public interface Importer
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SCHEME_PROPERTY
The name of the service property defining the scheme supported by the
importer (value is "importer.scheme").
|
static java.lang.String |
SERVICE_NAME
Service name under which Importer services are to be registered (value is
"com.day.cq.polling.importer.Importer").
|
Modifier and Type | Method and Description |
---|---|
void |
importData(java.lang.String scheme,
java.lang.String dataSource,
Resource target)
This method is called to poll for data to be imported at the given called
dataSource location and to import the result into the target
Resource . |
void |
importData(java.lang.String scheme,
java.lang.String dataSource,
Resource target,
java.lang.String login,
java.lang.String password)
This method is called to poll for data to be imported at the given called
dataSource location and to import the result into the target
Resource . |
static final java.lang.String SERVICE_NAME
static final java.lang.String SCHEME_PROPERTY
This service property may a single string value or an array or collection of String values. The service is registered for all schemes provided by this property.
If this service property is missing, empty or not one of the listed types, the service cannot be used and is therefore ignored.
void importData(java.lang.String scheme, java.lang.String dataSource, Resource target) throws ImportException
dataSource
location and to import the result into the target
Resource
.scheme
- The actual scheme of the data source. If an
Importer
is registered for multiple schemes, this
scheme may for example be used to decide on which data
represenation can be expected. This value is one of the
schemes with which the Importer
service has been
configured in the importer.scheme
service property
.dataSource
- The scheme specific string (generally an URI)
describing the location at which the data is to be polled. The
format of this string is specific to the actual
scheme
used. For example, this may be a plain
HTTP URL of the form http://host/some/data.xml.target
- The target resource into which the data has to be importedImportException
- may be thrown in case of problems accessing,
transferring or actually importing the data. If the failure
is caused by an exception, this exception (
Throwable
) should be made available as the cause
of this exception.void importData(java.lang.String scheme, java.lang.String dataSource, Resource target, java.lang.String login, java.lang.String password) throws ImportException
dataSource
location and to import the result into the target
Resource
.scheme
- The actual scheme of the data source. If an
Importer
is registered for multiple schemes, this
scheme may for example be used to decide on which data
represenation can be expected. This value is one of the
schemes with which the Importer
service has been
configured in the importer.scheme
service property
.dataSource
- The scheme specific string (generally an URI)
describing the location at which the data is to be polled. The
format of this string is specific to the actual
scheme
used. For example, this may be a plain
HTTP URL of the form http://host/some/data.xml.target
- The target resource into which the data has to be importedlogin
- The login for basic authentication.password
- The password for basic authentication.ImportException
- may be thrown in case of problems accessing,
transferring or actually importing the data. If the failure
is caused by an exception, this exception (
Throwable
) should be made available as the cause
of this exception."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"