public class ArticleExporter extends AbstractExporter<Article>
GenericService.StartCommand, GenericService.StopCommand
Modifier and Type | Field and Description |
---|---|
static String |
AUTHOR_ATTR_EMAIL_ADDRESS |
static String |
AUTHOR_ATTR_FIRST_NAME |
static String |
AUTHOR_ATTR_LAST_NAME |
static String |
AUTHOR_ATTR_PUBLICATION_NAME |
static String |
AUTHOR_ATTR_URI |
static String |
AUTHOR_ATTR_USERNAME |
static String |
AUTHOR_ELEMENT |
static String |
CREATOR_ELEMENT |
mLogger
CLASS_VERSION
state
Constructor and Description |
---|
ArticleExporter() |
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(IOObject pObjectToExport,
ExportConfiguration pConfiguration)
Returns
true if the given object can be handled by this exporter. |
void |
addFieldExporter(Integer pType,
FieldExporter pFieldExporter) |
nu.xom.Element |
build(Article pArticle,
ExportConfiguration pConfiguration)
Creates an exportable representation of the provided object.
|
Map<Integer,FieldExporter> |
getFieldExporters() |
ObjectLoader |
getObjectLoader() |
TypeManager |
getTypeManager() |
void |
setObjectLoader(ObjectLoader pObjectLoader) |
void |
setTypeManager(TypeManager pTypeManager) |
protected void |
startService()
Is called by
AbstractNurseryService.doStartService() when the NurseryService is being started. |
createElement, createElement, stopService
doStartService, doStopService, stopIdleService
assertServiceRunning, getServiceDescription, getServiceMessage, getServiceState, isServiceEnabled, isServiceFailed, isServiceIdle, isServiceRunning, isServiceShutdownFailed, isServiceStopped, setServiceDescription, setServiceEnabled, start, stop, validateIsTrue, validateNotNull
public static final String AUTHOR_ELEMENT
public static final String CREATOR_ELEMENT
public static final String AUTHOR_ATTR_EMAIL_ADDRESS
public static final String AUTHOR_ATTR_FIRST_NAME
public static final String AUTHOR_ATTR_LAST_NAME
public static final String AUTHOR_ATTR_PUBLICATION_NAME
public static final String AUTHOR_ATTR_URI
public static final String AUTHOR_ATTR_USERNAME
public Map<Integer,FieldExporter> getFieldExporters()
public ObjectLoader getObjectLoader()
public void setObjectLoader(ObjectLoader pObjectLoader)
public TypeManager getTypeManager()
public void setTypeManager(TypeManager pTypeManager)
public void addFieldExporter(Integer pType, FieldExporter pFieldExporter)
protected void startService() throws Exception
AbstractNurseryService
Is called by AbstractNurseryService.doStartService()
when the NurseryService
is being started. Exceptions thrown by this
method are logged by AbstractNurseryService.doStartService()
.
Subclasses must implement this method to bootstrap the service.
startService
in class AbstractExporter<Article>
Exception
- when something goes wrong during startup. GenericService.isServiceRunning()
will return false
and GenericService.isServiceFailed()
will return true
.IllegalArgumentException
- when the configuration of the service
is invalid. GenericService.isServiceRunning()
will return false
and GenericService.isServiceFailed()
will return true
.IllegalStateException
- when this service is in the wrong state for startup. Used to signal to AbstractNurseryService.doStartService()
that it is OK to try to starting
this service
later. GenericService.isServiceRunning()
returns false
and GenericService.isServiceIdle()
returns true
.AbstractNurseryService.doStartService()
public boolean accepts(IOObject pObjectToExport, ExportConfiguration pConfiguration)
Exporter
true
if the given object can be handled by this exporter.pObjectToExport
- the object to be exportedpConfiguration
- the configuration objecttrue
if the given object can be handled by this exporter. false
otherwisepublic nu.xom.Element build(Article pArticle, ExportConfiguration pConfiguration)
Exporter
Exporter.accepts(Object, Object)
)}
returns true
pArticle
- the object to exportpConfiguration
- the configuration object© 1998- 2021 Escenic AS