org.apache.lenya.cms.publication.task
Class DocumentTask

java.lang.Object
  extended by org.apache.lenya.cms.task.AbstractTask
      extended by org.apache.lenya.cms.publication.task.PublicationTask
          extended by org.apache.lenya.cms.publication.task.DocumentTask
All Implemented Interfaces:
org.apache.avalon.framework.parameters.Parameterizable, Task
Direct Known Subclasses:
CopyDocumentToArea

public abstract class DocumentTask
extends PublicationTask

Abstract super class for document-based tasks.


Field Summary
static java.lang.String PARAMETER_DOCUMENT_AREA
           
static java.lang.String PARAMETER_DOCUMENT_ID
           
static java.lang.String PARAMETER_DOCUMENT_LANGUAGE
           
 
Fields inherited from class org.apache.lenya.cms.publication.task.PublicationTask
PARAMETER_IP_ADDRESS, PARAMETER_ROLE_IDS, PARAMETER_USER_ID, PARAMETER_WORKFLOW_EVENT, ROLE_SEPARATOR_REGEXP
 
Fields inherited from interface org.apache.lenya.cms.task.Task
DEFAULT_PREFIX, FAILURE, NAMESPACE, PARAMETER_CONTEXT_PREFIX, PARAMETER_PUBLICATION_ID, PARAMETER_SERVER_PORT, PARAMETER_SERVER_URI, PARAMETER_SERVLET_CONTEXT, SUCCESS
 
Constructor Summary
DocumentTask()
           
 
Method Summary
protected  Document getDocument()
          Returns the document specified using the default document parameters (PARAMETER_DOCUMENT_ID, PARAMETER_DOCUMENT_AREA, PARAMETER_DOCUMENT_LANGUAGE).
protected  Document getDocument(java.lang.String documentId, java.lang.String area, java.lang.String language)
          Creates a document.
 
Methods inherited from class org.apache.lenya.cms.publication.task.PublicationTask
canCheckOut, canWorkflowFire, copyResources, getEventName, getExecutableEvent, getPublication, getRevisionController, getRevisionFilePath, getRoleIDs, getSituation, reservedCheckIn, reservedCheckOut, triggerWorkflow
 
Methods inherited from class org.apache.lenya.cms.task.AbstractTask
getParameters, getResult, parameterize, setLabel, setResult
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.lenya.cms.task.Task
execute
 

Field Detail

PARAMETER_DOCUMENT_ID

public static final java.lang.String PARAMETER_DOCUMENT_ID
See Also:
Constant Field Values

PARAMETER_DOCUMENT_AREA

public static final java.lang.String PARAMETER_DOCUMENT_AREA
See Also:
Constant Field Values

PARAMETER_DOCUMENT_LANGUAGE

public static final java.lang.String PARAMETER_DOCUMENT_LANGUAGE
See Also:
Constant Field Values
Constructor Detail

DocumentTask

public DocumentTask()
Method Detail

getDocument

protected Document getDocument()
                        throws ExecutionException
Returns the document specified using the default document parameters (PARAMETER_DOCUMENT_ID, PARAMETER_DOCUMENT_AREA, PARAMETER_DOCUMENT_LANGUAGE).

Returns:
A document.
Throws:
ExecutionException - when something went wrong.

getDocument

protected Document getDocument(java.lang.String documentId,
                               java.lang.String area,
                               java.lang.String language)
                        throws ExecutionException
Creates a document.

Parameters:
documentId - The document ID.
area - The area.
language - The language.
Returns:
A document.
Throws:
ExecutionException - when something went wrong.


Copyright © 1999-2005 Apache Software Foundation. All Rights Reserved.