Package lumis.portal.group
Interface IGroupManager
-
- All Superinterfaces:
IConfigDeleter
- All Known Subinterfaces:
IGroupManagerSPI
@StableMinor(version="16.0", sinceVersion="4.0") public interface IGroupManager extends IConfigDeleter
Manager Interface for Group operations- Since:
- 4.0.0
- Version:
- $Revision: 25808 $ $Date: 2023-07-04 15:20:55 -0300 (Tue, 04 Jul 2023) $
-
-
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 java.lang.String
GROUP_ID_ALL_REGISTERED_USERS
static java.lang.String
GROUP_ID_ALL_USERS
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.lang.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, java.lang.String groupId, java.lang.String memberId, ITransaction transaction)
Add a member into the group.void
addOrUpdate(SessionConfig sessionConfig, GroupConfig groupConfig, ITransaction transaction)
void
delete(SessionConfig sessionConfig, java.lang.String groupId, ITransaction transaction)
Delete a group.void
deleteAllMembers(SessionConfig sessionConfig, java.lang.String groupId, ITransaction transaction)
Delete all member associations for the specified group.void
deleteGroupType(SessionConfig sessionConfig, java.lang.String groupTypeId, ITransaction transaction)
Deletes a group type.void
deleteMember(SessionConfig sessionConfig, java.lang.String groupId, java.lang.String memberId, ITransaction transaction)
Delete a member of the group.java.lang.String
deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, org.w3c.dom.Node groupNode, ITransaction transaction)
void
deserializeMembers(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, org.w3c.dom.Node membersNode, ITransaction transaction)
GroupConfig
get(SessionConfig sessionConfig, java.lang.String groupId, ITransaction transaction)
Returns the group with the specified identifier.java.util.Collection<GroupConfig>
getByChannelId(SessionConfig sessionConfig, java.lang.String channelId, ITransaction transaction)
Get all local groups from the specified channeljava.util.Collection<GroupConfig>
getByOrigin(SessionConfig sessionConfig, java.lang.String origin, ITransaction transaction)
Get the local groups configuration for the specified origin.java.lang.String
getGroupConfigurationInterfaceId(SessionConfig sessionConfig, java.lang.String groupTypeId, ITransaction transaction)
Returns the interface identifier for editing membership configurations of groups of a specific group type.GroupType
getGroupType(SessionConfig sessionConfig, java.lang.String groupTypeId, ITransaction transaction)
Returns a group type.java.lang.String
getGroupTypeConfigurationInterfaceId(SessionConfig sessionConfig, java.lang.String groupTypeId, ITransaction transaction)
Returns the interface identifier for editing membership configurations for a group type.java.util.Collection<java.lang.String>
getIds(SessionConfig sessionConfig, ITransaction transaction)
Get all groups.java.util.Collection<java.lang.String>
getMemberGroups(SessionConfig sessionConfig, java.lang.String memberId, boolean recursively, ITransaction transaction)
Returns an array of groups of the given member.java.util.Collection<java.lang.String>
getMembers(SessionConfig sessionConfig, java.lang.String groupId, int filterType, boolean recursively, ITransaction transaction)
Returns the immediate group members.void
invalidateGroupMembershipProvider(SessionConfig sessionConfig, java.lang.String groupTypeId, ITransaction transaction)
Invalidates the group membership provider of a group type.boolean
isMember(SessionConfig sessionConfig, java.lang.String groupId, java.lang.String principalId, ITransaction transaction)
Deprecated.since 11.2.0 replaced byIPrincipalManager.isMember(SessionConfig, String, Collection, ITransaction)
boolean
isMember(SessionConfig sessionConfig, java.util.Collection<java.lang.String> groupIds, java.lang.String principalId, ITransaction transaction)
Deprecated.since 11.2.0 replaced byIPrincipalManager.isMember(SessionConfig, String, Collection, ITransaction)
void
serialize(SessionConfig sessionConfig, GroupConfig groupConfig, java.io.OutputStream outputStream, ITransaction transaction)
void
serializeMembers(SessionConfig sessionConfig, GroupConfig groupConfig, java.io.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 java.lang.String GROUP_ID_ALL_USERS
- See Also:
- Constant Field Values
-
GROUP_ID_ALL_REGISTERED_USERS
static final java.lang.String GROUP_ID_ALL_REGISTERED_USERS
- See Also:
- Constant Field Values
-
-
Method Detail
-
add
java.lang.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, java.lang.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, java.lang.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, java.lang.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, java.lang.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
java.util.Collection<java.lang.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, java.lang.String groupId, java.lang.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, java.lang.String groupId, java.lang.String memberId, ITransaction transaction) throws ManagerException, PortalException
Delete a member of the group.- Parameters:
sessionConfig
-groupId
-memberId
-transaction
-- Throws:
ManagerException
PortalException
-
getMembers
java.util.Collection<java.lang.String> getMembers(SessionConfig sessionConfig, java.lang.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
java.util.Collection<java.lang.String> getMemberGroups(SessionConfig sessionConfig, java.lang.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
java.util.Collection<GroupConfig> getByChannelId(SessionConfig sessionConfig, java.lang.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, java.io.OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
- Parameters:
sessionConfig
-groupConfig
-outputStream
-transaction
-- Throws:
ManagerException
PortalException
-
serializeMembers
void serializeMembers(SessionConfig sessionConfig, GroupConfig groupConfig, java.io.OutputStream outputStream, ITransaction transaction) throws ManagerException, PortalException
- Parameters:
sessionConfig
-groupConfig
-outputStream
-transaction
-- Throws:
ManagerException
PortalException
-
deserialize
java.lang.String deserialize(SessionConfig sessionConfig, DeserializationConfig deserializationConfig, org.w3c.dom.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, org.w3c.dom.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, java.lang.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
java.util.Collection<GroupConfig> getByOrigin(SessionConfig sessionConfig, java.lang.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, java.lang.String groupId, java.lang.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, java.util.Collection<java.lang.String> groupIds, java.lang.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
java.lang.String getGroupTypeConfigurationInterfaceId(SessionConfig sessionConfig, java.lang.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
java.lang.String getGroupConfigurationInterfaceId(SessionConfig sessionConfig, java.lang.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, java.lang.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
-
-