|
SiteMinder Java SDK r12.51 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.netegrity.sdk.dmsapi.SmDmsObject
public class SmDmsObject
Class SmDmsObject is the root of the DMS API object hierarchy.
| Field Summary | |
|---|---|
static int |
DMSOBJECT_CLASS_DIRECTORY
The DMS object class identifier is a directory. |
static int |
DMSOBJECT_CLASS_GROUP
The DMS object class identifier is a group. |
static int |
DMSOBJECT_CLASS_ORGANIZATION
The DMS object class identifier is an organization. |
static int |
DMSOBJECT_CLASS_ROLE
The DMS object class identifier is a role. |
static int |
DMSOBJECT_CLASS_UNKNOWN
The DMS object class identifier is unknown. |
static int |
DMSOBJECT_CLASS_USER
The DMS object class identifier is a user. |
| Method Summary | |
|---|---|
SmApiResult |
addObject()
Adds the DMS object to the directory. |
SmApiResult |
addObjectNoAdminCheck()
|
SmApiResult |
addToGroup(SmDmsGroup group)
Adds the current object to a group. |
SmApiResult |
addToGroupNoAdminCheck(SmDmsGroup group)
|
void |
clearAttributes()
Clears the attributes of the current object. |
SmApiResult |
deleteObject()
Deletes the DMS object from the directory. |
SmApiResult |
deleteObjectNoAdminCheck()
|
SmApiSession |
getApiSession()
Gets the API session associated with the current object. |
java.lang.Object |
getAttribute(java.lang.String attributeName)
Gets the value of the specified attribute name. |
java.util.Hashtable |
getAttributes()
Gets the attributes of the current object. |
int |
getClassId()
Gets the object class identifier of the current object. |
SmDmsConfig |
getDmsConfig()
Gets the DMS configuration object. |
java.lang.String |
getDn()
Gets the distinguished name of the current object. |
SmApiResult |
getGroups(SmDmsCursor cursorObj,
java.util.Vector attrNames,
java.util.Vector groups,
boolean recursive,
int direction)
Gets a list of groups that the object belongs to, and also gets information about the group attributes specified in attrNames. |
SmApiResult |
getGroups(java.util.Vector groups,
boolean recursive)
Gets a list of groups that this object belongs to--for example, all groups that a given user is a member of. |
SmApiResult |
getGroupsNoAdminCheck(SmDmsCursor cursorObj,
java.util.Vector attrNames,
java.util.Vector groups,
boolean recursive,
int direction)
|
SmApiResult |
getGroupsNoAdminCheck(java.util.Vector groups,
boolean recursive)
|
SmApiResult |
getObject()
Gets the current object's attributes from the directory. |
SmApiResult |
getObject(java.util.Vector attrNames)
Gets a subset of the current object's attributes from the directory. |
SmApiResult |
getObjectNoAdminCheck()
|
SmApiResult |
getObjectNoAdminCheck(java.util.Vector attrNames)
|
java.lang.String |
getOrganizationDn()
Gets the organization distinguished name of the current object. |
SmRealm |
getRealm()
Gets the SiteMinder realm associated with the current object. |
SmUserDirectory |
getUserDirectory()
Gets the SiteMinder user directory associated with the current object. |
int |
getVersion()
Gets the DMS API version compliance level. |
boolean |
isActiveDir()
Confirms the type of processing directory as Active directory. |
SmApiResult |
modifyObject()
Modifies the current object's attributes in the directory. |
SmApiResult |
modifyObjectClass(java.util.Vector objectClass)
Modifies the current object's object class. |
SmApiResult |
modifyObjectClassNoAdminCheck(java.util.Vector objectClass)
|
SmApiResult |
modifyObjectNoAdminCheck()
|
SmDmsObject |
newDmsObject(int nClassId,
java.lang.String Dn)
Creates a new DMS object for the specified object class identifier and DN. |
void |
readAttributes(java.util.Hashtable attributes)
Copies the specified attributes to the current object. |
SmApiResult |
removeFromGroup(SmDmsGroup group)
Removes the current object from a group. |
SmApiResult |
removeFromGroupNoAdminCheck(SmDmsGroup group)
|
void |
setActiveDir()
Sets the Directory type as Active directory. |
void |
setAttribute(java.lang.String attributeName,
java.lang.Object attributeValue)
Adds an attribute name-value pair. |
void |
setAttributes(java.util.Hashtable attributes)
Sets the attributes for the current object. |
void |
setClassId(int classId)
Sets the object class identifier. |
java.lang.String |
toString()
Returns the distinguished name of the current object. |
void |
writeAttributes(java.util.Hashtable attributes)
Copies the attribute of the current object to the specified attribute hashtable. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int DMSOBJECT_CLASS_UNKNOWN
SmDmsObject
object that is not associated with a subclass object type
(directory, organization, group, role, or user).
public static final int DMSOBJECT_CLASS_DIRECTORY
public static final int DMSOBJECT_CLASS_ORGANIZATION
public static final int DMSOBJECT_CLASS_GROUP
public static final int DMSOBJECT_CLASS_USER
public static final int DMSOBJECT_CLASS_ROLE
| Method Detail |
|---|
public SmDmsObject newDmsObject(int nClassId,
java.lang.String Dn)
nClassId - Object Class identifier defined in the SmDmsObject class.Dn - Distinguished name of the DMS object.public SmApiSession getApiSession()
public SmRealm getRealm()
Gets the SiteMinder realm associated with the current object.
When this method is called for a directory context, the realm object will contain a null OID.
public SmUserDirectory getUserDirectory()
public SmDmsConfig getDmsConfig()
SmDmsConfig object.public int getClassId()
public void setClassId(int classId)
Sets the object class identifier.
If you are creating a generic directory, organization, group, role, or user object withSmDmsObject, specify the type of
object by calling setClassId() before you call
addObject(). If you are creating a specific object using
a subclass (such as SmDmsUser), setClassId()
is set automatically.SmDmsObject object that is not
associated with a subclass object type (directory, organization, group,
role, or user), set classId to
DMSOBJECT_CLASS_UNKNOWN.
classId - The new object class identifier. Class identifier constants
appear in this class prefixed with DMSOBJECT_CLASS_.public java.lang.String getDn()
public java.lang.String getOrganizationDn()
public java.util.Hashtable getAttributes()
java.util.Hashtablepublic void setAttributes(java.util.Hashtable attributes)
Sets the attributes for the current object.
The keys of the hashtable should be strings. The values
associated with the keys can be any object. The SDK
automatically puts the object into string format by calling
toString() on the object. If the object is a
Vector, the SDK calls toString()
on each element of the object.
attributes - The new attributes for the current object.public void clearAttributes()
public void setAttribute(java.lang.String attributeName,
java.lang.Object attributeValue)
Adds an attribute name-value pair.
This method maps the specified key to the specified value
in this hashtable. attributeName
should be a string. attributeValue can be
any object. The SDK automatically puts the object into string
format by calling toString() on the object.
If the object is a Vector, the SDK calls toString()
on each element of the object.
Neither a key nor its value can be null.
You can set multiple values for an attribute in the following circumstances:
objectclass attribute.
You can set multile values for an attribute in either of these ways:
objectclass with the values top and
organizationalunit:
group.setAttribute("objectclass","top^organizationalunit");
objectclass with the same two values as above:
Vector objectclass = new Vector();
objectclass.add("top");
objectclass.add("organizationalunit");
group.setAttribute("objectclass",objectclass);
attributeName - The name of the attribute.attributeValue - The attribute value.public java.lang.Object getAttribute(java.lang.String attributeName)
attributeName - The name of the attribute.
public void readAttributes(java.util.Hashtable attributes)
attributes - The new attributes.public void writeAttributes(java.util.Hashtable attributes)
attributes - The destination attribute hashtable.public java.lang.String toString()
toString in class java.lang.Object
public SmApiResult getObject()
throws SmApiException
Gets the current object's attributes from the directory.
To retrieve a subset of the object's attributes, callgetObject(Vector).
modifyObject().
SmApiException
public SmApiResult getObjectNoAdminCheck()
throws SmApiException
SmApiException
public SmApiResult getObject(java.util.Vector attrNames)
throws SmApiException
Gets a subset of the current object's attributes from the directory.
To retrieve all of the object's attributes, callgetObject().
attrNames - The attributes to retrieve.
SmApiException
public SmApiResult getObjectNoAdminCheck(java.util.Vector attrNames)
throws SmApiException
SmApiException
public SmApiResult addObject()
throws SmApiException
objectclass attribute, you can assign multiple values
to the attribute. For information, see setAttribute().SmDmsObject, specify the type of
object by calling setClassId() before you call
addObject(). If you are creating a specific object using
a subclass (such as SmDmsUser), setClassId()
is set automatically.
SmApiException
public SmApiResult addObjectNoAdminCheck()
throws SmApiException
SmApiException
public SmApiResult deleteObject()
throws SmApiException
Deletes the DMS object from the directory. This method deletes the entry from the directory.
This method requires an organization administrator session or higher.
SmApiException
public SmApiResult deleteObjectNoAdminCheck()
throws SmApiException
SmApiException
public SmApiResult modifyObject()
throws SmApiException
Modifies the current object's attributes in the directory.
When you modify an object, you can assign multiple values to any of the object's attributes. For information, seesetAttribute().getObject() -- for example:
SmDmsUser user = org.newUser(USER_DN1);
result = user.getObject();
user.setAttribute("l", "Boston");
result = user.modifyObject();
This method requires an end user session
or higher.
SmApiException
public SmApiResult modifyObjectNoAdminCheck()
throws SmApiException
SmApiException
public SmApiResult modifyObjectClass(java.util.Vector objectClass)
throws SmApiException
Modifies the current object's object class.
You can assign multiple values to the object class in a single call tomodifyObjectClass(). To do so, you can either
pass in a string, with each value within the string delimited by
a carat (^) character, or you can pass in a vector of values. For
more information, see setAttribute().
objectClass - Vector containing new object classes (String).
SmApiException
public SmApiResult modifyObjectClassNoAdminCheck(java.util.Vector objectClass)
throws SmApiException
SmApiException
public SmApiResult addToGroup(SmDmsGroup group)
throws SmApiException
Adds the current object to a group.
This method requires an organization administrator session or higher.
group - Group under which the object is to be added.
SmApiException
public SmApiResult addToGroupNoAdminCheck(SmDmsGroup group)
throws SmApiException
SmApiException
public SmApiResult removeFromGroup(SmDmsGroup group)
throws SmApiException
Removes the current object from a group.
This method requires an organization administrator session or higher.
group - Group under which the object is to be removed.
SmApiException
public SmApiResult removeFromGroupNoAdminCheck(SmDmsGroup group)
throws SmApiException
SmApiException
public SmApiResult getGroups(java.util.Vector groups,
boolean recursive)
throws SmApiException
getGroups(SmDmsCursor, Vector, Vector, int).
groups - When this method returns successfully, this output
parameter is filled with a Vector of strings containing
the distinguished names of groups.recursive - If true, the search is recursive. If
false, the search occurs on just one level.
SmApiException
public SmApiResult getGroupsNoAdminCheck(java.util.Vector groups,
boolean recursive)
throws SmApiException
SmApiException
public SmApiResult getGroups(SmDmsCursor cursorObj,
java.util.Vector attrNames,
java.util.Vector groups,
boolean recursive,
int direction)
throws SmApiException
attrNames.
For example, the method might return all the groups that a given user
is a member of, along with the values of selected attributes.
SmDmsCursor.
getGroups(Vector, boolean).
getGroups() is not supported with
ODBC databases. Use an
SmDmsOrganization.search...
method instead, or use the
getGroups(Vector, boolean)
version that retrieves group names but not attribute information.
cursorObj - The object containing sorting and paging information.attrNames - A Vector of strings containing
the names of the attributes to retrieve.groups - When this method returns successfully, this output
parameter is filled with a Vector of
SmDmsObject objects containing the
distinguished names of the retrieved groups
and the specified attribute information.recursive - If true, the search is recursive. If
false, the search occurs on just one level.direction - The search direction. One of the following:
SmDmsSearch.Forward
SmDmsSearch.Back
SmDmsSearch.Refresh
SmDmsSearch.Reset
SmApiException
public SmApiResult getGroupsNoAdminCheck(SmDmsCursor cursorObj,
java.util.Vector attrNames,
java.util.Vector groups,
boolean recursive,
int direction)
throws SmApiException
SmApiExceptionpublic int getVersion()
Gets the DMS API version compliance level.
public boolean isActiveDir()
Confirms the type of processing directory as Active directory.
public void setActiveDir()
Sets the Directory type as Active directory.
For Active Directory to work properly dmsobject should call setActivedir before calling getAttribute , ReadAtributes, writeAttributes & copyAttributes methods.
|
Java SDK r12.51 Mon 04/08/2013 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||