Class JpaOrganization

java.lang.Object
org.opencastproject.security.impl.jpa.JpaOrganization
All Implemented Interfaces:
org.opencastproject.security.api.Organization

@Entity public class JpaOrganization extends Object implements org.opencastproject.security.api.Organization
JPA-annotated organization object.
  • Constructor Details

    • JpaOrganization

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

      public JpaOrganization(String orgId, String name, String serverName, Integer serverPort, String adminRole, String anonymousRole, Map<String,String> properties)
      Constructs an organization with its attributes.
      Parameters:
      orgId - the unique identifier
      name - the friendly name
      serverName - the host name
      serverPort - the host port
      adminRole - name of the local admin role
      anonymousRole - name of the local anonymous role
      properties - arbitrary properties defined for this organization, which might include branding, etc.
    • JpaOrganization

      public JpaOrganization(String orgId, String name, Map<String,Integer> servers, String adminRole, String anonymousRole, Map<String,String> properties)
      Constructs an organization with its attributes.
      Parameters:
      orgId - the unique identifier
      name - the friendly name
      servers - the servers
      adminRole - name of the local admin role
      anonymousRole - name of the local anonymous role
      properties - arbitrary properties defined for this organization, which might include branding, etc.
  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface org.opencastproject.security.api.Organization
      See Also:
      • Organization.getId()
    • getAnonymousRole

      public String getAnonymousRole()
      Specified by:
      getAnonymousRole in interface org.opencastproject.security.api.Organization
      See Also:
      • Organization.getAnonymousRole()
    • setAnonymousRole

      public void setAnonymousRole(String anonymousRole)
    • getAdminRole

      public String getAdminRole()
      Specified by:
      getAdminRole in interface org.opencastproject.security.api.Organization
      See Also:
      • Organization.getAdminRole()
    • setAdminRole

      public void setAdminRole(String adminRole)
    • getName

      public String getName()
      Specified by:
      getName in interface org.opencastproject.security.api.Organization
      See Also:
      • Organization.getName()
    • setName

      public void setName(String name)
    • getProperties

      public Map<String,String> getProperties()
      Specified by:
      getProperties in interface org.opencastproject.security.api.Organization
      See Also:
      • Organization.getProperties()
    • setProperties

      public void setProperties(Map<String,String> properties)
    • getServers

      public Map<String,Integer> getServers()
      Specified by:
      getServers in interface org.opencastproject.security.api.Organization
      See Also:
      • Organization.getServers()
    • setServers

      public void setServers(Map<String,Integer> servers)
      Replaces the existing servers.
      Parameters:
      servers - the servers
    • addServer

      public void addServer(String serverName, Integer port)
      Adds the server - port mapping.
      Parameters:
      serverName - the server name
      port - the port
    • remove

      public void remove(String serverName, Integer port)
      Removes the given server - port mapping.
      Parameters:
      serverName - the server name
      port - the port
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object