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 final class TransactionalCrowdServiceWrapper extends Object implements com.atlassian.crowd.embedded.api.UnfilteredCrowdService
AN implementation ofUnfilteredCrowdService
which exists solely as a place to hangTransactional
annotations on, since we cannot add them toUnfilteredCrowdService
.We could use an interface to extend
UnfilteredCrowdService
rather than a class, but this way if a new method is ever added toUnfilteredCrowdService
this class will be forced to implement it, and will therefore automatically get the class-levelTransactional
annotation.- Since:
- 7.15
-
-
Constructor Summary
Constructors Constructor Description TransactionalCrowdServiceWrapper(com.atlassian.crowd.embedded.api.UnfilteredCrowdService crowdService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.atlassian.crowd.embedded.api.Group
addGroup(com.atlassian.crowd.embedded.api.Group group)
boolean
addGroupToGroup(com.atlassian.crowd.embedded.api.Group childGroup, com.atlassian.crowd.embedded.api.Group parentGroup)
com.atlassian.crowd.embedded.api.User
addUser(com.atlassian.crowd.embedded.api.User user, String credential)
com.atlassian.crowd.embedded.api.UserWithAttributes
addUser(com.atlassian.crowd.embedded.api.UserWithAttributes user, String credential)
boolean
addUserToGroup(com.atlassian.crowd.embedded.api.User user, com.atlassian.crowd.embedded.api.Group group)
com.atlassian.crowd.embedded.api.User
authenticate(String name, String credential)
com.atlassian.crowd.embedded.api.UserCapabilities
getCapabilitiesForNewUsers()
com.atlassian.crowd.embedded.api.Group
getGroup(String name)
com.atlassian.crowd.embedded.api.GroupWithAttributes
getGroupWithAttributes(String name)
com.atlassian.crowd.embedded.api.User
getRemoteUser(String name)
com.atlassian.crowd.embedded.api.User
getUser(String name)
com.atlassian.crowd.embedded.api.UserWithAttributes
getUserWithAttributes(String name)
boolean
isGroupDirectGroupMember(com.atlassian.crowd.embedded.api.Group childGroup, com.atlassian.crowd.embedded.api.Group parentGroup)
boolean
isGroupMemberOfGroup(com.atlassian.crowd.embedded.api.Group childGroup, com.atlassian.crowd.embedded.api.Group parentGroup)
boolean
isGroupMemberOfGroup(String childGroupName, String parentGroupName)
boolean
isUserDirectGroupMember(com.atlassian.crowd.embedded.api.User user, com.atlassian.crowd.embedded.api.Group group)
boolean
isUserMemberOfGroup(com.atlassian.crowd.embedded.api.User user, com.atlassian.crowd.embedded.api.Group group)
boolean
isUserMemberOfGroup(String userName, String groupName)
void
removeAllGroupAttributes(com.atlassian.crowd.embedded.api.Group group)
void
removeAllUserAttributes(com.atlassian.crowd.embedded.api.User user)
boolean
removeGroup(com.atlassian.crowd.embedded.api.Group group)
void
removeGroupAttribute(com.atlassian.crowd.embedded.api.Group group, String attributeName)
boolean
removeGroupFromGroup(com.atlassian.crowd.embedded.api.Group childGroup, com.atlassian.crowd.embedded.api.Group parentGroup)
boolean
removeUser(com.atlassian.crowd.embedded.api.User user)
void
removeUserAttribute(com.atlassian.crowd.embedded.api.User user, String attributeName)
boolean
removeUserFromGroup(com.atlassian.crowd.embedded.api.User user, com.atlassian.crowd.embedded.api.Group group)
com.atlassian.crowd.embedded.api.User
renameUser(com.atlassian.crowd.embedded.api.User user, String newUsername)
<T> Iterable<T>
search(com.atlassian.crowd.embedded.api.Query<T> query)
void
setGroupAttribute(com.atlassian.crowd.embedded.api.Group group, String attributeName, String attributeValue)
void
setGroupAttribute(com.atlassian.crowd.embedded.api.Group group, String attributeName, Set<String> attributeValues)
void
setUserAttribute(com.atlassian.crowd.embedded.api.User user, String attributeName, String attributeValue)
void
setUserAttribute(com.atlassian.crowd.embedded.api.User user, String attributeName, Set<String> attributeValues)
com.atlassian.crowd.embedded.api.Group
updateGroup(com.atlassian.crowd.embedded.api.Group group)
com.atlassian.crowd.embedded.api.User
updateUser(com.atlassian.crowd.embedded.api.User user)
void
updateUserCredential(com.atlassian.crowd.embedded.api.User user, String credential)
com.atlassian.crowd.embedded.api.User
userAuthenticated(String name)
-
-
-
Method Detail
-
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 interfacecom.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 interfacecom.atlassian.crowd.embedded.api.CrowdService
-
getRemoteUser
@Transactional(readOnly=true) public com.atlassian.crowd.embedded.api.User getRemoteUser(String name)
- Specified by:
getRemoteUser
in interfacecom.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 interfacecom.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 interfacecom.atlassian.crowd.embedded.api.CrowdService
-
getGroup
@Transactional(readOnly=true) public com.atlassian.crowd.embedded.api.Group getGroup(String name)
- Specified by:
getGroup
in interfacecom.atlassian.crowd.embedded.api.CrowdService
-
getGroupWithAttributes
@Transactional(readOnly=true) public com.atlassian.crowd.embedded.api.GroupWithAttributes getGroupWithAttributes(String name)
- Specified by:
getGroupWithAttributes
in interfacecom.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 interfacecom.atlassian.crowd.embedded.api.CrowdService
-
isUserMemberOfGroup
@Transactional(readOnly=true) public boolean isUserMemberOfGroup(String userName, String groupName)
- Specified by:
isUserMemberOfGroup
in interfacecom.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 interfacecom.atlassian.crowd.embedded.api.CrowdService
-
isGroupMemberOfGroup
@Transactional(readOnly=true) public boolean isGroupMemberOfGroup(String childGroupName, String parentGroupName)
- Specified by:
isGroupMemberOfGroup
in interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.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
-
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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.atlassian.crowd.embedded.api.CrowdService
-
-