jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ajaqu...@apache.org
Subject svn commit: r889884 - in /incubator/jspwiki/trunk: ./ src/WebContent/ src/WebContent/WEB-INF/classes/ src/WebContent/WEB-INF/classes/templates/ src/WebContent/admin/ src/WebContent/templates/default/ src/java/org/apache/wiki/ src/java/org/apache/wiki/a...
Date Sat, 12 Dec 2009 04:03:14 GMT
Author: ajaquith
Date: Sat Dec 12 04:03:11 2009
New Revision: 889884

URL: http://svn.apache.org/viewvc?rev=889884&view=rev
Log:
Workflow/WorkflowContent.jsp received the Stripes treatment. All logic moved to WorkflowActionBean.

Added:
    incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/stripes/OutcomeTypeConverter.java
    incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/WorkflowActionBeanTest.java
Modified:
    incubator/jspwiki/trunk/ChangeLog
    incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources.properties
    incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_de.properties
    incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_es.properties
    incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_fi.properties
    incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_fr.properties
    incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_it.properties
    incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_nl.properties
    incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_pt_BR.properties
    incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_ru.properties
    incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_zh_CN.properties
    incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default.properties
    incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_de.properties
    incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_es.properties
    incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_fi.properties
    incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_fr.properties
    incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_it.properties
    incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_nl.properties
    incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_pt_BR.properties
    incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_ru.properties
    incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_zh_CN.properties
    incubator/jspwiki/trunk/src/WebContent/Workflow.jsp
    incubator/jspwiki/trunk/src/WebContent/admin/Install.jsp
    incubator/jspwiki/trunk/src/WebContent/templates/default/WorkflowContent.jsp
    incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/action/WorkflowActionBean.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/authorize/Role.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/DecisionQueue.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/Outcome.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/WorkflowManager.java
    incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/AllTests.java
    incubator/jspwiki/trunk/tests/java/org/apache/wiki/workflow/OutcomeTest.java

Modified: incubator/jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Sat Dec 12 04:03:11 2009
@@ -1,3 +1,12 @@
+2009-12-11 Andrew Jaquith <ajaquith AT apache DOT org>
+
+        * 3.0.0-svn-191.
+
+        * Workflow/WorkflowContent.jsp received the Stripes treatment.
+        All logic moved to WorkflowActionBean.
+        
+        * Fixed some dumb license header issues.
+
 2009-12-10 Andrew Jaquith <ajaquith AT apache DOT org>
 
         * 3.0.0-svn-190. Unit test fixes. Back up to 97.3% pass rate.

Modified: incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources.properties?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources.properties (original)
+++ incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources.properties Sat Dec 12 04:03:11 2009
@@ -328,7 +328,7 @@
 properties.jspwiki.ldap_ssl=Use SSL?
 properties.jspwiki.ldap_userBase=User base
 properties.jspwiki.ldap_roleBase=Role base
-adminPassword=Admin password
+adminPassword=Superuser password
 properties.jspwiki.ldap_bindUser=Bind as user
 bindPassword=Password
 #Formerly named install.jsp.adv.settings.logfile.label.
@@ -352,3 +352,24 @@
 group=Name
 #Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named group.members.
 members=Group members
+outcome.doesnotexist=The Outcome named {0} does not exist.
+org.apache.wiki.action.WorkflowActionBean.abort=Abort
+org.apache.wiki.action.WorkflowActionBean.decide=Submit
+properties.jspwiki.jspwiki_approver_workflow_saveWikiPage=Wiki page approver
+properties.jspwiki.jspwiki_approver_workflow_createUserProfile=Profile approver
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.abort.
+Outcome.step.abort=Abort
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.complete.
+Outcome.step.complete=Completed
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.continue.
+Outcome.step.continue=Continue
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.acknowledge.
+Outcome.decision.acknowledge=OK
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.approve.
+Outcome.decision.approve=Approve
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.deny.
+Outcome.decision.deny=Deny
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.hold.
+Outcome.decision.hold=Hold
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.reassign.
+Outcome.decision.reassign=Reassign

Modified: incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_de.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_de.properties?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_de.properties (original)
+++ incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_de.properties Sat Dec 12 04:03:11 2009
@@ -328,6 +328,23 @@
 group=Name
 #Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named group.members.
 members=Mitglieder
+org.apache.wiki.action.WorkflowActionBean.abort=Abbrechen
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.abort.
+Outcome.step.abort=Abbrechen
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.complete.
+Outcome.step.complete=Beendet
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.continue.
+Outcome.step.continue=Fortsetzen
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.acknowledge.
+Outcome.decision.acknowledge=OK
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.approve.
+Outcome.decision.approve=Genehmigen
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.deny.
+Outcome.decision.deny=Ablehnen
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.hold.
+Outcome.decision.hold=Zurückstellen
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.reassign.
+Outcome.decision.reassign=Neu zuweisen
 # Outdated or superfluous properties since 3.0.0
 
 # folgende Properties sind in der aktuellen 'default en' Datei nicht enthalten

Modified: incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_es.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_es.properties?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_es.properties (original)
+++ incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_es.properties Sat Dec 12 04:03:11 2009
@@ -329,3 +329,20 @@
 group=Nombre
 #Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named group.members.
 members=Miembros
+org.apache.wiki.action.WorkflowActionBean.abort=Abortar
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.abort.
+Outcome.step.abort=Abortar
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.complete.
+Outcome.step.complete=Completado
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.continue.
+Outcome.step.continue=Continuar
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.acknowledge.
+Outcome.decision.acknowledge=OK
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.approve.
+Outcome.decision.approve=Aprobar
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.deny.
+Outcome.decision.deny=Denegar
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.hold.
+Outcome.decision.hold=Mantener
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.reassign.
+Outcome.decision.reassign=Reasignar

Modified: incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_fi.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_fi.properties?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_fi.properties (original)
+++ incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_fi.properties Sat Dec 12 04:03:11 2009
@@ -222,3 +222,20 @@
 group=Ryhmän nimi
 #Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named group.members.
 members=Jäsenet
+org.apache.wiki.action.WorkflowActionBean.abort=Keskeytä
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.abort.
+Outcome.step.abort=Keskeytä
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.complete.
+Outcome.step.complete=Suoritettu
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.continue.
+Outcome.step.continue=Jatka
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.acknowledge.
+Outcome.decision.acknowledge=OK
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.approve.
+Outcome.decision.approve=Hyväksy
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.deny.
+Outcome.decision.deny=Kiellä
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.hold.
+Outcome.decision.hold=Laita jonoon
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.reassign.
+Outcome.decision.reassign=Lähetä edelleen

Modified: incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_fr.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_fr.properties?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_fr.properties (original)
+++ incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_fr.properties Sat Dec 12 04:03:11 2009
@@ -235,3 +235,20 @@
 #Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named group.members.
 members=Membres du groupe
 #Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named editor.plain.save.title.
+org.apache.wiki.action.WorkflowActionBean.abort=Abandonner
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.abort.
+Outcome.step.abort=Abandonner
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.complete.
+Outcome.step.complete=Terminé
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.continue.
+Outcome.step.continue=Continuer
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.acknowledge.
+Outcome.decision.acknowledge=OK
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.approve.
+Outcome.decision.approve=Approuver
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.deny.
+Outcome.decision.deny=Refuser
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.hold.
+Outcome.decision.hold=Conserver
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.reassign.
+Outcome.decision.reassign=Réassigner

Modified: incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_it.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_it.properties?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_it.properties (original)
+++ incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_it.properties Sat Dec 12 04:03:11 2009
@@ -233,3 +233,20 @@
 #Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named group.members.
 members=Membri del gruppo
 #Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named editor.plain.save.title.
+org.apache.wiki.action.WorkflowActionBean.abort=Annulla
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.abort.
+Outcome.step.abort=Annulla
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.complete.
+Outcome.step.complete=Completato
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.continue.
+Outcome.step.continue=Continua
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.acknowledge.
+Outcome.decision.acknowledge=OK
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.approve.
+Outcome.decision.approve=Approva
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.deny.
+Outcome.decision.deny=Deny
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.hold.
+Outcome.decision.hold=Blocca
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.reassign.
+Outcome.decision.reassign=Riassegna

Modified: incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_nl.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_nl.properties?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_nl.properties (original)
+++ incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_nl.properties Sat Dec 12 04:03:11 2009
@@ -289,3 +289,20 @@
 group=Naam
 #Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named group.members.
 members=Leden van de groep
