org.apache.lenya.cms.editors
Class InsertAsset

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.site.usecases.CreateResource
                      extended by org.apache.lenya.cms.editors.InsertAsset
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 InsertAsset
extends org.apache.lenya.cms.site.usecases.CreateResource

Usecase to insert an image into a document.

Version:
$Id: InsertAsset.java 567644 2007-08-20 10:30:20Z andreas $

Field Summary
protected static java.lang.String DOCUMENT
           
 
Fields inherited from class org.apache.lenya.cms.site.usecases.CreateResource
MESSAGE_UPLOAD_CHOOSE_FILE, MESSAGE_UPLOAD_DISABLED, MESSAGE_UPLOAD_ENTER_TITLE, MESSAGE_UPLOAD_MISSING_EXTENSION, MESSAGE_UPLOAD_RESET, MESSAGE_UPLOAD_SIZE_EXCEEDED, PARAMETER_FILE
 
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
InsertAsset()
           
 
Method Summary
 void advance()
          Delegates to the main assets usecase; the name of the usecase being delegated to is set in the configuration parameter "asset-usecase".
protected  void doCheckPreconditions()
           
protected  org.apache.lenya.cms.publication.Document[] getResourceDocuments()
           
protected  void initParameters()
           
protected  void loadResources()
           
 
Methods inherited from class org.apache.lenya.cms.site.usecases.CreateResource
addResource, doCheckExecutionConditions, doExecute, getSourceExtension, resetUploadField
 
Methods inherited from class org.apache.lenya.cms.site.usecases.CreateDocument
createVersion, getDocumentTypeName, getNewDocumentName, getNewDocumentPath, getNodeName, getRelation, getSupportedRelations, isPathValid
 
Methods inherited from class org.apache.lenya.cms.site.usecases.Create
getArea, getDublinCoreParameter, getInitialDocument, getNewDocument, getNodesToLock, getPublication, getSourceDocument, getVisibleInNav, initSampleParameters, setDublinCoreParameter, setMetaData
 
Methods inherited from class org.apache.lenya.cms.usecase.AbstractUsecase
addErrorMessage, addErrorMessage, addErrorMessages, addInfoMessage, addInfoMessage, 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

DOCUMENT

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

InsertAsset

public InsertAsset()
Method Detail

initParameters

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

doCheckPreconditions

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

getResourceDocuments

protected org.apache.lenya.cms.publication.Document[] getResourceDocuments()
                                                                    throws org.apache.lenya.cms.publication.DocumentException
Throws:
org.apache.lenya.cms.publication.DocumentException

loadResources

protected void loadResources()

advance

public void advance()
             throws org.apache.lenya.cms.usecase.UsecaseException
Delegates to the main assets usecase; the name of the usecase being delegated to is set in the configuration parameter "asset-usecase".

Specified by:
advance in interface org.apache.lenya.cms.usecase.Usecase
Overrides:
advance in class org.apache.lenya.cms.usecase.AbstractUsecase
Throws:
org.apache.lenya.cms.usecase.UsecaseException
See Also:
Usecase.advance()


Copyright $ Apache Software Foundation. All Rights Reserved.