Package lumis.portal.principal
Interface IPrincipalManager
-
- All Superinterfaces:
IConfigKeyChecker
- All Known Subinterfaces:
IPrincipalManagerSPI
- All Known Implementing Classes:
PrincipalManager
@StableMinor(version="17.0", sinceVersion="4.0") public interface IPrincipalManager extends IConfigKeyChecker
Manage Principals.- Since:
- 4.0.6
- Version:
- $Revision$ $Date$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(SessionConfig sessionConfig, PrincipalConfig principal, ITransaction transaction)
Add a Principal.void
delete(SessionConfig sessionConfig, java.lang.String principalId, ITransaction transaction)
Remove a Principal.PrincipalConfig
get(SessionConfig sessionConfig, java.lang.String principalId, ITransaction transaction)
Get the Principal.PrincipalConfig
getByShortId(SessionConfig sessionConfig, java.lang.String shortId, ITransaction transaction)
Get the Principal given the shortId.java.util.Set<java.lang.String>
getPortalUserMembers(SessionConfig sessionConfig, java.lang.String principalId, ITransaction transaction)
Returns the members that are (portal) users of the given principal.
The return value will be:
If the given principal is a user: a set with a single entry that is the given user itself. If the given principal is a user segmentation: a set with the users that are members of the given segmentation. If the given principal is a group: a set containing the result of a recursion in this method with each direct member of the given group.java.util.Set<java.lang.String>
getPrincipals(SessionConfig sessionConfig, java.lang.String principalId, ITransaction transaction)
Returns the principals of the given principal.
The return value will be:
If the given principal is a user: a set with an entry that is the given user itself and the result of the recursion in this method for each group and segmentation the user is member of.boolean
isMember(SessionConfig sessionConfig, java.lang.String portalUserId, java.util.Collection<java.lang.String> principalIds, ITransaction transaction)
Check whether the principal is a member of any given principal.void
update(SessionConfig sessionConfig, PrincipalConfig principal, ITransaction transaction)
Update a Principal.-
Methods inherited from interface lumis.portal.serialization.operation.IConfigKeyChecker
keyExists
-
-
-
-
Method Detail
-
get
PrincipalConfig get(SessionConfig sessionConfig, java.lang.String principalId, ITransaction transaction) throws PortalException
Get the Principal.- Parameters:
sessionConfig
-principalId
-transaction
-- Returns:
- a PrincipalConfig.
- Throws:
PortalException
-
getByShortId
PrincipalConfig getByShortId(SessionConfig sessionConfig, java.lang.String shortId, ITransaction transaction) throws PortalException
Get the Principal given the shortId.- Parameters:
sessionConfig
-shortId
-transaction
-- Returns:
- a PrincipalConfig.
- Throws:
PortalException
-
add
void add(SessionConfig sessionConfig, PrincipalConfig principal, ITransaction transaction) throws PortalException
Add a Principal.- Parameters:
sessionConfig
-principal
-transaction
-- Throws:
PortalException
-
update
void update(SessionConfig sessionConfig, PrincipalConfig principal, ITransaction transaction) throws PortalException
Update a Principal.- Parameters:
sessionConfig
-principal
-transaction
-- Throws:
PortalException
-
delete
void delete(SessionConfig sessionConfig, java.lang.String principalId, ITransaction transaction) throws PortalException
Remove a Principal.- Parameters:
sessionConfig
-principalId
-transaction
-- Throws:
PortalException
-
getPortalUserMembers
java.util.Set<java.lang.String> getPortalUserMembers(SessionConfig sessionConfig, java.lang.String principalId, ITransaction transaction) throws PortalException
Returns the members that are (portal) users of the given principal.
The return value will be:
- If the given principal is a user: a set with a single entry that is the given user itself.
- If the given principal is a user segmentation: a set with the users that are members of the given segmentation.
- If the given principal is a group: a set containing the result of a recursion in this method with each direct member of the given group.
- Parameters:
sessionConfig
- the user's session.principalId
- the principal identifier.transaction
- the transaction.- Returns:
- the members that are (portal) users of the given principal.
- Throws:
PortalException
- Since:
- 11.2.0
-
getPrincipals
java.util.Set<java.lang.String> getPrincipals(SessionConfig sessionConfig, java.lang.String principalId, ITransaction transaction) throws PortalException
Returns the principals of the given principal.
The return value will be:
- If the given principal is a user: a set with an entry that is the given user itself and the result of the recursion in this method for each group and segmentation the user is member of. The segmentations will not be calculated if the given principal is the guest user and there is no current monitor user in current thread.
- If the given principal is a user segmentation: a set with the given segmentation and the result of the recursion in this method with each group the given segmentation is member of.
- If the given principal is a group: a set containing the given group and the result of a recursion in this method with each group the given group is member of.
- Parameters:
sessionConfig
- the user's session.principalId
- the principal identifier.transaction
- the transaction.- Returns:
- the principals of the given principal.
- Throws:
PortalException
- Since:
- 11.2.0
-
isMember
boolean isMember(SessionConfig sessionConfig, java.lang.String portalUserId, java.util.Collection<java.lang.String> principalIds, ITransaction transaction) throws PortalException
Check whether the principal is a member of any given principal.- Parameters:
sessionConfig
- the sesssion config.portalUserId
- the identifier of user.principalIds
- the identifiers of principals.transaction
- the transaction.- Returns:
- true whether the principal is member, otherwise false.
- Throws:
PortalException
- Since:
- 11.2.0
-
-