+org.apache.wiki.action.WorkflowActionBean.abort=Breek af
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.abort.
+Outcome.step.abort=Breek af
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.complete.
+Outcome.step.complete=Afgewerkt
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.continue.
+Outcome.step.continue=Verderzetten
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.acknowledge.
+Outcome.decision.acknowledge=OK
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.approve.
+Outcome.decision.approve=Keur goed
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.deny.
+Outcome.decision.deny=Geweigerd
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.hold.
+Outcome.decision.hold=Hold
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.reassign.
+Outcome.decision.reassign=Opnieuw toewijzen

Modified: incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_pt_BR.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_pt_BR.properties?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_pt_BR.properties (original)
+++ incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_pt_BR.properties Sat Dec 12 04:03:11 2009
@@ -174,3 +174,20 @@
 org.apache.wiki.action.GroupActionBean.save=Save Group
 #Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named group.members.
 members=Group Members
+org.apache.wiki.action.WorkflowActionBean.abort=Abort
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.abort.
+Outcome.step.abort=Abort
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.complete.
+Outcome.step.complete=Completed
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.continue.
+Outcome.step.continue=Continue
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.acknowledge.
+Outcome.decision.acknowledge=OK
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.approve.
+Outcome.decision.approve=Approve
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.deny.
+Outcome.decision.deny=Deny
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.hold.
+Outcome.decision.hold=Hold
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.reassign.
+Outcome.decision.reassign=Reassign

Modified: incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_ru.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_ru.properties?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_ru.properties (original)
+++ incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_ru.properties Sat Dec 12 04:03:11 2009
@@ -238,3 +238,20 @@
 group=\u0418\u043c\u044f
 #Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named group.members.
 members=\u0423\u0447\u0430\u0441\u043d\u0438\u043a\u0438 \u0433\u0440\u0443\u043f\u043f\u044b
+org.apache.wiki.action.WorkflowActionBean.abort=\u041f\u0440\u0435\u0440\u0432\u0430\u0442\u044c
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.abort.
+Outcome.step.abort=\u041f\u0440\u0435\u0440\u0432\u0430\u0442\u044c
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.complete.
+Outcome.step.complete=\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.continue.
+Outcome.step.continue=\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.acknowledge.
+Outcome.decision.acknowledge=\u0425\u043e\u0440\u043e\u0448\u043e
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.approve.
+Outcome.decision.approve=\u041e\u0434\u043e\u0431\u0440\u0438\u0442\u044c
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.deny.
+Outcome.decision.deny=\u0417\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.hold.
+Outcome.decision.hold=\u0417\u0430\u0434\u0435\u0440\u0436\u0430\u0442\u044c
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.reassign.
+Outcome.decision.reassign=\u041f\u0435\u0440\u0435\u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c

Modified: incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_zh_CN.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_zh_CN.properties?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_zh_CN.properties (original)
+++ incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/CoreResources_zh_CN.properties Sat Dec 12 04:03:11 2009
@@ -326,3 +326,20 @@
 #Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named group.members.
 members=\u7ec4\u6210\u5458
 #Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named editor.plain.save.title.
+org.apache.wiki.action.WorkflowActionBean.abort=\u653e\u5f03
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.abort.
+Outcome.step.abort=\u653e\u5f03
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.complete.
+Outcome.step.complete=\u5df2\u5b8c\u6210
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.step.continue.
+Outcome.step.continue=\u7ee7\u7eed
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.acknowledge.
+Outcome.decision.acknowledge=\u786e\u5b9a
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.approve.
+Outcome.decision.approve=\u5141\u8bb8
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.deny.
+Outcome.decision.deny=\u62d2\u7edd
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.hold.
+Outcome.decision.hold=\u6302\u8d77
+#Copied from src/WebContent/WEB-INF/classes/templates/default.properties.. Formerly named outcome.decision.reassign.
+Outcome.decision.reassign=\u91cd\u65b0\u6307\u5b9a

Modified: incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default.properties?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default.properties (original)
+++ incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default.properties Sat Dec 12 04:03:11 2009
@@ -334,14 +334,6 @@
 workflow.actions=Actions
 workflow.actor=Current actor
 workflow.submit=Do it
-outcome.step.abort=Abort
-outcome.step.complete=Completed
-outcome.step.continue=Continue
-outcome.decision.acknowledge=OK
-outcome.decision.approve=Approve
-outcome.decision.deny=Deny
-outcome.decision.hold=Hold
-outcome.decision.reassign=Reassign
 workflow.details.title=Show or hide details
 workflow.details=details...
 # Specific workflow/decision messages
@@ -517,13 +509,13 @@
 #Copied from src/WebContent/WEB-INF/classes/CoreResources.properties.. Formerly named install.jsp.basics.title.
 install.basics=Basics
 #Formerly named adminPassword.description.
-install.adminPassword.description=Enter the "admin" user's desired password here. This account can do anything, and can log in even if the UserDatabase is not functioning properly. The password must be at least 16 characters in length. You should write down this password after you set it. For your convenience, we have generated a random password for you. Feel free to change it to something else.
+install.adminPassword.description=Enter the superuser's desired password here. This account (su) can do anything, and can log in even if the UserDatabase is not functioning properly. The password must be at least 16 characters in length. You should write down this password after you set it. For your convenience, we have generated a random password for you. Feel free to change it to something else.
 #Copied from src/WebContent/WEB-INF/classes/CoreResources.properties.. Formerly named install.jsp.basics.appname.desc.. Formerly named applicationName.description.
 install.applicationName.description=What should your wiki be called?  Try and make this a relatively short name.
 #Copied from src/WebContent/WEB-INF/classes/CoreResources.properties.. Formerly named install.jsp.basics.baseurl.desc.. Formerly named baseURL.description.
 install.baseURL.description=Please tell JSPWiki where your wiki is located, for example "http://localhost:8080/JSPWiki/".
 #Copied from src/WebContent/WEB-INF/classes/CoreResources.properties.. Formerly named install.jsp.basics.page.storage.desc.. Formerly named pageDir.description.
-install.pageDir.description=By default, JSPWiki will use the VersioningFileProvider that stores files in a particular directory on your hard drive. If you specify a directory that does not exist, JSPWiki will create one for you. All attachments will also be put in the same directory.
+install.pageDir.description=By default, JSPWiki will use the Priha JCR implementation to store files in a particular directory on your hard drive. If you specify a directory that does not exist, JSPWiki will create one for you.
 #Copied from src/WebContent/WEB-INF/classes/CoreResources.properties.. Formerly named install.jsp.adv.settings.logfile.desc.. Formerly named logFile.description.. Formerly named logDirectory.description.
 install.logDirectory.description=JSPWiki uses Jakarta Log4j for logging.  Please tell JSPWiki where the log files should go.
 #Copied from src/WebContent/WEB-INF/classes/CoreResources.properties.. Formerly named install.jsp.adv.settings.workdir.desc.. Formerly named workDir.description.
@@ -540,3 +532,5 @@
 newgroup.heading.create=Create new group
 #Formerly named newgroup.members.description.
 members.description=The membership for this group. Enter each user&#8217;s name or wiki name, separated by carriage returns.
+install.approver.saveWikiPage.description=Name of the role or wiki group that can approve page changes. If users can change pages themselves without approval, leave this blank. Specify the role "SU" if you want the superuser to approve all page changes. 
+install.approver.createUserProfile.description=Name of the role or wiki group that can approve new wiki profiles. If users can self-enroll without approval, leave this blank. Specify the role "SU" if you want the superuser to approve all new accounts.
\ No newline at end of file

Modified: incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_de.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_de.properties?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_de.properties (original)
+++ incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_de.properties Sat Dec 12 04:03:11 2009
@@ -350,14 +350,6 @@
 workflow.actions=Aktionen
 workflow.actor=Aktueller Bearbeiter
 workflow.submit=Erledigen
-outcome.step.abort=Abbrechen
-outcome.step.complete=Beendet
-outcome.step.continue=Fortsetzen
-outcome.decision.acknowledge=OK
-outcome.decision.approve=Genehmigen
-outcome.decision.deny=Ablehnen
-outcome.decision.hold=Zurückstellen
-outcome.decision.reassign=Neu zuweisen
 workflow.details.title=Details ein-/ausblenden
 workflow.details=Details...
 # Specific workflow/decision messages

Modified: incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_es.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_es.properties?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_es.properties (original)
+++ incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_es.properties Sat Dec 12 04:03:11 2009
@@ -337,14 +337,6 @@
 workflow.actions=Acciones
 workflow.actor=Actor actual
 workflow.submit=Hazlo
-outcome.step.abort=Abortar
-outcome.step.complete=Completado
-outcome.step.continue=Continuar
-outcome.decision.acknowledge=OK
-outcome.decision.approve=Aprobar
-outcome.decision.deny=Denegar
-outcome.decision.hold=Mantener
-outcome.decision.reassign=Reasignar
 workflow.details.title=Mostrar u ocultar detalles
 workflow.details=detalles...
 # Specific workflow/decision messages

Modified: incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_fi.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_fi.properties?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_fi.properties (original)
+++ incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_fi.properties Sat Dec 12 04:03:11 2009
@@ -322,14 +322,6 @@
 workflow.actions=Toiminnot
 workflow.actor=Tämänhetkinen tekijä
 workflow.submit=Hyväksy
-outcome.step.abort=Keskeytä
-outcome.step.complete=Suoritettu
-outcome.step.continue=Jatka
-outcome.decision.acknowledge=OK
-outcome.decision.approve=Hyväksy
-outcome.decision.deny=Kiellä
-outcome.decision.hold=Laita jonoon
-outcome.decision.reassign=Lähetä edelleen
 workflow.details=lisää...
 workflow.details.title=Näytä/piilota lisätiedot
 workflow.creatUserProfile=Uusi käyttäjäprofiili <strong>{2}</strong>

Modified: incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_fr.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_fr.properties?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_fr.properties (original)
+++ incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_fr.properties Sat Dec 12 04:03:11 2009
@@ -333,14 +333,6 @@
 workflow.actions=Actions
 workflow.actor=Acteur courant
 workflow.submit=Soumettre
-outcome.step.abort=Abandonner
-outcome.step.complete=Terminé
-outcome.step.continue=Continuer
-outcome.decision.acknowledge=OK
-outcome.decision.approve=Approuver
-outcome.decision.deny=Refuser
-outcome.decision.hold=Conserver
-outcome.decision.reassign=Réassigner
 workflow.details.title=Montrer/cacher les détails
 workflow.details=Détails...
 # Specific workflow/decision messages

Modified: incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_it.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_it.properties?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_it.properties (original)
+++ incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_it.properties Sat Dec 12 04:03:11 2009
@@ -327,14 +327,6 @@
 workflow.actions=Azioni
 workflow.actor=Soggetto
 workflow.submit=Esegui
-outcome.step.abort=Annulla
-outcome.step.complete=Completato
-outcome.step.continue=Continua
-outcome.decision.acknowledge=OK
-outcome.decision.approve=Approva
-outcome.decision.deny=Deny
-outcome.decision.hold=Blocca
-outcome.decision.reassign=Riassegna
 workflow.details.title=Mostra o nascondi i dettagli 
 workflow.details=dettagli ...
 # Specific workflow/decision messages

Modified: incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_nl.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_nl.properties?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_nl.properties (original)
+++ incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_nl.properties Sat Dec 12 04:03:11 2009
@@ -328,14 +328,6 @@
 workflow.actions=Acties
 workflow.actor=Huidige actor
 workflow.submit=Do it
-outcome.step.abort=Breek af.
-outcome.step.complete=Afgewerkt
-outcome.step.continue=Verderzetten
-outcome.decision.acknowledge=OK
-outcome.decision.approve=Keur goed
-outcome.decision.deny=Geweigerd
-outcome.decision.hold=Hold
-outcome.decision.reassign=Opnieuw toewijzen
 workflow.details.title=Toon/verberg details
 workflow.details=details...
 # Specific workflow/decision messages

Modified: incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_pt_BR.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_pt_BR.properties?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_pt_BR.properties (original)
+++ incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_pt_BR.properties Sat Dec 12 04:03:11 2009
@@ -362,14 +362,6 @@
 workflow.actions=Actions
 workflow.actor=Current actor
 workflow.submit=Do it
-outcome.step.abort=Abort
-outcome.step.complete=Completed
-outcome.step.continue=Continue
-outcome.decision.acknowledge=OK
-outcome.decision.approve=Approve
-outcome.decision.deny=Deny
-outcome.decision.hold=Hold
-outcome.decision.reassign=Reassign
 workflow.details.title=Show or hide details
 workflow.details=details...
 # Specific workflow/decision messages

Modified: incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_ru.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_ru.properties?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_ru.properties (original)
+++ incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_ru.properties Sat Dec 12 04:03:11 2009
@@ -333,14 +333,6 @@
 workflow.actions=Actions
 workflow.actor=Current actor
 workflow.submit=\u0421\u0434\u0435\u043b\u0430\u0442\u044c
-outcome.step.abort=\u041f\u0440\u0435\u0440\u0432\u0430\u0442\u044c
-outcome.step.complete=\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e
-outcome.step.continue=\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c
-outcome.decision.acknowledge=\u0425\u043e\u0440\u043e\u0448\u043e
-outcome.decision.approve=\u041e\u0434\u043e\u0431\u0440\u0438\u0442\u044c
-outcome.decision.deny=\u0417\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c
-outcome.decision.hold=\u0417\u0430\u0434\u0435\u0440\u0436\u0430\u0442\u044c
-outcome.decision.reassign=\u041f\u0435\u0440\u0435\u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c
 workflow.details.title=\u0421\u043f\u0440\u044f\u0442\u0430\u0442\u044c \u0438\u043b\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u0438
 workflow.details=\u0434\u0435\u0442\u0430\u043b\u0438...
 # Specific workflow/decision messages

Modified: incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_zh_CN.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_zh_CN.properties?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_zh_CN.properties (original)
+++ incubator/jspwiki/trunk/src/WebContent/WEB-INF/classes/templates/default_zh_CN.properties Sat Dec 12 04:03:11 2009
@@ -334,14 +334,6 @@
 workflow.actions=\u64cd\u4f5c
 workflow.actor=\u5f53\u524d\u64cd\u4f5c\u8005
 workflow.submit=\u63d0\u4ea4
-outcome.step.abort=\u653e\u5f03
-outcome.step.complete=\u5df2\u5b8c\u6210
-outcome.step.continue=\u7ee7\u7eed
-outcome.decision.acknowledge=\u786e\u5b9a
-outcome.decision.approve=\u5141\u8bb8
-outcome.decision.deny=\u62d2\u7edd
-outcome.decision.hold=\u6302\u8d77
-outcome.decision.reassign=\u91cd\u65b0\u6307\u5b9a
 workflow.details.title=\u663e\u793a\u6216\u9690\u85cf\u8be6\u7ec6\u4fe1\u606f
 workflow.details=\u8be6\u7ec6\u4fe1\u606f...
 # Specific workflow/decision messages

Modified: incubator/jspwiki/trunk/src/WebContent/Workflow.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/Workflow.jsp?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/Workflow.jsp (original)
+++ incubator/jspwiki/trunk/src/WebContent/Workflow.jsp Sat Dec 12 04:03:11 2009
@@ -18,99 +18,10 @@
     specific language governing permissions and limitations
     under the License.  
 --%>
-<%@ page import="java.util.Collection" %>
-<%@ page import="java.util.Iterator" %>
-<%@ page import="org.apache.wiki.log.Logger" %>
-<%@ page import="org.apache.wiki.log.LoggerFactory" %>
-<%@ page import="org.apache.wiki.WikiContext" %>
-<%@ page import="org.apache.wiki.WikiSession" %>
-<%@ page import="org.apache.wiki.WikiEngine" %>
-<%@ page import="org.apache.wiki.workflow.Decision" %>
-<%@ page import="org.apache.wiki.workflow.DecisionQueue" %>
-<%@ page import="org.apache.wiki.workflow.NoSuchOutcomeException" %>
-<%@ page import="org.apache.wiki.workflow.Outcome" %>
-<%@ page import="org.apache.wiki.workflow.Workflow" %>
-<%@ page errorPage="/Error.jsp" %>
-<%@ taglib uri="http://jakarta.apache.org/jspwiki.tld" prefix="wiki" %>
 <%@ taglib uri="http://stripes.sourceforge.net/stripes.tld" prefix="s" %>
-<s:useActionBean beanclass="org.apache.wiki.action.WorkflowActionBean" event="view" id="wikiActionBean"/>
-
-<%! 
-    Logger log = LoggerFactory.getLogger("JSPWiki"); 
-%>
-
-<%
-    WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
-    // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.WORKFLOW );
-    
-    // Extract the wiki session
-    WikiSession wikiSession = wikiContext.getWikiSession();
-    
-    // Get the current decisions
-    DecisionQueue dq = wiki.getWorkflowManager().getDecisionQueue();
-
-    if( "decide".equals(request.getParameter("action")) )
-    {
-        try
-        {
-          // Extract parameters for decision ID & decision outcome
-          int id = Integer.parseInt( request.getParameter( "id" ) );
-          String outcomeKey = request.getParameter("outcome");
-          Outcome outcome = Outcome.forName( outcomeKey );
-          // Iterate through our actor decisions and see if we can find an ID match
-          Collection<Decision> decisions = dq.getActorDecisions(wikiSession);
-          for (Iterator<Decision> it = decisions.iterator(); it.hasNext();)
-          {
-            Decision d = it.next();
-            if (d.getId() == id)
-            {
-              // Cool, we found it. Now make the decision.
-              dq.decide(d, outcome);
-            }
-          }
-        }
-        catch ( NumberFormatException e )
-        {
-           log.warn("Could not parse integer from parameter 'decision'. Somebody is being naughty.");
-        }
-        catch ( NoSuchOutcomeException e )
-        {
-           log.warn("Could not look up Outcome from parameter 'outcome'. Somebody is being naughty.");
-        }
-    }
-    if( "abort".equals(request.getParameter("action")) )
-    {
-        try
-        {
-          // Extract parameters for decision ID & decision outcome
-          int id = Integer.parseInt( request.getParameter( "id" ) );
-          // Iterate through our owner decisions and see if we can find an ID match
-          Collection<Workflow> workflows = wiki.getWorkflowManager().getOwnerWorkflows(wikiSession);
-          for (Iterator<Workflow> it = workflows.iterator(); it.hasNext();)
-          {
-            Workflow w = it.next();
-            if (w.getId() == id)
-            {
-              // Cool, we found it. Now kill the workflow.
-              w.abort();
-            }
-          }
-        }
-        catch ( NumberFormatException e )
-        {
-           log.warn("Could not parse integer from parameter 'decision'. Somebody is being naughty.");
-        }
-    }
-    
-    // Stash the current decisions/workflows
-    request.setAttribute("decisions",   dq.getActorDecisions(wikiSession));
-    request.setAttribute("workflows",   wiki.getWorkflowManager().getOwnerWorkflows(wikiSession));
-    request.setAttribute("wikiSession", wikiSession);
-    
-    response.setContentType("text/html; charset="+wiki.getContentEncoding() );
-    String contentPage = wiki.getTemplateManager().findJSP( pageContext,
-                                                            wikiContext.getTemplate(),
-                                                            "ViewTemplate.jsp" );
-%><wiki:Include page="<%=contentPage%>" />
-
+<s:useActionBean beanclass="org.apache.wiki.action.WorkflowActionBean" event="view" executeResolution="true" id="wikiActionBean" />
+<s:layout-render name="${templates['DefaultLayout.jsp']}">
+  <s:layout-component name="content">
+    <jsp:include page="${templates['WorkflowContent.jsp']}" />
+  </s:layout-component>
+</s:layout-render>

Modified: incubator/jspwiki/trunk/src/WebContent/admin/Install.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/admin/Install.jsp?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/admin/Install.jsp (original)
+++ incubator/jspwiki/trunk/src/WebContent/admin/Install.jsp Sat Dec 12 04:03:11 2009
@@ -98,6 +98,18 @@
                 <div class="description"><fmt:message key="install.workDir.description" /></div>
               </div>
               <div>
+                <s:label for="properties.jspwiki.jspwiki_approver_workflow_saveWikiPage" />
+                <s:text name="properties.jspwiki.jspwiki_approver_workflow_saveWikiPage" size="40" />
+                <s:errors field="properties.jspwiki.jspwiki_approver_workflow_saveWikiPage" />
+                <div class="description"><fmt:message key="install.approver.saveWikiPage.description" /></div>
+              </div>
+              <div>
+                <s:label for="properties.jspwiki.jspwiki_approver_workflow_createUserProfile" />
+                <s:text name="properties.jspwiki.jspwiki_approver_workflow_createUserProfile" size="40" />
+                <s:errors field="properties.jspwiki.jspwiki_approver_workflow_createUserProfile" />
+                <div class="description"><fmt:message key="install.approver.createUserProfile.description" /></div>
+              </div>
+              <div>
                 <s:label for="properties.jspwiki.jspwiki_userdatabase" />
                 <s:select id="userdatabase" name="properties.jspwiki.jspwiki_userdatabase">
                   <s:option value="org.apache.wiki.auth.user.XMLUserDatabase">XML (default)</s:option>

Modified: incubator/jspwiki/trunk/src/WebContent/templates/default/WorkflowContent.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/templates/default/WorkflowContent.jsp?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/templates/default/WorkflowContent.jsp (original)
+++ incubator/jspwiki/trunk/src/WebContent/templates/default/WorkflowContent.jsp Sat Dec 12 04:03:11 2009
@@ -25,37 +25,25 @@
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
 <%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
 <%@ taglib uri="http://stripes.sourceforge.net/stripes.tld" prefix="s" %>
-<script language="JavaScript">
-  function SubmitOutcomeIfSelected(selectId) 
-  {
-    if ( selectId.selectedIndex > 0 )
-    {
-      // alert(selectId.selectedIndex);
-      selectId.form.submit();
-    }
-  }
-</script>
 <%
   int i = 0;
   String evenOdd;
 %>
-<wiki:TabbedSection defaultTab='${param.tab} %>'>
-
-<wiki:Tab id="pagecontent" titleKey="workflow.tab">
 
 <h3><fmt:message key="workflow.heading" /></h3>
 <p><fmt:message key="workflow.instructions" /></p>
+<s:errors/>
 
 <!-- Pending Decisions -->
 <h4><fmt:message key="workflow.decisions.heading" /></h4>
 
-<c:if test="${empty decisions}">
+<c:if test="${empty wikiActionBean.decisions}">
   <div class="information">
     <fmt:message key="workflow.noinstructions" />
   </div>
 </c:if>
 
-<c:if test="${!empty decisions}">
+<c:if test="${!empty wikiActionBean.decisions}">
   <div class="formhelp">
     <fmt:message key="workflow.actor.instructions" />
   </div>
@@ -71,7 +59,7 @@
     </thead>
     <tbody>
       <% i = 1; %>
-      <c:forEach var="decision" items="${decisions}">
+      <c:forEach var="decision" items="${wikiActionBean.decisions}">
         <% evenOdd = (i % 2 == 0) ? "even" : "odd"; %>
         <tr class="<%=evenOdd%>">
           <!-- Workflow ID -->
@@ -86,22 +74,20 @@
           </td>
           <!-- Possible actions (outcomes) -->
           <td align="left">
-            <form id="<c:out value='decision.${decision.id}' />" action="<wiki:Link jsp='Workflow.jsp' format='url' />" method="POST" accept-charset="UTF-8">
-              <input type="hidden" name="action" value="decide" />
-              <input type="hidden" name="id" value="<c:out value='${decision.id}' />" />
-              <select name="outcome" onchange="SubmitOutcomeIfSelected(this)">
-                <option value="-"><fmt:message key="select.one" /></option>
-                <c:forEach var="outcome" items="${decision.availableOutcomes}"><option value="${outcome.messageKey}"><fmt:message key="${outcome.messageKey}" /></option>
-                </c:forEach>
-              </select>
-            </form>
+            <s:form id="decision.${decision.id}" beanclass="org.apache.wiki.action.WorkflowActionBean" method="POST" acceptcharset="UTF-8">
+              <input type="hidden" name="id" value="${decision.id}" />
+              <s:select name="outcome" value="${decision.defaultOutcome.messageKey}">
+                <s:options-collection collection="${decision.availableOutcomes}" value="messageKey" label="messageKey" />
+              </s:select>
+              <s:submit name="decide" />
+            </s:form>
           </td>
           <!-- Requester -->
           <td align="left"><c:out value="${decision.owner.name}" /></td>
           <!-- When did the actor start this step? -->
           <td align="left">
             <fmt:formatDate value="${decision.startTime}" pattern="${prefs.TimeFormat}" timeZone="${prefs.TimeZone}" />
-		  </td>
+    		  </td>
         </tr>
         <!-- Hidden row with Decision details, if there are any -->
         <c:if test="${!empty decision.facts}">
@@ -132,13 +118,13 @@
 <!-- Running workflows for which current user is the owner -->
 <h4><fmt:message key="workflow.workflows.heading" /></h4>
 
-<c:if test="${empty workflows}">
+<c:if test="${empty wikiActionBean.workflows}">
   <div class="information">
     <fmt:message key="workflow.noinstructions" />
   </div>
 </c:if>
 
-<c:if test="${!empty workflows}">
+<c:if test="${!empty wikiActionBean.workflows}">
   <div class="formhelp">
     <fmt:message key="workflow.owner.instructions" />
   </div>
@@ -154,7 +140,7 @@
     </thead>
     <% i = 1; %>
     <tbody>
