public class DatabaseViewGroupMembershipProvider extends AbstractGroupMembershipProvider
Constructor and Description |
---|
DatabaseViewGroupMembershipProvider() |
Modifier and Type | Method and Description |
---|---|
void |
deleteGroupMembershipData(String groupId)
Deletes
DatabaseViewGroupConfig of the specified group. |
void |
deleteGroupTypeMembershipData()
Deletes
DatabaseViewGroupTypeConfig of the current group type. |
void |
destroy()
Indicates that this membership provider will no longer be used.
|
protected DatabaseViewGroupTypeConfig |
getDatabaseViewGroupTypeConfig() |
String |
getGroupConfigurationInterfaceId()
Returns the interface identifier for editing configurations at a group
scope.
|
Collection<String> |
getGroups(String principalId)
Returns the groups of a principal.
|
String |
getGroupTypeConfigurationInterfaceId()
Returns the interface identifier for editing configurations at a group
type scope.
|
Collection<String> |
getMembers(String groupId,
int filterType)
Returns the members of a group.
|
void |
init(GroupType groupType)
Initializes this membership provider to be used for the given group type.
|
protected Map<String,Object> |
readMemberData(String principalId)
Returns the data for a specific member.
|
protected Collection<String> |
readMembers(DatabaseViewGroupConfig databaseViewGroupConfig,
int filterType)
Read from persistence the identifiers of principals that match the
specified criteria.
|
addMember, getGroupType, removeMember
public void init(GroupType groupType)
IGroupMembershipProvider
This method is the first method called after an instance creation.
init
in interface IGroupMembershipProvider
init
in class AbstractGroupMembershipProvider
groupType
- the group type.protected DatabaseViewGroupTypeConfig getDatabaseViewGroupTypeConfig() throws NoResultException
NoResultException
public void destroy()
IGroupMembershipProvider
This method may be used to clean up resources allocated in this instance. This instance is no longer used after this method is called.
destroy
in interface IGroupMembershipProvider
destroy
in class AbstractGroupMembershipProvider
public String getGroupConfigurationInterfaceId()
IGroupMembershipProvider
The interface will receive the parameter groupId with the identifier of the group being configured.
Usually IGroupMembershipProvider.deleteGroupMembershipData(String)
will be used to
delete data stored using this configuration interface.
getGroupConfigurationInterfaceId
in interface IGroupMembershipProvider
getGroupConfigurationInterfaceId
in class AbstractGroupMembershipProvider
public String getGroupTypeConfigurationInterfaceId()
IGroupMembershipProvider
The interface will receive the parameter groupTypeId with the identifier of the group type being configured.
Usually IGroupMembershipProvider.deleteGroupTypeMembershipData()
will be used to
delete data stored using this configuration interface.
getGroupTypeConfigurationInterfaceId
in interface IGroupMembershipProvider
getGroupTypeConfigurationInterfaceId
in class AbstractGroupMembershipProvider
public Collection<String> getGroups(String principalId) throws PortalException
IGroupMembershipProvider
principalId
- the principal identifier.PortalException
public Collection<String> getMembers(String groupId, int filterType) throws PortalException
IGroupMembershipProvider
groupId
- the group identifier.filterType
- defines how the result will be filtered.
This may be one of IGroupManager.FILTER_TYPE_USERS_AND_GROUPS
,
IGroupManager.FILTER_TYPE_ONLY_USERS
or
IGroupManager.FILTER_TYPE_ONLY_GROUPS
.PortalException
protected Map<String,Object> readMemberData(String principalId) throws PortalException, NoResultException
principalId
- the member's identifier.DatabaseViewField.getColumnName()
,
and the value is the corresponding value read from the databaseNoResultException
- if no entry was found for the given principalShortId.PortalException
protected Collection<String> readMembers(DatabaseViewGroupConfig databaseViewGroupConfig, int filterType) throws PortalException
databaseViewGroupConfig
- the configuration for the group membership.filterType
- the type of members (IGroupManager.FILTER_TYPE_* constants).PortalException
public void deleteGroupMembershipData(String groupId) throws PortalException
DatabaseViewGroupConfig
of the specified group.deleteGroupMembershipData
in interface IGroupMembershipProvider
deleteGroupMembershipData
in class AbstractGroupMembershipProvider
groupId
- the group identifier.PortalException
public void deleteGroupTypeMembershipData() throws PortalException
DatabaseViewGroupTypeConfig
of the current group type.deleteGroupTypeMembershipData
in interface IGroupMembershipProvider
deleteGroupTypeMembershipData
in class AbstractGroupMembershipProvider
PortalException
LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.