|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.anwrt.anycontent.extensions.content.ContentImport
This class must be extends to define an new import in a content type.
An import class is defined by its label, the extensions it can handle and
the import operation itself.
Cocoon can be used for the conversion by using the given objectModel and resolver.
| Constructor Summary | |
ContentImport()
|
|
| Method Summary | |
void |
configure(Configuration configuration,
java.lang.String errorMessage)
Configure the import class by configuration its label, and its specificities |
protected abstract void |
configureImport(Configuration configuration)
Implement this method to configure the specificity of your class implementation |
java.lang.String |
getCatalogue()
Get the i18n catalogue directory |
abstract java.lang.String[] |
getExtensions()
The class must return the extensions type it can handle |
java.lang.String |
getLabel()
Get the label associated to the import |
java.lang.String |
getPluginId()
Get the plugin id |
java.lang.String |
getPluginName()
Get the plugin name |
abstract void |
importContent(java.io.File input,
Content content,
java.util.Map objectModel,
SourceResolver resolver,
ServiceManager manager)
Realize the import by importing the file and writing the result in the output stream |
void |
setInformation(java.lang.String pluginName,
java.lang.String pluginId)
Set the name of the plugin (the directory name) |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ContentImport()
| Method Detail |
public final java.lang.String getLabel()
public final java.lang.String getPluginName()
public final java.lang.String getPluginId()
public final java.lang.String getCatalogue()
public final void setInformation(java.lang.String pluginName,
java.lang.String pluginId)
pluginName - name of the pluginpluginId - id of the pluginpublic abstract java.lang.String[] getExtensions()
public abstract void importContent(java.io.File input,
Content content,
java.util.Map objectModel,
SourceResolver resolver,
ServiceManager manager)
throws java.lang.Exception
input - The file to importcontent - The content where to write the result of importobjectModel - The cocoon object model if needed by the import classresolver - The cocoon resolver if needed by the import classmanager - The Avalon ServiceManager to interact with other components
java.lang.Exception - If a error occurs while importing content in repository
protected abstract void configureImport(Configuration configuration)
throws ConfigurationException
configuration - The xml import configuration from the import tag
ConfigurationException - If the configuration is incorrect
public void configure(Configuration configuration,
java.lang.String errorMessage)
throws ConfigurationException
configuration - The import tag in xml configurationerrorMessage - The begining of a full qualified error message
ConfigurationException - If the configuration is incorrect
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||