Class MessagePolicy

    • Field Detail

      • log

        protected static final Logger log
    • Constructor Detail

      • MessagePolicy

        public MessagePolicy()
        Construct an Empty MessagePolicy
    • Method Detail

      • removeAll

        public void removeAll()
        clear this policy collection
      • size

        public int size()
        Returns:
        size of policy collection
      • get

        public SecurityPolicy get​(int index)
                           throws Exception
        Get the Security policy at the specified index
        Parameters:
        index - index to the policy collection
        Returns:
        SecurityPolicy instance at the specified index
        Throws:
        Exception - if a policy could not be retrieved
      • iterator

        public Iterator iterator()
        Returns:
        Iterator iterator on policy collection
      • isEmpty

        public boolean isEmpty()
        Returns:
        true if collection is empty
      • remove

        public void remove​(SecurityPolicy item)
        remove the specified SecurityPolicy
        Parameters:
        item - the SecurityPolicy instance to be removed
      • insertBefore

        public void insertBefore​(SecurityPolicy existing,
                                 SecurityPolicy additional)
                          throws PolicyGenerationException
        Insert the additional policy before the existing policy
        Parameters:
        existing - SecurityPolicy instance before which the additional policy needs to be inserted
        additional - SecurityPolicy instance to be inserted
        Throws:
        PolicyGenerationException - if the policy to be inserted is not an instance of WSSPolicy, or there is an error in inserting the policy
      • dumpMessages

        public void dumpMessages​(boolean dump)
        Parameters:
        dump - set it to true if messages should be Logged
      • dumpMessages

        public boolean dumpMessages()
        Returns:
        true if logging of messages is enabled
      • enableDynamicPolicy

        public void enableDynamicPolicy​(boolean flag)
      • enableDynamicPolicy

        public boolean enableDynamicPolicy()
      • enableSignatureConfirmation

        public boolean enableSignatureConfirmation()
      • enableWSS11Policy

        public void enableWSS11Policy​(boolean flag)
      • enableWSS11Policy

        public boolean enableWSS11Policy()
      • isBSP

        public void isBSP​(boolean flag)
      • isBSP

        public boolean isBSP()
      • removeOptionalTargets

        public void removeOptionalTargets()
      • addOptionalTarget

        public void addOptionalTarget​(Target target)
      • equals

        public boolean equals​(MessagePolicy policy)
        Equals operator
        Parameters:
        policy - MessagePolicy to be compared for equality
        Returns:
        true if the policy is equal to this policy
      • getPrimaryPolicies

        public ArrayList getPrimaryPolicies()
      • getSecondaryPolicies

        public ArrayList getSecondaryPolicies()
      • getType

        public String getType()
        Description copied from interface: SecurityPolicy
        Get the type of the policy.

        Implementation Note: Useful to avoid instanceof checks and String.equals checks

        Specified by:
        getType in interface SecurityPolicy
        Returns:
        the type of the policy
      • setAlgorithmSuite

        public void setAlgorithmSuite​(AlgorithmSuite algSuite)
      • setSSL

        public void setSSL​(boolean value)
      • isSSL

        public boolean isSSL()
      • getPolicyAlternativeId

        public String getPolicyAlternativeId()
      • setPolicyAlternativeId

        public void setPolicyAlternativeId​(String polId)