public interface IGroupFactory extends IConfigurable
Note: As this interface can be extended, this interface can be freely used, but must not be implemented.
Modifier and Type | Field and Description |
---|---|
static String |
ANONYMOUS_USERS
Deprecated.
use
ANONYMOUS_USERS_UNIQUEID instead |
static String |
ANONYMOUS_USERS_UNIQUEID
Constant used to access build-in group Anonymous Users with uniqueId
|
static String |
AUTHENTICATED_USERS
Deprecated.
use
AUTHENTICATED_USERS_UNIQUEID instead |
static String |
AUTHENTICATED_USERS_UNIQUEID
Constant used to access build-in group Authenticated Users with uniqueId
|
static String |
EVERYONE
Deprecated.
use
EVERYONE_UNIQUEID instead |
static String |
EVERYONE_UNIQUEID
Constant used to access build-in group Everyone with uniqueId
|
Modifier and Type | Method and Description |
---|---|
void |
addGroupToParent(String uniqueIdOfGroup,
String uniqueIdOfParentGroup)
Assign group with
uniqueIdOfGroup to parent group with
uniqueIdOfParentGroup . |
void |
addUserToGroup(String uniqueIdOfUser,
String uniqueIdOfGroup)
Assign user with
uniqueIdOfUser to group with
uniqueIdOfGroup . |
void |
deleteGroup(String uniqueID)
Delete a group from the data store.
|
String[] |
getChildGroups(String uniqueIdOfGroup,
boolean recursive)
Returns principals of type group belonging to this groupId.
|
IGroup |
getGroup(String uniqueID)
Gets the group object with the given unique ID.
|
IGroup |
getGroup(String uniqueID,
AttributeList populateAttributes)
Gets the group object with the given unique ID and populates the
attributes which are defined in populateAttributes
Note: This operation will search for the group only on the
responsible datasource for this principal.
|
IGroup |
getGroupByUniqueName(String uniqueName)
Gets the group object with the given uniqueName
Note: If you use this method be prepared to get an exception if
multiple objects with the same name are found.
|
IGroup[] |
getGroups(String[] uniqueIDs)
Gets the group objects for multiple unique IDs
Note: This operation will search for the groups only on the
responsible datasource for the given principal.
|
IGroup[] |
getGroups(String[] uniqueIDs,
AttributeList populateAttributes)
Gets the group objects for multiple unique IDs and populates the
attributes which are defined in populateAttributes
Note: This operation will search for the groups only on the
responsible datasource for the given principal.
|
IGroupSearchFilter |
getGroupSearchFilter()
Returns an
IGroupSearchFilter object to be used to specify
query attributes
IGroupSearchFilter only contains attributes which will be
queried |
IGroup |
getMutableGroup(String uniqueID)
Gets the group object identified by
uniqueID which can be
modified
Note: This operation will search for the group only on the
responsible datasource for this principal. |
String[] |
getParentGroups(String uniqueIdOfGroup,
boolean recursive)
Gets the list of parent groups of group which is identified by
uniqueIdOfGroup . |
void |
invalidateCacheEntry(String uniqueid)
Removes the group object which has the specified
uniqueid
from the factory's cache. |
void |
invalidateCacheEntryByUniqueName(String uniqueName)
Removes the group object which has the specified unique name from the
factory's cache
Note: Use this method carefully, because calling it too often may
cause performance problems
|
IGroup |
newGroup(String uniqueName)
Creates a new, initially blank group object.
|
void |
registerListener(GroupListener groupListener,
int modifier)
This method allows to subscribe to a predefined eventName.
|
void |
registerListener(GroupListener groupListener,
int modifier,
boolean notifyAfterPhysicalCommitCompleted)
This methos allows to subscribe to a predefined eventName.
|
void |
removeGroupFromParent(String uniqueIdOfGroup,
String uniqueIdOfParentGroup)
Unassign group with
uniqueIdOfGroup from parent group with
uniqueIdOfParentGroup . |
void |
removeUserFromGroup(String uniqueIdOfUser,
String uniqueIdOfGroup)
Unassign user with
uniqueIdOfUser from group with
uniqueIdOfGroup . |
ISearchResult |
searchGroups(IGroupSearchFilter filter)
Search for groups in the group store which match the criteria specified
in the given
filter . |
void |
unregisterListener(GroupListener groupListener)
This method unsubscribes a receiver from a previously subscribed event.
|
initialize
static final String EVERYONE
EVERYONE_UNIQUEID
insteadstatic final String EVERYONE_UNIQUEID
static final String AUTHENTICATED_USERS
AUTHENTICATED_USERS_UNIQUEID
insteadstatic final String AUTHENTICATED_USERS_UNIQUEID
static final String ANONYMOUS_USERS
ANONYMOUS_USERS_UNIQUEID
insteadstatic final String ANONYMOUS_USERS_UNIQUEID
IGroup getGroup(String uniqueID) throws UMException
Note: This operation will search for the group only on the responsible datasource for this principal.
uniqueID
- of groupUMException
- if no group with the given unique ID existsIGroup getGroup(String uniqueID, AttributeList populateAttributes) throws UMException
Note: This operation will search for the group only on the responsible datasource for this principal.
uniqueID
- of grouppopulateAttributes
- AttributeList
UMException
- if no group with the given unique ID existsIGroup newGroup(String uniqueName) throws UMException
IPrincipalMaint.commit()
.uniqueName
- of new group Note: This name has to be unique for ALL
data storesGroupAlreadyExistsException
- if group with uniqueName already
existsUMException
IGroup getGroupByUniqueName(String uniqueName) throws UMException
Note: If you use this method be prepared to get an exception if multiple objects with the same name are found.
Note: This operation will search for a group with the given unique
name on all datasources that are available. The execution time is slower
then method getGroup(String)
.
uniqueName
- of groupNoSuchGroupException
- if no group with the given uniqueName
existsUMException
- if given unique name is not uniquevoid deleteGroup(String uniqueID) throws UMException
Note:Deletes also all direct group and role assignments of this group.
uniqueID
- of group which should be deletedUMException
- if the group can't be deletedNoSuchGroupException
- if the group does not existISearchResult searchGroups(IGroupSearchFilter filter) throws UMException
filter
. In order to get a group search filter
use getGroupSearchFilter()
. You can define a search filter using
methods of class IGroupSearchFilter
.
Note: This operation can be time consuming, depending on the
filter
that is passed to the method.
filter
- defined to search for groupsISearchResult
UMException
- if the search failsIGroup[] getGroups(String[] uniqueIDs) throws NoSuchGroupException, UMException
Note: This operation will search for the groups only on the responsible datasource for the given principal.
uniqueIDs
- array of uniqueIDs which are used to get an array of
IGroup objects.NoSuchGroupException
- if one or more of the given unique IDs
are not assigned to any groupUMException
IGroup[] getGroups(String[] uniqueIDs, AttributeList populateAttributes) throws NoSuchGroupException, UMException
Note: This operation will search for the groups only on the responsible datasource for the given principal.
uniqueIDs
- array of uniqueIDs which are used to get an array of
IGroup objects.populateAttributes
- AttributeList
NoSuchGroupException
- if one or more of the given unique IDs
are not assigned to any groupUMException
IGroup getMutableGroup(String uniqueID) throws NoSuchGroupException, UMException
uniqueID
which can be
modified
Note: This operation will search for the group only on the responsible datasource for this principal.
uniqueID
- of group objectNoSuchGroupException
- if the unique ID does not existNoSuchGroupException
- if group with given uniqueID does not
exist.UMException
void registerListener(GroupListener groupListener, int modifier)
GroupListener
The caller has to provide a receiver object which
implements GroupListener
.groupListener
- object which implements interface GroupListenermodifier
- constant defined in GroupListener
void registerListener(GroupListener groupListener, int modifier, boolean notifyAfterPhysicalCommitCompleted)
GroupListener
The caller has to provide a receiver object which
implements GroupListener
.groupListener
- object which implements interface GroupListenermodifier
- constant defined in GroupListener
notifyAfterPhysicalCommitCompleted
- Allows callers when set to
false, to get a notification before the physical transaction
is completed in order to include their actions into the same
physical transaction.void unregisterListener(GroupListener groupListener)
groupListener
- object which implements interface GroupListenerString[] getParentGroups(String uniqueIdOfGroup, boolean recursive) throws UMException
uniqueIdOfGroup
.
Depending on the parameter recursive
this method will
perform a recursive search, that is parent, grandparent and ... 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)
.
uniqueIdOfGroup
- which should be usedrecursive
- if recursive set to true recursive parent groups are
checked including parents, grandparents, ...NoSuchGroupException
- if group with given uniqueIdOfGroup does
not exist.UMException
String[] getChildGroups(String uniqueIdOfGroup, boolean recursive) throws UMException
Depending on the parameter recursive
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)
.
uniqueIdOfGroup
- given uniqueId of group objectrecursive
- if recursive is set to true all children, grandchildren,
... will be returned. If false only children of
uniqueIdOfGroup are returned.NoSuchGroupException
- if one or more of the given unique IDsUMException
void addGroupToParent(String uniqueIdOfGroup, String uniqueIdOfParentGroup) throws UMException
uniqueIdOfGroup
to parent group with
uniqueIdOfParentGroup
. Implicitly a commit is done if you
call this method.uniqueIdOfGroup
- id of groupuniqueIdOfParentGroup
- id of the parent groupUMException
- if group cannot be added to parentvoid addUserToGroup(String uniqueIdOfUser, String uniqueIdOfGroup) throws UMException
uniqueIdOfUser
to group with
uniqueIdOfGroup
. Implicitly a commit is done if you call
this method.uniqueIdOfUser
- id of useruniqueIdOfGroup
- id of the groupUMException
- if user cannot be added to groupvoid removeGroupFromParent(String uniqueIdOfGroup, String uniqueIdOfParentGroup) throws UMException
uniqueIdOfGroup
from parent group with
uniqueIdOfParentGroup
. Implicitly a commit is done if you
call this method.uniqueIdOfGroup
- id of groupuniqueIdOfParentGroup
- id of the parent groupUMException
- if group cannot be removed from parent groupvoid removeUserFromGroup(String uniqueIdOfUser, String uniqueIdOfGroup) throws UMException
uniqueIdOfUser
from group with
uniqueIdOfGroup
. Implicitly a commit is done if you call
this method.uniqueIdOfUser
- id of useruniqueIdOfGroup
- id of the groupUMException
- if user cannot be removed from groupIGroupSearchFilter getGroupSearchFilter() throws UMException
IGroupSearchFilter
object to be used to specify
query attributes
IGroupSearchFilter
only contains attributes which will be
queried
UMException
- if filter cannot be providedvoid invalidateCacheEntryByUniqueName(String uniqueName) throws UMException
Note: Use this method carefully, because calling it too often may cause performance problems
uniqueName
- the uniqueName of the groupUMException
- if a error occursvoid invalidateCacheEntry(String uniqueid) throws UMException
uniqueid
from the factory's cache.
Note: Use this method carefully, because calling it too often may cause performance problems
uniqueid
- the uniqueid of the groupUMException
- if a error occursAccess 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