Class JpaUser

java.lang.Object
org.opencastproject.security.impl.jpa.JpaUser
All Implemented Interfaces:
User

@Entity public class JpaUser extends Object implements User
JPA-annotated user object.
  • Constructor Details

    • JpaUser

      public JpaUser()
      No-arg constructor needed by JPA
    • JpaUser

      public JpaUser(String username, String password, JpaOrganization organization, String name, String email, String provider, boolean manageable)
      Constructs a user with the specified username, password, name, email and provider.
      Parameters:
      username - the username
      password - the password
      organization - the organization
      name - the name
      email - the email
      provider - the provider
      manageable - whether the user is manageable
    • JpaUser

      public JpaUser(String username, String password, JpaOrganization organization, String provider, boolean manageable, Set<JpaRole> roles)
      Constructs a user with the specified username, password, provider and roles.
      Parameters:
      username - the username
      password - the password
      organization - the organization
      provider - the provider
      manageable - whether the user is manageable
      roles - the roles
    • JpaUser

      public JpaUser(String username, String password, JpaOrganization organization, String name, String email, String provider, boolean manageable, Set<JpaRole> roles)
      Constructs a user with the specified username, password, name, email, provider and roles.
      Parameters:
      username - the username
      password - the password
      organization - the organization
      name - the name
      email - the email
      provider - the provider
      manageable - whether the user is manageable
      roles - the roles
  • Method Details

    • getId

      public Long getId()
    • setId

      public void setId(Long id)
    • getPassword

      public String getPassword()
      Gets this user's clear text password.
      Specified by:
      getPassword in interface User
      Returns:
      the user account's password
    • getUsername

      public String getUsername()
      Description copied from interface: User
      Gets this user's unique account name.
      Specified by:
      getUsername in interface User
      Returns:
      the account name
      See Also:
    • hasRole

      public boolean hasRole(String roleName)
      Description copied from interface: User
      Returns whether the user is in a specific role.
      Specified by:
      hasRole in interface User
      Parameters:
      roleName - the role to check
      Returns:
      whether the role is one of this user's roles
      See Also:
    • getOrganization

      public Organization getOrganization()
      Description copied from interface: User
      Returns the user's organization identifier.
      Specified by:
      getOrganization in interface User
      Returns:
      the organization
      See Also:
    • getRoles

      public Set<Role> getRoles()
      Description copied from interface: User
      Gets the user's roles. For anonymous users, this will return Anonymous.
      Specified by:
      getRoles in interface User
      Returns:
      the user's roles
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
      See Also:
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also:
    • getName

      public String getName()
      Description copied from interface: User
      Gets the user's name.
      Specified by:
      getName in interface User
      Returns:
      the user name
    • getEmail

      public String getEmail()
      Description copied from interface: User
      Gets the user's email address.
      Specified by:
      getEmail in interface User
      Returns:
      the user's email address
    • getProvider

      public String getProvider()
      Description copied from interface: User
      Gets the provider where the user is coming from.
      Specified by:
      getProvider in interface User
      Returns:
      the provider where the user is coming from.
    • setProvider

      public void setProvider(String provider)
    • isManageable

      public boolean isManageable()
      Description copied from interface: User
      Returns true if this user object can be managed by Opencast.
      Specified by:
      isManageable in interface User
      Returns:
      true if this user is manageable
    • setManageable

      public void setManageable(boolean isManageable)