Class OrganizationDirectoryServiceImpl
java.lang.Object
org.opencastproject.kernel.security.OrganizationDirectoryServiceImpl
- All Implemented Interfaces:
OrganizationDirectoryService,org.osgi.service.cm.ManagedServiceFactory
public class OrganizationDirectoryServiceImpl
extends Object
implements OrganizationDirectoryService, org.osgi.service.cm.ManagedServiceFactory
Implements the organizational directory. As long as no organizations are published in the service registry, the
directory will contain the default organization as the only instance.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.osgi.service.cm.ConfigurationAdminThe configuration admin servicestatic final StringThe default host in case no server is configuredstatic final intThe default port in case no server is configuredstatic final StringThe managed property that specifies the organization administrative rolestatic final StringThe managed property that specifies the organization anonymous rolestatic final StringThe managed property that specifies the organization idstatic final StringThe managed property that specifies the organization namestatic final StringThe prefix for configurations to use for arbitrary organization propertiesstatic final StringThe managed property that specifies the organization server namestatic final StringThe organization service PID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOrganization(Organization organization) Adds the organization to the list of organizations.voidAddslistenerto the list of organization listeners.voidgetName()Gets an organization by its identifier.getOrganization(URL url) Gets an organization by request URL.Gets all registered organizations.voidRemoveslistenerfrom the list of organization listeners.voidsetConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configAdmin) voidsetOrgPersistence(OrganizationDatabase setOrgPersistence) OSGi DIvoidupdated(String pid, Dictionary properties)
-
Field Details
-
PID
The organization service PID- See Also:
-
ORG_PROPERTY_PREFIX
The prefix for configurations to use for arbitrary organization properties- See Also:
-
ORG_ID_KEY
The managed property that specifies the organization id- See Also:
-
ORG_NAME_KEY
The managed property that specifies the organization name- See Also:
-
ORG_SERVER_PREFIX
The managed property that specifies the organization server name- See Also:
-
DEFAULT_SERVER_HOST
The default host in case no server is configured- See Also:
-
DEFAULT_SERVER_PORT
public static final int DEFAULT_SERVER_PORTThe default port in case no server is configured- See Also:
-
ORG_ADMIN_ROLE_KEY
The managed property that specifies the organization administrative role- See Also:
-
ORG_ANONYMOUS_ROLE_KEY
The managed property that specifies the organization anonymous role- See Also:
-
configAdmin
protected org.osgi.service.cm.ConfigurationAdmin configAdminThe configuration admin service
-
-
Constructor Details
-
OrganizationDirectoryServiceImpl
public OrganizationDirectoryServiceImpl()
-
-
Method Details
-
setOrgPersistence
OSGi DI -
setConfigurationAdmin
public void setConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configAdmin) - Parameters:
configAdmin- the configAdmin to set
-
getOrganization
Description copied from interface:OrganizationDirectoryServiceGets an organization by its identifier.- Specified by:
getOrganizationin interfaceOrganizationDirectoryService- Parameters:
id- the identifier- Returns:
- the organization with this identifier
- Throws:
NotFoundException
-
getOrganization
Description copied from interface:OrganizationDirectoryServiceGets an organization by request URL.- Specified by:
getOrganizationin interfaceOrganizationDirectoryService- Parameters:
url- a request URL- Returns:
- the organization that is mapped to this URL
- Throws:
NotFoundException
-
getOrganizations
Description copied from interface:OrganizationDirectoryServiceGets all registered organizations.- Specified by:
getOrganizationsin interfaceOrganizationDirectoryService- Returns:
- the organizations
-
addOrganization
Adds the organization to the list of organizations.- Parameters:
organization- the organization
-
getName
- Specified by:
getNamein interfaceorg.osgi.service.cm.ManagedServiceFactory
-
updated
public void updated(String pid, Dictionary properties) throws org.osgi.service.cm.ConfigurationException - Specified by:
updatedin interfaceorg.osgi.service.cm.ManagedServiceFactory- Throws:
org.osgi.service.cm.ConfigurationException
-
deleted
- Specified by:
deletedin interfaceorg.osgi.service.cm.ManagedServiceFactory
-
addOrganizationDirectoryListener
Description copied from interface:OrganizationDirectoryServiceAddslistenerto the list of organization listeners.- Specified by:
addOrganizationDirectoryListenerin interfaceOrganizationDirectoryService- Parameters:
listener- the organization listener
-
removeOrganizationDirectoryListener
Description copied from interface:OrganizationDirectoryServiceRemoveslistenerfrom the list of organization listeners.- Specified by:
removeOrganizationDirectoryListenerin interfaceOrganizationDirectoryService- Parameters:
listener- the organization listener
-