public interface IGroup extends IPrincipalSet
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.
Note: As this interface can be extended, this interface can be freely used, but must not be implemented.
BYTE_TYPE, CREATED_BY, DATASOURCE, DEFAULT_NAMESPACE, DEFAULT_RELATION_NAMESPACE, DESCRIPTION, DISPLAYNAME, LAST_MODIFIED_BY, PRINCIPAL_CREATION_DATE, PRINCIPAL_MODIFY_DATE, PRINCIPAL_RELATION_MEMBER_ATTRIBUTE, PRINCIPAL_RELATION_PARENT_ATTRIBUTE, STRING_TYPE, TRANSIENT_NAMESPACE, UNIQUE_NAME
Modifier and Type | Method and Description |
---|---|
boolean |
addGroupMember(String uniqueIdOfGroup)
Adds the specified group member to this group.
|
void |
addToGroup(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(String uniqueIdOfRole)
Assign this principal to the role identified by uniqueIdOfRole.
|
boolean |
addUserMember(String uniqueIdOfUser)
Adds the specified user member to the collection.
|
String |
getDescription()
Returns the description of this principal.
|
Iterator |
getGroupMembers(boolean getChildMembers)
Returns principals of type group belonging to this group.
|
Iterator |
getParentGroups(boolean recursive)
Gets the list of all parent groups.
|
Iterator |
getRoles(boolean recursive)
Gets the list of all assigned roles of this group.
|
String |
getUniqueName()
Get uniqueName of this
IGroup object. |
Iterator |
getUserMembers(boolean getChildMembers)
Returns principals of type user belonging to this group.
|
boolean |
isGroupMember(String uniqueIdOfGroup,
boolean checkParents)
Returns
true if the passed principal of type groups is a
member of this group. |
boolean |
isMemberOfGroup(String uniqueIdOfGroup,
boolean recursive)
Checks if the principal belongs to the passed parentGroup identified by
uniqueIdOfGroup . |
boolean |
isMemberOfRole(String uniqueIdOfRole,
boolean recursive)
Checks if the principal belongs to the passed role identified by
uniqueIdOfRole . |
boolean |
isUserMember(String uniqueIdOfUser,
boolean checkParents)
Returns
true if the passed principal of type user is a
member of this group. |
void |
removeFromGroup(String uniqueIdOfGroup)
Unassign this group from the parent-group identified by uniqueIdOfGroup.
|
void |
removeFromRole(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(String uniqueIdOfGroup)
Remove the specified group member from the collection.
|
boolean |
removeUserMember(String uniqueIdOfUser)
Remove the specified user member from the group.
|
boolean |
setDescription(String description)
Sets the description of this principal.
|
addMember, getMembers, isMember, removeMember
addAttributeValue, commit, isModified, removeAttributeValue, rollback, save, setAttribute, setBinaryAttribute, setDisplayName
created, equals, getAttribute, getAttributeNames, getAttributeNamespaces, getAttributeType, getBinaryAttribute, getDisplayName, getMessages, getParents, getUniqueID, hashCode, isExistenceChecked, isMutable, lastModified, refresh
Iterator getUserMembers(boolean getChildMembers)
Depending on the parameter getChildMembers
this method will
perform a recursive search, that is children, grandchildren ... of this
group are checked and all users of this group and its subgroups are
returned.
Note: Recursive searching for users can lead to performance
degradation if you have a large user/group hierarchy. For more
information about recursive searching see
IPrincipal.getParents(String[], boolean)
.
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.Iterator getGroupMembers(boolean getChildMembers)
Depending on the parameter getChildMembers
this method will
perform a recursive search, that is children, grandchildren ... of this
group are checked and all groups of this group and its subgroups are
returned.
Note: Recursive searching for groups can lead to performance
degradation if you have a large group hierarchy. For more information
about recursive searching see
IPrincipal.getParents(String[], boolean)
.
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.boolean isUserMember(String uniqueIdOfUser, boolean checkParents)
true
if the passed principal of type user is a
member of this group.
Note: Recursive check for user membership can lead to performance
degradation if you have a large user/group hierarchy. For more
information about recursive searching see
IPrincipal.getParents(String[], boolean)
.
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 groupsboolean isGroupMember(String uniqueIdOfGroup, boolean checkParents)
true
if the passed principal of type groups is a
member of this group.
Note: Recursive check for group membership can lead to performance
degradation if you have a large group hierarchy. For more information
about recursive searching see
IPrincipal.getParents(String[], boolean)
.
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 groupsboolean addUserMember(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 occursboolean addGroupMember(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 occursboolean removeUserMember(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 occursboolean removeGroupMember(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 occursIterator getRoles(boolean recursive)
recursive
is set to true
the search
will be performed recursively on all groups, parent groups, grand parent
groups, and etc. The result will include all direct and indirect role
assignments. If recursive
is false
the result
will include only direct role assignments.
Note: Recursive searching for roles can lead to performance
degradation if you have a large group/role hierarchy. For more
information about recursive searching see
IPrincipal.getParents(String[], boolean)
.
recursive
- if true
returns all directly assigned roles
and also the roles which are assigned to parent groups
(indirectly assigned roles).Iterator getParentGroups(boolean recursive)
recursive
is set to true
the search will be
performed recursively on all groups, parent groups, grand parent groups,
and etc. The result will include all direct and indirect group
assignments. If recursive
is false
the result
will include only direct group assignments.
Note: Recursive searching for groups can lead to performance
degradation if you have a large group hierarchy. For more information
about recursive searching see
IPrincipal.getParents(String[], boolean)
.
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.boolean isMemberOfRole(String uniqueIdOfRole, boolean recursive)
uniqueIdOfRole
.
Note: Recursive check for role membership can lead to performance
degradation if you have a large group/role hierarchy. For more
information about recursive searching see
IPrincipal.getParents(String[], boolean)
.
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 roleboolean isMemberOfGroup(String uniqueIdOfGroup, boolean recursive)
uniqueIdOfGroup
.
Note: Recursive check for group membership can lead to performance
degradation if you have a large group/role hierarchy. For more
information about recursive searching see
IPrincipal.getParents(String[], boolean)
.
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.true
if this group is a member of the group
identified by uniqueIdOfGroup
.void addToGroup(String uniqueIdOfGroup) throws UMException
IPrincipalMaint.commit()
or to roll them back (i.e.
discard them) if appropriate.uniqueIdOfGroup
- uniqueIdOfGroup of the parent groupUMException
- if group assignment failsvoid removeFromGroup(String uniqueIdOfGroup) throws UMException
IPrincipalMaint.commit()
or to roll them back (i.e.
discard them) if appropriate.uniqueIdOfGroup
- of the parent groupUMException
- if group unassignment failsvoid addToRole(String uniqueIdOfRole) throws UMException
IPrincipalMaint.commit()
or to roll them back (i.e.
discard them) if appropriate.uniqueIdOfRole
- id of the roleUMException
- if group to role assignment failsvoid removeFromRole(String uniqueIdOfRole) throws UMException
IPrincipalMaint.commit()
or to roll them back (i.e.
discard them) if appropriate.uniqueIdOfRole
- of the roleUMException
- if group unassignment failsString getDescription()
null
: if
no description existsboolean setDescription(String description) throws UMException
IPrincipalMaint.commit()
or to roll them back (i.e.
discard them) if appropriate.description
- the description to be set to the principalUMException
- if the description could not be setString 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.
Access Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] CORE-TOOLS
|
[sap.com]
|
default
|
BC-JAS
|
[sap.com] ENGFACADE
|
[sap.com] tc/je/usermanagement/api
|
api
|
BC-JAS-SEC
|
[sap.com] ENGINEAPI
|
[sap.com]
|
-
|
BC-JAS-SEC-UME
|
[sap.com] ENGINEAPI
|
[sap.com]
|
default
|
BC-JAS-SEC-UME
|
Copyright 2018 SAP AG Complete Copyright Notice