on 05-21-2008 9:25 AM
Hi Gurus,
what is Iuser?
what is the use of it?
Thanks in Advance,
Dharani
Hi
IUserfactory provides means to instantiate user objects,create users,delete users ,search for users based on different criteria.
Acccess to user factory can be obtained using following packages
import com.sap.security.api;
IuserFactory userfact=UMFactory.getUserFactory();
Methods are provided to instantiateuser objects given a login id
IUserFactory userfact=UMFactory.getUserFactory();
getUserFactory().getUser(String uniqueid);
get the user with login id
getUserFactory.getUser(string uniqueid,AttributeList attrlist)
The IUser object contains most the information that you probably need regarding a user. Information about the name of the user, their unique ID, LDAP attributes,display name, role membership, etc are available from the IUser object.
Thanks,
Tulasi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Dharani,
IUser is a public interface under com.sap.security.api package and it is present in com.sap.security.api.jar file. This jar file you can get if you have installed NWDS (Netweaver development studio).
This interface provides read-access to the user's attributes, and offers basic support for authorization checking. Implementations of this interface must make sure that all get-methods with a return type of String, e.g. getFax(), getCompanyId() etc. return null if that attribute either does not exist or has a null value in the user store. This does NOT apply to the generic getAttribute...() methods.
This interface mainly delas with user details, to get all users, to get user info, etc.
Refer to following snippet of java code:
try {
IUserFactory uf = UMFactory.getUserFactory();
ISearchResult result = uf.getUniqueIDs();
while (result.hasNext()) {
String uniqueid = result.next().toString();
IUser user = uf.getUser(uniqueid);
String userid = user.getUniqueName();
//response.write("<BR>"+ uniqueid + " "+ user + " "+ userid+" <BR>");
response.write("<BR>"+ userid+" <BR>");
}
} catch (UMException um) {
response.write("In Catch : <BR>");
response.write("excp is " + um.toString());
}
also refer to following links for more clear understanding:-
https://www.sdn.sap.com/irj/sdn/thread?messageID=5428797#5428797
https://www.sdn.sap.com/irj/sdn/thread?messageID=5312444#5312444
Hope this solves your query...
Regards,
Yogesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hiii Dharani..
use this link , it contain lot off information http://help.sap.com/javadocs/NW04S/current/se/com/sap/security/api/package-summary.html.
Give rewards if usefull for u.
Regards
Mayank saxena.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.