org.apache.lenya.cms.site.usecases
Class CreateBlogEntry

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.lenya.cms.usecase.AbstractUsecase
          extended by org.apache.lenya.cms.usecase.DocumentUsecase
              extended by org.apache.lenya.cms.site.usecases.CreateBlogEntry
All Implemented Interfaces:
org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, org.apache.lenya.cms.usecase.Usecase

public class CreateBlogEntry
extends org.apache.lenya.cms.usecase.DocumentUsecase

Usecase to create a Blog entry.

Version:
$Id: CreateBlogEntry.java 557603 2007-07-19 12:48:31Z andreas $

Field Summary
protected static java.lang.String DOCUMENT_ID
           
protected static java.lang.String DOCUMENT_TYPE
           
protected static java.lang.String PARENT_ID
           
 
Fields inherited from class org.apache.lenya.cms.usecase.DocumentUsecase
DOCUMENT, TARGET_DOCUMENT
 
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
CreateBlogEntry()
           
 
Method Summary
protected  void doCheckExecutionConditions()
           
protected  void doExecute()
           
protected  java.lang.String getDocumentID()
          The blog publication has a specific site structuring: it groups nodes by date.
protected  java.lang.String getDocumentTypeName()
           
protected  java.lang.String getNewDocumentName()
           
protected  org.apache.lenya.cms.repository.Node[] getNodesToLock()
           
protected  void initParameters()
           
protected  void transformXML(org.apache.lenya.cms.publication.Document document)
           
 
Methods inherited from class org.apache.lenya.cms.usecase.DocumentUsecase
doCheckPreconditions, getSourceDocument, getSourceURL, getTargetDocument, getTargetURL, setDefaultTargetURL, setTargetDocument
 
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, getStateMachine, getView, hasErrors, hasInfoMessages, initialize, initializeParametersIfNotDone, isOptimistic, lockInvolvedObjects, lockInvolvedObjects, prepareView, service, 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

PARENT_ID

protected static final java.lang.String PARENT_ID
See Also:
Constant Field Values

DOCUMENT_TYPE

protected static final java.lang.String DOCUMENT_TYPE
See Also:
Constant Field Values

DOCUMENT_ID

protected static final java.lang.String DOCUMENT_ID
See Also:
Constant Field Values
Constructor Detail

CreateBlogEntry

public CreateBlogEntry()
Method Detail

getNodesToLock

protected org.apache.lenya.cms.repository.Node[] getNodesToLock()
                                                         throws org.apache.lenya.cms.usecase.UsecaseException
Overrides:
getNodesToLock in class org.apache.lenya.cms.usecase.AbstractUsecase
Throws:
org.apache.lenya.cms.usecase.UsecaseException
See Also:
AbstractUsecase.getNodesToLock()

initParameters

protected void initParameters()
Overrides:
initParameters in class org.apache.lenya.cms.usecase.AbstractUsecase
See Also:
AbstractUsecase.initParameters()

doCheckExecutionConditions

protected void doCheckExecutionConditions()
                                   throws java.lang.Exception
Overrides:
doCheckExecutionConditions in class org.apache.lenya.cms.usecase.AbstractUsecase
Throws:
java.lang.Exception
See Also:
AbstractUsecase.doCheckExecutionConditions()

doExecute

protected void doExecute()
                  throws java.lang.Exception
Overrides:
doExecute in class org.apache.lenya.cms.usecase.AbstractUsecase
Throws:
java.lang.Exception
See Also:
AbstractUsecase.doExecute()

getDocumentID

protected java.lang.String getDocumentID()
The blog publication has a specific site structuring: it groups nodes by date.

Example structuring of blog entries:

Returns:
The document ID.

getNewDocumentName

protected java.lang.String getNewDocumentName()
Returns:
The document name.
See Also:
Create.getNewDocumentName()

getDocumentTypeName

protected java.lang.String getDocumentTypeName()
Returns:
The name of the document type.
See Also:
Create.getDocumentTypeName()

transformXML

protected void transformXML(org.apache.lenya.cms.publication.Document document)
                     throws java.lang.Exception
Throws:
java.lang.Exception


Copyright $ Apache Software Foundation. All Rights Reserved.