× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I think it's a little more work but it seems that you couldn't use
introspection on the User class to accomplish the same thing?

Gary

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of
Christopher J. Jewell
Sent: Tuesday, April 17, 2007 1:57 PM
To: JAVA400-L@xxxxxxxxxxxx
Subject: Anything to replace RUser in JTOpen?

I was a little disappointed just now to discover that
JTOpen's com.ibm.as400.resource.Resource package has been deprecated.

I want to be able to list (in a generic manner) the
attributes and values of any resource, and in particular that
of User Profiles. The following deprecated technique nicely
does the job and is (ironically for a deprecated
technique) upwardly compatible with future i5/OS releases
because it's all generic!

...
system = new AS400(system_name);
boolean error = true;
RUser resource = new RUser(system, user_name);

try {

// Get the attribute meta data.
ResourceMetaData[] attributeMetaData =
resource.getAttributeMetaData();

// Loop through all attributes and print the values.
for(int i = 0; i < attributeMetaData.length; ++i)
{
Object attributeID =
attributeMetaData[i].getID();
Object value =
resource.getAttributeValue(attributeID);
System.out.println("Attribute " +
attributeID + " = " + value);
}

} catch (ResourceException e) {

e.printStackTrace();
}

....

Unless I'm missing something, it seems to me that the
suggested alternative of (for user
information)com.ibm.as400.access.UserList and
com.ibm.as400.access.User is less flexible because
com.ibm.as400.access.User requires the programmer to have
knowledge of the property getters (one has to program
'getDescroption()', 'getDirectoryEntry()', etc.)

Any thoughts anyone/someone who has been through this path
already? Maybe there is some alternative that I'm not aware of?

Thanks in advance

Chris Jewell
mailto:jewellcj@xxxxxxxxxxxx


--
This is the Java Programming on and around the iSeries /
AS400 (JAVA400-L) mailing list To post a message email:
JAVA400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change
list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx Before posting,
please take a moment to review the archives at
http://archive.midrange.com/java400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.