1 5 package com.opensymphony.workflow.config; 6 7 import com.opensymphony.workflow.FactoryException; 8 import com.opensymphony.workflow.StoreException; 9 import com.opensymphony.workflow.loader.AbstractWorkflowFactory; 10 import com.opensymphony.workflow.loader.WorkflowDescriptor; 11 import com.opensymphony.workflow.spi.WorkflowStore; 12 13 import java.net.URL ; 14 15 import java.util.Map ; 16 17 18 24 public class SpringConfiguration implements Configuration { 25 27 private AbstractWorkflowFactory factory; 28 private WorkflowStore store; 29 30 32 public void setFactory(AbstractWorkflowFactory factory) { 33 this.factory = factory; 34 } 35 36 39 public boolean isInitialized() { 40 return false; 42 } 43 44 47 public String getPersistence() { 48 return null; 50 } 51 52 55 public Map getPersistenceArgs() { 56 return null; 58 } 59 60 public void setStore(WorkflowStore store) { 61 this.store = store; 62 } 63 64 public WorkflowDescriptor getWorkflow(String name) throws FactoryException { 65 WorkflowDescriptor workflow = factory.getWorkflow(name); 66 67 if (workflow == null) { 68 throw new FactoryException("Unknown workflow name"); 69 } 70 71 return workflow; 72 } 73 74 public String [] getWorkflowNames() throws FactoryException { 75 return factory.getWorkflowNames(); 76 } 77 78 public WorkflowStore getWorkflowStore() throws StoreException { 79 return store; 80 } 81 82 85 public void load(URL url) throws FactoryException { 86 } 88 89 public boolean removeWorkflow(String workflow) throws FactoryException { 90 return factory.removeWorkflow(workflow); 91 } 92 93 public boolean saveWorkflow(String name, WorkflowDescriptor descriptor, boolean replace) throws FactoryException { 94 return factory.saveWorkflow(name, descriptor, replace); 95 } 96 } 97 | Popular Tags |