krysalis-sandbox/workflow/src/java/org/krysalis/workflow WorkFlow.java,1.3,1.4 WorkFlowAction.java,1.3,1.4 WorkFlowCondition.java,1.3,1.4 WorkFlowEvent.java,1.2,1.3 WorkFlowManager.java,1.6,1.7 WorkFlowMapper.java,1.2,1.3 WorkFlowState.java,1.2,1.3 WorkFlowStore.java,1.3,1.4

[email protected]
Newsgroups gmane.comp.krysalis.sandbox
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/krysalis-sandbox/workflow/src/java/org/krysalis/workflow
In directory sc8-pr-cvs1:/tmp/cvs-serv31230/src/java/org/krysalis/workflow

Modified Files:
	WorkFlow.java WorkFlowAction.java WorkFlowCondition.java 
	WorkFlowEvent.java WorkFlowManager.java WorkFlowMapper.java 
	WorkFlowState.java WorkFlowStore.java 
Log Message:
Fixing role configuration.
Using configuration class instead of parameters for actions
and conditions.


Index: WorkFlow.java
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-sandbox/workflow/src/java/org/krysalis/workflow/WorkFlow.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** WorkFlow.java	14 Mar 2003 15:06:02 -0000	1.3
--- WorkFlow.java	17 Mar 2003 10:39:10 -0000	1.4
***************
*** 13,18 ****
  
  /**
!  *
!  *
   *
   * @author <a href="mailto:[email protected]">Stephan Michels</a>
--- 13,17 ----
  
  /**
!  * Contract for the a workflow implementation. 
   *
   * @author <a href="mailto:[email protected]">Stephan Michels</a>
***************
*** 22,33 ****
  {
  
!   /**  */
    public final static String ROLE = WorkFlow.class.getName();
  
    /**
     *
!    *
!    * @param state      
!    * @param event      
     */
    void process(WorkFlowState state, WorkFlowEvent event);
--- 21,33 ----
  {
  
!   /** Role of a workflow component */
    public final static String ROLE = WorkFlow.class.getName();
  
    /**
+    * Process all transitions for a given event and state.
+    * The event can be null to process all epsilon transition.
     *
!    * @param state State of the resource
!    * @param event Event for the transitions.
     */
    void process(WorkFlowState state, WorkFlowEvent event);

Index: WorkFlowAction.java
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-sandbox/workflow/src/java/org/krysalis/workflow/WorkFlowAction.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** WorkFlowAction.java	14 Mar 2003 15:06:04 -0000	1.3
--- WorkFlowAction.java	17 Mar 2003 10:39:11 -0000	1.4
***************
*** 10,14 ****
  
  import org.apache.avalon.framework.component.Component;
! import org.apache.avalon.framework.parameters.Parameters;
  import org.apache.avalon.framework.thread.ThreadSafe;
  
--- 10,14 ----
  
  import org.apache.avalon.framework.component.Component;
! import org.apache.avalon.framework.configuration.Configuration;
  import org.apache.avalon.framework.thread.ThreadSafe;
  
***************
*** 22,36 ****
  {
  
!   /**  */
    public final static String ROLE = WorkFlowAction.class.getName();
  
!   /**
!    *
!    *
!    * @param state      
!    * @param event      
!    * @param params     
!    */
!   void perform(WorkFlowState state, WorkFlowEvent event, Parameters params);
  }
  
--- 22,29 ----
  {
  
!   /** Role of a workflow action component */
    public final static String ROLE = WorkFlowAction.class.getName();
  
!   void perform(WorkFlowState state, WorkFlowEvent event, Configuration configuation);
  }
  

Index: WorkFlowCondition.java
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-sandbox/workflow/src/java/org/krysalis/workflow/WorkFlowCondition.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** WorkFlowCondition.java	14 Mar 2003 15:06:05 -0000	1.3
--- WorkFlowCondition.java	17 Mar 2003 10:39:11 -0000	1.4
***************
*** 10,14 ****
  
  import org.apache.avalon.framework.component.Component;
! import org.apache.avalon.framework.parameters.Parameters;
  import org.apache.avalon.framework.thread.ThreadSafe;
  
--- 10,14 ----
  
  import org.apache.avalon.framework.component.Component;
! import org.apache.avalon.framework.configuration.Configuration;
  import org.apache.avalon.framework.thread.ThreadSafe;
  
***************
*** 23,27 ****
      public final static String ROLE = WorkFlowAction.class.getName();
  
!     /**
       * Test this condition.
       *
--- 23,27 ----
      public final static String ROLE = WorkFlowAction.class.getName();
  
!     /*
       * Test this condition.
       *
***************
*** 33,37 ****
       *         executed.
       */
!     public boolean evaluate(WorkFlowState state, WorkFlowEvent event, Parameters parameters);
  }
  
