Class TransactionalCrowdServiceWrapper

java.lang.Object
com.atlassian.confluence.impl.user.crowd.TransactionalCrowdServiceWrapper
All Implemented Interfaces:
com.atlassian.crowd.embedded.api.CrowdService, com.atlassian.crowd.embedded.api.UnfilteredCrowdService

@Transactional public class TransactionalCrowdServiceWrapper extends Object implements com.atlassian.crowd.embedded.api.UnfilteredCrowdService
AN implementation of UnfilteredCrowdService which exists solely as a place to hang Transactional annotations on, since we cannot add them to UnfilteredCrowdService.

We could use an interface to extend UnfilteredCrowdService rather than a class, but this way if a new method is ever added to UnfilteredCrowdService this class will be forced to implement it, and will therefore automatically get the class-level Transactional annotation.

Since:
7.15
  • Constructor Details

    • TransactionalCrowdServiceWrapper

      public TransactionalCrowdServiceWrapper(com.atlassian.crowd.embedded.api.UnfilteredCrowdService crowdService)
  • Method Details

    • authenticate

      public com.atlassian.crowd.embedded.api.User authenticate(String name, String credential) throws com.atlassian.crowd.exception.FailedAuthenticationException, com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      authenticate in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.FailedAuthenticationException
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • verifyCredentials

      public com.atlassian.crowd.embedded.api.User verifyCredentials(String name, String credential) throws com.atlassian.crowd.exception.FailedAuthenticationException, com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      verifyCredentials in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.FailedAuthenticationException
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • getUser

      @Transactional(readOnly=true) public com.atlassian.crowd.embedded.api.User getUser(String name)
      Specified by:
      getUser in interface com.atlassian.crowd.embedded.api.CrowdService
    • getRemoteUser

      @Transactional(readOnly=true) public com.atlassian.crowd.embedded.api.User getRemoteUser(String name)
      Specified by:
      getRemoteUser in interface com.atlassian.crowd.embedded.api.CrowdService
    • userAuthenticated

      public com.atlassian.crowd.embedded.api.User userAuthenticated(String name) throws com.atlassian.crowd.exception.runtime.UserNotFoundException, com.atlassian.crowd.exception.runtime.OperationFailedException, com.atlassian.crowd.exception.InactiveAccountException
      Specified by:
      userAuthenticated in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.runtime.UserNotFoundException
      com.atlassian.crowd.exception.runtime.OperationFailedException
      com.atlassian.crowd.exception.InactiveAccountException
    • getUserWithAttributes

      @Transactional(readOnly=true) public com.atlassian.crowd.embedded.api.UserWithAttributes getUserWithAttributes(String name)
      Specified by:
      getUserWithAttributes in interface com.atlassian.crowd.embedded.api.CrowdService
    • getGroup

      @Transactional(readOnly=true) public com.atlassian.crowd.embedded.api.Group getGroup(String name)
      Specified by:
      getGroup in interface com.atlassian.crowd.embedded.api.CrowdService
    • getGroupWithAttributes

      @Transactional(readOnly=true) public com.atlassian.crowd.embedded.api.GroupWithAttributes getGroupWithAttributes(String name)
      Specified by:
      getGroupWithAttributes in interface com.atlassian.crowd.embedded.api.CrowdService
    • search

      @Transactional(readOnly=true) public <T> Iterable<T> search(com.atlassian.crowd.embedded.api.Query<T> query)
      Specified by:
      search in interface com.atlassian.crowd.embedded.api.CrowdService
    • isUserMemberOfGroup

      @Transactional(readOnly=true) public boolean isUserMemberOfGroup(String userName, String groupName)
      Specified by:
      isUserMemberOfGroup in interface com.atlassian.crowd.embedded.api.CrowdService
    • isUserMemberOfGroup

      @Transactional(readOnly=true) public boolean isUserMemberOfGroup(com.atlassian.crowd.embedded.api.User user, com.atlassian.crowd.embedded.api.Group group)
      Specified by:
      isUserMemberOfGroup in interface com.atlassian.crowd.embedded.api.CrowdService
    • isGroupMemberOfGroup

      @Transactional(readOnly=true) public boolean isGroupMemberOfGroup(String childGroupName, String parentGroupName)
      Specified by:
      isGroupMemberOfGroup in interface com.atlassian.crowd.embedded.api.CrowdService
    • isGroupMemberOfGroup

      @Transactional(readOnly=true) public boolean isGroupMemberOfGroup(com.atlassian.crowd.embedded.api.Group childGroup, com.atlassian.crowd.embedded.api.Group parentGroup)
      Specified by:
      isGroupMemberOfGroup in interface com.atlassian.crowd.embedded.api.CrowdService
    • addUser

      public com.atlassian.crowd.embedded.api.User addUser(com.atlassian.crowd.embedded.api.User user, String credential) throws com.atlassian.crowd.exception.InvalidUserException, com.atlassian.crowd.exception.InvalidCredentialException, com.atlassian.crowd.exception.OperationNotPermittedException, com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      addUser in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.InvalidUserException
      com.atlassian.crowd.exception.InvalidCredentialException
      com.atlassian.crowd.exception.OperationNotPermittedException
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • addUser

      public com.atlassian.crowd.embedded.api.UserWithAttributes addUser(com.atlassian.crowd.embedded.api.UserWithAttributes user, String credential) throws com.atlassian.crowd.exception.InvalidUserException, com.atlassian.crowd.exception.InvalidCredentialException, com.atlassian.crowd.exception.OperationNotPermittedException, com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      addUser in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.InvalidUserException
      com.atlassian.crowd.exception.InvalidCredentialException
      com.atlassian.crowd.exception.OperationNotPermittedException
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • updateUser

      public com.atlassian.crowd.embedded.api.User updateUser(com.atlassian.crowd.embedded.api.User user) throws com.atlassian.crowd.exception.runtime.UserNotFoundException, com.atlassian.crowd.exception.InvalidUserException, com.atlassian.crowd.exception.OperationNotPermittedException, com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      updateUser in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.runtime.UserNotFoundException
      com.atlassian.crowd.exception.InvalidUserException
      com.atlassian.crowd.exception.OperationNotPermittedException
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • setUserStatusLocally

      public com.atlassian.crowd.embedded.api.User setUserStatusLocally(String username, boolean userActiveInternally) throws com.atlassian.crowd.exception.runtime.UserNotFoundException, com.atlassian.crowd.exception.InvalidUserException, com.atlassian.crowd.exception.OperationNotPermittedException, com.atlassian.crowd.exception.runtime.OperationFailedException, com.atlassian.crowd.exception.DirectoryNotFoundException
      Specified by:
      setUserStatusLocally in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.runtime.UserNotFoundException
      com.atlassian.crowd.exception.InvalidUserException
      com.atlassian.crowd.exception.OperationNotPermittedException
      com.atlassian.crowd.exception.runtime.OperationFailedException
      com.atlassian.crowd.exception.DirectoryNotFoundException
    • renameUser

      public com.atlassian.crowd.embedded.api.User renameUser(com.atlassian.crowd.embedded.api.User user, String newUsername) throws com.atlassian.crowd.exception.runtime.UserNotFoundException, com.atlassian.crowd.exception.InvalidUserException, com.atlassian.crowd.exception.OperationNotPermittedException, com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      renameUser in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.runtime.UserNotFoundException
      com.atlassian.crowd.exception.InvalidUserException
      com.atlassian.crowd.exception.OperationNotPermittedException
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • updateUserCredential

      public void updateUserCredential(com.atlassian.crowd.embedded.api.User user, String credential) throws com.atlassian.crowd.exception.runtime.UserNotFoundException, com.atlassian.crowd.exception.InvalidCredentialException, com.atlassian.crowd.exception.OperationNotPermittedException, com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      updateUserCredential in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.runtime.UserNotFoundException
      com.atlassian.crowd.exception.InvalidCredentialException
      com.atlassian.crowd.exception.OperationNotPermittedException
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • setUserAttribute

      public void setUserAttribute(com.atlassian.crowd.embedded.api.User user, String attributeName, String attributeValue) throws com.atlassian.crowd.exception.runtime.UserNotFoundException, com.atlassian.crowd.exception.OperationNotPermittedException, com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      setUserAttribute in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.runtime.UserNotFoundException
      com.atlassian.crowd.exception.OperationNotPermittedException
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • setUserAttribute

      public void setUserAttribute(com.atlassian.crowd.embedded.api.User user, String attributeName, Set<String> attributeValues) throws com.atlassian.crowd.exception.runtime.UserNotFoundException, com.atlassian.crowd.exception.OperationNotPermittedException, com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      setUserAttribute in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.runtime.UserNotFoundException
      com.atlassian.crowd.exception.OperationNotPermittedException
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • removeUserAttribute

      public void removeUserAttribute(com.atlassian.crowd.embedded.api.User user, String attributeName) throws com.atlassian.crowd.exception.runtime.UserNotFoundException, com.atlassian.crowd.exception.OperationNotPermittedException, com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      removeUserAttribute in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.runtime.UserNotFoundException
      com.atlassian.crowd.exception.OperationNotPermittedException
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • removeAllUserAttributes

      public void removeAllUserAttributes(com.atlassian.crowd.embedded.api.User user) throws com.atlassian.crowd.exception.runtime.UserNotFoundException, com.atlassian.crowd.exception.OperationNotPermittedException, com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      removeAllUserAttributes in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.runtime.UserNotFoundException
      com.atlassian.crowd.exception.OperationNotPermittedException
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • removeUser

      public boolean removeUser(com.atlassian.crowd.embedded.api.User user) throws com.atlassian.crowd.exception.OperationNotPermittedException, com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      removeUser in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.OperationNotPermittedException
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • addGroup

      public com.atlassian.crowd.embedded.api.Group addGroup(com.atlassian.crowd.embedded.api.Group group) throws com.atlassian.crowd.exception.embedded.InvalidGroupException, com.atlassian.crowd.exception.OperationNotPermittedException, com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      addGroup in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.embedded.InvalidGroupException
      com.atlassian.crowd.exception.OperationNotPermittedException
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • updateGroup

      public com.atlassian.crowd.embedded.api.Group updateGroup(com.atlassian.crowd.embedded.api.Group group) throws com.atlassian.crowd.exception.runtime.GroupNotFoundException, com.atlassian.crowd.exception.embedded.InvalidGroupException, com.atlassian.crowd.exception.OperationNotPermittedException, com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      updateGroup in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.runtime.GroupNotFoundException
      com.atlassian.crowd.exception.embedded.InvalidGroupException
      com.atlassian.crowd.exception.OperationNotPermittedException
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • setGroupAttribute

      public void setGroupAttribute(com.atlassian.crowd.embedded.api.Group group, String attributeName, String attributeValue) throws com.atlassian.crowd.exception.runtime.GroupNotFoundException, com.atlassian.crowd.exception.OperationNotPermittedException, com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      setGroupAttribute in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.runtime.GroupNotFoundException
      com.atlassian.crowd.exception.OperationNotPermittedException
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • setGroupAttribute

      public void setGroupAttribute(com.atlassian.crowd.embedded.api.Group group, String attributeName, Set<String> attributeValues) throws com.atlassian.crowd.exception.runtime.GroupNotFoundException, com.atlassian.crowd.exception.OperationNotPermittedException, com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      setGroupAttribute in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.runtime.GroupNotFoundException
      com.atlassian.crowd.exception.OperationNotPermittedException
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • removeGroupAttribute

      public void removeGroupAttribute(com.atlassian.crowd.embedded.api.Group group, String attributeName) throws com.atlassian.crowd.exception.runtime.GroupNotFoundException, com.atlassian.crowd.exception.OperationNotPermittedException, com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      removeGroupAttribute in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.runtime.GroupNotFoundException
      com.atlassian.crowd.exception.OperationNotPermittedException
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • removeAllGroupAttributes

      public void removeAllGroupAttributes(com.atlassian.crowd.embedded.api.Group group) throws com.atlassian.crowd.exception.runtime.GroupNotFoundException, com.atlassian.crowd.exception.OperationNotPermittedException, com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      removeAllGroupAttributes in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.runtime.GroupNotFoundException
      com.atlassian.crowd.exception.OperationNotPermittedException
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • removeGroup

      public boolean removeGroup(com.atlassian.crowd.embedded.api.Group group) throws com.atlassian.crowd.exception.OperationNotPermittedException, com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      removeGroup in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.OperationNotPermittedException
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • addUserToGroup

      public boolean addUserToGroup(com.atlassian.crowd.embedded.api.User user, com.atlassian.crowd.embedded.api.Group group) throws com.atlassian.crowd.exception.runtime.GroupNotFoundException, com.atlassian.crowd.exception.runtime.UserNotFoundException, com.atlassian.crowd.exception.OperationNotPermittedException, com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      addUserToGroup in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.runtime.GroupNotFoundException
      com.atlassian.crowd.exception.runtime.UserNotFoundException
      com.atlassian.crowd.exception.OperationNotPermittedException
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • addGroupToGroup

      public boolean addGroupToGroup(com.atlassian.crowd.embedded.api.Group childGroup, com.atlassian.crowd.embedded.api.Group parentGroup) throws com.atlassian.crowd.exception.runtime.GroupNotFoundException, com.atlassian.crowd.exception.OperationNotPermittedException, com.atlassian.crowd.exception.InvalidMembershipException, com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      addGroupToGroup in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.runtime.GroupNotFoundException
      com.atlassian.crowd.exception.OperationNotPermittedException
      com.atlassian.crowd.exception.InvalidMembershipException
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • removeUserFromGroup

      public boolean removeUserFromGroup(com.atlassian.crowd.embedded.api.User user, com.atlassian.crowd.embedded.api.Group group) throws com.atlassian.crowd.exception.runtime.GroupNotFoundException, com.atlassian.crowd.exception.runtime.UserNotFoundException, com.atlassian.crowd.exception.OperationNotPermittedException, com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      removeUserFromGroup in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.runtime.GroupNotFoundException
      com.atlassian.crowd.exception.runtime.UserNotFoundException
      com.atlassian.crowd.exception.OperationNotPermittedException
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • removeGroupFromGroup

      public boolean removeGroupFromGroup(com.atlassian.crowd.embedded.api.Group childGroup, com.atlassian.crowd.embedded.api.Group parentGroup) throws com.atlassian.crowd.exception.runtime.GroupNotFoundException, com.atlassian.crowd.exception.OperationNotPermittedException, com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      removeGroupFromGroup in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.runtime.GroupNotFoundException
      com.atlassian.crowd.exception.OperationNotPermittedException
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • isUserDirectGroupMember

      @Transactional(readOnly=true) public boolean isUserDirectGroupMember(com.atlassian.crowd.embedded.api.User user, com.atlassian.crowd.embedded.api.Group group) throws com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      isUserDirectGroupMember in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • isGroupDirectGroupMember

      @Transactional(readOnly=true) public boolean isGroupDirectGroupMember(com.atlassian.crowd.embedded.api.Group childGroup, com.atlassian.crowd.embedded.api.Group parentGroup) throws com.atlassian.crowd.exception.runtime.OperationFailedException
      Specified by:
      isGroupDirectGroupMember in interface com.atlassian.crowd.embedded.api.CrowdService
      Throws:
      com.atlassian.crowd.exception.runtime.OperationFailedException
    • getCapabilitiesForNewUsers

      @Transactional(readOnly=true) public com.atlassian.crowd.embedded.api.UserCapabilities getCapabilitiesForNewUsers()
      Specified by:
      getCapabilitiesForNewUsers in interface com.atlassian.crowd.embedded.api.CrowdService