Class ServiceAccountUserImpl
java.lang.Object
com.atlassian.confluence.user.ConfluenceUserImpl
com.atlassian.confluence.impl.user.crowd.serviceaccount.ServiceAccountUserImpl
- All Implemented Interfaces:
RelatableEntity,ConfluenceUser,HasBackingUser,com.atlassian.crowd.embedded.api.service.ServiceAccount,com.atlassian.user.Entity,com.atlassian.user.User,Serializable,Cloneable,Principal
public class ServiceAccountUserImpl
extends ConfluenceUserImpl
implements com.atlassian.crowd.embedded.api.service.ServiceAccount
An implementation of a service account user in Confluence.
It wraps platform's
ServiceAccount and adds Confluence specific fields, so that it can function as a virtual ConfluenceUser.- Since:
- 10.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.confluence.user.ConfluenceUserImpl
ConfluenceUserImpl.EntityType -
Field Summary
Fields inherited from class com.atlassian.confluence.user.ConfluenceUserImpl
lowerName -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedServiceAccountUserImpl(@NonNull ConfluenceUser confluenceUser) ServiceAccountUserImpl(ConfluenceUser confluenceUser, @NonNull com.atlassian.crowd.embedded.api.service.ServiceAccount serviceAccount) ServiceAccountUserImpl(ConfluenceUser confluenceUser, Long id, boolean active, @NonNull String name, String displayName, String description, Map<com.atlassian.crowd.embedded.api.service.ResourceType, Set<com.atlassian.crowd.embedded.api.service.Resource>> resourceRestrictions) -
Method Summary
Modifier and TypeMethodDescriptionclone()Return a new copy of this ServiceAccountUserImplbooleancom.atlassian.user.UsergetEmail()getId()Map<com.atlassian.crowd.embedded.api.service.ResourceType, Set<com.atlassian.crowd.embedded.api.service.Resource>> @NonNull com.atlassian.crowd.embedded.api.service.ServiceAccountinthashCode()booleanisActive()booleanReturns whether this user entity is a service account user.protected voidvoidsetLowerName(@Nullable String lowerName) static Optional<ServiceAccountUserImpl> toServiceAccountUserImpl(@NonNull ConfluenceUser confluenceUser) Methods inherited from class com.atlassian.confluence.user.ConfluenceUserImpl
getKey, getLowerName, getName, readResolve, resetBackingUserSupplier, setBackingUser, setKey, setName, toString
-
Constructor Details
-
ServiceAccountUserImpl
public ServiceAccountUserImpl() -
ServiceAccountUserImpl
-
ServiceAccountUserImpl
public ServiceAccountUserImpl(ConfluenceUser confluenceUser, @NonNull com.atlassian.crowd.embedded.api.service.ServiceAccount serviceAccount) -
ServiceAccountUserImpl
-
-
Method Details
-
toServiceAccountUserImpl
public static Optional<ServiceAccountUserImpl> toServiceAccountUserImpl(@NonNull ConfluenceUser confluenceUser) -
getBackingUser
public com.atlassian.user.User getBackingUser()- Specified by:
getBackingUserin interfaceHasBackingUser- Overrides:
getBackingUserin classConfluenceUserImpl- Returns:
- the backing user
-
resetServiceAccountUserSupplier
protected void resetServiceAccountUserSupplier() -
getServiceAccount
public @NonNull com.atlassian.crowd.embedded.api.service.ServiceAccount getServiceAccount() -
setLowerName
- Overrides:
setLowerNamein classConfluenceUserImpl
-
getId
- Specified by:
getIdin interfacecom.atlassian.crowd.embedded.api.service.ServiceAccount
-
isActive
public boolean isActive()- Specified by:
isActivein interfacecom.atlassian.crowd.embedded.api.service.ServiceAccount
-
getDisplayName
- Specified by:
getDisplayNamein interfacecom.atlassian.crowd.embedded.api.service.ServiceAccount
-
getDescription
- Specified by:
getDescriptionin interfacecom.atlassian.crowd.embedded.api.service.ServiceAccount
-
getResourceRestrictions
public Map<com.atlassian.crowd.embedded.api.service.ResourceType,Set<com.atlassian.crowd.embedded.api.service.Resource>> getResourceRestrictions()- Specified by:
getResourceRestrictionsin interfacecom.atlassian.crowd.embedded.api.service.ServiceAccount
-
getFullName
- Specified by:
getFullNamein interfacecom.atlassian.user.User- Overrides:
getFullNamein classConfluenceUserImpl
-
getEmail
- Specified by:
getEmailin interfacecom.atlassian.user.User- Overrides:
getEmailin classConfluenceUserImpl
-
isServiceAccount
public boolean isServiceAccount()Description copied from interface:ConfluenceUserReturns whether this user entity is a service account user.- Specified by:
isServiceAccountin interfaceConfluenceUser- Returns:
- true if the authenticated user is an OAuth2 service account.
-
clone
Return a new copy of this ServiceAccountUserImpl- Overrides:
clonein classConfluenceUserImpl- Throws:
CloneNotSupportedException
-
equals
- Specified by:
equalsin interfacePrincipal- Overrides:
equalsin classConfluenceUserImpl
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacePrincipal- Overrides:
hashCodein classConfluenceUserImpl
-