Class MetadataLocationImpl

java.lang.Object
org.opensaml.core.xml.AbstractXMLObject
se.swedenconnect.opensaml.eidas.metadata.impl.MetadataLocationImpl
All Implemented Interfaces:
org.opensaml.core.xml.AttributeExtensibleXMLObject, org.opensaml.core.xml.XMLObject, org.opensaml.saml.common.SAMLObject, MetadataLocation

public class MetadataLocationImpl extends org.opensaml.core.xml.AbstractXMLObject implements MetadataLocation
Implementation class for MetadataLocation.
Author:
Martin Lindström
  • Field Summary

    Fields inherited from interface se.swedenconnect.opensaml.eidas.metadata.MetadataLocation

    DEFAULT_ELEMENT_LOCAL_NAME, DEFAULT_ELEMENT_NAME, LOCATION_ATTR_NAME, TYPE_LOCAL_NAME, TYPE_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
    MetadataLocationImpl(String namespaceURI, String elementLocalName, String namespacePrefix)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Utility method that creates a KeyInfo object and assigns the supplied certificate to it before adding it to MetadataLocation.getKeyInfos().
    Returns the list of endpoints.
    List<org.opensaml.xmlsec.signature.KeyInfo>
    Returns a list of the key info elements that may be used when verifying downloaded metadata.
    Returns the location attribute, i.e., the URL from where the metadata endpoint(s) can be obtained.
    List<org.opensaml.core.xml.XMLObject>
    boolean
    For the Swedish eIDAS configuration, a flag, Suspend is used to indicate whether an endpoint has been suspended.
    org.opensaml.core.xml.util.AttributeMap
     
    void
    setLocation(String location)
    Assigns the location attribute, i.e., the URL from where the metadata endpoint(s) can be obtained.
    void
    setSuspend(boolean suspendFlag)
    Assigns the Suspend flag.

    Methods inherited from class org.opensaml.core.xml.AbstractXMLObject

    detach, ensureDOM, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getObjectMetadata, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, manageQualifiedAttributeNamespace, prepareAttributeValueForAssignment, prepareElementContentForAssignment, prepareForAssignment, prepareForAssignment, prepareForAssignment, registerOwnID, releaseChildrenDOM, releaseDOM, releaseParentDOM, releaseThisAndChildrenDOM, releaseThisandParentDOM, resolveID, resolveIDFromRoot, setDOM, setElementNamespacePrefix, setElementQName, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation, setSchemaType

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface se.swedenconnect.opensaml.eidas.metadata.MetadataLocation

    getKeyInfo, setKeyInfo, setX509Certificate

    Methods inherited from interface org.opensaml.core.xml.XMLObject

    detach, ensureDOM, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getObjectMetadata, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, releaseChildrenDOM, releaseDOM, releaseParentDOM, resolveID, resolveIDFromRoot, setDOM, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation
  • Constructor Details

    • MetadataLocationImpl

      public MetadataLocationImpl(String namespaceURI, String elementLocalName, String namespacePrefix)
      Constructor.
      Parameters:
      namespaceURI - the namespace the element is in
      elementLocalName - the local name of the XML element this Object represents
      namespacePrefix - the prefix for the given namespace
  • Method Details

    • getOrderedChildren

      public List<org.opensaml.core.xml.XMLObject> getOrderedChildren()
      Specified by:
      getOrderedChildren in interface org.opensaml.core.xml.XMLObject
    • getEndpoints

      public List<Endpoint> getEndpoints()
      Returns the list of endpoints.
      Specified by:
      getEndpoints in interface MetadataLocation
      Returns:
      endpoint list
    • getKeyInfos

      public List<org.opensaml.xmlsec.signature.KeyInfo> getKeyInfos()
      Returns a list of the key info elements that may be used when verifying downloaded metadata.
      Specified by:
      getKeyInfos in interface MetadataLocation
      Returns:
      a (possibly empty) list of key info elements
    • addX509Certificate

      public void addX509Certificate(X509Certificate certificate)
      Utility method that creates a KeyInfo object and assigns the supplied certificate to it before adding it to MetadataLocation.getKeyInfos().
      Specified by:
      addX509Certificate in interface MetadataLocation
      Parameters:
      certificate - certificate the X.509 certificate to assign to a key info
    • getLocation

      public String getLocation()
      Returns the location attribute, i.e., the URL from where the metadata endpoint(s) can be obtained.
      Specified by:
      getLocation in interface MetadataLocation
      Returns:
      URL
    • setLocation

      public void setLocation(String location)
      Assigns the location attribute, i.e., the URL from where the metadata endpoint(s) can be obtained.
      Specified by:
      setLocation in interface MetadataLocation
      Parameters:
      location - URL
    • getSuspend

      public boolean getSuspend()
      For the Swedish eIDAS configuration, a flag, Suspend is used to indicate whether an endpoint has been suspended. This method is just a short cut instead of using AttributeExtensibleXMLObject.getUnknownAttributes().
      Specified by:
      getSuspend in interface MetadataLocation
      Returns:
      if the Suspend flag has been set to true this method returns true, otherwise false 
    • setSuspend

      public void setSuspend(boolean suspendFlag)
      Assigns the Suspend flag. See MetadataLocation.getSuspend().
      Specified by:
      setSuspend in interface MetadataLocation
      Parameters:
      suspendFlag - the suspend flag
    • getUnknownAttributes

      public org.opensaml.core.xml.util.AttributeMap getUnknownAttributes()
      Specified by:
      getUnknownAttributes in interface org.opensaml.core.xml.AttributeExtensibleXMLObject