-      <c:forEach var="workflow" items="${workflows}">
+      <c:forEach var="workflow" items="${wikiActionBean.workflows}">
         <% evenOdd = (i % 2 == 0) ? "even" : "odd"; %>
         <tr class="<%=evenOdd%>">
           <!-- Workflow ID -->
@@ -169,11 +155,10 @@
           </td>
           <!-- Actions -->
           <td align="left">
-            <form id="<c:out value='workflow.${workflow.id}' />" action="<wiki:Link jsp='Workflow.jsp' format='url' />" method="POST" accept-charset="UTF-8">
-              <input type="submit" name="submit" value="<fmt:message key="outcome.step.abort" />" />
-              <input type="hidden" name="action" value="abort" />
-              <input type="hidden" name="id" value="<c:out value="${workflow.id}" />" />
-            </form>
+            <s:form id="workflow.${workflow.id}" beanclass="org.apache.wiki.action.WorkflowActionBean" method="POST" acceptcharset="UTF-8">
+              <input type="hidden" name="id" value="${workflow.id}" />
+              <s:submit name="abort"/>
+            </s:form>
           </td>
           <!-- Current actor -->
           <td align="left"><c:out value="${workflow.currentActor.name}" /></td>
@@ -187,6 +172,3 @@
     </tbody>
   </table>
 </c:if>
-
-</wiki:Tab>
-</wiki:TabbedSection>
\ No newline at end of file

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java Sat Dec 12 04:03:11 2009
@@ -77,7 +77,7 @@
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "190";
+    public static final String     BUILD         = "191";
 
     /**
      *  This is the generic version string you should use

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/action/WorkflowActionBean.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/action/WorkflowActionBean.java?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/action/WorkflowActionBean.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/action/WorkflowActionBean.java Sat Dec 12 04:03:11 2009
@@ -21,28 +21,159 @@
 
 package org.apache.wiki.action;
 
-import org.apache.wiki.auth.permissions.PagePermission;
-import org.apache.wiki.ui.stripes.HandlerPermission;
-import org.apache.wiki.ui.stripes.WikiRequestContext;
+import java.util.Collection;
+import java.util.List;
 
 import net.sourceforge.stripes.action.*;
+import net.sourceforge.stripes.validation.Validate;
+
+import org.apache.wiki.WikiEngine;
+import org.apache.wiki.WikiSession;
+import org.apache.wiki.api.WikiException;
+import org.apache.wiki.ui.stripes.WikiRequestContext;
+import org.apache.wiki.workflow.Decision;
+import org.apache.wiki.workflow.DecisionQueue;
+import org.apache.wiki.workflow.Outcome;
+import org.apache.wiki.workflow.Workflow;
 
-@UrlBinding( "/Workflow.jsp" )
 public class WorkflowActionBean extends AbstractActionBean
 {
+    private Outcome m_outcome = null;
+
+    private int m_id;
+
+    /**
+     * Aborts a particular workflow.
+     * 
+     * @return always returns a {@link RedirectResolution} to the
+     *         {@link #view()} handler, so that other decisions can be made if
+     *         desired.
+     */
+    @HandlesEvent( "abort" )
+    public Resolution abort()
+    {
+        WikiEngine engine = getContext().getEngine();
+        WikiSession wikiSession = getContext().getWikiSession();
+        Collection<Workflow> workflows = engine.getWorkflowManager().getOwnerWorkflows( wikiSession );
+        for( Workflow workflow : workflows )
+        {
+            if( workflow.getId() == m_id )
+            {
+                workflow.abort();
+                break;
+            }
+        }
+        return new RedirectResolution( WorkflowActionBean.class, "view" );
+    }
+
+    /**
+     * Takes a decision for a particular workflow.
+     * 
+     * @return always returns a {@link RedirectResolution} to the
+     *         {@link #view()} handler, so that other decisions can be made if
+     *         desired.
+     */
+    @HandlesEvent( "decide" )
+    public Resolution decide() throws WikiException
+    {
+        WikiEngine engine = getContext().getEngine();
+        WikiSession wikiSession = getContext().getWikiSession();
+        DecisionQueue dq = engine.getWorkflowManager().getDecisionQueue();
+
+        // Find our actor's decision
+        Collection<Decision> decisions = dq.getActorDecisions( wikiSession );
+        for( Decision decision : decisions )
+        {
+            if( decision.getId() == m_id )
+            {
+                // Cool, we found it. Now make the decision.
+                dq.decide( decision, m_outcome );
+                break;
+            }
+        }
+        return new RedirectResolution( WorkflowActionBean.class, "view" );
+    }
+
+    /**
+     * Returns the collection of Decisions for the current user. This is a
+     * read-only property.
+     * 
+     * @return the collection fo decisions
+     */
+    public List<Decision> getDecisions()
+    {
+        WikiEngine engine = getContext().getEngine();
+        WikiSession wikiSession = getContext().getWikiSession();
+        DecisionQueue dq = engine.getWorkflowManager().getDecisionQueue();
+        return dq.getActorDecisions( wikiSession );
+    }
+
+    /**
+     * Returns the workflow or decision ID that is being acted on.
+     * 
+     * @return
+     */
+    public int getId()
+    {
+        return m_id;
+    }
+
+    /**
+     * Return the Outcome of the decision taken in the {@link #decide()} action.
+     * 
+     * @return the outcome
+     */
+    public Outcome getOutcome()
+    {
+        return m_outcome;
+    }
+
+    /**
+     * Returns the collection of Workflows for the current user. This is a
+     * read-only property.
+     * 
+     * @return the collection of workflows
+     */
+    public List<Workflow> getWorkflows()
+    {
+        WikiEngine engine = getContext().getEngine();
+        WikiSession wikiSession = getContext().getWikiSession();
+        return engine.getWorkflowManager().getOwnerWorkflows( wikiSession );
+    }
+
+    /**
+     * Sets the workflow or decision ID that is being acted on.
+     * 
+     * @param id the ID number of the workflow to work on.
+     */
+    @Validate( required = true, on = { "abort", "decide" } )
+    public void setId( int id )
+    {
+        m_id = id;
+    }
+
+    /**
+     * Sets the Outcome for the decision taken in the {@link #decide()} action.
+     * 
+     * @param outcome the outcome to set
+     */
+    @Validate( required = true, on = "decide" )
+    public void setOutcome( Outcome outcome )
+    {
+        m_outcome = outcome;
+    }
+
     /**
-     * Default handler that simply forwards the user back to the view page.
-     * Every ActionBean needs a default handler to function properly, so we use
-     * this (very simple) one.
+     * Event that the user to the preview display JSP.
      * 
-     * @return a forward resolution back to the view page
+     * @return always returns a forward resolution to the workflow page {@code
+     *         /Workflow.jsp}.
      */
     @DefaultHandler
     @HandlesEvent( "view" )
