Class AbstractDelegatingApplicationService
java.lang.Object
com.atlassian.crowd.manager.application.AbstractDelegatingApplicationService
- All Implemented Interfaces:
ApplicationService
- Direct Known Subclasses:
AllowingAuthenticateByEmailApplicationService,CachingApplicationService,TranslatingApplicationService
public abstract class AbstractDelegatingApplicationService
extends Object
implements ApplicationService
An implementation of ApplicationService that delegates all methods to another ApplicationService. Subclasses
can override specific methods to change the behaviour.
- Since:
- v2.7
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.crowd.manager.application.ApplicationService
ApplicationService.MembershipsIterable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllUsers(Application application, Collection<UserTemplateWithCredentialAndAttributes> users) addGroup(Application application, GroupTemplate group) voidaddGroupToGroup(Application application, String childGroupName, String parentGroupName) addUser(Application application, UserTemplate user, PasswordCredential credential) addUser(Application application, UserTemplateWithAttributes userWithAttributes, PasswordCredential credential) voidaddUserToGroup(Application application, String username, String groupName) authenticateUser(Application application, String username, PasswordCredential passwordCredential) <T> PagedSearcher<T>createPagedGroupSearcher(Application application, EntityQuery<T> query) <T> PagedSearcher<T>createPagedUserSearcher(Application application, EntityQuery<T> query) voidexpireAllPasswords(Application application) findGroupByName(Application application, String name) findGroupWithAttributesByName(Application application, String name) findRemoteUserByName(Application application, String username) findUserByKey(Application application, String key) findUserByName(Application application, String name) findUserWithAttributesByKey(Application application, String key) findUserWithAttributesByName(Application application, String name) findWebhookById(Application application, long webhookId) protected ApplicationServicegetCapabilitiesForNewUsers(Application application) getCurrentEventToken(Application application) getMemberships(Application application) getNewEvents(Application application, String eventToken) getUserAvatar(Application application, String username, int sizeHint) getUserAvatarLink(Application application, String username, int sizeHint) booleanisGroupDirectGroupMember(Application application, String childGroup, String parentGroup) booleanisGroupNestedGroupMember(Application application, String childGroup, String parentGroup) booleanisUserAuthorised(Application application, User user) booleanisUserAuthorised(Application application, String username) booleanisUserDirectGroupMember(Application application, String username, String groupName) booleanisUserNestedGroupMember(Application application, String username, String groupName) registerWebhook(Application application, String endpointUrl, String token) voidremoveGroup(Application application, String group) voidremoveGroupAttributes(Application application, String groupname, String attributeName) voidremoveGroupFromGroup(Application application, String childGroup, String parentGroup) voidremoveUser(Application application, String user) voidremoveUserAttributes(Application application, String username, String attributeName) voidremoveUserFromGroup(Application application, String username, String groupName) renameUser(Application application, String oldUserName, String newUsername) <T> List<T>searchDirectGroupRelationships(Application application, MembershipQuery<T> query) <T> List<T>searchGroups(Application application, EntityQuery<T> query) <T> List<T>searchNestedGroupRelationships(Application application, MembershipQuery<T> query) <T> List<T>searchUsers(Application application, EntityQuery<T> query) voidstoreGroupAttributes(Application application, String groupname, Map<String, Set<String>> attributes) voidstoreUserAttributes(Application application, String username, Map<String, Set<String>> attributes) voidunregisterWebhook(Application application, long webhookId) updateGroup(Application application, GroupTemplate group) updateUser(Application application, UserTemplate user) voidupdateUserCredential(Application application, String username, PasswordCredential credential) userAuthenticated(Application application, String username)
-
Constructor Details
-
AbstractDelegatingApplicationService
-
-
Method Details
-
getApplicationService
-
authenticateUser
public User authenticateUser(Application application, String username, PasswordCredential passwordCredential) throws OperationFailedException, InactiveAccountException, InvalidAuthenticationException, ExpiredCredentialException, UserNotFoundException - Specified by:
authenticateUserin interfaceApplicationService- Throws:
OperationFailedExceptionInactiveAccountExceptionInvalidAuthenticationExceptionExpiredCredentialExceptionUserNotFoundException
-
isUserAuthorised
- Specified by:
isUserAuthorisedin interfaceApplicationService
-
addAllUsers
public void addAllUsers(Application application, Collection<UserTemplateWithCredentialAndAttributes> users) throws ApplicationPermissionException, OperationFailedException, BulkAddFailedException - Specified by:
addAllUsersin interfaceApplicationService- Throws:
ApplicationPermissionExceptionOperationFailedExceptionBulkAddFailedException
-
findUserByName
- Specified by:
findUserByNamein interfaceApplicationService- Throws:
UserNotFoundException
-
findRemoteUserByName
public User findRemoteUserByName(Application application, String username) throws UserNotFoundException - Specified by:
findRemoteUserByNamein interfaceApplicationService- Throws:
UserNotFoundException
-
findUserWithAttributesByName
public UserWithAttributes findUserWithAttributesByName(Application application, String name) throws UserNotFoundException - Specified by:
findUserWithAttributesByNamein interfaceApplicationService- Throws:
UserNotFoundException
-
findUserByKey
- Specified by:
findUserByKeyin interfaceApplicationService- Throws:
UserNotFoundException
-
findUserWithAttributesByKey
public UserWithAttributes findUserWithAttributesByKey(Application application, String key) throws UserNotFoundException - Specified by:
findUserWithAttributesByKeyin interfaceApplicationService- Throws:
UserNotFoundException
-
addUser
public User addUser(Application application, UserTemplate user, PasswordCredential credential) throws InvalidUserException, OperationFailedException, InvalidCredentialException, ApplicationPermissionException - Specified by:
addUserin interfaceApplicationService- Throws:
InvalidUserExceptionOperationFailedExceptionInvalidCredentialExceptionApplicationPermissionException
-
addUser
public UserWithAttributes addUser(Application application, UserTemplateWithAttributes userWithAttributes, PasswordCredential credential) throws InvalidUserException, OperationFailedException, InvalidCredentialException, ApplicationPermissionException - Specified by:
addUserin interfaceApplicationService- Throws:
InvalidUserExceptionOperationFailedExceptionInvalidCredentialExceptionApplicationPermissionException
-
updateUser
public User updateUser(Application application, UserTemplate user) throws InvalidUserException, OperationFailedException, ApplicationPermissionException, UserNotFoundException - Specified by:
updateUserin interfaceApplicationService- Throws:
InvalidUserExceptionOperationFailedExceptionApplicationPermissionExceptionUserNotFoundException
-
renameUser
public User renameUser(Application application, String oldUserName, String newUsername) throws UserNotFoundException, OperationFailedException, ApplicationPermissionException, InvalidUserException - Specified by:
renameUserin interfaceApplicationService- Throws:
UserNotFoundExceptionOperationFailedExceptionApplicationPermissionExceptionInvalidUserException
-
updateUserCredential
public void updateUserCredential(Application application, String username, PasswordCredential credential) throws OperationFailedException, UserNotFoundException, InvalidCredentialException, ApplicationPermissionException - Specified by:
updateUserCredentialin interfaceApplicationService- Throws:
OperationFailedExceptionUserNotFoundExceptionInvalidCredentialExceptionApplicationPermissionException
-
storeUserAttributes
public void storeUserAttributes(Application application, String username, Map<String, Set<String>> attributes) throws OperationFailedException, ApplicationPermissionException, UserNotFoundException- Specified by:
storeUserAttributesin interfaceApplicationService- Throws:
OperationFailedExceptionApplicationPermissionExceptionUserNotFoundException
-
removeUserAttributes
public void removeUserAttributes(Application application, String username, String attributeName) throws OperationFailedException, ApplicationPermissionException, UserNotFoundException - Specified by:
removeUserAttributesin interfaceApplicationService- Throws:
OperationFailedExceptionApplicationPermissionExceptionUserNotFoundException
-
removeUser
public void removeUser(Application application, String user) throws OperationFailedException, UserNotFoundException, ApplicationPermissionException - Specified by:
removeUserin interfaceApplicationService- Throws:
OperationFailedExceptionUserNotFoundExceptionApplicationPermissionException
-
searchUsers
- Specified by:
searchUsersin interfaceApplicationService
-
findGroupByName
- Specified by:
findGroupByNamein interfaceApplicationService- Throws:
GroupNotFoundException
-
findGroupWithAttributesByName
public GroupWithAttributes findGroupWithAttributesByName(Application application, String name) throws GroupNotFoundException - Specified by:
findGroupWithAttributesByNamein interfaceApplicationService- Throws:
GroupNotFoundException
-
addGroup
public Group addGroup(Application application, GroupTemplate group) throws InvalidGroupException, OperationFailedException, ApplicationPermissionException - Specified by:
addGroupin interfaceApplicationService- Throws:
InvalidGroupExceptionOperationFailedExceptionApplicationPermissionException
-
updateGroup
public Group updateGroup(Application application, GroupTemplate group) throws InvalidGroupException, OperationFailedException, ApplicationPermissionException, GroupNotFoundException - Specified by:
updateGroupin interfaceApplicationService- Throws:
InvalidGroupExceptionOperationFailedExceptionApplicationPermissionExceptionGroupNotFoundException
-
storeGroupAttributes
public void storeGroupAttributes(Application application, String groupname, Map<String, Set<String>> attributes) throws OperationFailedException, ApplicationPermissionException, GroupNotFoundException- Specified by:
storeGroupAttributesin interfaceApplicationService- Throws:
OperationFailedExceptionApplicationPermissionExceptionGroupNotFoundException
-
removeGroupAttributes
public void removeGroupAttributes(Application application, String groupname, String attributeName) throws OperationFailedException, ApplicationPermissionException, GroupNotFoundException - Specified by:
removeGroupAttributesin interfaceApplicationService- Throws:
OperationFailedExceptionApplicationPermissionExceptionGroupNotFoundException
-
removeGroup
public void removeGroup(Application application, String group) throws OperationFailedException, GroupNotFoundException, ApplicationPermissionException - Specified by:
removeGroupin interfaceApplicationService- Throws:
OperationFailedExceptionGroupNotFoundExceptionApplicationPermissionException
-
searchGroups
- Specified by:
searchGroupsin interfaceApplicationService
-
addUserToGroup
public void addUserToGroup(Application application, String username, String groupName) throws OperationFailedException, UserNotFoundException, GroupNotFoundException, ApplicationPermissionException, MembershipAlreadyExistsException - Specified by:
addUserToGroupin interfaceApplicationService- Throws:
OperationFailedExceptionUserNotFoundExceptionGroupNotFoundExceptionApplicationPermissionExceptionMembershipAlreadyExistsException
-
addGroupToGroup
public void addGroupToGroup(Application application, String childGroupName, String parentGroupName) throws OperationFailedException, GroupNotFoundException, ApplicationPermissionException, InvalidMembershipException, MembershipAlreadyExistsException -
removeUserFromGroup
public void removeUserFromGroup(Application application, String username, String groupName) throws OperationFailedException, GroupNotFoundException, UserNotFoundException, ApplicationPermissionException, MembershipNotFoundException - Specified by:
removeUserFromGroupin interfaceApplicationService- Throws:
OperationFailedExceptionGroupNotFoundExceptionUserNotFoundExceptionApplicationPermissionExceptionMembershipNotFoundException
-
removeGroupFromGroup
public void removeGroupFromGroup(Application application, String childGroup, String parentGroup) throws OperationFailedException, GroupNotFoundException, ApplicationPermissionException, MembershipNotFoundException - Specified by:
removeGroupFromGroupin interfaceApplicationService- Throws:
OperationFailedExceptionGroupNotFoundExceptionApplicationPermissionExceptionMembershipNotFoundException
-
isUserDirectGroupMember
- Specified by:
isUserDirectGroupMemberin interfaceApplicationService
-
isGroupDirectGroupMember
public boolean isGroupDirectGroupMember(Application application, String childGroup, String parentGroup) - Specified by:
isGroupDirectGroupMemberin interfaceApplicationService
-
isUserNestedGroupMember
- Specified by:
isUserNestedGroupMemberin interfaceApplicationService
-
isGroupNestedGroupMember
public boolean isGroupNestedGroupMember(Application application, String childGroup, String parentGroup) - Specified by:
isGroupNestedGroupMemberin interfaceApplicationService
-
searchDirectGroupRelationships
public <T> List<T> searchDirectGroupRelationships(Application application, MembershipQuery<T> query) - Specified by:
searchDirectGroupRelationshipsin interfaceApplicationService
-
searchNestedGroupRelationships
public <T> List<T> searchNestedGroupRelationships(Application application, MembershipQuery<T> query) - Specified by:
searchNestedGroupRelationshipsin interfaceApplicationService
-
getCurrentEventToken
public String getCurrentEventToken(Application application) throws IncrementalSynchronisationNotAvailableException - Specified by:
getCurrentEventTokenin interfaceApplicationService- Throws:
IncrementalSynchronisationNotAvailableException
-
getNewEvents
public Events getNewEvents(Application application, String eventToken) throws EventTokenExpiredException, OperationFailedException - Specified by:
getNewEventsin interfaceApplicationService- Throws:
EventTokenExpiredExceptionOperationFailedException
-
findWebhookById
public Webhook findWebhookById(Application application, long webhookId) throws WebhookNotFoundException, ApplicationPermissionException - Specified by:
findWebhookByIdin interfaceApplicationService- Throws:
WebhookNotFoundExceptionApplicationPermissionException
-
registerWebhook
public Webhook registerWebhook(Application application, String endpointUrl, @Nullable String token) throws InvalidWebhookEndpointException - Specified by:
registerWebhookin interfaceApplicationService- Throws:
InvalidWebhookEndpointException
-
unregisterWebhook
public void unregisterWebhook(Application application, long webhookId) throws ApplicationPermissionException, WebhookNotFoundException - Specified by:
unregisterWebhookin interfaceApplicationService- Throws:
ApplicationPermissionExceptionWebhookNotFoundException
-
getCapabilitiesForNewUsers
- Specified by:
getCapabilitiesForNewUsersin interfaceApplicationService
-
getUserAvatarLink
@Nullable public URI getUserAvatarLink(Application application, String username, int sizeHint) throws UserNotFoundException, DirectoryNotFoundException, OperationFailedException - Specified by:
getUserAvatarLinkin interfaceApplicationService- Throws:
UserNotFoundExceptionDirectoryNotFoundExceptionOperationFailedException
-
getUserAvatar
@Nullable public AvatarReference getUserAvatar(Application application, String username, int sizeHint) throws UserNotFoundException, DirectoryNotFoundException, OperationFailedException - Specified by:
getUserAvatarin interfaceApplicationService- Throws:
UserNotFoundExceptionDirectoryNotFoundExceptionOperationFailedException
-
expireAllPasswords
- Specified by:
expireAllPasswordsin interfaceApplicationService- Throws:
OperationFailedException
-
userAuthenticated
public User userAuthenticated(Application application, String username) throws UserNotFoundException, OperationFailedException, InactiveAccountException - Specified by:
userAuthenticatedin interfaceApplicationService- Throws:
UserNotFoundExceptionOperationFailedExceptionInactiveAccountException
-
getMemberships
- Specified by:
getMembershipsin interfaceApplicationService
-
isUserAuthorised
- Specified by:
isUserAuthorisedin interfaceApplicationService
-
createPagedUserSearcher
public <T> PagedSearcher<T> createPagedUserSearcher(Application application, EntityQuery<T> query) throws PagingNotSupportedException - Specified by:
createPagedUserSearcherin interfaceApplicationService- Throws:
PagingNotSupportedException
-
createPagedGroupSearcher
public <T> PagedSearcher<T> createPagedGroupSearcher(Application application, EntityQuery<T> query) throws PagingNotSupportedException - Specified by:
createPagedGroupSearcherin interfaceApplicationService- Throws:
PagingNotSupportedException
-