| 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.lenya.cms.task.AbstractTask
org.apache.lenya.cms.publication.task.PublicationTask
public abstract class PublicationTask
Abstract super class for publication-based tasks.
| Field Summary | |
|---|---|
static java.lang.String | 
PARAMETER_IP_ADDRESS
 | 
static java.lang.String | 
PARAMETER_ROLE_IDS
 | 
static java.lang.String | 
PARAMETER_USER_ID
 | 
static java.lang.String | 
PARAMETER_WORKFLOW_EVENT
 | 
static java.lang.String | 
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 | |
|---|---|
PublicationTask()
 | 
|
| Method Summary | |
|---|---|
protected  boolean | 
canCheckOut(Document document)
Checks if the document can be checked out.  | 
protected  boolean | 
canWorkflowFire(Document document)
Checks if the workflow event can be invoked on a document.  | 
protected  void | 
copyResources(Document sourceDocument,
              Document destinationDocument)
Copies the resources of a document to another document.  | 
protected  java.lang.String | 
getEventName()
Returns the workflow event name.  | 
protected  Event | 
getExecutableEvent(SynchronizedWorkflowInstances instance,
                   Situation situation)
Returns the executable event for the provided PARAMETER_WORKFLOW_EVENT parameter. | 
protected  Publication | 
getPublication()
Returns the publication used by this task.  | 
protected  RevisionController | 
getRevisionController()
Returns the revision controller.  | 
protected  java.lang.String | 
getRevisionFilePath(Document document)
Returns the revision file path of a document.  | 
protected  java.lang.String[] | 
getRoleIDs()
Returns the role IDs.  | 
protected  Situation | 
getSituation()
Returns the workflow situation.  | 
protected  void | 
reservedCheckIn(Document document,
                boolean backup)
Checks in a document and creates a revision, if backup is true.  | 
protected  void | 
reservedCheckOut(Document document)
Checks out a document.  | 
protected  void | 
triggerWorkflow(Document document)
Invokes the workflow on a document.  | 
| 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 | 
|---|
public static final java.lang.String PARAMETER_WORKFLOW_EVENT
public static final java.lang.String PARAMETER_USER_ID
public static final java.lang.String PARAMETER_IP_ADDRESS
public static final java.lang.String PARAMETER_ROLE_IDS
public static final java.lang.String ROLE_SEPARATOR_REGEXP
| Constructor Detail | 
|---|
public PublicationTask()
| Method Detail | 
|---|
protected Publication getPublication()
                              throws ExecutionException
ExecutionException - when an error occurs.
protected void copyResources(Document sourceDocument,
                             Document destinationDocument)
                      throws ExecutionException
sourceDocument - The source document.destinationDocument - The destination document.
PublicationException - when something went wrong.
ExecutionException - when something went wrong.
java.io.IOException - when something went wrong.
protected boolean canWorkflowFire(Document document)
                           throws ExecutionException
document - The document.
ExecutionException - when something went wrong.
protected Situation getSituation()
                          throws org.apache.avalon.framework.parameters.ParameterException
org.apache.avalon.framework.parameters.ParameterException - when something went wrong.
protected void triggerWorkflow(Document document)
                        throws ExecutionException
document - The document.
org.apache.avalon.framework.parameters.ParameterException - when something went wrong.
WorkflowException - when something went wrong.
ExecutionException
protected Event getExecutableEvent(SynchronizedWorkflowInstances instance,
                                   Situation situation)
                            throws WorkflowException,
                                   org.apache.avalon.framework.parameters.ParameterException
PARAMETER_WORKFLOW_EVENT parameter.
instance - The workflow instance.situation - The situation.
WorkflowException - when something went wrong.
org.apache.avalon.framework.parameters.ParameterException - when the PARAMETER_WORKFLOW_EVENT parameter could not be resolved.
protected java.lang.String getEventName()
                                 throws org.apache.avalon.framework.parameters.ParameterException
org.apache.avalon.framework.parameters.ParameterException - when the parameter does not exist.
protected java.lang.String[] getRoleIDs()
                                 throws org.apache.avalon.framework.parameters.ParameterException
org.apache.avalon.framework.parameters.ParameterException
protected RevisionController getRevisionController()
                                            throws RevisionControlException,
                                                   ExecutionException
ExecutionException
java.io.IOException - when something went wrong.
RevisionControlException
protected java.lang.String getRevisionFilePath(Document document)
                                        throws java.io.IOException
document - The document.
java.io.IOException - when something went wrong.
protected boolean canCheckOut(Document document)
                       throws ExecutionException,
                              java.io.IOException,
                              java.lang.Exception
document - The document
ExecutionException - when something went wrong.
java.io.IOException - when something went wrong.
java.lang.Exception - when something went wrong.
protected void reservedCheckIn(Document document,
                               boolean backup)
                        throws FileReservedCheckInException,
                               java.lang.Exception
document - backup - A boolean Value
FileReservedCheckInException - when something went wrong.
java.lang.Exception - when something went wrong.
protected void reservedCheckOut(Document document)
                         throws java.io.IOException,
                                java.lang.Exception
document - The document
java.io.IOException - when something went wrong.
java.lang.Exception - when something went wrong.
  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||