eu.planets_project.ifr.core.wee.api.workflow
Class WorkflowTemplateHelper

java.lang.Object
  extended by eu.planets_project.ifr.core.wee.api.workflow.WorkflowTemplateHelper
All Implemented Interfaces:
java.io.Serializable

public abstract class WorkflowTemplateHelper
extends java.lang.Object
implements java.io.Serializable

Since:
18.12.2008 Contains information and operations which are the same for all objects implementing the workflowTemplate interface
See Also:
Serialized Form

Constructor Summary
WorkflowTemplateHelper()
           
 
Method Summary
 void addWFResultItem(WorkflowResultItem wfResultItem)
           
 java.util.List<DigitalObject> getData()
           
 DataRegistry getDataRegistry()
           
 java.util.List<java.lang.String> getDeclaredWFServiceNames()
           
 java.util.List<java.lang.reflect.Field> getDeclaredWFServices()
           
static java.lang.String getHostAuthority()
          Returns host and port of the system the wee is running on as configured through AppServer installation
 ServiceCallConfigs getServiceCallConfigs(PlanetsService forService)
           
 java.util.List<java.lang.String> getSupportedServiceTypes()
           
 Agent getWEEAgent()
          Returns the Agent of the batch processor the template is currently executed by.
 WorkflowResult getWFResult()
           
 WorkflowContext getWorkflowContext()
           
 ReportingLog getWorkflowReportingLogger()
           
 java.util.UUID getWorklowInstanceID()
           
 boolean isServiceTypeSupported(java.lang.reflect.Field f)
           
static Message link(java.util.List<java.net.URL> results)
           
static Message overview(WorkflowTemplate template)
           
static java.util.List<java.net.URL> reference(java.util.List<DigitalObject> objects, java.io.File folder)
           
 DigitalObject retrieveDigitalObjectDataRegistryRef(java.net.URI digitalObjectRef)
           
 void setData(java.util.List<DigitalObject> data)
           
 void setServiceCallConfigs(PlanetsService forService, ServiceCallConfigs serCallConfigs)
           
 void setWEEAgent(Agent agent)
           
 void setWorkflowContext(WorkflowContext wfContext)
           
 void setWorkflowInstanceID(java.util.UUID id)
          A reference to the WOrkflowInstance's UUID
 java.net.URI storeDigitalObject(DigitalObject digoToStore)
           
 java.net.URI storeDigitalObjectInRepository(DigitalObject digoToStore, java.net.URI repositoryID)
           
 java.net.URI storeDigitalObjectInRepository(java.net.URI objectLocation, DigitalObject digoToStore, java.net.URI repositoryID)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkflowTemplateHelper

public WorkflowTemplateHelper()
Method Detail

getDeclaredWFServices

public java.util.List<java.lang.reflect.Field> getDeclaredWFServices()

getDeclaredWFServiceNames

public java.util.List<java.lang.String> getDeclaredWFServiceNames()

getSupportedServiceTypes

public java.util.List<java.lang.String> getSupportedServiceTypes()

isServiceTypeSupported

public boolean isServiceTypeSupported(java.lang.reflect.Field f)

setServiceCallConfigs

public void setServiceCallConfigs(PlanetsService forService,
                                  ServiceCallConfigs serCallConfigs)

getServiceCallConfigs

public ServiceCallConfigs getServiceCallConfigs(PlanetsService forService)

setWorkflowContext

public void setWorkflowContext(WorkflowContext wfContext)

getWorkflowContext

public WorkflowContext getWorkflowContext()

getData

public java.util.List<DigitalObject> getData()

setData

public void setData(java.util.List<DigitalObject> data)

reference

public static java.util.List<java.net.URL> reference(java.util.List<DigitalObject> objects,
                                                     java.io.File folder)
Parameters:
objects - The digital objects
folder - The folder to store the files in
Returns:
References to the given digital object, stored in the given folder

link

public static Message link(java.util.List<java.net.URL> results)
Parameters:
results - URLs to files (output of reference(List, File))
Returns:
The message linking to the given files, to be passed to a reporting log

overview

public static Message overview(WorkflowTemplate template)
Parameters:
template - The template
Returns:
A overview message for the template

getHostAuthority

public static java.lang.String getHostAuthority()
                                         throws java.net.URISyntaxException
Returns host and port of the system the wee is running on as configured through AppServer installation

Returns:
the host authority as a java.lang.String
Throws:
java.net.URISyntaxException

getWFResult

public WorkflowResult getWFResult()

addWFResultItem

public void addWFResultItem(WorkflowResultItem wfResultItem)

getWorkflowReportingLogger

public ReportingLog getWorkflowReportingLogger()
Returns:
The ReportingLog

setWorkflowInstanceID

public void setWorkflowInstanceID(java.util.UUID id)
A reference to the WOrkflowInstance's UUID

Parameters:
id -

getWorklowInstanceID

public java.util.UUID getWorklowInstanceID()
Returns:
the UUID identifying the WorkflowInstance

storeDigitalObject

public java.net.URI storeDigitalObject(DigitalObject digoToStore)
                                throws DataRegistry.DigitalObjectManagerNotFoundException,
                                       DigitalObjectManager.DigitalObjectNotStoredException
Throws:
DataRegistry.DigitalObjectManagerNotFoundException
DigitalObjectManager.DigitalObjectNotStoredException

storeDigitalObjectInRepository

public java.net.URI storeDigitalObjectInRepository(DigitalObject digoToStore,
                                                   java.net.URI repositoryID)
                                            throws DataRegistry.DigitalObjectManagerNotFoundException,
                                                   DigitalObjectManager.DigitalObjectNotStoredException
Throws:
DataRegistry.DigitalObjectManagerNotFoundException
DigitalObjectManager.DigitalObjectNotStoredException

storeDigitalObjectInRepository

public java.net.URI storeDigitalObjectInRepository(java.net.URI objectLocation,
                                                   DigitalObject digoToStore,
                                                   java.net.URI repositoryID)
                                            throws DataRegistry.DigitalObjectManagerNotFoundException,
                                                   DigitalObjectManager.DigitalObjectNotStoredException
Throws:
DataRegistry.DigitalObjectManagerNotFoundException
DigitalObjectManager.DigitalObjectNotStoredException

getDataRegistry

public DataRegistry getDataRegistry()

retrieveDigitalObjectDataRegistryRef

public DigitalObject retrieveDigitalObjectDataRegistryRef(java.net.URI digitalObjectRef)
                                                   throws DigitalObjectManager.DigitalObjectNotFoundException
Throws:
DigitalObjectManager.DigitalObjectNotFoundException

getWEEAgent

public Agent getWEEAgent()
Returns the Agent of the batch processor the template is currently executed by.

Returns:
the Agent

setWEEAgent

public void setWEEAgent(Agent agent)


Copyright © 2007-2010 The Planets Consortium. All Rights Reserved.