|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.lenya.cms.usecase.AbstractUsecase org.apache.lenya.cms.site.usecases.Create
public abstract class Create
Abstract superclass for usecases to create a document.
You can pass the following parameters into the usecase:
Field Summary | |
---|---|
protected static java.lang.String |
DUBLIN_CORE_PREFIX
|
protected static java.lang.String |
LANGUAGE
|
protected static java.lang.String |
LANGUAGES
|
protected static java.lang.String |
NODE_NAME
|
protected static java.lang.String |
PATH
|
protected static java.lang.String |
RESOURCE_TYPES
|
protected static java.lang.String |
SAMPLE
|
protected static java.lang.String |
SAMPLES
|
protected static java.lang.String |
VISIBLEINNAV
|
Fields inherited from class org.apache.lenya.cms.usecase.AbstractUsecase |
---|
ATTRIBUTE_NAME, ATTRIBUTE_POLICY, ATTRIBUTE_USECASE, ATTRIBUTE_VALUE, context, ELEMENT_EXIT, ELEMENT_PARAMETER, ELEMENT_TRANSACTION, ELEMENT_VIEW, ERROR_OBJECTS_CHECKED_OUT, EVENT_CHECK_EXECUTION_CONDITIONS, EVENT_CHECK_POSTCONDITIONS, EVENT_CHECK_PRECONDITIONS, EVENT_EXECUTE, manager, MODEL, PARAMETER_CHECKOUT_RESTRICTED_TO_SESSION, PARAMETER_FACTORY, PARAMETER_SESSION, PARAMETER_STATE_MACHINE, PARAMETERS_INITIALIZED, SOURCE_URL, TRANSITIONS, VALUE_OPTIMISTIC, VALUE_PESSIMISTIC |
Fields inherited from interface org.apache.lenya.cms.usecase.Usecase |
---|
ROLE |
Constructor Summary | |
---|---|
Create()
Ctor. |
Method Summary | |
---|---|
protected abstract boolean |
createVersion()
|
protected void |
doCheckExecutionConditions()
|
protected void |
doCheckPreconditions()
|
protected void |
doExecute()
|
java.lang.String |
getArea()
|
protected abstract java.lang.String |
getDocumentTypeName()
|
protected java.lang.String |
getDublinCoreParameter(java.lang.String name)
|
protected org.apache.lenya.cms.publication.Document |
getInitialDocument()
If the document created in the usecase shall have initial contents copied from an existing document, construct that document in this method. |
protected org.apache.lenya.cms.publication.Document |
getNewDocument()
|
protected abstract java.lang.String |
getNewDocumentName()
|
protected abstract java.lang.String |
getNewDocumentPath()
|
protected org.apache.lenya.cms.repository.Node[] |
getNodesToLock()
|
protected org.apache.lenya.cms.publication.Publication |
getPublication()
Access to the current publication. |
protected org.apache.lenya.cms.publication.Document |
getSourceDocument()
|
protected abstract java.lang.String |
getSourceExtension()
|
protected boolean |
getVisibleInNav()
|
protected void |
initParameters()
|
protected void |
initSampleParameters()
|
protected boolean |
isPathValid()
This method is used by doCheckExecutionConditions() to check if
the path entered by the user is valid. |
protected void |
setDublinCoreParameter(java.lang.String name,
java.lang.String value)
|
protected void |
setMetaData(org.apache.lenya.cms.publication.Document document)
Sets the meta data of the created document. |
Methods inherited from class org.apache.lenya.cms.usecase.AbstractUsecase |
---|
addErrorMessage, addErrorMessage, addErrorMessages, addInfoMessage, addInfoMessage, advance, advanceState, cancel, canCheckOut, checkEvent, checkExecutionConditions, checkoutRestrictedToSession, checkPostconditions, checkPreconditions, clearErrorMessages, clearInfoMessages, configure, contextualize, deleteParameter, doCheckPostconditions, doInitialize, dumpErrorMessages, execute, getBooleanCheckboxParameter, getContext, getDocumentFactory, getErrorMessages, getExitQueryString, getInfoMessages, getName, getParameter, getParameter, getParameterAsBoolean, getParameterAsInteger, getParameterAsString, getParameterAsString, getParameterNames, getParameters, getPart, getSession, getSourceURL, getStateMachine, getTargetURL, getView, hasErrors, hasInfoMessages, initialize, initializeParametersIfNotDone, isOptimistic, lockInvolvedObjects, lockInvolvedObjects, prepareView, service, setDefaultTargetURL, setExitParameter, setName, setParameter, setPart, setSession, setSourceURL, setTestSession, setView, startTransaction |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String RESOURCE_TYPES
protected static final java.lang.String LANGUAGE
protected static final java.lang.String LANGUAGES
protected static final java.lang.String PATH
protected static final java.lang.String NODE_NAME
protected static final java.lang.String VISIBLEINNAV
protected static final java.lang.String SAMPLE
protected static final java.lang.String SAMPLES
protected static final java.lang.String DUBLIN_CORE_PREFIX
Constructor Detail |
---|
public Create()
Method Detail |
---|
protected void doCheckPreconditions() throws java.lang.Exception
doCheckPreconditions
in class org.apache.lenya.cms.usecase.AbstractUsecase
java.lang.Exception
AbstractUsecase.doCheckPreconditions()
protected org.apache.lenya.cms.repository.Node[] getNodesToLock() throws org.apache.lenya.cms.usecase.UsecaseException
getNodesToLock
in class org.apache.lenya.cms.usecase.AbstractUsecase
org.apache.lenya.cms.usecase.UsecaseException
AbstractUsecase.getNodesToLock()
protected void doCheckExecutionConditions() throws java.lang.Exception
doCheckExecutionConditions
in class org.apache.lenya.cms.usecase.AbstractUsecase
java.lang.Exception
AbstractUsecase.doCheckExecutionConditions()
protected boolean isPathValid()
doCheckExecutionConditions()
to check if
the path entered by the user is valid. If not, checking the existence of
the new document in the site structure is omitted because this operation
could cause errors.
protected void doExecute() throws java.lang.Exception
doExecute
in class org.apache.lenya.cms.usecase.AbstractUsecase
java.lang.Exception
AbstractUsecase.doExecute()
protected java.lang.String getDublinCoreParameter(java.lang.String name)
protected void setDublinCoreParameter(java.lang.String name, java.lang.String value)
protected abstract boolean createVersion()
protected abstract java.lang.String getSourceExtension()
protected abstract java.lang.String getNewDocumentName()
protected abstract java.lang.String getNewDocumentPath()
protected org.apache.lenya.cms.publication.Document getInitialDocument()
protected abstract java.lang.String getDocumentTypeName()
protected void setMetaData(org.apache.lenya.cms.publication.Document document) throws org.apache.lenya.cms.metadata.MetaDataException
document
- The document.
org.apache.lenya.cms.metadata.MetaDataException
- if an error occurs.protected void initParameters()
initParameters
in class org.apache.lenya.cms.usecase.AbstractUsecase
AbstractUsecase.initParameters()
protected void initSampleParameters()
protected org.apache.lenya.cms.publication.Document getSourceDocument()
null
if the usecase was not
invoked on a document.protected org.apache.lenya.cms.publication.Document getNewDocument()
public java.lang.String getArea()
protected org.apache.lenya.cms.publication.Publication getPublication()
protected boolean getVisibleInNav()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |