Author: pete.muir(a)jboss.org
Date: 2008-05-21 05:59:25 -0400 (Wed, 21 May 2008)
New Revision: 8245
Removed:
trunk/src/main/org/jboss/seam/faces/BusinessProcess.java
Modified:
trunk/src/main/org/jboss/seam/bpm/BusinessProcess.java
Log:
Move facesMessages -> statusMessages
Modified: trunk/src/main/org/jboss/seam/bpm/BusinessProcess.java
===================================================================
--- trunk/src/main/org/jboss/seam/bpm/BusinessProcess.java 2008-05-21 09:44:51 UTC (rev
8244)
+++ trunk/src/main/org/jboss/seam/bpm/BusinessProcess.java 2008-05-21 09:59:25 UTC (rev
8245)
@@ -13,6 +13,8 @@
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.core.AbstractMutable;
import org.jboss.seam.core.Events;
+import org.jboss.seam.international.StatusMessage;
+import org.jboss.seam.international.StatusMessages;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ProcessInstance;
import org.jbpm.taskmgmt.exe.TaskInstance;
@@ -361,33 +363,64 @@
protected void taskNotFound(Long taskId)
{
-
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ StatusMessage.Severity.WARN,
+ "org.jboss.seam.TaskNotFound",
+ "Task #0 not found",
+ taskId
+ );
}
protected void taskEnded(Long taskId)
{
-
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ StatusMessage.Severity.WARN,
+ "org.jboss.seam.TaskEnded",
+ "Task #0 already ended",
+ taskId
+ );
}
protected void processEnded(Long processId)
{
-
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ StatusMessage.Severity.WARN,
+ "org.jboss.seam.ProcessEnded",
+ "Process #0 already ended",
+ processId
+ );
}
protected void processNotFound(Long processId)
{
-
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ StatusMessage.Severity.WARN,
+ "org.jboss.seam.ProcessNotFound",
+ "Process #0 not found",
+ processId
+ );
}
protected void processEnded(String key)
{
-
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ StatusMessage.Severity.WARN,
+ "org.jboss.seam.ProcessEnded",
+ "Process #0 already ended",
+ key
+ );
}
protected void processNotFound(String key)
{
-
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ StatusMessage.Severity.WARN,
+ "org.jboss.seam.ProcessNotFound",
+ "Process #0 not found",
+ key
+ );
}
+
@Override
public String toString()
Deleted: trunk/src/main/org/jboss/seam/faces/BusinessProcess.java
===================================================================
--- trunk/src/main/org/jboss/seam/faces/BusinessProcess.java 2008-05-21 09:44:51 UTC (rev
8244)
+++ trunk/src/main/org/jboss/seam/faces/BusinessProcess.java 2008-05-21 09:59:25 UTC (rev
8245)
@@ -1,93 +0,0 @@
-package org.jboss.seam.faces;
-
-import static org.jboss.seam.annotations.Install.FRAMEWORK;
-
-import javax.faces.application.FacesMessage;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-
-/**
- * Holds the task and process ids for the current conversation,
- * and provides programmatic control over the business process.
- *
- * @author Gavin King
- *
- */
-(a)Scope(ScopeType.CONVERSATION)
-(a)Name("org.jboss.seam.bpm.businessProcess")
-@BypassInterceptors
-(a)Install(dependencies="org.jboss.seam.bpm.jbpm", precedence=FRAMEWORK,
classDependencies="javax.faces.context.FacesContext")
-public class BusinessProcess extends org.jboss.seam.bpm.BusinessProcess
-{
-
- @Override
- protected void taskNotFound(Long taskId)
- {
- FacesMessages.instance().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_WARN,
- "org.jboss.seam.TaskNotFound",
- "Task #0 not found",
- taskId
- );
- }
-
- @Override
- protected void taskEnded(Long taskId)
- {
- FacesMessages.instance().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_WARN,
- "org.jboss.seam.TaskEnded",
- "Task #0 already ended",
- taskId
- );
- }
-
- @Override
- protected void processEnded(Long processId)
- {
- FacesMessages.instance().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_WARN,
- "org.jboss.seam.ProcessEnded",
- "Process #0 already ended",
- processId
- );
- }
-
- @Override
- protected void processNotFound(Long processId)
- {
- FacesMessages.instance().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_WARN,
- "org.jboss.seam.ProcessNotFound",
- "Process #0 not found",
- processId
- );
- }
-
- @Override
- protected void processEnded(String key)
- {
- FacesMessages.instance().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_WARN,
- "org.jboss.seam.ProcessEnded",
- "Process #0 already ended",
- key
- );
- }
-
- @Override
- protected void processNotFound(String key)
- {
- FacesMessages.instance().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_WARN,
- "org.jboss.seam.ProcessNotFound",
- "Process #0 not found",
- key
- );
- }
-
-}