|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.lenya.workflow.impl.History
org.apache.lenya.cms.workflow.CMSHistory
public class CMSHistory
| Field Summary | |
|---|---|
static java.lang.String |
HISTORY_PATH
|
static java.lang.String |
ID_ATTRIBUTE
|
static java.lang.String |
IDENTITY_ELEMENT
|
static java.lang.String |
IP_ATTRIBUTE
|
static java.lang.String |
MACHINE_ELEMENT
|
static java.lang.String |
NAME_ATTRIBUTE
|
static java.lang.String |
USER_ELEMENT
|
| Fields inherited from class org.apache.lenya.workflow.impl.History |
|---|
DATE_ATTRIBUTE, EVENT_ATTRIBUTE, HISTORY_ELEMENT, STATE_ATTRIBUTE, VALUE_ATTRIBUTE, VARIABLE_ELEMENT, VERSION_ELEMENT, WORKFLOW_ATTRIBUTE |
| Constructor Summary | |
|---|---|
protected |
CMSHistory(Document document)
Creates a new CMSHistory object. |
| Method Summary | |
|---|---|
protected WorkflowInstanceImpl |
createInstance()
Factory method to create a workflow instance object. |
protected org.w3c.dom.Element |
createVersionElement(NamespaceHelper helper,
Situation situation)
Creates a version element based on a situation. |
void |
delete()
Additionally to deleting the workflow history, the parent directories are deleted up to the workflow history directory. |
protected org.w3c.dom.Element |
generateMachineElement(NamespaceHelper helper,
java.lang.String machineIp)
Creates an XML element describing the machine. |
protected org.w3c.dom.Element |
generateUserElement(NamespaceHelper helper,
java.lang.String userId)
Creates an XML element describing the user. |
Document |
getDocument()
Get the document |
protected java.io.File |
getHistoryFile()
Factory method to obtain the history file. |
protected java.io.File |
getHistoryFile(Document document)
Returns the history file for a certain document. |
java.lang.String |
getHistoryPath()
Returns the history path of this history. |
java.lang.String |
getHistoryPath(Document document)
Returns the path of the history file inside the publication directory. |
protected void |
initialize(Document newDocument,
Situation situation)
Initializes the workflow history of another document using the same workflow schema like this history. |
protected void |
move(Document newDocument)
Moves this history to a new document. |
protected Version |
restoreVersion(NamespaceHelper helper,
org.w3c.dom.Element element)
Restores a version from an XML element. |
void |
setDocument(Document document)
Set the document |
| Methods inherited from class org.apache.lenya.workflow.impl.History |
|---|
createInitialVersionElement, createVersionElement, getInstance, getNamespaceHelper, getVersions, getWorkflowId, getWorkflowId, initialize, isInitialized, move, restoreState, restoreVariables, saveVariables, setInstance, transitionFired |
| 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 HISTORY_PATH
public static final java.lang.String IDENTITY_ELEMENT
public static final java.lang.String USER_ELEMENT
public static final java.lang.String MACHINE_ELEMENT
public static final java.lang.String ID_ATTRIBUTE
public static final java.lang.String NAME_ATTRIBUTE
public static final java.lang.String IP_ATTRIBUTE
| Constructor Detail |
|---|
protected CMSHistory(Document document)
document - the document to which the CMSHistory is attached| Method Detail |
|---|
protected org.w3c.dom.Element createVersionElement(NamespaceHelper helper,
Situation situation)
History
createVersionElement in class Historyhelper - The namespace helper of the history document.situation - The current situation.
History.createVersionElement(org.apache.lenya.xml.NamespaceHelper, org.apache.lenya.workflow.Situation)
protected org.w3c.dom.Element generateUserElement(NamespaceHelper helper,
java.lang.String userId)
helper - The namespace helper of the document.userId - The user ID.
protected org.w3c.dom.Element generateMachineElement(NamespaceHelper helper,
java.lang.String machineIp)
helper - The namespace helper of the document.machineIp - The machine IP address.
public java.lang.String getHistoryPath(Document document)
document - A CMS document.
protected java.io.File getHistoryFile()
History
getHistoryFile in class HistoryHistory.getHistoryFile()protected java.io.File getHistoryFile(Document document)
document - The document.
protected WorkflowInstanceImpl createInstance()
throws WorkflowException
History
createInstance in class HistoryWorkflowException - if something goes wrong.History.createInstance()public Document getDocument()
public void setDocument(Document document)
document - the document
protected void initialize(Document newDocument,
Situation situation)
throws WorkflowException
newDocument - The document to initialize the history for.situation - The current situation.
WorkflowException - when something went wrong.
protected void move(Document newDocument)
throws WorkflowException
newDocument - The new document.
WorkflowException - when something went wrong.
protected Version restoreVersion(NamespaceHelper helper,
org.w3c.dom.Element element)
throws WorkflowException
History
restoreVersion in class Historyhelper - The namespace helper.element - An XML element.
WorkflowException - when something went wrong.History.restoreVersion(NamespaceHelper, org.w3c.dom.Element)public java.lang.String getHistoryPath()
public void delete()
throws WorkflowException
delete in class HistoryWorkflowException - when something went wrong.History.delete()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||