--- 33,37 ----
       *         executed.
       */
!     public boolean evaluate(WorkFlowState state, WorkFlowEvent event, Configuration configuration);
  }
  

Index: WorkFlowEvent.java
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-sandbox/workflow/src/java/org/krysalis/workflow/WorkFlowEvent.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** WorkFlowEvent.java	14 Mar 2003 15:06:06 -0000	1.2
--- WorkFlowEvent.java	17 Mar 2003 10:39:12 -0000	1.3
***************
*** 30,43 ****
  
    /**
     *
!    *
!    * @return
     */
    public String getName();
  
    /**
     *
!    *
!    * @return
     */
    Map getAttributes();
--- 30,43 ----
  
    /**
+    * Return the name of the event.
     *
!    * @return Name of the event.
     */
    public String getName();
  
    /**
+    * Return all attributes of this event.
     *
!    * @return Attributes of the event.
     */
    Map getAttributes();

Index: WorkFlowManager.java
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-sandbox/workflow/src/java/org/krysalis/workflow/WorkFlowManager.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** WorkFlowManager.java	15 Mar 2003 18:44:37 -0000	1.6
--- WorkFlowManager.java	17 Mar 2003 10:39:12 -0000	1.7
***************
*** 13,18 ****
  
  /**
!  *
!  *
   *
   * @author <a href="mailto:[email protected]">Stephan Michels</a>
--- 13,18 ----
  
  /**
!  * A workflow manager manages several workflows, and assignments
!  * of resources against workflows and workflow stores.
   *
   * @author <a href="mailto:[email protected]">Stephan Michels</a>
***************
*** 22,49 ****
  {
  
!   /**  */
    public final static String ROLE = WorkFlowManager.class.getName();
  
    /**
     *
!    *
!    * @param resource   
!    * @param event      
     */
    void process(WorkFlowEvent event);
  
    /**
     *
     *
!    * @param resource   
!    *
!    * @return
     */
    WorkFlowState lookup(String resource);
  
    /**
     *
!    *
!    * @param state      
     */
    void release(WorkFlowState state);
