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:
  • Constructor Details

    • ServiceAccountUserImpl

      public ServiceAccountUserImpl()
    • ServiceAccountUserImpl

      public 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)
    • ServiceAccountUserImpl

      public ServiceAccountUserImpl(ConfluenceUser confluenceUser, @NonNull com.atlassian.crowd.embedded.api.service.ServiceAccount serviceAccount)
    • ServiceAccountUserImpl

      protected ServiceAccountUserImpl(@NonNull ConfluenceUser confluenceUser)
  • Method Details

    • toServiceAccountUserImpl

      public static Optional<ServiceAccountUserImpl> toServiceAccountUserImpl(@NonNull ConfluenceUser confluenceUser)
    • getBackingUser

      public com.atlassian.user.User getBackingUser()
      Specified by:
      getBackingUser in interface HasBackingUser
      Overrides:
      getBackingUser in class ConfluenceUserImpl
      Returns:
      the backing user
    • resetServiceAccountUserSupplier

      protected void resetServiceAccountUserSupplier()
    • getServiceAccount

      public @NonNull com.atlassian.crowd.embedded.api.service.ServiceAccount getServiceAccount()
    • setLowerName

      public void setLowerName(@Nullable String lowerName)
      Overrides:
      setLowerName in class ConfluenceUserImpl
    • getId

      public Long getId()
      Specified by:
      getId in interface com.atlassian.crowd.embedded.api.service.ServiceAccount
    • isActive

      public boolean isActive()
      Specified by:
      isActive in interface com.atlassian.crowd.embedded.api.service.ServiceAccount
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface com.atlassian.crowd.embedded.api.service.ServiceAccount
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface com.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:
      getResourceRestrictions in interface com.atlassian.crowd.embedded.api.service.ServiceAccount
    • getFullName

      public String getFullName()
      Specified by:
      getFullName in interface com.atlassian.user.User
      Overrides:
      getFullName in class ConfluenceUserImpl
    • getEmail

      public String getEmail()
      Specified by:
      getEmail in interface com.atlassian.user.User
      Overrides:
      getEmail in class ConfluenceUserImpl
    • isServiceAccount

      public boolean isServiceAccount()
      Description copied from interface: ConfluenceUser
      Returns whether this user entity is a service account user.
      Specified by:
      isServiceAccount in interface ConfluenceUser
      Returns:
      true if the authenticated user is an OAuth2 service account.
    • clone

      Return a new copy of this ServiceAccountUserImpl
      Overrides:
      clone in class ConfluenceUserImpl
      Throws:
      CloneNotSupportedException
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in interface Principal
      Overrides:
      equals in class ConfluenceUserImpl
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface Principal
      Overrides:
      hashCode in class ConfluenceUserImpl