org.yawlfoundation.yawl.worklet.support
Class Library

java.lang.Object
  extended by org.yawlfoundation.yawl.worklet.support.Library

public class Library
extends Object

The support library class of static methods for the worklet service

Author:
Michael Adams v0.8, 04-09/2006

Field Summary
static String newline
           
static String wsHomeDir
           
static boolean wsInitialised
           
static String wsLogsDir
           
static boolean wsPersistOn
           
static String wsRepositoryDir
           
static String wsRulesDir
           
static String wsSelectedDir
           
static String wsWorkletsDir
           
 
Constructor Summary
Library()
           
 
Method Summary
static StringBuilder appendLine(StringBuilder s, String title, String item)
          appends a formatted line with the passed title and value to the StringBuilder
static StringBuilder appendXML(StringBuilder s, String tag, String value)
          appends an XML formatted line with the passed tag and value to the StringBuilder
static boolean fileExists(String fName)
          returns true if the file is found
static String FileToString(String fName)
          converts the contents of a file to a String
static String getSepChars(int len)
          returns a string of characters of length 'len'
static String getTaskNameFromId(String tid)
          removes the ddd_ part from the front or rear of a taskid
static String listItems(List l)
          returns a list of objects as a String of csv's
static void setHomeDir(String dir)
          Called by the WorkletGateway servlet to set the actual local file path to the worklet service (as read from the servlet context)
static void setPersist(boolean setting)
          Called by the WorkletGateway servlet to set the persistence value read in from web.xml
static void setRepositoryDir(String dir)
          Called by the WorkletGateway servlet to set the path to the worklet repository as read in from web.xml
static void setServicetInitialised()
          Called by the WorkletGateway servlet to set a flag when the service has completed initialisation (to prevent multi-initialisations)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

wsHomeDir

public static String wsHomeDir

wsRepositoryDir

public static String wsRepositoryDir

wsLogsDir

public static String wsLogsDir

wsWorkletsDir

public static String wsWorkletsDir

wsRulesDir

public static String wsRulesDir

wsSelectedDir

public static String wsSelectedDir

wsPersistOn

public static boolean wsPersistOn

wsInitialised

public static boolean wsInitialised

newline

public static final String newline
Constructor Detail

Library

public Library()
Method Detail

setPersist

public static void setPersist(boolean setting)
Called by the WorkletGateway servlet to set the persistence value read in from web.xml

Parameters:
setting - - true or false as specified in web.xml

setRepositoryDir

public static void setRepositoryDir(String dir)
Called by the WorkletGateway servlet to set the path to the worklet repository as read in from web.xml

Parameters:
dir - - the path value specified in web.xml

setHomeDir

public static void setHomeDir(String dir)
Called by the WorkletGateway servlet to set the actual local file path to the worklet service (as read from the servlet context)

Parameters:
dir - - the local path value to the root of the worklet service

setServicetInitialised

public static void setServicetInitialised()
Called by the WorkletGateway servlet to set a flag when the service has completed initialisation (to prevent multi-initialisations)


getTaskNameFromId

public static String getTaskNameFromId(String tid)
removes the ddd_ part from the front or rear of a taskid


getSepChars

public static String getSepChars(int len)
returns a string of characters of length 'len'


FileToString

public static String FileToString(String fName)
converts the contents of a file to a String

Parameters:
fName - the name of the file
Returns:
the String representing the file's contents

fileExists

public static boolean fileExists(String fName)
returns true if the file is found


listItems

public static String listItems(List l)
returns a list of objects as a String of csv's


appendLine

public static StringBuilder appendLine(StringBuilder s,
                                       String title,
                                       String item)
appends a formatted line with the passed title and value to the StringBuilder


appendXML

public static StringBuilder appendXML(StringBuilder s,
                                      String tag,
                                      String value)
appends an XML formatted line with the passed tag and value to the StringBuilder



Copyright © 2004-2012 The YAWL Foundation.