Package com.iplanet.ums
Class UMSObject
- java.lang.Object
-
- com.iplanet.ums.UMSObject
-
public class UMSObject extends Object
UMSObject class exposes public methods that serve as the entry points to the UMS SDK. This class is used to replace the public static methods that are previously available in Session class.// Previous access class with authenticated context // UMSObject.getObject( Context ctx, String guid ); UMSObject.removeObject( Context ctx, String guid ); UMSObject.logout( Context ctx ); // New API with the use of Principal interface that represents an // authenticated principal UMSObject.getObject( java.security.Principal principal, String guid ); UMSObject.removeObject(java.security.Principal principal, String guid);
-
-
Constructor Summary
Constructors Constructor Description UMSObject()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PersistentObjectgetObject(SSOToken token, Guid guid)Returns the persistent object of correct subclass, for the given id.static PersistentObjectgetObject(SSOToken token, Guid guid, String[] attrNames)Returns the persistent object of correct subclass, for the given ID.static PersistentObjectgetObject(Principal principal, Guid guid)static PersistentObjectgetObject(Principal principal, Guid guid, String[] attrNames)static PersistentObjectgetObjectHandle(SSOToken token, Guid guid)Return a PersistentObject given an authenticated token and guid.static voidremoveObject(SSOToken token, Guid guid)Removes an object identified by the given ID.
-
-
-
Field Detail
-
UMS
public static final String UMS
- See Also:
- Constant Field Values
-
ENTITY
public static final String ENTITY
- See Also:
- Constant Field Values
-
UTIL
public static final String UTIL
- See Also:
- Constant Field Values
-
-
Method Detail
-
getObject
public static PersistentObject getObject(SSOToken token, Guid guid) throws UMSException
Returns the persistent object of correct subclass, for the given id. The Java class to construct the persistent object is inferred from the default creation templates registered with the Template manager.- Parameters:
token- Authenticated principal's single sign on token.guid- GUID identification of the object to get.- Returns:
- the object read, all non operational attributes are read.
- Throws:
UMSException- if there is an error while instantiating the right type of object. In addition, it propagates any exception from the datalayer.
-
getObject
public static PersistentObject getObject(SSOToken token, Guid guid, String[] attrNames) throws UMSException
Returns the persistent object of correct subclass, for the given ID. The Java class to construct the persistent object is inferred from the default creation templates registered with the Template manager.- Parameters:
token- Authenticated principal's single sign on token.guid- GUID identification of the object to getattrNames- attribute names to read.- Returns:
- the object read.
- Throws:
UMSException- if there is an error while instantiating the right type of object. In addition, it propagates any exception from the datalayer.
-
removeObject
public static void removeObject(SSOToken token, Guid guid) throws EntryNotFoundException, UMSException
Removes an object identified by the given ID.- Parameters:
token- Authenticated principal's single sign on token.guid- GUID identification of the object to be removed.- Throws:
EntryNotFoundException- if the entry is not found.UMSException- if there is an error while removing the object from persistence store
-
getObject
public static PersistentObject getObject(Principal principal, Guid guid) throws UMSException
- Throws:
UMSException
-
getObject
public static PersistentObject getObject(Principal principal, Guid guid, String[] attrNames) throws UMSException
- Throws:
UMSException
-
getObjectHandle
public static PersistentObject getObjectHandle(SSOToken token, Guid guid) throws UMSException
Return a PersistentObject given an authenticated token and guid. The validity of the returned PersistentObject can not be guaranteed since the object is created in memory, not instantiated from the persistent storage. Using the PersistentObject returned from this method may result exceptions in the later part of the application if the given guid is not valid or represents an entry that does not exist.- Parameters:
token- Valid and authenticated tokenguid- Globally unique identifier for the entity- Returns:
- the PersistentObject created in memory
- Throws:
UMSException- for failure to create the object
-
-