Class ExternalContentHandler

  • All Implemented Interfaces:
    org.fcrepo.kernel.api.models.ExternalContent

    public class ExternalContentHandler
    extends Object
    implements org.fcrepo.kernel.api.models.ExternalContent
    This class is a helper for dealing with the External Content Link header and External Content itself, in the case of handling="copy". This class will verify that an External Content Link header is formatted correctly and help parse it, delivering parts of it when asked.
    Since:
    5/7/2018
    Author:
    bseeger
    • Constructor Detail

      • ExternalContentHandler

        protected ExternalContentHandler​(String linkHeader)
        Construct an ExternalContentHandler (helper)
        Parameters:
        linkHeader - actual link header from request
    • Method Detail

      • getContentType

        public String getContentType()
        Specified by:
        getContentType in interface org.fcrepo.kernel.api.models.ExternalContent
      • getContentSize

        public long getContentSize()
        Specified by:
        getContentSize in interface org.fcrepo.kernel.api.models.ExternalContent
      • getHandling

        public String getHandling()
        Specified by:
        getHandling in interface org.fcrepo.kernel.api.models.ExternalContent
      • getURL

        public String getURL()
        Specified by:
        getURL in interface org.fcrepo.kernel.api.models.ExternalContent
      • getURI

        public URI getURI()
        Specified by:
        getURI in interface org.fcrepo.kernel.api.models.ExternalContent
      • isCopy

        public boolean isCopy()
        Specified by:
        isCopy in interface org.fcrepo.kernel.api.models.ExternalContent
      • isRedirect

        public boolean isRedirect()
        Specified by:
        isRedirect in interface org.fcrepo.kernel.api.models.ExternalContent
      • isProxy

        public boolean isProxy()
        Specified by:
        isProxy in interface org.fcrepo.kernel.api.models.ExternalContent
      • fetchExternalContent

        public InputStream fetchExternalContent()
        Specified by:
        fetchExternalContent in interface org.fcrepo.kernel.api.models.ExternalContent