Class AddStatusResponseShell

  • All Implemented Interfaces:
    net.shibboleth.utilities.java.support.component.Component, net.shibboleth.utilities.java.support.component.DestructableComponent, net.shibboleth.utilities.java.support.component.InitializableComponent, org.opensaml.profile.action.ProfileAction

    public class AddStatusResponseShell
    extends org.opensaml.profile.action.AbstractProfileAction
    Action that creates an empty object derived from StatusResponseType, and sets it as the message returned by InOutOperationContext.getOutboundMessageContext().

    The Status is set to StatusCode.SUCCESS as a default assumption, and this can be overridden by subsequent actions.

    If an issuer value is returned via a lookup strategy, then it's set as the Issuer of the message.

    Event:
    EventIds.PROCEED_EVENT_ID, EventIds.INVALID_MSG_CTX
    Postcondition:
    ProfileRequestContext.getOutboundMessageContext().getMessage() != null
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private net.shibboleth.utilities.java.support.security.IdentifierGenerationStrategy idGenerator
      The generator to use.
      private Function<org.opensaml.profile.context.ProfileRequestContext,​net.shibboleth.utilities.java.support.security.IdentifierGenerationStrategy> idGeneratorLookupStrategy
      Strategy used to locate the IdentifierGenerationStrategy to use.
      private String issuerId
      EntityID to populate into Issuer element.
      private Function<org.opensaml.profile.context.ProfileRequestContext,​String> issuerLookupStrategy
      Strategy used to obtain the response issuer value.
      private Logger log
      Class logger.
      private QName messageType
      Message type to create.
      private boolean overwriteExisting
      Overwrite an existing message?
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doExecute​(org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
      protected void doInitialize()
      protected boolean doPreExecute​(org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
      void setIdentifierGeneratorLookupStrategy​(Function<org.opensaml.profile.context.ProfileRequestContext,​net.shibboleth.utilities.java.support.security.IdentifierGenerationStrategy> strategy)
      Set the strategy used to locate the IdentifierGenerationStrategy to use.
      void setIssuerLookupStrategy​(Function<org.opensaml.profile.context.ProfileRequestContext,​String> strategy)
      Set the strategy used to locate the issuer value to use.
      void setMessageType​(QName type)
      Set the type of message to create.
      void setOverwriteExisting​(boolean flag)
      Set whether to overwrite an existing message.
      • Methods inherited from class org.opensaml.profile.action.AbstractProfileAction

        doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponse
      • Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent

        destroy, doDestroy, initialize, isDestroyed, isInitialized
      • Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent

        initialize, isInitialized
    • Field Detail

      • log

        @Nonnull
        private Logger log
        Class logger.
      • messageType

        @NonnullAfterInit
        private QName messageType
        Message type to create.
      • overwriteExisting

        private boolean overwriteExisting
        Overwrite an existing message?
      • idGeneratorLookupStrategy

        @Nonnull
        private Function<org.opensaml.profile.context.ProfileRequestContext,​net.shibboleth.utilities.java.support.security.IdentifierGenerationStrategy> idGeneratorLookupStrategy
        Strategy used to locate the IdentifierGenerationStrategy to use.
      • issuerLookupStrategy

        @Nullable
        private Function<org.opensaml.profile.context.ProfileRequestContext,​String> issuerLookupStrategy
        Strategy used to obtain the response issuer value.
      • idGenerator

        @Nullable
        private net.shibboleth.utilities.java.support.security.IdentifierGenerationStrategy idGenerator
        The generator to use.
      • issuerId

        @Nullable
        private String issuerId
        EntityID to populate into Issuer element.
    • Constructor Detail

      • AddStatusResponseShell

        public AddStatusResponseShell()
        Constructor.
    • Method Detail

      • setMessageType

        public void setMessageType​(@Nonnull
                                   QName type)
        Set the type of message to create.
        Parameters:
        type - message type
      • setOverwriteExisting

        public void setOverwriteExisting​(boolean flag)
        Set whether to overwrite an existing message.
        Parameters:
        flag - flag to set
      • setIdentifierGeneratorLookupStrategy

        public void setIdentifierGeneratorLookupStrategy​(@Nonnull
                                                         Function<org.opensaml.profile.context.ProfileRequestContext,​net.shibboleth.utilities.java.support.security.IdentifierGenerationStrategy> strategy)
        Set the strategy used to locate the IdentifierGenerationStrategy to use.
        Parameters:
        strategy - lookup strategy
      • setIssuerLookupStrategy

        public void setIssuerLookupStrategy​(@Nullable
                                            Function<org.opensaml.profile.context.ProfileRequestContext,​String> strategy)
        Set the strategy used to locate the issuer value to use.
        Parameters:
        strategy - lookup strategy
      • doInitialize

        protected void doInitialize()
                             throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
        Overrides:
        doInitialize in class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
        Throws:
        net.shibboleth.utilities.java.support.component.ComponentInitializationException
      • doPreExecute

        protected boolean doPreExecute​(@Nonnull
                                       org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
        Overrides:
        doPreExecute in class org.opensaml.profile.action.AbstractProfileAction
      • doExecute

        protected void doExecute​(@Nonnull
                                 org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
        Overrides:
        doExecute in class org.opensaml.profile.action.AbstractProfileAction