com.ptc.wgmecad
Class ArgumentRegister

java.lang.Object
  extended bycom.ptc.wgmecad.ArgumentRegister

public class ArgumentRegister
extends Object


Field Summary
static String CLASSIC_Argument
           
static String configPrefix
           
private static String configurationDelim
           
static int COUNT_CONFIGURATIONCOLUMNS
           
static int COUNT_CONFIGURATIONSTATUSCOLUMNS
           
static String CurrentCommandArgument
           
private static String[] epmDocTypes
           
static String[] fileLocationTypes
           
private static String[] functions
           
static String GlobalCommentArgument
           
static String hookPrefix
           
private static String[] hookTiming
           
static int INDEX_EPMDESCRIBES
           
static int INDEX_FILEGROUPNAME
           
static int INDEX_FILEPARENTDIR
           
static int INDEX_FILEPATTERN
           
static int INDEX_FILESIZE
           
static int INDEX_FILESTATUS
           
static int INDEX_VALUEDEFAULT
           
static int INDEX_VALUEEPMDOC
           
static int INDEX_VALUELOCKED
           
private static ArgumentRegister instance
           
static String Last_CCO_OptionArgument
           
static String Last_CI_OptionArgument
           
static String Last_CO_OptionArgument
           
static String Last_GC_OptionArgument
           
static String Last_New_OptionArgument
           
static String Last_NewRev_OptionArgument
           
(package private) static org.apache.log4j.Logger logger
           
static String MandatoryCommentArgument
           
static String MetalLandFArgument
           
static String MotifLandFArgument
           
static String PDMLINK_Argument
           
static String PRJLINK_Argument
           
static String serverNameArgument
           
static String setupArgument
           
static String skipStatusArgument
           
static String WGM_HOME
           
static String whatLFArgument
           
 
Constructor Summary
private ArgumentRegister()
           
 
Method Summary
static Argument getArgumentFromExpandedConfig(Object[] attr, int idx)
           
static String getArgumentFromExpandedConfigStatus(Object[] attr, int idx)
           
private static String[] getEveryOtherElement(String[] arr, int offset)
          returns an array composed of every other element of the array arr passed in, offset by offset.
static String getExcludeArgForFile(String f)
           
static Object[] getExpandedArgument(Argument arg, String prefix)
          returns values thru the arguments function and when - these are assumed to be empty when passed to the function.
private  Object[][] getExpandedArguments(String prefix)
           
 Object[][] getExpandedConfigurationArguments()
           
 Object[][] getExpandedFileLocationsArguments()
           
 Object[][] getExpandedHookArguments()
          returns a two dimensional array - in the form: { {func1, when1, exe1, parameter1}, {func2, when2, exe2, parameter2}, ...
static Object[] getExpandedHookDefault()
          Same format return value as getExpandedHookArguments()
 String getHookArgument(String function, String when)
           
 String getHookArgumentOrig(String function, String when)
           
static ArgumentRegister getInstance()
           
static String getLongForm(String abbrev, String[] list)
          Get the long form for an abbreviation of a string based on an array of strings of the form: , , , ...
static String getShortForm(String longForm, String[] list)
          Get the abbreviation for the long form of a string based on an array of strings of the form: , , , ...
static String[] getValidEPMDocs()
           
static String[] getValidHookFunctions()
           
static String[] getValidHookWhen()
           
static boolean isValidHookArgument(String arg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serverNameArgument

public static final String serverNameArgument

CLASSIC_Argument

public static final String CLASSIC_Argument
See Also:
Constant Field Values

PDMLINK_Argument

public static final String PDMLINK_Argument
See Also:
Constant Field Values

PRJLINK_Argument

public static final String PRJLINK_Argument
See Also:
Constant Field Values

MandatoryCommentArgument

public static final String MandatoryCommentArgument

GlobalCommentArgument

public static final String GlobalCommentArgument

setupArgument

public static final String setupArgument

MotifLandFArgument

public static final String MotifLandFArgument

MetalLandFArgument

public static final String MetalLandFArgument

whatLFArgument

public static final String whatLFArgument

skipStatusArgument

public static final String skipStatusArgument

CurrentCommandArgument

public static final String CurrentCommandArgument

Last_New_OptionArgument

public static final String Last_New_OptionArgument

Last_CI_OptionArgument

public static final String Last_CI_OptionArgument

Last_CO_OptionArgument

public static final String Last_CO_OptionArgument

Last_CCO_OptionArgument

public static final String Last_CCO_OptionArgument

Last_GC_OptionArgument

public static final String Last_GC_OptionArgument

Last_NewRev_OptionArgument

public static final String Last_NewRev_OptionArgument

hookPrefix

public static final String hookPrefix

configPrefix

public static final String configPrefix

COUNT_CONFIGURATIONCOLUMNS

public static final int COUNT_CONFIGURATIONCOLUMNS
See Also:
Constant Field Values

COUNT_CONFIGURATIONSTATUSCOLUMNS

public static final int COUNT_CONFIGURATIONSTATUSCOLUMNS
See Also:
Constant Field Values

INDEX_VALUELOCKED

public static final int INDEX_VALUELOCKED
See Also:
Constant Field Values

INDEX_VALUEDEFAULT

public static final int INDEX_VALUEDEFAULT
See Also:
Constant Field Values

INDEX_VALUEEPMDOC

public static final int INDEX_VALUEEPMDOC
See Also:
Constant Field Values

INDEX_FILEGROUPNAME

public static final int INDEX_FILEGROUPNAME
See Also:
Constant Field Values

INDEX_FILEPARENTDIR

public static final int INDEX_FILEPARENTDIR
See Also:
Constant Field Values

INDEX_FILEPATTERN

public static final int INDEX_FILEPATTERN
See Also:
Constant Field Values

INDEX_EPMDESCRIBES

public static final int INDEX_EPMDESCRIBES
See Also:
Constant Field Values

INDEX_FILESTATUS

public static final int INDEX_FILESTATUS
See Also:
Constant Field Values

INDEX_FILESIZE

public static final int INDEX_FILESIZE
See Also:
Constant Field Values

WGM_HOME

public static final String WGM_HOME

logger

static org.apache.log4j.Logger logger

instance

private static ArgumentRegister instance

fileLocationTypes

public static final String[] fileLocationTypes

configurationDelim

private static final String configurationDelim
See Also:
Constant Field Values

functions

private static final String[] functions

hookTiming

private static final String[] hookTiming

epmDocTypes

private static final String[] epmDocTypes
Constructor Detail

ArgumentRegister

private ArgumentRegister()
Method Detail

getInstance

public static ArgumentRegister getInstance()

getValidHookFunctions

public static String[] getValidHookFunctions()

getValidHookWhen

public static String[] getValidHookWhen()

getValidEPMDocs

public static String[] getValidEPMDocs()

isValidHookArgument

public static boolean isValidHookArgument(String arg)

getEveryOtherElement

private static String[] getEveryOtherElement(String[] arr,
                                             int offset)
returns an array composed of every other element of the array arr passed in, offset by offset. offset should be either 0 or 1, and arr should have an even number of elements.


getShortForm

public static String getShortForm(String longForm,
                                  String[] list)
                           throws InvalidArgumentException
Get the abbreviation for the long form of a string based on an array of strings of the form: , , , ... returns null if the long form is unknown.

Throws:
InvalidArgumentException

getLongForm

public static String getLongForm(String abbrev,
                                 String[] list)
                          throws InvalidArgumentException
Get the long form for an abbreviation of a string based on an array of strings of the form: , , , ... return null if the abbreviation is unknown.

Throws:
InvalidArgumentException

getHookArgumentOrig

public String getHookArgumentOrig(String function,
                                  String when)
                           throws InvalidArgumentException
Throws:
InvalidArgumentException

getHookArgument

public String getHookArgument(String function,
                              String when)
                       throws InvalidArgumentException
Throws:
InvalidArgumentException

getExpandedArgument

public static Object[] getExpandedArgument(Argument arg,
                                           String prefix)
                                    throws InvalidArgumentException
returns values thru the arguments function and when - these are assumed to be empty when passed to the function.

Throws:
InvalidArgumentException

getArgumentFromExpandedConfig

public static Argument getArgumentFromExpandedConfig(Object[] attr,
                                                     int idx)

getArgumentFromExpandedConfigStatus

public static String getArgumentFromExpandedConfigStatus(Object[] attr,
                                                         int idx)

getExpandedHookDefault

public static Object[] getExpandedHookDefault()
Same format return value as getExpandedHookArguments()


getExpandedConfigurationArguments

public Object[][] getExpandedConfigurationArguments()

getExpandedArguments

private Object[][] getExpandedArguments(String prefix)

getExpandedHookArguments

public Object[][] getExpandedHookArguments()
returns a two dimensional array - in the form: { {func1, when1, exe1, parameter1}, {func2, when2, exe2, parameter2}, ... {funcN, whenN, exeN, parameterN} }


getExpandedFileLocationsArguments

public Object[][] getExpandedFileLocationsArguments()

getExcludeArgForFile

public static String getExcludeArgForFile(String f)