Class ServiceManager


  • @Supported
    public class ServiceManager
    extends Object
    The ServiceManager class provides methods to register/remove services and to list currently registered services. It also provides methods to obtain an instance of ServiceSchemaManager and an instance of ServiceConfigManager.
    • Constructor Detail

      • ServiceManager

        @Supported
        public ServiceManager​(SSOToken token)
                       throws SSOException,
                              SMSException
        Creates an instance of ServiceManager. The SSOToken is used to identify the user performing service operations.
        Parameters:
        token - the authenticated single sign on token.
        Throws:
        SSOException - if the user's single sign on token is invalid or expired
        SMSException - if an error occurred while performing the operation
    • Method Detail

      • getSchemaManager

        @Supported
        public ServiceSchemaManager getSchemaManager​(String serviceName,
                                                     String version)
                                              throws SMSException,
                                                     SSOException
        Returns the ServiceSchemaManager for the given service name and version.
        Parameters:
        serviceName - the name of the service
        version - the version of the service
        Returns:
        the ServiceSchemaManager for the given service name and version
        Throws:
        SSOException - if the user's single sign on token is invalid or expired
        SMSException - if an error occurred while performing the operation
      • getConfigManager

        @Supported
        public ServiceConfigManager getConfigManager​(String serviceName,
                                                     String version)
                                              throws SMSException,
                                                     SSOException
        Returns the ServiceConfigManager for the given service name and version.
        Parameters:
        serviceName - the name of the service
        version - the version of the service
        Returns:
        the ServiceConfigManager for the given service name and version.
        Throws:
        SSOException - if the user's single sign on token is invalid or expired
        SMSException - if an error occurred while performing the operation
      • getServiceNames

        @Supported
        public Set<String> getServiceNames()
                                    throws SMSException
        Returns all the service names that have been registered.
        Returns:
        the set of names of services that have been registered
        Throws:
        SMSException - if an error occurred while performing the operation
      • getServiceVersions

        @Supported
        public Set<String> getServiceVersions​(String serviceName)
                                       throws SMSException
        Returns all versions supported by the service.
        Parameters:
        serviceName - service name.
        Returns:
        the set of versions supported by the service
        Throws:
        SMSException - if an error occurred while performing the operation
      • registerServices

        @Supported
        public Set<String> registerServices​(InputStream xmlServiceSchema)
                                     throws SMSException,
                                            SSOException
        Registers one or more services, defined by the XML input stream that follows the SMS DTD.
        Parameters:
        xmlServiceSchema - the input stream of service metadata in XML conforming to SMS DTD.
        Returns:
        set of registered service names.
        Throws:
        SMSException - if an error occurred while performing the operation.
        SSOException - if the user's single sign on token is invalid or expired.
      • removeService

        @Supported
        public void removeService​(String serviceName,
                                  String version)
                           throws SMSException,
                                  SSOException
        Removes the service schema and configuration for the given service name.
        Parameters:
        serviceName - the name of the service
        version - the version of the service
        Throws:
        SMSException - if an error occurred while performing the operation
        SSOException - if the user's single sign on token is invalid or expired
      • clearCache

        @Supported
        public void clearCache()
        Removes all the SMS cached entries. This method should be called to clear the cache for example, if ACIs for the SMS entries are changed in the directory. Also, this clears the SMS entries only in this JVM instance. If multiple instances (of JVM) are running this method must be called within each instance.