|
||||||||
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 org.apache.lenya.cms.site.usecases.CreateDocument org.apache.lenya.cms.site.usecases.CreateResource
public class CreateResource
Create a new resource document.
Field Summary | |
---|---|
protected static java.lang.String |
MESSAGE_UPLOAD_CHOOSE_FILE
|
protected static java.lang.String |
MESSAGE_UPLOAD_DISABLED
|
protected static java.lang.String |
MESSAGE_UPLOAD_ENTER_TITLE
|
protected static java.lang.String |
MESSAGE_UPLOAD_MISSING_EXTENSION
|
protected static java.lang.String |
MESSAGE_UPLOAD_RESET
|
protected static java.lang.String |
MESSAGE_UPLOAD_SIZE_EXCEEDED
|
protected static java.lang.String |
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 | |
---|---|
CreateResource()
|
Method Summary | |
---|---|
protected void |
addResource()
Adds the ressource. |
protected void |
doCheckExecutionConditions()
|
protected void |
doCheckPreconditions()
|
protected void |
doExecute()
|
protected java.lang.String |
getSourceExtension()
|
protected void |
initParameters()
|
protected void |
resetUploadField()
The browser can't set the value of the file upload widget for security reasons, so we have to remove the file parameter and the user has to select the file again. |
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, 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 PARAMETER_FILE
protected static final java.lang.String MESSAGE_UPLOAD_DISABLED
protected static final java.lang.String MESSAGE_UPLOAD_ENTER_TITLE
protected static final java.lang.String MESSAGE_UPLOAD_CHOOSE_FILE
protected static final java.lang.String MESSAGE_UPLOAD_SIZE_EXCEEDED
protected static final java.lang.String MESSAGE_UPLOAD_RESET
protected static final java.lang.String MESSAGE_UPLOAD_MISSING_EXTENSION
Constructor Detail |
---|
public CreateResource()
Method Detail |
---|
protected void doCheckPreconditions() throws java.lang.Exception
doCheckPreconditions
in class org.apache.lenya.cms.site.usecases.Create
java.lang.Exception
protected void doCheckExecutionConditions() throws java.lang.Exception
doCheckExecutionConditions
in class org.apache.lenya.cms.site.usecases.CreateDocument
java.lang.Exception
AbstractUsecase.doCheckExecutionConditions()
protected void resetUploadField()
protected void initParameters()
initParameters
in class org.apache.lenya.cms.site.usecases.CreateDocument
AbstractUsecase.initParameters()
protected void doExecute() throws java.lang.Exception
doExecute
in class org.apache.lenya.cms.site.usecases.Create
java.lang.Exception
AbstractUsecase.doExecute()
protected void addResource() throws org.apache.avalon.framework.service.ServiceException, java.io.IOException, org.apache.lenya.cms.publication.DocumentException, org.apache.lenya.cms.repository.RepositoryException, org.apache.lenya.cms.metadata.MetaDataException
java.io.IOException
org.apache.avalon.framework.service.ServiceException
org.apache.lenya.cms.publication.DocumentException
org.apache.lenya.cms.metadata.MetaDataException
org.apache.lenya.cms.repository.RepositoryException
protected java.lang.String getSourceExtension()
getSourceExtension
in class org.apache.lenya.cms.site.usecases.CreateDocument
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |