wt.lifecycle
Class LifeCycleExportImportHandler

java.lang.Object
  extended bywt.lifecycle.LifeCycleExportImportHandler

public final class LifeCycleExportImportHandler
extends Object

Handle the Export/Import of a LifeCycle Template.

Supported API: false

Extendable: false


Field Summary
private static String ACTOR_ROLE_HOLDER
           
private static String COMMA_DELIMITER
           
private static String CONTAINER
           
private static String CRITERION
           
private static String CSV_SUFFIX
           
private static String EXPORT_HEADER
           
private static String EXPORT_HEADER_TIMESTAMP
           
private static String EXPORT_HEADER_USER
           
private static String EXPORT_IMPORT_DIRECTORY
           
private static String INDIRECT_ROLE_HOLDER
           
private static String LIFECYCLE_TEMPLATE_BEGIN
           
private static String LIFECYCLE_TEMPLATE_END
           
private static String NEW_LINE
           
private static String PHASE_SUCCESSION_BEGIN
           
private static String PHASE_TEMPLATE_BEGIN
           
private static String PHASE_TEMPLATE_END
           
private static String RESOURCE
           
private static String ROLE_HOLDER
           
private static String SERVICE_NAME
           
private static boolean VERBOSE
           
private static String WT_ACL_ENTRY
           
private static String WT_HOME
           
 
Constructor Summary
LifeCycleExportImportHandler()
           
 
Method Summary
protected static StringBuffer exportTemplateAsStringBuffer(LifeCycleTemplate template, StringBuffer buf)
          Exports the template to a CSV string buffer.
protected static void exportTemplates(Vector lifeCycleVector, String fileName, boolean appendFlag)
           
protected static Vector findExportImportFileNames()
           
protected static void getAllSuccessors(LifeCycleTemplate lct, PhaseTemplate phaseTemplate, StringBuffer buf, StringBuffer successionBuf)
           
private static PhaseTemplate getInitialPhase(LifeCycleManaged object)
           
private static PhaseTemplate getInitialPhase(LifeCycleTemplate aLCT)
           
private static PhaseTemplate getSuccessorPhase(PhaseTemplate current)
           
protected static void importTemplates(String fileName)
           
protected static void importTemplates(String fileName, WTContainerRef context)
           
private static String stringActorRoleHolder(Role role, ActorRole actor)
           
private static String stringCriterion(Criterion aCriterion)
           
private static String stringIndirectRoleHolder(Role role, Role roleAssignee)
           
private static String stringLifeCycleTemplate(LifeCycleTemplate aTemplate)
           
private static String stringPhaseSuccessionBegin(LifeCycleTemplate lct, PhaseTemplate predecessorPhase, PhaseTemplate successorPhase, PhaseSuccession aSuccession)
           
private static String stringPhaseTemplate(PhaseTemplate aTemplate)
           
private static String stringRoleHolder(Role role, WTPrincipalReference principal)
           
private static String stringWTAclEntry(Role role, Enumeration permissions)
           
