public class LdapUserGroupAccessor extends Object implements ExternalUserGroupAccessor, PropertyKeys
ExternalUserGroupAccessor
for LDAP.PROPERTY_KEY_ACTIVE_DIRECTORY_TRACKING_ALLOW_PAGING, PROPERTY_KEY_ACTIVE_DIRECTORY_TRACKING_ENABLED_GROUP, PROPERTY_KEY_ACTIVE_DIRECTORY_TRACKING_ENABLED_USER, PROPERTY_KEY_ACTIVE_DIRECTORY_TRACKING_PAGING_SIZE, PROPERTY_KEY_ACTIVE_DIRECTORY_TRACKING_TIME_OUT, PROPERTY_KEY_ACTIVE_DIRECTORY_TRACKING_USER_SEQUENCE_NUMBER
Constructor and Description |
---|
LdapUserGroupAccessor(PluginPropertyService pluginProperties)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
acceptGroupsOfUser(User user,
ExternalEntityVisitor<ExternalGroupVO> visitor)
This method can be used to visit all groups of a given user.
|
void |
acceptMembersOfGroup(ExternalUserGroup group,
ExternalEntityVisitor<Long> visitor)
This method can be used to visit all members of the given group.
|
void |
acceptParentGroups(ExternalUserGroup group,
ExternalEntityVisitor<ExternalGroupVO> visitor)
This method can be used to visit all parent groups of the given groups.
|
boolean |
canConnect()
Checks if the system is available.
|
ExternalGroupVO |
getGroup(ExternalUserGroup group)
Retrieves the current data of a group in the external system.
|
ExternalGroupVO |
getGroup(String externalGroupId)
Retrieves the current data of a group in the external system by the external group
identifier.
|
boolean |
hasGroup(ExternalUserGroup group) |
boolean |
needsSynchronization(Date date) |
void |
start()
This method will be called when the accessor starts.
|
void |
stop()
This method will be called when the accessor should be stopped.
|
boolean |
supports(ExternalSystemConfiguration externalConfiguration) |
public LdapUserGroupAccessor(PluginPropertyService pluginProperties)
pluginProperties
- The properties to use.public void acceptGroupsOfUser(User user, ExternalEntityVisitor<ExternalGroupVO> visitor) throws ExternalUserGroupAccessorException
acceptGroupsOfUser
in interface ExternalUserGroupAccessor
user
- The user.visitor
- A visitor for visiting the found entities.ExternalUserGroupAccessorException
- Exception.public void acceptMembersOfGroup(ExternalUserGroup group, ExternalEntityVisitor<Long> visitor) throws ExternalUserGroupAccessorException
acceptMembersOfGroup
in interface ExternalUserGroupAccessor
group
- The child group.visitor
- A visitor for visiting the found entities.ExternalUserGroupAccessorException
- Exception.public void acceptParentGroups(ExternalUserGroup group, ExternalEntityVisitor<ExternalGroupVO> visitor) throws ExternalUserGroupAccessorException
acceptParentGroups
in interface ExternalUserGroupAccessor
group
- The child group.visitor
- A visitor for visiting the found entities.ExternalUserGroupAccessorException
- Exception.public boolean canConnect()
ExternalUserGroupAccessor
canConnect
in interface ExternalUserGroupAccessor
public ExternalGroupVO getGroup(ExternalUserGroup group) throws PluginException
getGroup
in interface ExternalUserGroupAccessor
group
- The group to retrieve.PluginException
- Exception.public ExternalGroupVO getGroup(String externalGroupId)
getGroup
in interface ExternalUserGroupAccessor
externalGroupId
- The identifier of the external group.public boolean hasGroup(ExternalUserGroup group) throws PluginException
hasGroup
in interface ExternalUserGroupAccessor
group
- The group to check against.PluginException
- Exception.public boolean needsSynchronization(Date date)
needsSynchronization
in interface ExternalUserGroupAccessor
date
- Date.true
True, if a synchronization is needed.public void start()
ExternalUserGroupAccessor
start
in interface ExternalUserGroupAccessor
public void stop()
ExternalUserGroupAccessor
stop
in interface ExternalUserGroupAccessor
public boolean supports(ExternalSystemConfiguration externalConfiguration)
supports
in interface ExternalUserGroupAccessor
externalConfiguration
- The external configuration.Copyright © 2019 Communote team. All rights reserved.