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 Details

    • PID

      public static final String PID
      The organization service PID
      See Also:
    • ORG_PROPERTY_PREFIX

      public static final String ORG_PROPERTY_PREFIX
      The prefix for configurations to use for arbitrary organization properties
      See Also:
    • ORG_ID_KEY

      public static final String ORG_ID_KEY
      The managed property that specifies the organization id
      See Also:
    • ORG_NAME_KEY

      public static final String ORG_NAME_KEY
      The managed property that specifies the organization name
      See Also:
    • ORG_SERVER_PREFIX

      public static final String ORG_SERVER_PREFIX
      The managed property that specifies the organization server name
      See Also:
    • DEFAULT_SERVER_HOST

      public static final String DEFAULT_SERVER_HOST
      The default host in case no server is configured
      See Also:
    • DEFAULT_SERVER_PORT

      public static final int DEFAULT_SERVER_PORT
      The default port in case no server is configured
      See Also:
    • ORG_ADMIN_ROLE_KEY

      public static final String ORG_ADMIN_ROLE_KEY
      The managed property that specifies the organization administrative role
      See Also:
    • ORG_ANONYMOUS_ROLE_KEY

      public static final String ORG_ANONYMOUS_ROLE_KEY
      The managed property that specifies the organization anonymous role
      See Also:
    • configAdmin

      protected org.osgi.service.cm.ConfigurationAdmin configAdmin
      The configuration admin service
  • Constructor Details

    • OrganizationDirectoryServiceImpl

      public OrganizationDirectoryServiceImpl()
  • Method Details

    • setOrgPersistence

      public void setOrgPersistence(OrganizationDatabase 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:
      getOrganization in interface org.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:
      getOrganization in interface org.opencastproject.security.api.OrganizationDirectoryService
      Throws:
      org.opencastproject.util.NotFoundException
    • getOrganizations

      public List<org.opencastproject.security.api.Organization> getOrganizations()
      Specified by:
      getOrganizations in interface org.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

      public String getName()
      Specified by:
      getName in interface org.osgi.service.cm.ManagedServiceFactory
    • updated

      public void updated(String pid, Dictionary properties) throws org.osgi.service.cm.ConfigurationException
      Specified by:
      updated in interface org.osgi.service.cm.ManagedServiceFactory
      Throws:
      org.osgi.service.cm.ConfigurationException
    • deleted

      public void deleted(String pid)
      Specified by:
      deleted in interface org.osgi.service.cm.ManagedServiceFactory
    • addOrganizationDirectoryListener

      public void addOrganizationDirectoryListener(org.opencastproject.security.api.OrganizationDirectoryListener listener)
      Specified by:
      addOrganizationDirectoryListener in interface org.opencastproject.security.api.OrganizationDirectoryService
    • removeOrganizationDirectoryListener

      public void removeOrganizationDirectoryListener(org.opencastproject.security.api.OrganizationDirectoryListener listener)
      Specified by:
      removeOrganizationDirectoryListener in interface org.opencastproject.security.api.OrganizationDirectoryService