Class OrganizationDirectoryServiceImpl
java.lang.Object
org.opencastproject.kernel.security.OrganizationDirectoryServiceImpl
- All Implemented Interfaces:
org.opencastproject.security.api.OrganizationDirectoryService,org.osgi.service.cm.ManagedServiceFactory
public class OrganizationDirectoryServiceImpl
extends Object
implements org.opencastproject.security.api.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(org.opencastproject.security.api.Organization organization) Adds the organization to the list of organizations.voidaddOrganizationDirectoryListener(org.opencastproject.security.api.OrganizationDirectoryListener listener) voidgetName()org.opencastproject.security.api.Organizationorg.opencastproject.security.api.OrganizationgetOrganization(URL url) List<org.opencastproject.security.api.Organization> voidremoveOrganizationDirectoryListener(org.opencastproject.security.api.OrganizationDirectoryListener listener) 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
public org.opencastproject.security.api.Organization getOrganization(String id) throws org.opencastproject.util.NotFoundException - Specified by:
getOrganizationin interfaceorg.opencastproject.security.api.OrganizationDirectoryService- Throws:
org.opencastproject.util.NotFoundException
-
getOrganization
public org.opencastproject.security.api.Organization getOrganization(URL url) throws org.opencastproject.util.NotFoundException - Specified by:
getOrganizationin interfaceorg.opencastproject.security.api.OrganizationDirectoryService- Throws:
org.opencastproject.util.NotFoundException
-
getOrganizations
- Specified by:
getOrganizationsin interfaceorg.opencastproject.security.api.OrganizationDirectoryService
-
addOrganization
public void addOrganization(org.opencastproject.security.api.Organization organization) 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
public void addOrganizationDirectoryListener(org.opencastproject.security.api.OrganizationDirectoryListener listener) - Specified by:
addOrganizationDirectoryListenerin interfaceorg.opencastproject.security.api.OrganizationDirectoryService
-
removeOrganizationDirectoryListener
public void removeOrganizationDirectoryListener(org.opencastproject.security.api.OrganizationDirectoryListener listener) - Specified by:
removeOrganizationDirectoryListenerin interfaceorg.opencastproject.security.api.OrganizationDirectoryService
-