fedora.server.storage
Class DefaultExternalContentManager
java.lang.Object
fedora.server.Parameterized
fedora.server.Pluggable
fedora.server.Module
fedora.server.storage.DefaultExternalContentManager
- All Implemented Interfaces:
- Constants, ExternalContentManager
public class DefaultExternalContentManager
- extends Module
- implements ExternalContentManager
Title: DefaultExternalContentManager.java
Description: Provides a mechanism to obtain external HTTP-accessible
content.
- Version:
- $Id: DefaultExternalContentManager.java 6339 2007-12-05 19:29:52Z rwayland3 $
- Author:
- rlw@virginia.edu
| Fields inherited from interface fedora.common.Constants |
ACCESS, ACTION, API, AUDIT, AUDIT1_0, BATCH_MODIFY, BATCH_MODIFY1_1, BDEF, BE_SECURITY, BE_SECURITY1_0, BINDING_SPEC, BMECH, DATASTREAM, DC, DISSEMINATOR, DS_COMPOSITE_MODEL, DS_COMPOSITE_MODEL1_0, ENVIRONMENT, FCFG, FEDORA, FEDORA_HOME, FOXML, FOXML1_0, FOXML1_1, HTTP_REQUEST, MANAGEMENT, METHOD_MAP, METS, METS_EXT, METS_EXT1_0, METS_EXT1_1, MODEL, MULGARA, OAI_DC, OAI_DC2_0, OAI_FRIENDS, OAI_FRIENDS2_0, OAI_IDENTIFIER, OAI_IDENTIFIER2_0, OAI_PMH, OAI_PMH2_0, OAI_PROV, OAI_PROV2_0, OBJ_DATASTREAMS1_0, OBJ_HISTORY1_0, OBJ_ITEMS1_0, OBJ_METHODS1_0, OBJ_PROFILE1_0, OBJECT, OLD_XLINK, PID_LIST1_0, RDF, RDF_XSD, RECOVERY, RELS_EXT, REPO_DESC1_0, RESOURCE, SERVICE_PROFILE, SOAP, SOAP_ENC, SUBJECT, TYPES, VIEW, WSDL, WSDL_HTTP, WSDL_MIME, XLINK, XML_XSD, XMLNS, XSI |
|
Method Summary |
MIMETypedStream |
getExternalContent(java.lang.String url,
Context context)
A method that reads the contents of the specified URL and returns the
result as a MIMETypedStream |
void |
initModule()
Initializes the Module based on configuration parameters. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultExternalContentManager
public DefaultExternalContentManager(java.util.Map moduleParameters,
Server server,
java.lang.String role)
throws ModuleInitializationException
Creates a new DefaultExternalContentManager.
- Parameters:
moduleParameters - The name/value pair map of module parameters.server - The server instance.role - The module role name.
- Throws:
ModuleInitializationException - If initialization values are
invalid or initialization fails for some other reason.
initModule
public void initModule()
throws ModuleInitializationException
- Initializes the Module based on configuration parameters. The
implementation of this method is dependent on the schema used to define
the parameter names for the role of
fedora.server.storage.DefaultExternalContentManager.
- Overrides:
initModule in class Module
- Throws:
ModuleInitializationException - If initialization values are
invalid or initialization fails for some other reason.
getExternalContent
public MIMETypedStream getExternalContent(java.lang.String url,
Context context)
throws GeneralException,
HttpServiceNotFoundException
- A method that reads the contents of the specified URL and returns the
result as a MIMETypedStream
- Specified by:
getExternalContent in interface ExternalContentManager
- Parameters:
url - The URL of the external content.
- Returns:
- A MIME-typed stream.
- Throws:
HttpServiceNotFoundException - If the URL connection could not
be established.
GeneralException