-    @HandlerPermission( permissionClass = PagePermission.class, target = "${page.name}", actions = PagePermission.VIEW_ACTION )
     @WikiRequestContext( "workflow" )
     public Resolution view()
     {
-        return new ForwardResolution( ViewActionBean.class );
+        return new ForwardResolution( "/Workflow.jsp" );
     }
 }

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/authorize/Role.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/authorize/Role.java?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/authorize/Role.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/authorize/Role.java Sat Dec 12 04:03:11 2009
@@ -74,15 +74,14 @@
     /**
      * Returns <code>true</code> if a supplied Role is a built-in Role:
      * {@link #ALL}, {@link #ANONYMOUS}, {@link #ASSERTED},
-     * or {@link #AUTHENTICATED}.
+     * {@link #AUTHENTICATED}, or {@link #SUPERUSER}.
      * @param role the role to check
      * @return the result of the check
      */
     public static final boolean isBuiltInRole(Role role)
     {
         return  role.equals( ALL ) || role.equals( ANONYMOUS ) ||
-                role.equals( ASSERTED ) || role.equals( AUTHENTICATED );
-
+                role.equals( ASSERTED ) || role.equals( AUTHENTICATED ) || role.equals( SUPERUSER );
     }
 
     /**

Added: incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/stripes/OutcomeTypeConverter.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/stripes/OutcomeTypeConverter.java?rev=889884&view=auto
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/stripes/OutcomeTypeConverter.java (added)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/stripes/OutcomeTypeConverter.java Sat Dec 12 04:03:11 2009
@@ -0,0 +1,92 @@
+/* 
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.  
+ */
+package org.apache.wiki.ui.stripes;
+
+import java.util.Collection;
+import java.util.Locale;
+
+import net.sourceforge.stripes.validation.LocalizableError;
+import net.sourceforge.stripes.validation.TypeConverter;
+import net.sourceforge.stripes.validation.ValidationError;
+
+import org.apache.wiki.workflow.NoSuchOutcomeException;
+import org.apache.wiki.workflow.Outcome;
+
+/**
+ * Stripes type converter that converts an Outcome, expressed as a String,
+ * into an {@link Outcome} object. This converter
+ * is looked up and returned by the Stripes
+ * {@link net.sourceforge.stripes.validation.TypeConverterFactory} for HTTP
+ * request parameters that need to be bound to ActionBean properties of type
+ * Outcome. Stripes executes this TypeConverter during the
+ * {@link net.sourceforge.stripes.controller.LifecycleStage#BindingAndValidation}
+ * stage of request processing.
+ * 
+ */
+public class OutcomeTypeConverter implements TypeConverter<Outcome>
+{
+
+    /**
+     * Converts a named Outcome, passed as a String, into a valid
+     * {@link Outcome} object. The Outcome is looked up by passing
+     * {@code outcomeKey} to {@link Outcome#forName(String)}.
+     * If the Outcome cannot be found (perhaps because it does not exist), this
+     * method will add a validation error to the supplied Collection of errors.
+     * The error will be of type
+     * {@link net.sourceforge.stripes.validation.LocalizableError} and will have
+     * a message key of <code>outcome.doesnotexist</code> with parameter
+     * <code>{0}</code> (equal to the value passed for <code>outcomeKey</code>).
+     * If a Outcome cannot be parsed or looked up, this method returns
+     * <code>null</code>. This method will not ever return errors.
+     * 
+     * @param outcomeKey the key representing the Outcome to look up
+     * @param targetType the type to return, which will always be of type
+     *            {@link Outcome}
+     * @param errors the current Collection of validation errors for this field
+     * @return the Outcome
+     */
+    public Outcome convert( String outcomeKey, Class<? extends Outcome> targetType, Collection<ValidationError> errors )
+    {
+        if ( outcomeKey == null )
+        {
+            return null;
+        }
+        
+        Outcome outcome = null;
+        try
+        {
+            outcome = Outcome.forName( outcomeKey );
+        }
+        catch( NoSuchOutcomeException e )
+        {
+            // Illegal Outcome
+            errors.add( new LocalizableError( "outcome.doesnotexist" ) );
+        }
+        return outcome;
+    }
+
+    /**
+     * No-op method that does nothing, because setting the Locale has no effect on the conversion.
+     */
+    public void setLocale( Locale locale )
+    {
+    };
+}

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/DecisionQueue.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/DecisionQueue.java?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/DecisionQueue.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/DecisionQueue.java Sat Dec 12 04:03:11 2009
@@ -23,8 +23,8 @@
 import java.io.Serializable;
 import java.security.Principal;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.LinkedList;
+import java.util.List;
 
 import org.apache.wiki.WikiSession;
 import org.apache.wiki.api.WikiException;
@@ -98,7 +98,7 @@
      *            the wiki session
      * @return the collection of Decisions, which may be empty
      */
-    public Collection<Decision> getActorDecisions(WikiSession session)
+    public List<Decision> getActorDecisions(WikiSession session)
     {
         ArrayList<Decision> decisions = new ArrayList<Decision>();
         if ( session.isAuthenticated() )

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/Outcome.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/Outcome.java?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/Outcome.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/Outcome.java Sat Dec 12 04:03:11 2009
@@ -34,28 +34,28 @@
     private static final long serialVersionUID = -338361947886288073L;
 
     /** Complete workflow step (without errors) */
-    public static final Outcome STEP_COMPLETE = new Outcome( "outcome.step.complete", true );
+    public static final Outcome STEP_COMPLETE = new Outcome( "step.complete", true );
 
     /** Terminate workflow step (without errors) */
-    public static final Outcome STEP_ABORT = new Outcome( "outcome.step.abort", true );
+    public static final Outcome STEP_ABORT = new Outcome( "step.abort", true );
 
     /** Continue workflow step (without errors) */
-    public static final Outcome STEP_CONTINUE = new Outcome( "outcome.step.continue", false );
+    public static final Outcome STEP_CONTINUE = new Outcome( "step.continue", false );
 
     /** Acknowlege the Decision. */
-    public static final Outcome DECISION_ACKNOWLEDGE = new Outcome( "outcome.decision.acknowledge", true );
+    public static final Outcome DECISION_ACKNOWLEDGE = new Outcome( "decision.acknowledge", true );
 
     /** Approve the Decision (and complete the step). */
-    public static final Outcome DECISION_APPROVE = new Outcome( "outcome.decision.approve", true );
+    public static final Outcome DECISION_APPROVE = new Outcome( "decision.approve", true );
 
     /** Deny the Decision (and complete the step). */
-    public static final Outcome DECISION_DENY = new Outcome( "outcome.decision.deny", true );
+    public static final Outcome DECISION_DENY = new Outcome( "decision.deny", true );
 
     /** Put the Decision on hold (and pause the step). */
-    public static final Outcome DECISION_HOLD = new Outcome( "outcome.decision.hold", false );
+    public static final Outcome DECISION_HOLD = new Outcome( "decision.hold", false );
 
     /** Reassign the Decision to another actor (and pause the step). */
-    public static final Outcome DECISION_REASSIGN = new Outcome( "outcome.decision.reassign", false );
+    public static final Outcome DECISION_REASSIGN = new Outcome( "decision.reassign", false );
 
     private static final Outcome[] OUTCOMES = new Outcome[] { STEP_COMPLETE, STEP_ABORT, STEP_CONTINUE, DECISION_ACKNOWLEDGE,
                                                                DECISION_APPROVE, DECISION_DENY, DECISION_HOLD, DECISION_REASSIGN };

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/WorkflowManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/WorkflowManager.java?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/WorkflowManager.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/WorkflowManager.java Sat Dec 12 04:03:11 2009
@@ -243,7 +243,7 @@
      * @param session the wiki session
      * @return the collection workflows the wiki session owns, which may be empty
      */
-    public Collection<Workflow> getOwnerWorkflows( WikiSession session )
+    public List<Workflow> getOwnerWorkflows( WikiSession session )
     {
         List<Workflow> workflows = new ArrayList<Workflow>();
         if ( session.isAuthenticated() )

Modified: incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/AllTests.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/AllTests.java?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/AllTests.java (original)
+++ incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/AllTests.java Sat Dec 12 04:03:11 2009
@@ -46,6 +46,7 @@
         suite.addTest( UserProfileActionBeanTest.suite() );
         suite.addTest( ViewActionBeanTest.suite() );
         suite.addTest( WikiContextFactoryTest.suite() );
+        suite.addTest( WorkflowActionBeanTest.suite() );
 
         return suite;
     }

Added: incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/WorkflowActionBeanTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/WorkflowActionBeanTest.java?rev=889884&view=auto
==============================================================================
--- incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/WorkflowActionBeanTest.java (added)
+++ incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/WorkflowActionBeanTest.java Sat Dec 12 04:03:11 2009
@@ -0,0 +1,325 @@
+/*
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.    
+ */
+package org.apache.wiki.action;
+
+import java.security.Principal;
+import java.util.List;
+import java.util.Properties;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import net.sourceforge.stripes.mock.MockRoundtrip;
+import net.sourceforge.stripes.validation.ValidationError;
+import net.sourceforge.stripes.validation.ValidationErrors;
+
+import org.apache.wiki.TestEngine;
+import org.apache.wiki.WikiSession;
+import org.apache.wiki.auth.Users;
+import org.apache.wiki.auth.WikiPrincipal;
+import org.apache.wiki.workflow.*;
+
+public class WorkflowActionBeanTest extends TestCase
+{
+    TestEngine m_engine;
+
+    Decision m_decision;
+
+    Workflow m_workflow;
+
+    public void setUp() throws Exception
+    {
+        super.setUp();
+
+        // Start the WikiEngine, and stash reference
+        Properties props = new Properties();
+        try
+        {
+            props.load( TestEngine.findTestProperties() );
+            m_engine = new TestEngine( props );
+        }
+        catch( Exception e )
+        {
+            throw new RuntimeException( "Could not set up TestEngine: " + e.getMessage() );
+        }
+
+        WikiSession session = m_engine.janneSession();
+        m_workflow = new Workflow( "workflow.key", new WikiPrincipal( "Administrator", WikiPrincipal.FULL_NAME ) );
+        m_workflow.setWorkflowManager( m_engine.getWorkflowManager() );
+        m_decision = new SimpleDecision( m_workflow, "decision.key", session.getUserPrincipal() );
+        m_workflow.setFirstStep( m_decision );
+        m_engine.getWorkflowManager().start( m_workflow );
+    }
+
+    /**
+     * Verifies that a workflow owner who has created a workflow can see it when
+     * the "view" event executes.
+     * 
+     * @throws Exception
+     */
+    public void testOwnerView() throws Exception
+    {
+        // Start with the Admin user, who owns a workflow
+        MockRoundtrip trip = m_engine.authenticatedTrip( Users.ADMIN, Users.ADMIN_PASS, WorkflowActionBean.class );
+
+        // View the workflows
+        trip.execute( "view" );
+
+        // Verify we are directed to the view page
+        WorkflowActionBean bean = trip.getActionBean( WorkflowActionBean.class );
+        ValidationErrors errors = bean.getContext().getValidationErrors();
+        assertEquals( 0, errors.size() );
+        assertEquals( "/Workflow.jsp", trip.getDestination() );
+
+        // Verify that Admin owns 1 Workflow
+        List<Workflow> workflows = bean.getWorkflows();
+        assertNotNull( workflows );
+        assertEquals( 1, workflows.size() );
+        assertEquals( m_workflow, workflows.get( 0 ) );
+        Principal userPrincipal = bean.getContext().getWikiSession().getUserPrincipal();
+        assertEquals( userPrincipal, m_workflow.getOwner() );
+        assertNotSame( userPrincipal, m_workflow.getCurrentActor() );
+
+        // Verify that Admin has no Decisions in his queue
+        List<Decision> decisions = bean.getDecisions();
+        assertNotNull( decisions );
+        assertEquals( 0, decisions.size() );
+    }
+
+    public void testAbortNoParams() throws Exception
+    {
+        // Start with the Admin user, who owns a workflow
+        MockRoundtrip trip = m_engine.authenticatedTrip( Users.ADMIN, Users.ADMIN_PASS, WorkflowActionBean.class );
+
+        // Attempt to abort the workflow
+        assertTrue( m_workflow.isStarted() );
+        assertFalse( m_workflow.isAborted() );
+        assertFalse( m_workflow.isCompleted() );
+        trip.execute( "abort" );
+
+        WorkflowActionBean bean = trip.getActionBean( WorkflowActionBean.class );
+        ValidationErrors validationErrors = bean.getContext().getValidationErrors();
+        assertEquals( 1, validationErrors.size() );
+        assertTrue( validationErrors.hasFieldErrors() );
+        List<ValidationError> errors = validationErrors.get( "id" );
+        assertEquals( 1, errors.size() );
+    }
+
+    /**
+     * Ensures that a user cannot abort someone elses's workflow
+     * 
+     * @throws Exception
+     */
+    public void testAbortWrongUser() throws Exception
+    {
+        // Start with Janne, who is NOT a workflow owner
+        MockRoundtrip trip = m_engine.authenticatedTrip( Users.JANNE, Users.JANNE_PASS, WorkflowActionBean.class );
+
+        // Attempt to abort the workflow
+        assertTrue( m_workflow.isStarted() );
+        assertFalse( m_workflow.isAborted() );
+        assertFalse( m_workflow.isCompleted() );
+        trip.addParameter( "id", String.valueOf( m_workflow.getId() ) );
+        trip.execute( "abort" );
+
+        // The event should execute without error, but nothing should actually
+        // happen...
+        WorkflowActionBean bean = trip.getActionBean( WorkflowActionBean.class );
+        assertEquals( 0, bean.getContext().getValidationErrors().size() );
+        assertEquals( "/Workflow.action?view=", trip.getDestination() );
+
+        // Verify that the workflow is still running and was NOT aborted
+        WorkflowManager mgr = m_engine.getWorkflowManager();
+        List<Workflow> workflows = mgr.getCompletedWorkflows();
+        assertEquals( 0, workflows.size() );
+        assertNotNull( null, m_workflow.getCurrentStep() );
+        assertFalse( m_workflow.isAborted() );
+        assertFalse( m_workflow.isCompleted() );
+    }
+
+    public void testDecideNoParams() throws Exception
+    {
+        // Start with Janne, who has a pending decision
+        MockRoundtrip trip = m_engine.authenticatedTrip( Users.JANNE, Users.JANNE_PASS, WorkflowActionBean.class );
+
+        // Try to complete the workflow
+        assertTrue( m_workflow.isStarted() );
+        assertFalse( m_workflow.isAborted() );
+        assertFalse( m_workflow.isCompleted() );
+        trip.execute( "decide" );
+
+        WorkflowActionBean bean = trip.getActionBean( WorkflowActionBean.class );
+        ValidationErrors validationErrors = bean.getContext().getValidationErrors();
+        assertEquals( 2, validationErrors.size() );
+        assertTrue( validationErrors.hasFieldErrors() );
+        List<ValidationError> errors = validationErrors.get( "id" );
+        assertEquals( 1, errors.size() );
+        errors = validationErrors.get( "outcome" );
+        assertEquals( 1, errors.size() );
+    }
+
+    /**
+     * Ensures that a user cannot make a decision on a workflow when they aren't
+     * the current Actor.
+     * 
+     * @throws Exception
+     */
+    public void testDecideWrongUser() throws Exception
+    {
+        // Start with Admin, who does NOT have a pending decision
+        MockRoundtrip trip = m_engine.authenticatedTrip( Users.ADMIN, Users.ADMIN_PASS, WorkflowActionBean.class );
+
+        // Try to complete the workflow
+        assertTrue( m_workflow.isStarted() );
+        assertFalse( m_workflow.isAborted() );
+        assertFalse( m_workflow.isCompleted() );
+        trip.addParameter( "id", String.valueOf( m_decision.getId() ) );
+        trip.addParameter( "outcome", Outcome.DECISION_APPROVE.getMessageKey() );
+        trip.execute( "decide" );
+
+        // The event should execute without error, but nothing should actually
+        // happen...
+        WorkflowActionBean bean = trip.getActionBean( WorkflowActionBean.class );
+        assertEquals( 0, bean.getContext().getValidationErrors().size() );
+        assertEquals( "/Workflow.action?view=", trip.getDestination() );
+
+        // Verify that the workflow is still running and was NOT completed
+        WorkflowManager mgr = m_engine.getWorkflowManager();
+        List<Workflow> workflows = mgr.getCompletedWorkflows();
+        assertEquals( 0, workflows.size() );
+        assertNotNull( null, m_workflow.getCurrentStep() );
+        assertFalse( m_workflow.isAborted() );
+        assertFalse( m_workflow.isCompleted() );
+    }
+
+    public void testAbort() throws Exception
+    {
+        // Start with the Admin user, who owns a workflow
+        MockRoundtrip trip = m_engine.authenticatedTrip( Users.ADMIN, Users.ADMIN_PASS, WorkflowActionBean.class );
+
+        // Attempt to abort the workflow
+        assertTrue( m_workflow.isStarted() );
+        assertFalse( m_workflow.isAborted() );
+        assertFalse( m_workflow.isCompleted() );
+        trip.addParameter( "id", String.valueOf( m_workflow.getId() ) );
+        trip.execute( "abort" );
+
+        // Verify we are directed to the view page
+        WorkflowActionBean bean = trip.getActionBean( WorkflowActionBean.class );
+        ValidationErrors errors = bean.getContext().getValidationErrors();
+        assertEquals( 0, errors.size() );
+        assertEquals( "/Workflow.action?view=", trip.getDestination() );
+
+        // Verify that Admin has no more current workflows
+        List<Workflow> workflows = bean.getWorkflows();
+        assertNotNull( workflows );
+        assertEquals( 0, workflows.size() );
+
+        // Verify that the workflow was successfully aborted
+        WorkflowManager mgr = m_engine.getWorkflowManager();
+        workflows = mgr.getCompletedWorkflows();
+        assertEquals( 1, workflows.size() );
+        assertEquals( null, m_workflow.getCurrentStep() );
+        assertEquals( m_workflow, workflows.get( 0 ) );
+        assertTrue( m_workflow.isAborted() );
+        assertFalse( m_workflow.isCompleted() );
+    }
+
+    public void testDecide() throws Exception
+    {
+        // Start with Janne, who has a pending decision
+        MockRoundtrip trip = m_engine.authenticatedTrip( Users.JANNE, Users.JANNE_PASS, WorkflowActionBean.class );
+
+        // Try to complete the workflow
+        assertTrue( m_workflow.isStarted() );
+        assertFalse( m_workflow.isAborted() );
+        assertFalse( m_workflow.isCompleted() );
+        trip.addParameter( "id", String.valueOf( m_decision.getId() ) );
+        trip.addParameter( "outcome", Outcome.DECISION_APPROVE.getMessageKey() );
+        trip.execute( "decide" );
+
+        // Verify we are directed to the view page
+        WorkflowActionBean bean = trip.getActionBean( WorkflowActionBean.class );
+        ValidationErrors errors = bean.getContext().getValidationErrors();
+        assertEquals( 0, errors.size() );
+        assertEquals( "/Workflow.action?view=", trip.getDestination() );
+
+        // Verify that Janne has no more current decisions
+        List<Decision> decisions = bean.getDecisions();
+        assertNotNull( decisions );
+        assertEquals( 0, decisions.size() );
+
+        // Verify that the workflow was successfully approved
+        WorkflowManager mgr = m_engine.getWorkflowManager();
+        List<Workflow> workflows = mgr.getCompletedWorkflows();
+        assertEquals( 1, workflows.size() );
+        assertEquals( null, m_workflow.getCurrentStep() );
+        assertEquals( m_workflow, workflows.get( 0 ) );
+        assertFalse( m_workflow.isAborted() );
+        assertTrue( m_workflow.isCompleted() );
+    }
+
+    /**
+     * Verifies that a user who has pending decisions in his queue can see them
+     * when the "view" event executes.
+     * 
+     * @throws Exception
+     */
+    public void testActorView() throws Exception
+    {
+        // Start with Janne, who has a pending decision
+        MockRoundtrip trip = m_engine.authenticatedTrip( Users.JANNE, Users.JANNE_PASS, WorkflowActionBean.class );
+
+        // View the workflows
+        trip.execute( "view" );
+
+        // Verify we are directed to the view page
+        WorkflowActionBean bean = trip.getActionBean( WorkflowActionBean.class );
+        ValidationErrors errors = bean.getContext().getValidationErrors();
+        assertEquals( 0, errors.size() );
+        assertEquals( "/Workflow.jsp", trip.getDestination() );
+
+        // Verify that Janne does not own any Workflows
+        List<Workflow> workflows = bean.getWorkflows();
+        assertNotNull( workflows );
+        assertEquals( 0, workflows.size() );
+
+        // Verify that Janne has one Decision in his queue
+        List<Decision> decisions = bean.getDecisions();
+        assertNotNull( decisions );
+        assertEquals( 1, decisions.size() );
+        assertEquals( m_decision, decisions.get( 0 ) );
+        Principal userPrincipal = bean.getContext().getWikiSession().getUserPrincipal();
+        assertEquals( userPrincipal, m_decision.getActor() );
+        assertNotSame( userPrincipal, m_decision.getOwner() );
+        assertNotSame( userPrincipal, m_decision.getWorkflow().getOwner() );
+    }
+
+    public void tearDown()
+    {
+        m_engine.shutdown();
+    }
+
+    public static Test suite()
+    {
+        return new TestSuite( WorkflowActionBeanTest.class );
+    }
+}

Modified: incubator/jspwiki/trunk/tests/java/org/apache/wiki/workflow/OutcomeTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/java/org/apache/wiki/workflow/OutcomeTest.java?rev=889884&r1=889883&r2=889884&view=diff
==============================================================================
--- incubator/jspwiki/trunk/tests/java/org/apache/wiki/workflow/OutcomeTest.java (original)
+++ incubator/jspwiki/trunk/tests/java/org/apache/wiki/workflow/OutcomeTest.java Sat Dec 12 04:03:11 2009
@@ -37,18 +37,18 @@
 
     public void testGetKey()
     {
-        assertEquals("outcome.decision.approve", Outcome.DECISION_APPROVE.getMessageKey());
-        assertEquals("outcome.decision.hold", Outcome.DECISION_HOLD.getMessageKey());
-        assertEquals("outcome.decision.deny", Outcome.DECISION_DENY.getMessageKey());
-        assertEquals("outcome.decision.reassign", Outcome.DECISION_REASSIGN.getMessageKey());
+        assertEquals("decision.approve", Outcome.DECISION_APPROVE.getMessageKey());
+        assertEquals("decision.hold", Outcome.DECISION_HOLD.getMessageKey());
+        assertEquals("decision.deny", Outcome.DECISION_DENY.getMessageKey());
+        assertEquals("decision.reassign", Outcome.DECISION_REASSIGN.getMessageKey());
     }
 
     public void testHashCode()
     {
-        assertEquals("outcome.decision.approve".hashCode(), Outcome.DECISION_APPROVE.hashCode());
-        assertEquals("outcome.decision.hold".hashCode()*2, Outcome.DECISION_HOLD.hashCode());
-        assertEquals("outcome.decision.deny".hashCode(), Outcome.DECISION_DENY.hashCode());
-        assertEquals("outcome.decision.reassign".hashCode()*2, Outcome.DECISION_REASSIGN.hashCode());
+        assertEquals("decision.approve".hashCode(), Outcome.DECISION_APPROVE.hashCode());
+        assertEquals("decision.hold".hashCode()*2, Outcome.DECISION_HOLD.hashCode());
+        assertEquals("decision.deny".hashCode(), Outcome.DECISION_DENY.hashCode());
+        assertEquals("decision.reassign".hashCode()*2, Outcome.DECISION_REASSIGN.hashCode());
     }
 
     public void testEquals()
@@ -63,21 +63,26 @@
         props.load(TestEngine.findTestProperties());
         WikiEngine engine = new TestEngine(props);
         InternationalizationManager i18n = engine.getInternationalizationManager();
-        String core = "templates.default";
+        String core = "CoreResources";
         Locale english = Locale.ENGLISH;
         Outcome o;
+        String key;
 
         o = Outcome.DECISION_APPROVE;
-        assertEquals("Approve", i18n.get(core, english, o.getMessageKey()));
+        key = "Outcome." + o.getMessageKey();
+        assertEquals("Approve", i18n.get( core, english, key ) );
 
         o = Outcome.DECISION_DENY;
-        assertEquals("Deny", i18n.get(core, english, o.getMessageKey()));
+        key = "Outcome." + o.getMessageKey();
+        assertEquals("Deny", i18n.get( core, english, key ) );
 
         o = Outcome.DECISION_HOLD;
-        assertEquals("Hold", i18n.get(core, english, o.getMessageKey()));
+        key = "Outcome." + o.getMessageKey();
+        assertEquals("Hold", i18n.get( core, english, key ) );
 
         o = Outcome.DECISION_REASSIGN;
-        assertEquals("Reassign", i18n.get(core, english, o.getMessageKey()));
+        key = "Outcome." + o.getMessageKey();
+        assertEquals("Reassign", i18n.get( core, english, key ) );
 
         engine.shutdown();
     }
