Class JpaOrganization
java.lang.Object
org.opencastproject.security.impl.jpa.JpaOrganization
- All Implemented Interfaces:
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.booleanReturns the name for the local admin role.Returns the name for the local anonymous role.getId()getName()Returns the organizational propertiesReturns the server names and the corresponding ports that have been registered with this organization.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 interfaceOrganization- Returns:
- the id
- See Also:
-
getAnonymousRole
Description copied from interface:OrganizationReturns the name for the local anonymous role.- Specified by:
getAnonymousRolein interfaceOrganization- Returns:
- the anonymous role name
- See Also:
-
setAnonymousRole
-
getAdminRole
Description copied from interface:OrganizationReturns the name for the local admin role.- Specified by:
getAdminRolein interfaceOrganization- Returns:
- the admin role name
- See Also:
-
setAdminRole
-
getName
- Specified by:
getNamein interfaceOrganization- Returns:
- the name
- See Also:
-
setName
-
getProperties
Description copied from interface:OrganizationReturns the organizational properties- Specified by:
getPropertiesin interfaceOrganization- Returns:
- the properties
- See Also:
-
setProperties
-
getServers
Description copied from interface:OrganizationReturns the server names and the corresponding ports that have been registered with this organization.- Specified by:
getServersin interfaceOrganization- Returns:
- the servers
- 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
-