org.apache.lenya.cms.usecases.webdav
Class Put

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.site.usecases.Create
              extended by org.apache.lenya.cms.site.usecases.CreateDocument
                  extended by org.apache.lenya.cms.usecases.webdav.Put
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 Put
extends org.apache.lenya.cms.site.usecases.CreateDocument

Supports WebDAV PUT.

Version:
$Id: $

Field Summary
protected static java.lang.String ATTRIBUTE_TYPE
           
protected static java.lang.String ELEMENT_EXTENSION
           
protected static java.lang.String ELEMENT_ROOT
           
protected static java.lang.String EVENT
           
protected  java.lang.String EXTENSION
           
protected  java.lang.String TYPE
           
 
Fields inherited from class org.apache.lenya.cms.site.usecases.CreateDocument
DOCUMENT_TYPE, PARENT_PATH, PATH_PROVIDED, RELATION, RELATION_AFTER, RELATION_BEFORE, RELATION_CHILD, RELATIONS
 
Fields inherited from class org.apache.lenya.cms.site.usecases.Create
DUBLIN_CORE_PREFIX, LANGUAGE, LANGUAGES, NODE_NAME, PATH, RESOURCE_TYPES, SAMPLE, SAMPLES, 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
Put()
           
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration config)
           
protected  void doCheckExecutionConditions()
           
protected  void doExecute()
           
protected  java.lang.String getDocumentTypeName()
           
protected  java.lang.String getNewDocumentName()
           
protected  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  java.lang.String getSourceExtension()
           
protected  boolean getVisibleInNav()
           
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.site.usecases.CreateDocument
createVersion, getNodeName, getRelation, getSupportedRelations, initParameters, isPathValid
 
Methods inherited from class org.apache.lenya.cms.site.usecases.Create
doCheckPreconditions, getArea, getDublinCoreParameter, getInitialDocument, getNewDocument, getSourceDocument, initSampleParameters, setDublinCoreParameter
 
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, 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

TYPE

protected java.lang.String TYPE

EXTENSION

protected java.lang.String EXTENSION

ATTRIBUTE_TYPE

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

ELEMENT_ROOT

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

ELEMENT_EXTENSION

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

EVENT

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

Put

public Put()
Method Detail

configure

public void configure(org.apache.avalon.framework.configuration.Configuration config)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Overrides:
configure in class org.apache.lenya.cms.usecase.AbstractUsecase
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

doCheckExecutionConditions

protected void doCheckExecutionConditions()
                                   throws java.lang.Exception
Overrides:
doCheckExecutionConditions in class org.apache.lenya.cms.site.usecases.CreateDocument
Throws:
java.lang.Exception

doExecute

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

getNodesToLock

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

setMetaData

protected void setMetaData(org.apache.lenya.cms.publication.Document document)
                    throws org.apache.lenya.cms.metadata.MetaDataException
Sets the meta data of the created document.

Overrides:
setMetaData in class org.apache.lenya.cms.site.usecases.Create
Parameters:
document - The document.
Throws:
org.apache.lenya.cms.metadata.MetaDataException - if an error occurs.

getPublication

protected org.apache.lenya.cms.publication.Publication getPublication()
Access to the current publication. Use this when the publication is not yet known in the usecase: e.g. when creating a global asset. When adding a resource or a child to a document, access the publication via that document's interface instead.

Overrides:
getPublication in class org.apache.lenya.cms.site.usecases.Create
Returns:
the publication in which the use-case is being executed

getSourceExtension

protected java.lang.String getSourceExtension()
Overrides:
getSourceExtension in class org.apache.lenya.cms.site.usecases.CreateDocument

getNewDocumentName

protected java.lang.String getNewDocumentName()
Overrides:
getNewDocumentName in class org.apache.lenya.cms.site.usecases.CreateDocument

getNewDocumentPath

protected java.lang.String getNewDocumentPath()
Overrides:
getNewDocumentPath in class org.apache.lenya.cms.site.usecases.CreateDocument

getVisibleInNav

protected boolean getVisibleInNav()
Overrides:
getVisibleInNav in class org.apache.lenya.cms.site.usecases.Create

getDocumentTypeName

protected java.lang.String getDocumentTypeName()
Overrides:
getDocumentTypeName in class org.apache.lenya.cms.site.usecases.CreateDocument


Copyright $ Apache Software Foundation. All Rights Reserved.