|
||||||||
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.usecase.DocumentUsecase org.apache.lenya.cms.workflow.usecases.CheckWorkflow org.apache.lenya.cms.workflow.usecases.InvokeWorkflow org.apache.lenya.cms.workflow.usecases.Publish
public class Publish
Publish usecase handler.
Nested Class Summary | |
---|---|
static class |
Publish.LinkList
A list of links originating from a document. |
Field Summary | |
---|---|
protected static java.lang.String |
MESSAGE_DOCUMENT_PUBLISHED
|
protected static java.lang.String |
MESSAGE_SUBJECT
|
protected static java.lang.String |
SCHEDULE
|
protected static java.lang.String |
SCHEDULE_TIME
|
protected static java.lang.String |
SEND_NOTIFICATION
|
protected static java.lang.String |
UNPUBLISHED_LINKS
|
Fields inherited from class org.apache.lenya.cms.workflow.usecases.CheckWorkflow |
---|
ATTRIBUTE_ID, ELEMENT_EVENT |
Fields inherited from class org.apache.lenya.cms.usecase.DocumentUsecase |
---|
DOCUMENT, TARGET_DOCUMENT |
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 | |
---|---|
Publish()
|
Method Summary | |
---|---|
protected void |
createAncestorNodes(org.apache.lenya.cms.publication.Document document)
|
protected void |
doCheckExecutionConditions()
|
protected void |
doCheckPreconditions()
Checks if the workflow event is supported and the parent of the document exists in the live area. |
protected void |
doExecute()
|
protected org.apache.lenya.cms.site.Link |
getExistingLink(java.lang.String path,
org.apache.lenya.cms.publication.Document document)
Returns a link of a certain node, preferably in the document's language, or null if the node has no links. |
protected org.apache.lenya.cms.repository.Node[] |
getNodesToLock()
|
protected boolean |
hasBrokenLinks()
|
protected void |
initParameters()
|
protected void |
publish(org.apache.lenya.cms.publication.Document authoringDocument)
|
protected void |
sendNotification(org.apache.lenya.cms.publication.Document authoringDocument)
|
Methods inherited from class org.apache.lenya.cms.workflow.usecases.CheckWorkflow |
---|
configure, getEvent |
Methods inherited from class org.apache.lenya.cms.usecase.DocumentUsecase |
---|
getSourceDocument, getSourceURL, getTargetDocument, getTargetURL, setDefaultTargetURL, setTargetDocument |
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, contextualize, deleteParameter, doCheckPostconditions, doInitialize, dumpErrorMessages, execute, getBooleanCheckboxParameter, getContext, getDocumentFactory, getErrorMessages, getExitQueryString, getInfoMessages, getName, getParameter, getParameter, getParameterAsBoolean, getParameterAsInteger, getParameterAsString, getParameterAsString, getParameterNames, getParameters, getPart, getSession, getStateMachine, getView, hasErrors, hasInfoMessages, initialize, initializeParametersIfNotDone, isOptimistic, lockInvolvedObjects, lockInvolvedObjects, prepareView, service, 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 MESSAGE_SUBJECT
protected static final java.lang.String MESSAGE_DOCUMENT_PUBLISHED
protected static final java.lang.String SCHEDULE
protected static final java.lang.String SCHEDULE_TIME
protected static final java.lang.String SEND_NOTIFICATION
protected static final java.lang.String UNPUBLISHED_LINKS
Constructor Detail |
---|
public Publish()
Method Detail |
---|
protected void initParameters()
initParameters
in class org.apache.lenya.cms.usecase.AbstractUsecase
AbstractUsecase.initParameters()
protected boolean hasBrokenLinks()
protected org.apache.lenya.cms.repository.Node[] getNodesToLock() throws org.apache.lenya.cms.usecase.UsecaseException
getNodesToLock
in class InvokeWorkflow
org.apache.lenya.cms.usecase.UsecaseException
AbstractUsecase.getNodesToLock()
protected void doCheckPreconditions() throws java.lang.Exception
doCheckPreconditions
in class CheckWorkflow
java.lang.Exception
AbstractUsecase.doCheckPreconditions()
protected org.apache.lenya.cms.site.Link getExistingLink(java.lang.String path, org.apache.lenya.cms.publication.Document document) throws org.apache.lenya.cms.site.SiteException
null
if the node has no links.
path
- The path of the node.document
- The document.
null
.
org.apache.lenya.cms.site.SiteException
- if an error occurs.protected void doCheckExecutionConditions() throws java.lang.Exception
doCheckExecutionConditions
in class org.apache.lenya.cms.usecase.AbstractUsecase
java.lang.Exception
protected void doExecute() throws java.lang.Exception
doExecute
in class InvokeWorkflow
java.lang.Exception
AbstractUsecase.doExecute()
protected void publish(org.apache.lenya.cms.publication.Document authoringDocument) throws org.apache.lenya.cms.publication.DocumentException, org.apache.lenya.cms.site.SiteException, org.apache.lenya.cms.publication.PublicationException
org.apache.lenya.cms.publication.DocumentException
org.apache.lenya.cms.site.SiteException
org.apache.lenya.cms.publication.PublicationException
protected void sendNotification(org.apache.lenya.cms.publication.Document authoringDocument) throws org.apache.lenya.notification.NotificationException, org.apache.lenya.cms.publication.DocumentException, org.apache.lenya.ac.AccessControlException
org.apache.lenya.notification.NotificationException
org.apache.lenya.cms.publication.DocumentException
org.apache.lenya.ac.AccessControlException
protected void createAncestorNodes(org.apache.lenya.cms.publication.Document document) throws org.apache.lenya.cms.publication.PublicationException, org.apache.lenya.cms.publication.DocumentException, org.apache.lenya.cms.site.SiteException
org.apache.lenya.cms.publication.PublicationException
org.apache.lenya.cms.publication.DocumentException
org.apache.lenya.cms.site.SiteException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |