|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lenya.cms.authoring.DefaultCreator
public abstract class DefaultCreator
Field Summary | |
---|---|
static java.lang.String |
RESOURCE_META_NAME
|
static java.lang.String |
RESOURCE_NAME
|
static java.lang.String |
SAMPLE_META_NAME
|
static java.lang.String |
SAMPLE_NAME
|
Fields inherited from interface org.apache.lenya.cms.authoring.ParentChildCreatorInterface |
---|
BRANCH_NODE, LEAF_NODE |
Constructor Summary | |
---|---|
DefaultCreator()
|
Method Summary | |
---|---|
void |
create(Publication publication,
java.io.File samplesDir,
java.io.File parentDir,
java.lang.String parentId,
java.lang.String childId,
short childType,
java.lang.String childName,
java.lang.String language,
java.util.Map parameters)
DOCUMENT ME! |
java.lang.String |
generateTreeId(java.lang.String childId,
short childType)
Generate a tree id by returning the child ID. |
protected abstract java.lang.String |
getChildFileName(Publication publication,
java.lang.String area,
java.lang.String parentId,
java.lang.String childId,
java.lang.String language)
Deprecated. because it implies not to use the DocumentIdToPathMapper Get the file name of the child |
protected java.lang.String |
getChildMetaFileName(java.io.File parentDir,
java.lang.String childId,
java.lang.String language)
Get the file name of the meta file |
java.lang.String |
getChildName(java.lang.String childname)
Create Child Name for tree entry |
short |
getChildType(short childType)
Return the child type by simply returning the child type. |
protected java.lang.String |
getLanguageSuffix(java.lang.String language)
Create the language suffix for a file name given a language string |
java.lang.String |
getSampleResourceName()
Get filename of template/sample |
void |
init(org.apache.avalon.framework.configuration.Configuration conf)
Configures the Creator, based on a configuration file. |
protected void |
transformMetaXML(org.w3c.dom.Document doc,
java.lang.String childId,
short childType,
java.lang.String childName,
java.util.Map parameters)
Apply some transformation on the meta file of newly created child. |
protected void |
transformXML(org.w3c.dom.Document doc,
java.lang.String childId,
short childType,
java.lang.String childName,
java.util.Map parameters)
Apply some transformation on the newly created child. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String RESOURCE_NAME
public static final java.lang.String RESOURCE_META_NAME
public static final java.lang.String SAMPLE_NAME
public static final java.lang.String SAMPLE_META_NAME
Constructor Detail |
---|
public DefaultCreator()
Method Detail |
---|
public void init(org.apache.avalon.framework.configuration.Configuration conf)
ParentChildCreatorInterface
init
in interface ParentChildCreatorInterface
conf
- DOCUMENT ME!ParentChildCreatorInterface.init(Configuration)
public java.lang.String generateTreeId(java.lang.String childId, short childType) throws java.lang.Exception
generateTreeId
in interface ParentChildCreatorInterface
childId
- a String
valuechildType
- a short
value
String
value
java.lang.Exception
- if an error occurspublic short getChildType(short childType) throws java.lang.Exception
getChildType
in interface ParentChildCreatorInterface
childType
- a short
value
short
value
java.lang.Exception
- if an error occurspublic java.lang.String getChildName(java.lang.String childname) throws java.lang.Exception
getChildName
in interface ParentChildCreatorInterface
childname
- a String
value
String
for Child Name for tree entry
java.lang.Exception
- if an error occurspublic void create(Publication publication, java.io.File samplesDir, java.io.File parentDir, java.lang.String parentId, java.lang.String childId, short childType, java.lang.String childName, java.lang.String language, java.util.Map parameters) throws java.lang.Exception
create
in interface ParentChildCreatorInterface
samplesDir
- DOCUMENT ME!parentDir
- DOCUMENT ME!childId
- DOCUMENT ME!childType
- DOCUMENT ME!childName
- the name of the childlanguage
- for which the document is createdparameters
- additional parameters that can be considered when
creating the childpublication
- the publication context.parentId
- the parent id of the new document
java.lang.Exception
- DOCUMENT ME!protected void transformXML(org.w3c.dom.Document doc, java.lang.String childId, short childType, java.lang.String childName, java.util.Map parameters) throws java.lang.Exception
doc
- the xml documentchildId
- the id of the childchildType
- the type of childchildName
- the name of the childparameters
- additional parameters that can be used in the transformation
java.lang.Exception
- if the transformation failsprotected void transformMetaXML(org.w3c.dom.Document doc, java.lang.String childId, short childType, java.lang.String childName, java.util.Map parameters) throws java.lang.Exception
doc
- the xml documentchildId
- the id of the childchildType
- the type of childchildName
- the name of the childparameters
- additional parameters that can be used in the transformation
java.lang.Exception
- if the transformation failsprotected abstract java.lang.String getChildFileName(Publication publication, java.lang.String area, java.lang.String parentId, java.lang.String childId, java.lang.String language)
parentDir
- the parent directorychildId
- the id of the childlanguage
- for which the document is created
protected java.lang.String getChildMetaFileName(java.io.File parentDir, java.lang.String childId, java.lang.String language)
parentDir
- the parent directorychildId
- the id of the childlanguage
- for which the document is created
protected java.lang.String getLanguageSuffix(java.lang.String language)
language
- the language
public java.lang.String getSampleResourceName()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |