Class STSInstanceConfigStoreBase<T extends STSInstanceConfig>

    • Constructor Detail

      • STSInstanceConfigStoreBase

        public STSInstanceConfigStoreBase​(InstanceConfigMarshaller<T> instanceConfigMarshaller,
                                          String serviceName,
                                          org.slf4j.Logger logger)
    • Method Detail

      • updateSTSInstance

        public void updateSTSInstance​(String stsInstanceId,
                                      String realm,
                                      T instance)
                               throws STSPublishException
        Updates attributes corresponding to the existing STS instance.
        Specified by:
        updateSTSInstance in interface STSInstanceConfigStore<T extends STSInstanceConfig>
        Parameters:
        stsInstanceId - the identifier for the to-be-updated sts instance
        realm - The realm in which the sts instance should be deployed
        instance - The updated STSInstanceConfig subclass
        Throws:
        STSPublishException - if the SMS encounters a problem during persistence.
      • getSTSInstanceConfig

        public T getSTSInstanceConfig​(String stsInstanceId,
                                      String realm)
                               throws STSPublishException
        Returns the STSInstanceConfig subclass corresponding to the stsInstanceId parameter.
        Specified by:
        getSTSInstanceConfig in interface STSInstanceConfigStore<T extends STSInstanceConfig>
        Parameters:
        stsInstanceId - the identifier of the sts
        realm - the realm in which the sts instance was deployed. Necessary for SMS lookup.
        Returns:
        the SoapSTSInstanceConfig or RestSTSInstanceConfig instance corresponding to this published instance.
        Throws:
        STSPublishException - if no instance could be found, or if the SMS encountered an error during the lookup.
      • getAllPublishedInstances

        public List<T> getAllPublishedInstances()
                                         throws STSPublishException
        Description copied from interface: STSInstanceConfigStore
        This method will be called by some startup context in the {locally|remotely} deployed {REST|SOAP} STS context to obtain all of the previously-published STS instances. The publish service will be called with all obtained instances. This will the set of published STS instances to be reconstituted following a server restart.
        Specified by:
        getAllPublishedInstances in interface STSInstanceConfigStore<T extends STSInstanceConfig>
        Returns:
        A non-null, but possibly empty list containing all of the STSInstanceConfig subclasses corresponding to published rest or soap sts instances.
        Throws:
        STSPublishException - if the realm names, necessary to obtain the sts instances published in each, could not be obtained.
      • getPublishedInstances

        public List<T> getPublishedInstances​(String realm)
                                      throws STSPublishException
        Description copied from interface: STSInstanceConfigStore
        This method will be called by some startup context in the remotely deployed SOAP STS context to obtain all of the previously-published soap STS instances for a given realm, as a soap-sts deployment is specific to a given realm.
        Specified by:
        getPublishedInstances in interface STSInstanceConfigStore<T extends STSInstanceConfig>
        Returns:
        The List of STSInstanceConfig instances (possibly empty) corresponding to the set of previously-published instances in the specified realm.
        Throws:
        STSPublishException
      • isInstancePresent

        public boolean isInstancePresent​(String stsId,
                                         String realm)
                                  throws STSPublishException
        Description copied from interface: STSInstanceConfigStore
        This method returns whether STS instance config referenced by the realm and id is present in the SMS. It is called by RestSTSPublishServiceRequestHandler#handleUpdate to determine whether the referenced sts id actually corresponds to a previously-published instance
        Specified by:
        isInstancePresent in interface STSInstanceConfigStore<T extends STSInstanceConfig>
        Parameters:
        stsId - The unique identifier for a particular STSInstanceConfig. Currently obtained by calling RestSTSInstanceConfig#getDeploymentSubPath.
        realm - the realm in which the sts instance was deployed. Necessary for SMS lookup.
        Returns:
        true if the instance is present
        Throws:
        STSPublishException - If an exception is encountered consulting the SMS.