From b8548a8bff0bc0ebf84c3c9c899432c4f5f7ed27 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Thu, 20 Jun 2013 16:37:39 +0200 Subject: getWorkflow and getViewpoint utility methods in ItemProxy --- src/main/java/com/c2kernel/entity/proxy/ItemProxy.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/c2kernel') diff --git a/src/main/java/com/c2kernel/entity/proxy/ItemProxy.java b/src/main/java/com/c2kernel/entity/proxy/ItemProxy.java index 1579d78..67685e7 100644 --- a/src/main/java/com/c2kernel/entity/proxy/ItemProxy.java +++ b/src/main/java/com/c2kernel/entity/proxy/ItemProxy.java @@ -25,7 +25,10 @@ import com.c2kernel.entity.ItemHelper; import com.c2kernel.entity.ManageableEntity; import com.c2kernel.entity.agent.Job; import com.c2kernel.entity.agent.JobArrayList; +import com.c2kernel.lifecycle.instance.Workflow; import com.c2kernel.lifecycle.instance.stateMachine.Transitions; +import com.c2kernel.persistency.ClusterStorage; +import com.c2kernel.persistency.outcome.Viewpoint; import com.c2kernel.process.Gateway; import com.c2kernel.utils.Logger; @@ -206,10 +209,18 @@ public class ItemProxy extends EntityProxy } - public Collection getCollection(String collName) throws ObjectNotFoundException { - return (Collection)getObject("Collection/"+collName); + public Collection getCollection(String collName) throws ObjectNotFoundException { + return (Collection)getObject(ClusterStorage.COLLECTION+"/"+collName); } - + + public Workflow getWorkflow() throws ObjectNotFoundException { + return (Workflow)getObject(ClusterStorage.LIFECYCLE+"/workflow"); + } + + public Viewpoint getViewpoint(String schemaName, String viewName) throws ObjectNotFoundException { + return (Viewpoint)getObject(ClusterStorage.VIEWPOINT+"/"+schemaName+"/"+viewName); + } + public Job getJobByName(String actName, AgentProxy agent) throws AccessRightsException, ObjectNotFoundException, -- cgit v1.2.3