|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface provides read and write access to principals of type group.
If you want to keep and persist an identifier as a
reference to an instance of IGroup you must use
method IPrincipal.getUniqueID().
As this identifier contains internal information
and is usually not readable, it should not be used in end user interfaces.
Use methods IPrincipal.getDisplayName() or
getUniqueName()
in order to display
attributes with a nice name for user interfaces.
| Field Summary | |
static java.lang.String |
VERSIONSTRING
|
| Fields inherited from interface com.sap.security.api.IPrincipal |
BYTE_TYPE, DEFAULT_NAMESPACE, DEFAULT_RELATION_NAMESPACE, DESCRIPTION, DISPLAYNAME, PRINCIPAL_CREATION_DATE, PRINCIPAL_MODIFY_DATE, PRINCIPAL_RELATION_MEMBER_ATTRIBUTE, PRINCIPAL_RELATION_PARENT_ATTRIBUTE, STRING_TYPE, TRANSIENT_NAMESPACE, UNIQUE_NAME |
| Method Summary | |
boolean |
addGroupMember(java.lang.String uniqueIdOfGroup)
Adds the specified group member to this group. |
void |
addToGroup(java.lang.String uniqueIdOfGroup)
Assign this principal to the parent-group identified by uniqueIdOfGroup These changes will only take effect if you commit these changes to the group store IPrincipalMaint.commit() or to roll them
back (i.e. |
void |
addToRole(java.lang.String uniqueIdOfRole)
Assign this principal to the role identified by uniqueIdOfRole. |
boolean |
addUserMember(java.lang.String uniqueIdOfUser)
Adds the specified user member to the collection. |
java.lang.String |
getDescription()
Returns the description of this principal. |
java.util.Iterator |
getGroupMembers(boolean getChildMembers)
Returns principals of type group belonging to this group. |
java.util.Iterator |
getParentGroups(boolean recursive)
Gets the list of all parent groups including parents, grandparents, ... |
java.util.Iterator |
getRoles(boolean recursive)
Gets the list of all assigned roles of this principal including parent groups, grandparent groups,... |
java.lang.String |
getUniqueName()
Get uniqueName of this IGroup object. |
java.util.Iterator |
getUserMembers(boolean getChildMembers)
Returns principals of type user belonging to this group. |
boolean |
isGroupMember(java.lang.String uniqueIdOfGroup,
boolean checkParents)
Returns true if the passed principal of type groups
is a member of this group. |
boolean |
isMemberOfGroup(java.lang.String uniqueIdOfGroup,
boolean recursive)
Checks if the principal belongs to the passed parentGroup identified by uniqueIdOfGroup. |
boolean |
isMemberOfRole(java.lang.String uniqueIdOfRole,
boolean recursive)
Checks if the principal belongs to the passed role identified by uniqueIdOfRole. |
boolean |
isUserMember(java.lang.String uniqueIdOfUser,
boolean checkParents)
Returns true if the passed principal of type user
is a member of this group. |
void |
removeFromGroup(java.lang.String uniqueIdOfGroup)
Unassign this group from the parent-group identified by uniqueIdOfGroup. |
void |
removeFromRole(java.lang.String uniqueIdOfRole)
Unassign this principal from role identified by uniqueIdOfRole These changes will only take effect if you commit these changes to the group store IPrincipalMaint.commit() or to roll them
back (i.e. |
boolean |
removeGroupMember(java.lang.String uniqueIdOfGroup)
Remove the specified group member from the collection. |
boolean |
removeUserMember(java.lang.String uniqueIdOfUser)
Remove the specified user member from the group. |
boolean |
setDescription(java.lang.String description)
Sets the description of this principal. |
| Methods inherited from interface com.sap.security.api.IPrincipalSet |
addMember, getMembers, isMember, removeMember |
| Methods inherited from interface com.sap.security.api.IPrincipalMaint |
commit, isModified, rollback, save, setAttribute, setBinaryAttribute, setDisplayName |
| Methods inherited from interface com.sap.security.api.IPrincipal |
created, equals, getAttribute, getAttributeNames, getAttributeNamespaces, getAttributeType, getBinaryAttribute, getDisplayName, getParents, getUniqueID, hashCode, isExistenceChecked, isMutable, lastModified, refresh |
| Field Detail |
public static final java.lang.String VERSIONSTRING
| Method Detail |
public java.util.Iterator getUserMembers(boolean getChildMembers)
getChildMembers - if set to true,
this method does a recursive search, that is children, grandchildren ...
of this group are checked and all users of this group and its subgroups
are returned. If this parameter is set to false only user members
of this group are returned.public java.util.Iterator getGroupMembers(boolean getChildMembers)
getChildMembers - if set to true,
this method does a recursive search, that is children, grandchildren ...
of this group are checked and all groups which are member
of this group and its subgroups
are returned. If this parameter is set to false only group members
of this group are returned.
public boolean isUserMember(java.lang.String uniqueIdOfUser,
boolean checkParents)
true if the passed principal of type user
is a member of this group.uniqueIdOfUser - - the uniqueIdOfUser which should be checked.
uniqueIdOfUser must be a uniqueID which identifies a user object.checkParents - - recursive search is done, that is parents, grandparents, ...
of this group are checked if this user is a member of this or its parent groups
public boolean isGroupMember(java.lang.String uniqueIdOfGroup,
boolean checkParents)
true if the passed principal of type groups
is a member of this group.uniqueIdOfGroup - - the uniqueIdOfGroup which should be checked.
uniqueIdOfGroup must be a uniqueID which identifies a group object.checkParents - - recursive search is done, that is parents, grandparents, ...
of this group are checked if this group is a member of this or its parent groups
public boolean addUserMember(java.lang.String uniqueIdOfUser)
throws UMException
uniqueIdOfUser - - the uniqueIdOfUser to add to this collection.true if the member was successfully added
These changes will only take effect if you commit these
changes to the group store IPrincipalMaint.commit() or to roll them
back (i.e. discard them) if appropriate.UMException - if an error occurs
public boolean addGroupMember(java.lang.String uniqueIdOfGroup)
throws UMException
uniqueIdOfGroup - - the uniqueIdOfGroup to add to this group.true if the member was successfully added
These changes will only take effect if you commit these
changes to the group store IPrincipalMaint.commit() or to roll them
back (i.e. discard them) if appropriate.UMException - if an error occurs
public boolean removeUserMember(java.lang.String uniqueIdOfUser)
throws UMException
uniqueIdOfUser - - the uniqueIdOfUser to remove from this grouptrue if the member was successfully removed
These changes will only take effect if you commit these
changes to the group store IPrincipalMaint.commit() or to roll them
back (i.e. discard them) if appropriate.UMException - if an error occurs
public boolean removeGroupMember(java.lang.String uniqueIdOfGroup)
throws UMException
uniqueIdOfGroup - - the uniqueIdOfGroup to remove from this collection.true if the member was successfully removed.
These changes will only take effect if you commit these
changes to the group store IPrincipalMaint.commit() or to roll them
back (i.e. discard them) if appropriate.UMException - if an error occurspublic java.util.Iterator getRoles(boolean recursive)
recursive - if true returns all directly assigned roles
and also the roles
which are assigned to parent groups (indirectly assigned roles).public java.util.Iterator getParentGroups(boolean recursive)
recursive - if true returns all parent groups of this group.
If this parameter is set to false only the groups are returned
which have a member of this group.
public boolean isMemberOfRole(java.lang.String uniqueIdOfRole,
boolean recursive)
uniqueIdOfRole - of role which should be checkedrecursive - - a recursive search is done if this parameter
is set to true. If this group is member of a
group which is assigned to role identified by uniqueIdOfRole,
true is returned. If this parameter is set to
false it is only checked if this group is directly
assigned to the role.true if this group is directly or indirectly
(via group membership) assigned to role identified by uniqueIdOfRole.
false if this group is not assigned to this role
public boolean isMemberOfGroup(java.lang.String uniqueIdOfGroup,
boolean recursive)
uniqueIdOfGroup - the ID of the collectionrecursive - - a recursive search is done if this parameter
is set to true. If this group is member of a
group which is a member of the group identified by uniqueIdOfGroup,
true is returned. If this parameter is set to
false it is only checked if this group is a direct
member of this group.
returns true if this group is a member of the group
identified by uniqueIdOfGroup.
public void addToGroup(java.lang.String uniqueIdOfGroup)
throws UMException
IPrincipalMaint.commit() or to roll them
back (i.e. discard them) if appropriate.uniqueIdOfGroup - uniqueIdOfGroup of the parent groupUMException -
public void removeFromGroup(java.lang.String uniqueIdOfGroup)
throws UMException
IPrincipalMaint.commit() or to roll them
back (i.e. discard them) if appropriate.String - uniqueIdOfGroup of the parent groupUMException -
public void addToRole(java.lang.String uniqueIdOfRole)
throws UMException
IPrincipalMaint.commit() or to roll them
back (i.e. discard them) if appropriate.String - uniqueIdOfRole id of the roleUMException -
public void removeFromRole(java.lang.String uniqueIdOfRole)
throws UMException
IPrincipalMaint.commit() or to roll them
back (i.e. discard them) if appropriate.uniqueIdOfRole - of the roleUMException - public java.lang.String getDescription()
null : if no description exists
public boolean setDescription(java.lang.String description)
throws UMException
IPrincipalMaint.commit() or to roll them
back (i.e. discard them) if appropriate.UMException - if the description could not be setpublic java.lang.String getUniqueName()
IGroup object.
A (usually) unique readable name of an instance of IGroup.
Note: Depending on the persistence layer
it is not guaranteed that this name
is unique. The uniqueName may change over time. Thus, do not persist the
uniqueName. Always use the unique identifier (UniqueID) of
IPrincipal.getUniqueID()
for this purpose.
Use the uniqueName for searching and displaying in user interfaces.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||