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 Summary
ConstructorsConstructorDescriptionNo-arg constructor needed by JPAJpaOrganization(String orgId, String name, String serverName, Integer serverPort, String adminRole, String anonymousRole, Map<String, String> properties) Constructs an organization with its attributes.JpaOrganization(String orgId, String name, Map<String, Integer> servers, String adminRole, String anonymousRole, Map<String, String> properties) Constructs an organization with its attributes. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the server - port mapping.booleangetId()getName()inthashCode()voidRemoves the given server - port mapping.voidsetAdminRole(String adminRole) voidsetAnonymousRole(String anonymousRole) voidvoidsetProperties(Map<String, String> properties) voidsetServers(Map<String, Integer> servers) Replaces the existing servers.toString()
-
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 identifiername- the friendly nameserverName- the host nameserverPort- the host portadminRole- name of the local admin roleanonymousRole- name of the local anonymous roleproperties- 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 identifiername- the friendly nameservers- the serversadminRole- name of the local admin roleanonymousRole- name of the local anonymous roleproperties- arbitrary properties defined for this organization, which might include branding, etc.
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceorg.opencastproject.security.api.Organization- See Also:
-
getAnonymousRole
- Specified by:
getAnonymousRolein interfaceorg.opencastproject.security.api.Organization- See Also:
-
setAnonymousRole
-
getAdminRole
- Specified by:
getAdminRolein interfaceorg.opencastproject.security.api.Organization- See Also:
-
setAdminRole
-
getName
- Specified by:
getNamein interfaceorg.opencastproject.security.api.Organization- See Also:
-
setName
-
getProperties
- Specified by:
getPropertiesin interfaceorg.opencastproject.security.api.Organization- See Also:
-
setProperties
-
getServers
- Specified by:
getServersin interfaceorg.opencastproject.security.api.Organization- See Also:
-
setServers
Replaces the existing servers.- Parameters:
servers- the servers
-
addServer
Adds the server - port mapping.- Parameters:
serverName- the server nameport- the port
-
remove
Removes the given server - port mapping.- Parameters:
serverName- the server nameport- the port
-
equals
-
hashCode
public int hashCode() -
toString
-