Class CircleOfTrustDescriptor


  • public class CircleOfTrustDescriptor
    extends Object
    The COTDescriptor class is the representation of the circle of trust configuration.
    • Constructor Detail

      • CircleOfTrustDescriptor

        public CircleOfTrustDescriptor​(String circleOfTrustName,
                                       String realm,
                                       String circleOfTrustStatus)
                                throws COTException
        Creates new COTDescriptor instance.
        Parameters:
        circleOfTrustName - name for the circleOfTrust
        realm - The realm the circle of trust resides.
        circleOfTrustStatus - status of the CircleOfTrust.
        Throws:
        COTException - if circleOfTrustName or circleOfTrustStatus is invalid.
      • CircleOfTrustDescriptor

        public CircleOfTrustDescriptor​(String circleOfTrustName,
                                       String realm,
                                       String circleOfTrustStatus,
                                       String circleOfTrustDescription,
                                       String circleOfTrustIDFFReaderURL,
                                       String circleOfTrustIDFFWriterURL,
                                       String circleOfTrustSAML2ReaderURL,
                                       String circleOfTrustSAML2WriterURL,
                                       Set circleOfTrustProvider)
                                throws COTException
        Creates new COTDescriptor instance.
        Parameters:
        circleOfTrustName - name for the circleOfTrust
        realm - The realm this circle of trust resides.
        circleOfTrustStatus - status of the CircleOfTrust.
        circleOfTrustDescription - description for the circleOfTrust.
        circleOfTrustIDFFReaderURL - the reader url of the CircleOfTrust.
        circleOfTrustIDFFWriterURL - the writer url of the circleOfTrust.
        circleOfTrustSAML2ReaderURL - the reader url of the CircleOfTrust.
        circleOfTrustSAML2WriterURL - the writer url of the circleOfTrust.
        circleOfTrustProvider - the trusted providers of the CircleOfTrust.
        Throws:
        COTException - if any input parameter is invalid.
    • Method Detail

      • getCircleOfTrustName

        public String getCircleOfTrustName()
        Returns name of the Circle of Trust.
        Returns:
        name of the Circle of Trust.
      • getCircleOfTrustRealm

        public String getCircleOfTrustRealm()
        Returns name of the realm the Circle of Trust resides.
        Returns:
        realm name.
      • getCircleOfTrustStatus

        public String getCircleOfTrustStatus()
        Returns status of the Circle of Trust.
        Returns:
        status of the Circle of Trust. It can be "active" or "inactive"
      • getCircleOfTrustDescription

        public String getCircleOfTrustDescription()
        Returns description of the Circle of Trust.
        Returns:
        description of the Circle of Trust.
      • getIDFFReaderServiceURL

        public String getIDFFReaderServiceURL()
        Returns reader service URL of the Circle of Trust for ID-FF protocol.
        Returns:
        Reader service URL for ID-FF protocol.
      • getSAML2ReaderServiceURL

        public String getSAML2ReaderServiceURL()
        Returns reader service URL of the Circle of Trust for SAMLv2 protocol.
        Returns:
        Reader service URL for SAMLv2 protocol.
      • getIDFFWriterServiceURL

        public String getIDFFWriterServiceURL()
        Returns Writer Service URL of the Circle of Trust for ID-FF protocol.
        Returns:
        the Writer service URL for ID-FF protocol.
      • getSAML2WriterServiceURL

        public String getSAML2WriterServiceURL()
        Returns Writer Service URL of the Circle of Trust for SAMLv2 protocol.
        Returns:
        the Writer service URL for SAMLv2 protocol.
      • setCircleOfTrustDescription

        public void setCircleOfTrustDescription​(String circleOfTrustDescription)
        Sets description of the Circle of Trust.
        Parameters:
        circleOfTrustDescription - Description of the Circle of Trust.
      • setIDFFReaderServiceURL

        public void setIDFFReaderServiceURL​(String readerServiceURL)
                                     throws COTException
        Sets reader service URL for ID-FF protocol.
        Parameters:
        readerServiceURL - reader service URL for ID-FF protocol.
        Throws:
        COTException - if readerServiceURL is not an URL.
      • setSAML2ReaderServiceURL

        public void setSAML2ReaderServiceURL​(String readerServiceURL)
                                      throws COTException
        Sets reader service URL for SMALv2 protocol.
        Parameters:
        readerServiceURL - reader service URL of SAMLv2 protocol.
        Throws:
        COTException - if readerServiceURL is not an URL.
      • setIDFFWriterServiceURL

        public void setIDFFWriterServiceURL​(String writerServiceURL)
                                     throws COTException
        Sets writer service URL for IDFF protocol.
        Parameters:
        writerServiceURL - writer service URL of the Circle of Trust.
        Throws:
        COTException - if writerServiceURL is not an URL.
      • setSAML2WriterServiceURL

        public void setSAML2WriterServiceURL​(String writerServiceURL)
                                      throws COTException
        Sets writer service URL for SAML2 protocol.
        Parameters:
        writerServiceURL - writer service URL of the Circle of Trust.
        Throws:
        COTException - if writerServiceURL is not an URL.
      • setCircleOfTrustStatus

        public void setCircleOfTrustStatus​(String circleOfTrustStatus)
                                    throws COTException
        Sets status of a circle of trust.
        Parameters:
        circleOfTrustStatus - the circle of trust status. The valid value for status is "active" or "inactive".
        Throws:
        COTException - if circleOfTrustStatus is blank or it is not "active" or "inactive"
      • setTrustedProviders

        public void setTrustedProviders​(Set circleOfTrustProvider)
        Sets trusted providers of a circle of trust.
        Parameters:
        circleOfTrustProvider - A set of trusted providers
      • getTrustedProviders

        public Set getTrustedProviders()
        Returns a set of trusted providers in the circle of trust.
        Returns:
        a set of trusted providers in the circle of trust, or null if there is no trusted providers in the circle of trust.
      • getTrustedProviders

        public Set getTrustedProviders​(String protocol)
        Returns a set of trusted providers in the circle of trust for a specific protocol.
        Parameters:
        protocol - name of the federation protocol
        Returns:
        a set of trusted providers in the circle of trust, or null if such entity does not exist.
      • add

        public boolean add​(String entityID,
                           String protocol)
                    throws COTException
        Adds entity identifier to trusted providers set within the circle of trust.
        Parameters:
        entityID - the entity id of a provider .
        protocol - name of protocol for the entity.
        Returns:
        true if the set did not already contain the entityID.
        Throws:
        COTException
      • remove

        public boolean remove​(String entityID,
                              String protocol)
        Removes member from the trusted provider set within this circle of trust.
        Parameters:
        entityID - The entity id of a provider.
        protocol - name of protocol for the entity.
        Returns:
        true if the set contained the entityID.
      • getAttributes

        protected Map getAttributes()
        Returns attributes of this object into a map.