--- 22,49 ----
  {
  
!   /** Role of the workflow manager component */
    public final static String ROLE = WorkFlowManager.class.getName();
  
    /**
+    * Process all transitions for a given event and state.
+    * The event can be null to process all epsilon transition. 
     *
!    * @param event Event for the transitions.    
     */
    void process(WorkFlowEvent event);
  
    /**
+    * Lookup for the state of a given resource.
     *
+    * @param resource Resource.
     *
!    * @return State of the resource.
     */
    WorkFlowState lookup(String resource);
  
    /**
+    * Release a state.
     *
!    * @param state State.  
     */
    void release(WorkFlowState state);

Index: WorkFlowMapper.java
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-sandbox/workflow/src/java/org/krysalis/workflow/WorkFlowMapper.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** WorkFlowMapper.java	14 Mar 2003 15:06:06 -0000	1.2
--- WorkFlowMapper.java	17 Mar 2003 10:39:13 -0000	1.3
***************
*** 13,17 ****
  
  /**
!  *
   *
   * @author <a href="mailto:[email protected]">Stephan Michels </a>
--- 13,17 ----
  
  /**
!  * A workflow mapper maps resources to workflows and workflow states.
   *
   * @author <a href="mailto:[email protected]">Stephan Michels </a>
***************
*** 21,42 ****
  {
  
!   /**  */
    public final static String ROLE = WorkFlowMapper.class.getName();
  
    /**
     *
     *
!    * @param resource   
!    *
!    * @return
     */
    public String getWorkFlow(String resource);
  
    /**
     *
     *
!    * @param resource   
!    *
!    * @return
     */
    public String getWorkFlowStore(String resource);
--- 21,44 ----
  {
  
!   /** Role of the workflow mapper component */
    public final static String ROLE = WorkFlowMapper.class.getName();
  
    /**
+    * Return the name of the workflow, which should be used for
+    * the resource.
     *
+    * @param resource Resource.
     *
!    * @return Name of the workflow.
     */
    public String getWorkFlow(String resource);
  
    /**
+    * Return the name of the workflow store, which should be used for
+    * the resource.
     *
+    * @param resource Resource.
     *
!    * @return Name of the workflow store.
     */
    public String getWorkFlowStore(String resource);

Index: WorkFlowState.java
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-sandbox/workflow/src/java/org/krysalis/workflow/WorkFlowState.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** WorkFlowState.java	14 Mar 2003 15:06:06 -0000	1.2
--- WorkFlowState.java	17 Mar 2003 10:39:14 -0000	1.3
***************
*** 22,50 ****
  
    /**
     *
!    *
!    * @return
     */
    public String getResource();
  
    /**
     *
!    *
!    * @param name       
     */
    public void setState(String name);
  
    /**
     *
!    *
!    * @return
     */
    public String getState();
  
    /**
!    * Set a parameter for a state.
     *
!    * @param name Name of the parameter.
!    * @param value Value of the parameter.
     */
    void setAttribute(String name, Object value);
--- 22,50 ----
  
    /**
+    * Return the name of the resource of this state.
     *
!    * @return Name of the resource.
     */
    public String getResource();
  
    /**
+    * Set the name of the current state.
     *
!    * @param name Name of the current state.
     */
    public void setState(String name);
  
    /**
+    * Return the name of the current state.
     *
!    * @return Name of the current state.
     */
    public String getState();
  
    /**
!    * Set a attribute for a state.
     *
!    * @param name Name of the attribute.
!    * @param value Value of the attribute.
     */
    void setAttribute(String name, Object value);
***************
*** 53,65 ****
     * Return a parameter of a state.
     *
!    * @param name Name of the parameter.
!    * @return Value of the parameter.
     */
    Object getAttribute(String name);
  
    /**
     *
!    *
!    * @return
     */
    public Map getAttributes();
--- 53,65 ----
     * Return a parameter of a state.
     *
!    * @param name Name of the attribute.
!    * @return Value of the attribute.
     */
    Object getAttribute(String name);
  
    /**
+    * Return a map of the attributes.
     *
!    * @return Map of attributes.
     */
    public Map getAttributes();

Index: WorkFlowStore.java
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-sandbox/workflow/src/java/org/krysalis/workflow/WorkFlowStore.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** WorkFlowStore.java	14 Mar 2003 15:06:07 -0000	1.3
--- WorkFlowStore.java	17 Mar 2003 10:39:15 -0000	1.4
***************
*** 21,40 ****
  {
  
!   /**  */
    public final static String ROLE = WorkFlowStore.class.getName();
  
    /**
     *
     *
!    * @param resource   
!    *
!    * @return
     */
    WorkFlowState lookup(String resource);
  
    /**
     *
!    *
!    * @param state      
     */
    void release(WorkFlowState state);
--- 21,40 ----
  {
  
!   /** Role of the workflow store component */
    public final static String ROLE = WorkFlowStore.class.getName();
  
    /**
+    * Lookup for the state of a given resource.
     *
+    * @param resource Name of the resource.
     *
!    * @return Current state of the resource.
     */
    WorkFlowState lookup(String resource);
  
    /**
+    * Release the state to the store.
     *
!    * @param state State, which should be released
     */
    void release(WorkFlowState state);




-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.