@@ -98,14 +103,14 @@
     {
         try
         {
-            assertEquals(Outcome.DECISION_ACKNOWLEDGE, Outcome.forName("outcome.decision.acknowledge"));
-            assertEquals(Outcome.DECISION_APPROVE, Outcome.forName("outcome.decision.approve"));
-            assertEquals(Outcome.DECISION_DENY, Outcome.forName("outcome.decision.deny"));
-            assertEquals(Outcome.DECISION_HOLD, Outcome.forName("outcome.decision.hold"));
-            assertEquals(Outcome.DECISION_REASSIGN, Outcome.forName("outcome.decision.reassign"));
-            assertEquals(Outcome.STEP_ABORT, Outcome.forName("outcome.step.abort"));
-            assertEquals(Outcome.STEP_COMPLETE, Outcome.forName("outcome.step.complete"));
-            assertEquals(Outcome.STEP_CONTINUE, Outcome.forName("outcome.step.continue"));
+            assertEquals(Outcome.DECISION_ACKNOWLEDGE, Outcome.forName("decision.acknowledge"));
+            assertEquals(Outcome.DECISION_APPROVE, Outcome.forName("decision.approve"));
+            assertEquals(Outcome.DECISION_DENY, Outcome.forName("decision.deny"));
+            assertEquals(Outcome.DECISION_HOLD, Outcome.forName("decision.hold"));
+            assertEquals(Outcome.DECISION_REASSIGN, Outcome.forName("decision.reassign"));
+            assertEquals(Outcome.STEP_ABORT, Outcome.forName("step.abort"));
+            assertEquals(Outcome.STEP_COMPLETE, Outcome.forName("step.complete"));
+            assertEquals(Outcome.STEP_CONTINUE, Outcome.forName("step.continue"));
         }
         catch (NoSuchOutcomeException e)
         {
@@ -116,7 +121,7 @@
         // Look for a non-existent one
         try
         {
-            Outcome.forName("outcome.decision.nonexistent");
+            Outcome.forName("decision.nonexistent");
         }
         catch (NoSuchOutcomeException e)
         {



Mime
View raw message