Package org.fcrepo.http.api
Class ExternalContentHandler
- java.lang.Object
-
- org.fcrepo.http.api.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 Summary
Constructors Modifier Constructor Description protectedExternalContentHandler(String linkHeader)Construct an ExternalContentHandler (helper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStreamfetchExternalContent()longgetContentSize()StringgetContentType()StringgetHandling()URIgetURI()StringgetURL()booleanisCopy()booleanisProxy()booleanisRedirect()
-
-
-
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:
getContentTypein interfaceorg.fcrepo.kernel.api.models.ExternalContent
-
getContentSize
public long getContentSize()
- Specified by:
getContentSizein interfaceorg.fcrepo.kernel.api.models.ExternalContent
-
getHandling
public String getHandling()
- Specified by:
getHandlingin interfaceorg.fcrepo.kernel.api.models.ExternalContent
-
getURL
public String getURL()
- Specified by:
getURLin interfaceorg.fcrepo.kernel.api.models.ExternalContent
-
getURI
public URI getURI()
- Specified by:
getURIin interfaceorg.fcrepo.kernel.api.models.ExternalContent
-
isCopy
public boolean isCopy()
- Specified by:
isCopyin interfaceorg.fcrepo.kernel.api.models.ExternalContent
-
isRedirect
public boolean isRedirect()
- Specified by:
isRedirectin interfaceorg.fcrepo.kernel.api.models.ExternalContent
-
isProxy
public boolean isProxy()
- Specified by:
isProxyin interfaceorg.fcrepo.kernel.api.models.ExternalContent
-
fetchExternalContent
public InputStream fetchExternalContent()
- Specified by:
fetchExternalContentin interfaceorg.fcrepo.kernel.api.models.ExternalContent
-
-