|
||||||||
| 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
org.apache.lenya.defaultpub.cms.task.Publish
public class Publish
Publish a document.
| Field Summary | |
|---|---|
static java.lang.String |
PARAMETER_DOCUMENT_ID
|
static java.lang.String |
PARAMETER_DOCUMENT_LANGUAGE
|
static java.lang.String |
PARAMETER_USER_EMAIL
|
static java.lang.String |
PARAMETER_USER_NAME
|
| 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 | |
|---|---|
Publish()
|
|
| Method Summary | |
|---|---|
protected boolean |
checkPreconditions(Document document)
Checks if the preconditions are complied. |
void |
execute(java.lang.String servletContextPath)
Execute the task. |
protected Document |
getAuthoringDocument()
Returns the authoring document to apply this task on. |
protected void |
publish(Document authoringDocument)
Publishes a document. |
void |
setModificationDate(Document document,
java.lang.String date)
set the date of the publication, the date of the last change |
void |
setPublicationDate(Document document,
java.lang.String date)
set the date of the first publication |
void |
setPublisher(Document document)
set the publisher (the user-id, the user-name and the user-email seperate with a |) |
| 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 |
| Field Detail |
|---|
public static final java.lang.String PARAMETER_DOCUMENT_ID
public static final java.lang.String PARAMETER_DOCUMENT_LANGUAGE
public static final java.lang.String PARAMETER_USER_NAME
public static final java.lang.String PARAMETER_USER_EMAIL
| Constructor Detail |
|---|
public Publish()
| Method Detail |
|---|
public void execute(java.lang.String servletContextPath)
throws ExecutionException
Task
servletContextPath - the servlet-context
ExecutionException - if the execution failsTask.execute(java.lang.String)
public void setPublisher(Document document)
throws PublicationException,
org.apache.avalon.framework.parameters.ParameterException
document - The document.
PublicationException - When something went wrong.
org.apache.avalon.framework.parameters.ParameterException - When something went wrong.
public void setModificationDate(Document document,
java.lang.String date)
throws PublicationException
document - The document.date - The date in the format yyyy-MM-dd HH:mm:ss.
PublicationException - When something went wrong
public void setPublicationDate(Document document,
java.lang.String date)
throws PublicationException
document - The document.date - The date in the format yyyy-MM-dd HH:mm:ss.
PublicationException - When something went wrong
protected boolean checkPreconditions(Document document)
throws ExecutionException,
java.io.IOException,
java.lang.Exception
document - The document to publish.
ExecutionException
java.lang.Exception
java.io.IOException
protected void publish(Document authoringDocument)
throws PublicationException,
ExecutionException,
java.io.IOException,
org.apache.avalon.framework.parameters.ParameterException,
WorkflowException
authoringDocument - The authoring document.
PublicationException
ExecutionException
java.io.IOException
org.apache.avalon.framework.parameters.ParameterException
WorkflowException
protected Document getAuthoringDocument()
throws org.apache.avalon.framework.parameters.ParameterException,
DocumentBuildException,
ExecutionException
org.apache.avalon.framework.parameters.ParameterException - when something went wrong.
DocumentBuildException - when something went wrong.
ExecutionException - when something went wrong.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||