wt.project
Class LoadProject

java.lang.Object
  extended bywt.project.LoadProject

public class LoadProject
extends Object

This class is used by wt.load.StandardLoadService to create objects for classes in the wt.project package.



Supported API: false

See Also:
StandardLoadService

Field Summary
private static String CACHE_CURRENTPROJECT
           
private static String CACHE_CURRENTPT
           
private static String PROJECT_FOLDER
           
private static String RESOURCE
           
private static boolean VERBOSE
           
 
Constructor Summary
LoadProject()
           
 
Method Summary
static boolean createActorRoleHolder(Hashtable fileFields, Hashtable cmd_line, Vector return_objects)
          Builds a hash table of role to actor role mappings, and stores the hash table to the StandardLoadService cache.
static boolean createIndirectRoleHolder(Hashtable fileFields, Hashtable cmd_line, Vector return_objects)
          Builds a hash table of role to role mappings, and stores the hash table to the StandardLoadService cache.
static boolean createProjectBegin(Hashtable attributes, Hashtable cmdLineArgs, Vector return_objects)
          Create and persist an empty Project (no participants).
static boolean createProjectEnd(Hashtable fileFields, Hashtable cmd_line, Vector return_objects)
          Repersist a project with all the participants specified.
static boolean createRoleHolder(Hashtable fileFields, Hashtable cmd_line, Vector return_objects)
          Adds a "role to principal" mapping to the cached CURRENT PhaseTemplate object (CACHE_CURRENTPT) OR to the cached CURRENT Project (CACHE_CURRENTPROJECT) if there is no CACHE_CURRENTPT).
private static boolean getBoolean(String name, Hashtable attributes, Hashtable cmdLineArgs, int required, boolean defaultValue)
           
private static Folder getFolder(String folderLocation, Hashtable attributes, Hashtable cmdLineArgs, int required)
           
private static String getString(String name, Hashtable attributes, Hashtable cmdLineArgs, int required)
           
protected static void printException(String methodName, Exception e)
          Helper method to print stack trace of exception to Method Server log.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERBOSE

private static final boolean VERBOSE

PROJECT_FOLDER

private static final String PROJECT_FOLDER
See Also:
Constant Field Values

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CACHE_CURRENTPROJECT

private static String CACHE_CURRENTPROJECT

CACHE_CURRENTPT

private static String CACHE_CURRENTPT
Constructor Detail

LoadProject

public LoadProject()
Method Detail

createProjectBegin

public static boolean createProjectBegin(Hashtable attributes,
                                         Hashtable cmdLineArgs,
                                         Vector return_objects)
Create and persist an empty Project (no participants).

Returns:
true if Project created and persisted ok, false otherwise
See Also:
wt.load.StandardLoadService.load, createPhaseTemplateBegin, createPhaseTemplateEnd

createProjectEnd

public static boolean createProjectEnd(Hashtable fileFields,
                                       Hashtable cmd_line,
                                       Vector return_objects)
Repersist a project with all the participants specified.

Parameters:
fileFields - Hashtable containing the values read from the input file.
Returns:
true if Project created and persisted ok, false otherwise
See Also:
wt.load.StandardLoadService.load, createPhaseTemplateBegin, createPhaseTemplateEnd

createIndirectRoleHolder

public static boolean createIndirectRoleHolder(Hashtable fileFields,
                                               Hashtable cmd_line,
                                               Vector return_objects)
Builds a hash table of role to role mappings, and stores the hash table to the StandardLoadService cache. This role holder is eventually added to the appropriate life cycle phase template by the createPhaseTemplateEnd method.

Parameters:
fileFields - Hashtable containing the values read from the input file.
Returns:
true if roleRoleMap hashtable created ok, false otherwise
See Also:
wt.load.StandardLoadService.load, createPhaseTemplateBegin, createPhaseTemplateEnd

createActorRoleHolder

public static boolean createActorRoleHolder(Hashtable fileFields,
                                            Hashtable cmd_line,
                                            Vector return_objects)
Builds a hash table of role to actor role mappings, and stores the hash table to the StandardLoadService cache. This role holder is eventually added to the appropriate life cycle phase template by the createPhaseTemplateEnd method.

Parameters:
fileFields - Hashtable containing the values read from the input file.
Returns:
true if roleRoleMap hashtable created ok, false otherwise
See Also:
wt.load.StandardLoadService.load, createPhaseTemplateBegin, createPhaseTemplateEnd

createRoleHolder

public static boolean createRoleHolder(Hashtable fileFields,
                                       Hashtable cmd_line,
                                       Vector return_objects)
Adds a "role to principal" mapping to the cached CURRENT PhaseTemplate object (CACHE_CURRENTPT) OR to the cached CURRENT Project (CACHE_CURRENTPROJECT) if there is no CACHE_CURRENTPT).

Parameters:
fileFields - Hashtable containing the values read in from the input file.
Returns:
true if rolePrincipalMap hashtable created ok, false otherwise
See Also:
wt.load.StandardLoadService.load, wt.lifecycle.WTRoleHolder.addPrincipal, createPhaseTemplateBegin, createPhaseTemplateEnd

getString

private static String getString(String name,
                                Hashtable attributes,
                                Hashtable cmdLineArgs,
                                int required)
                         throws IllegalArgumentException
Throws:
IllegalArgumentException

getFolder

private static Folder getFolder(String folderLocation,
                                Hashtable attributes,
                                Hashtable cmdLineArgs,
                                int required)
                         throws IllegalArgumentException
Throws:
IllegalArgumentException

getBoolean

private static boolean getBoolean(String name,
                                  Hashtable attributes,
                                  Hashtable cmdLineArgs,
                                  int required,
                                  boolean defaultValue)
                           throws IllegalArgumentException
Throws:
IllegalArgumentException

printException

protected static void printException(String methodName,
                                     Exception e)
Helper method to print stack trace of exception to Method Server log.

Parameters:
methodName - Name of the calling method.