private static File verifyDirectoryExists(String directoryToVerify, boolean autoCreate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXPORT_HEADER

private static final String EXPORT_HEADER
See Also:
Constant Field Values

EXPORT_HEADER_USER

private static final String EXPORT_HEADER_USER
See Also:
Constant Field Values

EXPORT_HEADER_TIMESTAMP

private static final String EXPORT_HEADER_TIMESTAMP
See Also:
Constant Field Values

LIFECYCLE_TEMPLATE_BEGIN

private static final String LIFECYCLE_TEMPLATE_BEGIN
See Also:
Constant Field Values

LIFECYCLE_TEMPLATE_END

private static final String LIFECYCLE_TEMPLATE_END
See Also:
Constant Field Values

PHASE_TEMPLATE_BEGIN

private static final String PHASE_TEMPLATE_BEGIN
See Also:
Constant Field Values

PHASE_SUCCESSION_BEGIN

private static final String PHASE_SUCCESSION_BEGIN
See Also:
Constant Field Values

PHASE_TEMPLATE_END

private static final String PHASE_TEMPLATE_END
See Also:
Constant Field Values

CRITERION

private static final String CRITERION
See Also:
Constant Field Values

ROLE_HOLDER

private static final String ROLE_HOLDER
See Also:
Constant Field Values

ACTOR_ROLE_HOLDER

private static final String ACTOR_ROLE_HOLDER
See Also:
Constant Field Values

INDIRECT_ROLE_HOLDER

private static final String INDIRECT_ROLE_HOLDER
See Also:
Constant Field Values

WT_ACL_ENTRY

private static final String WT_ACL_ENTRY
See Also:
Constant Field Values

CONTAINER

private static final String CONTAINER
See Also:
Constant Field Values

NEW_LINE

private static final String NEW_LINE

COMMA_DELIMITER

private static final String COMMA_DELIMITER
See Also:
Constant Field Values

CSV_SUFFIX

private static final String CSV_SUFFIX
See Also:
Constant Field Values

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

VERBOSE

private static final boolean VERBOSE

EXPORT_IMPORT_DIRECTORY

private static final String EXPORT_IMPORT_DIRECTORY

WT_HOME

private static final String WT_HOME

SERVICE_NAME

private static final String SERVICE_NAME
See Also:
Constant Field Values
Constructor Detail

LifeCycleExportImportHandler

public LifeCycleExportImportHandler()
Method Detail

findExportImportFileNames

protected static Vector findExportImportFileNames()
                                           throws WTException,
                                                  LifeCycleException
Throws:
WTException
LifeCycleException

exportTemplates

protected static void exportTemplates(Vector lifeCycleVector,
                                      String fileName,
                                      boolean appendFlag)
                               throws WTException,
                                      LifeCycleException
Throws:
WTException
LifeCycleException

exportTemplateAsStringBuffer

protected static StringBuffer exportTemplateAsStringBuffer(LifeCycleTemplate template,
                                                           StringBuffer buf)
                                                    throws WTException
Exports the template to a CSV string buffer.

Throws:
WTException

importTemplates

protected static void importTemplates(String fileName)
                               throws WTException,
                                      LifeCycleException
Throws:
WTException
LifeCycleException

importTemplates

protected static void importTemplates(String fileName,
                                      WTContainerRef context)
                               throws WTException,
                                      LifeCycleException
Throws:
WTException
LifeCycleException

stringLifeCycleTemplate

private static String stringLifeCycleTemplate(LifeCycleTemplate aTemplate)

stringPhaseTemplate

private static String stringPhaseTemplate(PhaseTemplate aTemplate)

stringPhaseSuccessionBegin

private static String stringPhaseSuccessionBegin(LifeCycleTemplate lct,
                                                 PhaseTemplate predecessorPhase,
                                                 PhaseTemplate successorPhase,
                                                 PhaseSuccession aSuccession)

stringCriterion

private static String stringCriterion(Criterion aCriterion)

stringWTAclEntry

private static String stringWTAclEntry(Role role,
                                       Enumeration permissions)

stringRoleHolder

private static String stringRoleHolder(Role role,
                                       WTPrincipalReference principal)

stringActorRoleHolder

private static String stringActorRoleHolder(Role role,
                                            ActorRole actor)

stringIndirectRoleHolder

private static String stringIndirectRoleHolder(Role role,
                                               Role roleAssignee)

getInitialPhase

private static PhaseTemplate getInitialPhase(LifeCycleManaged object)
                                      throws LifeCycleException
Throws:
LifeCycleException

getInitialPhase

private static PhaseTemplate getInitialPhase(LifeCycleTemplate aLCT)
                                      throws LifeCycleException
Throws:
LifeCycleException

getSuccessorPhase

private static PhaseTemplate getSuccessorPhase(PhaseTemplate current)
                                        throws WTException
Throws:
WTException

verifyDirectoryExists

private static File verifyDirectoryExists(String directoryToVerify,
                                          boolean autoCreate)
                                   throws LifeCycleException
Throws:
LifeCycleException

getAllSuccessors

protected static void getAllSuccessors(LifeCycleTemplate lct,
                                       PhaseTemplate phaseTemplate,
                                       StringBuffer buf,
                                       StringBuffer successionBuf)
                                throws WTException
Throws:
WTException