You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2005/01/31 10:07:17 UTC
svn commit: r149236 -
lenya/trunk/src/java/org/apache/lenya/cms/workflow/WorkflowDocument.java
Author: andreas
Date: Mon Jan 31 01:07:15 2005
New Revision: 149236
URL: http://svn.apache.org/viewcvs?view=rev&rev=149236
Log:
lazy loading for workflow history
Modified:
lenya/trunk/src/java/org/apache/lenya/cms/workflow/WorkflowDocument.java
Modified: lenya/trunk/src/java/org/apache/lenya/cms/workflow/WorkflowDocument.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/workflow/WorkflowDocument.java?view=diff&r1=149235&r2=149236
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/workflow/WorkflowDocument.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/workflow/WorkflowDocument.java Mon Jan 31 01:07:15 2005
@@ -27,17 +27,17 @@
/**
* Workflow instance for CMS documents.
- *
- * @version $Id:$
+ *
+ * @version $Id$
*/
public class WorkflowDocument extends WorkflowInstanceImpl {
-
- /**
- * Ctor.
- * @param workflow The workflow.
- * @param document the document
- * @throws WorkflowException if an error occurs.
- */
+
+ /**
+ * Ctor.
+ * @param workflow The workflow.
+ * @param document the document
+ * @throws WorkflowException if an error occurs.
+ */
protected WorkflowDocument(WorkflowImpl workflow, Document document) throws WorkflowException {
super(workflow);
assert document != null;
@@ -53,20 +53,15 @@
public Document getDocument() {
return document;
}
-
- private History history;
/**
- * @see org.apache.lenya.workflow.WorkflowInstance#getHistory()
+ * @see org.apache.lenya.workflow.impl.WorkflowInstanceImpl#createHistory()
*/
- public History getHistory() {
+ protected History createHistory() {
try {
- if (this.history == null) {
- this.history = new CMSHistory(this);
- }
+ return new CMSHistory(this);
} catch (WorkflowException e) {
throw new RuntimeException(e);
}
- return this.history;
}
-}
+}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org