public class CoreGroupManager extends GroupManagerImpl
GroupManager
.Constructor and Description |
---|
CoreGroupManager()
Constructor.
|
CoreGroupManager(FdkSession session) |
Modifier and Type | Method and Description |
---|---|
Item |
addUsers(long groupId,
NamedValue[] def,
AttributeRequest[] attributes)
Adds members and managers to an existing group.
|
Item |
createGroup(NamedValue[] def,
AttributeRequest[] attributes)
Creates a new group, returning an Item that represents it.
|
void |
deleteGroup(long groupId)
Deletes a group.
|
Item[] |
findGroups(NamedValue[] def,
AttributeRequest[] attributes)
Returns a set of GROUPs.
|
protected FdkSessionImpl |
getConnectedSession()
Return the web service session.
|
protected boolean |
isWebServiceCall()
Returns
true if the current call was made from a web services
client. |
protected NamedValue[] |
login(FdkCredential c,
NamedValue[] options,
AttributeRequest[] userAttributes)
Internal login method used by web services login managers.
|
void |
referenceTypes(TypeReference ref)
Dummy web service method to create a reference to data types used
in the web services to insure that they are defined in the WSDL.
|
Item |
removeUsers(long groupId,
NamedValue[] def,
AttributeRequest[] attributes)
Removes members and managers from an existing group.
|
Item |
updateGroup(long groupId,
NamedValue[] def,
AttributeRequest[] attributes)
Updates a group.
|
public CoreGroupManager()
public CoreGroupManager(FdkSession session)
public Item createGroup(NamedValue[] def, AttributeRequest[] attributes) throws FdkException
GroupManager
The returned Item will be of the type Group.
def
- Attributes of the new group. Valid attributes:
attributes
- Additional attributes on the new group to return.FdkException
- if the operation failspublic Item updateGroup(long groupId, NamedValue[] def, AttributeRequest[] attributes) throws FdkException
GroupManager
Note that it is preferable to update the member/manager lists using add/removeUsers unless it is impossible or expensive to calculate the necessary changes.
groupId
- The id of the group to update.def
- New attributes of the group. Valid attributes:
attributes
- Additional attributes on the group to return.FdkException
- if the operation failspublic Item addUsers(long groupId, NamedValue[] def, AttributeRequest[] attributes) throws FdkException
GroupManager
groupId
- The id of the group to update.def
- New attributes of the group. Valid attributes:
attributes
- Additional attributes on the group to return.FdkException
- if the operation failspublic Item removeUsers(long groupId, NamedValue[] def, AttributeRequest[] attributes) throws FdkException
GroupManager
groupId
- The id of the group to update.def
- New attributes of the group. Valid attributes:
attributes
- Additional attributes on the group to return.FdkException
- if the operation failspublic void deleteGroup(long groupId) throws FdkException
GroupManager
groupId
- The id of the group to delete.FdkException
- if the operation failspublic Item[] findGroups(NamedValue[] def, AttributeRequest[] attributes) throws FdkException
GroupManager
The NAME attribute is used as a name filter. Both database-style and
Windows-style wildcards -- e.g. _ ? % *
are accepted.
The HAS_MEMBER filter option will ensure that only groups where the specified USER or GROUP ID is a member of the group (or any sub-group, recursively). Managers of a group are considered members.
The HAS_MEMBER filter option cannot be specified if either the IS_MEMBER_OF or the IS_MANAGER_OF filter option is specified. Setting the IS_MEMBER_OF or IS_MANAGER_OF filter option to TRUE will automatically specify the current USER ID as the value for HAS_MEMBER or HAS_MANAGER, respectively, resulting in a query of the form "find groups the current user belongs to" or "find groups the current user manages". Passing FALSE for either of these two options is the same as not specifying them.
The returned Items will be of type GROUP.
If the primary or secondary sort attributes are specified but the corresponding sort directions are not specified, the sorting defaults to ascending order. The sorting order is ascending if the sort direction is explicitly set to TRUE and descending if the sort direction is set to FALSE.
Sort attribute names must be defined in the Attributes class and have data types that implement the Comparable interface.
def
- filter and sort options:
attributes
- attributes to return for each GROUPFdkException
- if the operation failsprotected final boolean isWebServiceCall()
true
if the current call was made from a web services
client. This check can be made by any subclasses in order to determine
functionality and restrictions based on the originating call. This
feature should be used lightly and only where really necessary as
this is not an idea way of implementing business logic.public void referenceTypes(TypeReference ref)
protected final NamedValue[] login(FdkCredential c, NamedValue[] options, AttributeRequest[] userAttributes) throws FdkException
FdkException
protected final FdkSessionImpl getConnectedSession() throws FdkException
FdkException
Copyright © 2023. All rights reserved.