Class ExternalIdCheckingGroupActionStrategy
java.lang.Object
com.atlassian.crowd.directory.synchronisation.cache.AbstractGroupActionStrategy
com.atlassian.crowd.directory.synchronisation.cache.ExternalIdCheckingGroupActionStrategy
- All Implemented Interfaces:
GroupActionStrategy
A group action strategy that compares the remote group with a local group matched by external id. This adds support
for renaming groups. As this class is unaware of other groups in the cache/from the remote, care must be taken to
ensure no duplicates exist beforehand.
This implementation also skips some checks from
DefaultGroupActionStrategy
, mostly related to groups of type
GroupType.LEGACY_ROLE
, so it is not intended as a drop in replacement for
existing LDAP directories, even if they support the notion of external ids for groups.-
Field Summary
Fields inherited from class com.atlassian.crowd.directory.synchronisation.cache.AbstractGroupActionStrategy
NO_OP
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecide
(InternalDirectoryGroup internalGroup, InternalDirectoryGroup groupMatchedByExternalId, Group remoteGroup, Date syncStartDate, long directoryId) Methods inherited from class com.atlassian.crowd.directory.synchronisation.cache.AbstractGroupActionStrategy
addGroup, replaceGroup, updateGroup, wasGroupUpdatedAfterSearchStart
-
Constructor Details
-
ExternalIdCheckingGroupActionStrategy
public ExternalIdCheckingGroupActionStrategy()
-
-
Method Details
-
decide
public DirectoryCacheChangeOperations.GroupsToAddUpdateReplace decide(@Nullable InternalDirectoryGroup internalGroup, @Nullable InternalDirectoryGroup groupMatchedByExternalId, Group remoteGroup, Date syncStartDate, long directoryId) throws OperationFailedException - Parameters:
internalGroup
- the group matched by name from the internal directory or null if the group isn't present yetgroupMatchedByExternalId
- the group matched by external id from the internal directory or null if there were no matches, only applicable for directories supporting special handling for groups with external idsremoteGroup
- the group from the remote directorysyncStartDate
- the date at which the synchronisation was started, used to check for local modifications after sync startdirectoryId
- the id of the remote directory- Returns:
- an object containing collections related to different types of handling new groups, one of which may contain the remote group if it should be handled
- Throws:
OperationFailedException
- if the group can't be correctly handled
-