Package lumis.portal.group
Interface IGroupManager
-
- All Superinterfaces:
IConfigDeleter
- All Known Subinterfaces:
IGroupManagerSPI
@StableMinor(version="14.2", sinceVersion="4.0") public interface IGroupManager extends IConfigDeleter
Manager Interface for Group operations- Since:
- 4.0.0
- Version:
- $Revision: 24985 $ $Date: 2022-05-02 23:04:30 -0300 (Mon, 02 May 2022) $
-
-
Field Summary
Fields Modifier and Type Field Description static int
FILTER_TYPE_ONLY_GROUPS
static int
FILTER_TYPE_ONLY_USERS
static int
FILTER_TYPE_USERS_AND_GROUPS
static String
GROUP_ID_ALL_REGISTERED_USERS
static String
GROUP_ID_ALL_USERS
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description String
add(SessionConfig sessionConfig, GroupConfig groupConfig, ITransaction transaction)
Add a group.void
addGroupType(SessionConfig sessionConfig, GroupType groupType, ITransaction transaction)
Adds a group type.void
addMember(SessionConfig sessionConfig, String groupId, String memberId, ITransaction transaction)
Add a member into the group.void
addOrUpdate(SessionConfig sessionConfig, GroupConfig groupConfig, ITransaction transaction)
void
delete(SessionConfig sessionConfig, String groupId, ITransaction transaction)
Delete a group.void
deleteAllMembers(SessionConfig sessionConfig, String groupId, ITransaction transaction)
Delete all member associations for the specified group.void
deleteGroupType(SessionConfig sessionConfig, String groupTypeId, ITransaction transaction)
Deletes a group type.void
deleteMember(SessionConfig sessionConfig, String groupId, String memberId, ITransaction transaction)
Delete a member of the group.String
deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node groupNode, ITransaction transaction)
void
deserializeMembers(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node membersNode, ITransaction transaction)
GroupConfig
get(SessionConfig sessionConfig, String groupId, ITransaction transaction)
Returns the group with the specified identifier.Collection<GroupConfig>
getByChannelId(SessionConfig sessionConfig, String channelId, ITransaction transaction)
Get all local groups from the specified channelCollection<GroupConfig>
getByOrigin(SessionConfig sessionConfig, String origin, ITransaction transaction)
Get the local groups configuration for the specified origin.String
getGroupConfigurationInterfaceId(SessionConfig sessionConfig, String groupTypeId, ITransaction transaction)
Returns the interface identifier for editing membership configurations of groups of a specific group type.GroupType
getGroupType(SessionConfig sessionConfig, String groupTypeId, ITransaction transaction)
Returns a group type.String
getGroupTypeConfigurationInterfaceId(SessionConfig sessionConfig, String groupTypeId, ITransaction transaction)
Returns the interface identifier for editing membership configurations for a group type.Collection<String>
getIds(SessionConfig sessionConfig, ITransaction transaction)
Get all groups.Collection<String>
getMemberGroups(SessionConfig sessionConfig, String memberId, boolean recursively, ITransaction transaction)
Returns an array of groups of the given member.Collection<String>
getMembers(SessionConfig sessionConfig, String groupId, int filterType, boolean recursively, ITransaction transaction)
Returns the immediate group members.void
invalidateGroupMembershipProvider(SessionConfig sessionConfig, String groupTypeId, ITransaction transaction)
Invalidates the group membership provider of a group type.boolean
isMember(SessionConfig sessionConfig, String groupId, String principalId, ITransaction transaction)
Deprecated.since 11.2.0 replaced byIPrincipalManager.isMember(SessionConfig, String, Collection, ITransaction)
boolean
isMember(SessionConfig sessionConfig, Collection<String> groupIds, String principalId, ITransaction transaction)
Deprecated.since 11.2.0 replaced byIPrincipalManager.isMember(SessionConfig, String, Collection, ITransaction)
void
serialize(SessionConfig sessionConfig, GroupConfig groupConfig, OutputStream outputStream, ITransaction transaction)
void
serializeMembers(SessionConfig sessionConfig, GroupConfig groupConfig, OutputStream outputStream, ITransaction transaction)
void
update(SessionConfig sessionConfig, GroupConfig groupConfig, ITransaction transaction)
Update the group configuration.void
updateGroupType(SessionConfig sessionConfig, GroupType groupType, ITransaction transaction)
Updates a group type.-
Methods inherited from interface lumis.portal.serialization.operation.IConfigDeleter
deleteConfig
-
-
-
-
Field Detail
-
FILTER_TYPE_USERS_AND_GROUPS
static final int FILTER_TYPE_USERS_AND_GROUPS
- See Also:
- Constant Field Values
-
FILTER_TYPE_ONLY_USERS
static final int FILTER_TYPE_ONLY_USERS
- See Also:
- Constant Field Values
-
FILTER_TYPE_ONLY_GROUPS
static final int FILTER_TYPE_ONLY_GROUPS
- See Also:
- Constant Field Values
-
GROUP_ID_ALL_USERS
static final String GROUP_ID_ALL_USERS
- See Also:
- Constant Field Values
-
GROUP_ID_ALL_REGISTERED_USERS
static final String GROUP_ID_ALL_REGISTERED_USERS
- See Also:
- Constant Field Values
-
-
Method Detail
-
add
String add(SessionConfig sessionConfig, GroupConfig groupConfig, ITransaction transaction) throws ManagerException, PortalException
Add a group.- Parameters:
sessionConfig
-groupConfig
-transaction
-- Returns:
- Returns a String.
- Throws:
ManagerException
PortalException
-
get
GroupConfig get(SessionConfig sessionConfig, String groupId, ITransaction transaction) throws ManagerException, PortalException
Returns the group with the specified identifier.- Parameters:
sessionConfig
- the user session information.groupId
- the group identifier.transaction
- the transaction for persistence access.- Returns:
- the group.
- Throws:
PortalObjectNotFoundException
- if no such group was found.ManagerException
PortalException
-
delete
void delete(SessionConfig sessionConfig, String groupId, ITransaction transaction) throws ManagerException, PortalException
Delete a group.- Parameters:
sessionConfig
-groupId
-transaction
-- Throws:
ManagerException
PortalException
-
update
void update(SessionConfig sessionConfig, GroupConfig groupConfig, ITransaction transaction) throws ManagerException, PortalException
Update the group configuration.- Parameters:
sessionConfig
-groupConfig
-transaction
-- Throws:
ManagerException
PortalException
-
addGroupType
void addGroupType(SessionConfig sessionConfig, GroupType groupType, ITransaction transaction) throws PortalException
Adds a group type.- Parameters:
sessionConfig
- user session information.groupType
- the group type.transaction
- transaction for persistence access.- Throws:
PortalObjectAlreadyExistsException
- if a group type with the same identifier already exists.PortalException
- Since:
- 4.2.1
-
getGroupType
GroupType getGroupType(SessionConfig sessionConfig, String groupTypeId, ITransaction transaction) throws PortalException
Returns a group type.- Parameters:
sessionConfig
- user session information.groupTypeId
- the group type identifier.transaction
- transaction for persistence access.- Returns:
- the group type.
- Throws:
PortalObjectNotFoundException
- if no such group type was found.PortalException
- Since:
- 4.2.1
-
deleteGroupType
void deleteGroupType(SessionConfig sessionConfig, String groupTypeId, ITransaction transaction) throws PortalException
Deletes a group type.- Parameters:
sessionConfig
- user session information.groupTypeId
- the group type identifier.transaction
- transaction for persistence access.- Throws:
PortalObjectNotFoundException
- if no such group type was found.PortalException
- Since:
- 4.2.1
-
updateGroupType
void updateGroupType(SessionConfig sessionConfig, GroupType groupType, ITransaction transaction) throws PortalException
Updates a group type.- Parameters:
sessionConfig
- user session information.groupType
- the group type.transaction
- transaction for persistence access.- Throws:
PortalObjectNotFoundException
- if no such group type was found.PortalException
- Since:
- 4.2.1
-
getIds
Collection<String> getIds(SessionConfig sessionConfig, ITransaction transaction) throws ManagerException, PortalException
Get all groups.- Parameters:
sessionConfig
-transaction
-- Returns:
- Returns an array of Strings.
- Throws:
ManagerException
PortalException
-
addMember
void addMember(SessionConfig sessionConfig, String groupId, String memberId, ITransaction transaction) throws ManagerException, PortalException
Add a member into the group. The members may be users or groups.- Parameters:
sessionConfig
-groupId
-memberId
-transaction
-- Throws:
ManagerException
PortalException
-
deleteMember
void deleteMember(SessionConfig sessionConfig, String groupId, String memberId, ITransaction transaction) throws ManagerException, PortalException
Delete a member of the group.- Parameters:
sessionConfig
-groupId
-memberId
-transaction
-- Throws:
ManagerException
PortalException
-
getMembers
Collection<String> getMembers(SessionConfig sessionConfig, String groupId, int filterType, boolean recursively, ITransaction transaction) throws ManagerException, PortalException
Returns the immediate group members. The members may be users or groups. You can specify to get direct members or all members recursively as well as the type of members that should be considered.- Parameters:
sessionConfig
- the user session information.groupId
- the group identifier.filterType
- defines how the result will be filtered. This may be one ofFILTER_TYPE_USERS_AND_GROUPS
,FILTER_TYPE_ONLY_USERS
,FILTER_TYPE_ONLY_GROUPS
.recursively
- true to search for members recursively, false otherwise.transaction
- the transaction for persistence access.- Returns:
- a collection of group member identifiers.
- Throws:
ManagerException
PortalException
-
getMemberGroups
Collection<String> getMemberGroups(SessionConfig sessionConfig, String memberId, boolean recursively, ITransaction transaction) throws ManagerException, PortalException
Returns an array of groups of the given member. The list of members must include the framework groups "all" and "registered users" if the current user is not the guest user. You can specify to get just direct groups as well as all groups recursively- Parameters:
sessionConfig
-memberId
-recursively
-transaction
-- Returns:
- Returns an array of Strings.
- Throws:
ManagerException
PortalException
-
getByChannelId
Collection<GroupConfig> getByChannelId(SessionConfig sessionConfig, String channelId, ITransaction transaction) throws ManagerException, PortalException
Get all local groups from the specified channel- Parameters:
sessionConfig
-channelId
-transaction
-- Returns:
- Returns an array of GroupConfig.
- Throws:
ManagerException
PortalException
-
serialize
void serialize(SessionConfig sessionConfig, GroupConfig groupConfig, OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
- Parameters:
sessionConfig
-groupConfig
-outputStream
-transaction
-- Throws:
ManagerException
PortalException
-
serializeMembers
void serializeMembers(SessionConfig sessionConfig, GroupConfig groupConfig, OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
- Parameters:
sessionConfig
-groupConfig
-outputStream
-transaction
-- Throws:
ManagerException
PortalException
-
deserialize
String deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node groupNode, ITransaction transaction) throws ManagerException, PortalException
- Parameters:
sessionConfig
-deserializationConfig
-groupNode
-transaction
-- Returns:
- Returns a String.
- Throws:
ManagerException
PortalException
-
deserializeMembers
void deserializeMembers(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, Node membersNode, ITransaction transaction) throws ManagerException, PortalException
- Parameters:
sessionConfig
-deserializationConfig
-membersNode
-transaction
-- Throws:
ManagerException
PortalException
-
addOrUpdate
void addOrUpdate(SessionConfig sessionConfig, GroupConfig groupConfig, ITransaction transaction) throws ManagerException, PortalException
- Throws:
ManagerException
PortalException
-
deleteAllMembers
void deleteAllMembers(SessionConfig sessionConfig, String groupId, ITransaction transaction) throws DaoException, PortalException
Delete all member associations for the specified group.- Parameters:
sessionConfig
- the user session information.groupId
- the group id.transaction
- the transaction for persistence access.- Throws:
DaoException
PortalException
- Since:
- 4.0.8
-
getByOrigin
Collection<GroupConfig> getByOrigin(SessionConfig sessionConfig, String origin, ITransaction transaction) throws DaoException, PortalException
Get the local groups configuration for the specified origin.- Parameters:
origin
- the origin identifiertransaction
- the transaction for persistence access.- Returns:
- Throws:
DaoException
PortalException
- Since:
- 4.0.8
-
isMember
@Deprecated boolean isMember(SessionConfig sessionConfig, String groupId, String principalId, ITransaction transaction) throws DaoException, PortalException
Deprecated.since 11.2.0 replaced byIPrincipalManager.isMember(SessionConfig, String, Collection, ITransaction)
Verifies if a principal is a member, directly or indirectly, of a group.- Parameters:
sessionConfig
- the user session information.groupId
- the group identifier.principalId
- the principal identifier.transaction
- the transaction for persistence access.- Returns:
- true if the specified principal is member of the group or any of its subgroups recursively, false otherwise.
- Throws:
DaoException
PortalException
- Since:
- 4.0.9
-
isMember
@Deprecated boolean isMember(SessionConfig sessionConfig, Collection<String> groupIds, String principalId, ITransaction transaction) throws PortalException
Deprecated.since 11.2.0 replaced byIPrincipalManager.isMember(SessionConfig, String, Collection, ITransaction)
Verifies if a principal is a member, directly or indirectly, of one of the specified groups.- Parameters:
sessionConfig
- the user session information.groupIds
- the group identifiers.principalId
- the principal identifier.transaction
- the transaction for persistence access.- Returns:
- true if the principal is member of any of the groups or their subgroups recursively, false otherwise.
- Throws:
PortalException
- Since:
- 4.2.1
-
getGroupTypeConfigurationInterfaceId
String getGroupTypeConfigurationInterfaceId(SessionConfig sessionConfig, String groupTypeId, ITransaction transaction) throws PortalException
Returns the interface identifier for editing membership configurations for a group type.The interface should receive the parameter groupTypeId with the identifier of the group type being configured.
- Parameters:
sessionConfig
- user session information.groupTypeId
- the group type identifier.transaction
- the transaction for persistence access.- Returns:
- the interface identifier, or null if no such configuration interface exists for the specified group type.
- Throws:
PortalException
- Since:
- 4.2.1
-
getGroupConfigurationInterfaceId
String getGroupConfigurationInterfaceId(SessionConfig sessionConfig, String groupTypeId, ITransaction transaction) throws PortalException
Returns the interface identifier for editing membership configurations of groups of a specific group type.The interface should receive the parameter groupId with the identifier of the group being configured.
- Parameters:
sessionConfig
- user session information.groupTypeId
- the group type identifier.transaction
- the transaction for persistence access.- Returns:
- the interface identifier, or null if no such configuration interface exists for the specified group type.
- Throws:
PortalException
- Since:
- 4.2.1
-
invalidateGroupMembershipProvider
void invalidateGroupMembershipProvider(SessionConfig sessionConfig, String groupTypeId, ITransaction transaction) throws PortalException
Invalidates the group membership provider of a group type. Causes the destruction of existing instance, if any, and re-initialization of a new one when necessary.- Parameters:
sessionConfig
- user session information.groupTypeId
- the group type identifier the group membership provider is used in.transaction
- the transaction for persistence access.- Throws:
PortalException
- Since:
- 4.2.1
-
-