com.ptc.wgmecad
Class Main

java.lang.Object
  extended bycom.ptc.wgmecad.Main
All Implemented Interfaces:
IRegisterProgress

public class Main
extends Object
implements IRegisterProgress


Nested Class Summary
static class Main.ReturnNow
           
 
Field Summary
private static Frame app
           
private static ArgumentMap argMap
          this map of arguments contains the complete parsed set of command line options
private static ArgumentRegister argReg
           
static String BOARD_TOOL_KEY
           
static String BOARD_TOOL_VALUE
           
static String BOARD_VENDOR_KEY
           
static String BOARD_VENDOR_VALUE
           
private static int borderSize
           
static String brdDirArg
           
static int CANCEL_CHECKOUT
           
private static cds_CA_Manager cdsm
           
static int CHECKIN
           
static int CHECKOUT
           
static int CHECKPOINT
           
private static int CHOOSER_X_LOCATION
           
private static int CHOOSER_Y_LOCATION
           
private  ClientInterface clientinterface
           
static int CREATENEW
           
static DesignAll design
           
static String DirArg
           
private  FileManager fileManager
           
private static FileManager fm
           
static String frameTitle
           
private static String frameTitlePrefix
           
private static String frameTitleSpacing
           
static String functionName
           
static int GET_COPY
           
private static WindchillIntegrationManager im
           
private static JLabel label
           
(package private) static org.apache.log4j.Logger logger
           
private static CCAWGMMain mainFrame
           
private static mgc_BB_Manager mgcm
           
static int NEW_REVISION
           
static int NONE
          release level
(package private)  Set OKCancelListeners
           
(package private)  Set OKConfirmers
           
static ProcessManager pm
           
(package private) static int preCheckinTotalBlks
           
(package private) static int preCreateNewTotalBlks
           
static int QUERY_WORKSPACE
           
private static Thread runThread
           
private static SecondaryArgumentMap sargMap
           
private static SecondaryArgumentRegister sargReg
           
static String schDirArg
           
static String SCHEMATIC_TOOL_KEY
           
static String SCHEMATIC_TOOL_VALUE
           
static String SCHEMATIC_VENDOR_KEY
           
static String SCHEMATIC_VENDOR_VALUE
           
static String VendorArg
           
private static VariantManager vm
           
private  int xSize
           
private  int ySize
           
 
Constructor Summary
(package private) Main()
           
 
Method Summary
static void checkForPrimaryVariantAsmNumMatch(String asmNumber)
          used in preValidateCheckin()
private static void checkMissingLocations(DesignAll design, int action)
           
 void createAndShowDialog()
           
private  void defaultAttribDefFileName()
           
static void executePreloadHook(DesignAll _design, String function)
           
private  boolean getDebugModeFromEcadProperties()
           
 Thread getRDThread()
           
static Component getTopLevelComponent()
           
 int getTotalInitTime()
           
 int getTotalOperation()
           
 int getTotalPre()
          returns true if it succeeds in finding a component registered as this argument and manages to set it in the Frame.
static void initializeArchiveDirectory()
           
static void initializeWCConnection()
           
static void main(String[] args)
           
private  void mainWork(String[] args)
           
static boolean preValidateCheckin(DesignAll dsn, boolean newRev)
          checks if an iperation is likely to succeed
static boolean preValidateCheckout(DesignAll dsn, boolean checkout)
          checks if an iperation is likely to succeed
static boolean preValidateCreateNew(DesignAll dsn)
          checks if an iperation is likely to succeed
static boolean proceed(boolean goFlag)
          This is called after we have completed the initial dialog to present additional dialogs and process the users request.
private static void proceedCancelCheckout(DesignAll design, String functionName)
           
private static void proceedCheckIn(DesignAll _design, String _functionName)
           
private static void proceedCheckOut(DesignAll design, String functionName, boolean getCopy)
           
private static void proceedCheckpoint(DesignAll design, String functionName)
           
private static void proceedCreateNew(DesignAll _design, String _functionName)
           
private static void proceedGetCopy(DesignAll design, String functionName)
           
private static void proceedNewRevision(DesignAll design, String functionName)
           
private static int processArg(String arg1, String arg2)
          Returns 0 if only arg1 is consumed or 1 if arg 2 is also used.
static void processArgs(String[] args)
          Just a loop processing the array of arguments.
private  void setWindowSize()
           
private static boolean submitCancelCheckout(DesignAll design, String functionName)
           
private static boolean submitCheckIn(DesignAll design, String functionName, boolean checkPoint)
           
private static boolean submitCheckOut(DesignAll design, String functionName, boolean getCopy)
           
private static boolean submitCheckpoint(DesignAll design, String functionName)
           
private static boolean submitCreateNew(DesignAll design, String functionName)
           
private static boolean submitGetCopy(DesignAll design, String functionName)
           
private static boolean submitNewRevision(DesignAll design, String functionName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

argMap

private static ArgumentMap argMap
this map of arguments contains the complete parsed set of command line options


argReg

private static ArgumentRegister argReg

sargMap

private static SecondaryArgumentMap sargMap

sargReg

private static SecondaryArgumentRegister sargReg

pm

public static ProcessManager pm

fm

private static FileManager fm

im

private static WindchillIntegrationManager im

cdsm

private static cds_CA_Manager cdsm

vm

private static VariantManager vm

mgcm

private static mgc_BB_Manager mgcm

functionName

public static String functionName

design

public static DesignAll design

VendorArg

public static String VendorArg

BOARD_VENDOR_KEY

public static final String BOARD_VENDOR_KEY
See Also:
Constant Field Values

BOARD_TOOL_KEY

public static final String BOARD_TOOL_KEY
See Also:
Constant Field Values

SCHEMATIC_VENDOR_KEY

public static final String SCHEMATIC_VENDOR_KEY
See Also:
Constant Field Values

SCHEMATIC_TOOL_KEY

public static final String SCHEMATIC_TOOL_KEY
See Also:
Constant Field Values

BOARD_VENDOR_VALUE

public static String BOARD_VENDOR_VALUE

BOARD_TOOL_VALUE

public static String BOARD_TOOL_VALUE

SCHEMATIC_VENDOR_VALUE

public static String SCHEMATIC_VENDOR_VALUE

SCHEMATIC_TOOL_VALUE

public static String SCHEMATIC_TOOL_VALUE

app

private static Frame app

frameTitlePrefix

private static final String frameTitlePrefix

frameTitleSpacing

private static final String frameTitleSpacing
See Also:
Constant Field Values

frameTitle

public static String frameTitle

xSize

private int xSize

ySize

private int ySize

borderSize

private static final int borderSize
See Also:
Constant Field Values

label

private static final JLabel label

mainFrame

private static CCAWGMMain mainFrame

OKCancelListeners

Set OKCancelListeners

OKConfirmers

Set OKConfirmers

fileManager

private FileManager fileManager

clientinterface

private ClientInterface clientinterface

CHOOSER_Y_LOCATION

private static final int CHOOSER_Y_LOCATION
See Also:
Constant Field Values

CHOOSER_X_LOCATION

private static final int CHOOSER_X_LOCATION
See Also:
Constant Field Values

NONE

public static final int NONE
release level

See Also:
Constant Field Values

CREATENEW

public static final int CREATENEW
See Also:
Constant Field Values

CHECKIN

public static final int CHECKIN
See Also:
Constant Field Values

CHECKPOINT

public static final int CHECKPOINT
See Also:
Constant Field Values

CHECKOUT

public static final int CHECKOUT
See Also:
Constant Field Values

CANCEL_CHECKOUT

public static final int CANCEL_CHECKOUT
See Also:
Constant Field Values

NEW_REVISION

public static final int NEW_REVISION
See Also:
Constant Field Values

GET_COPY

public static final int GET_COPY
See Also:
Constant Field Values

QUERY_WORKSPACE

public static final int QUERY_WORKSPACE
See Also:
Constant Field Values

schDirArg

public static String schDirArg

brdDirArg

public static String brdDirArg

DirArg

public static String DirArg

logger

static org.apache.log4j.Logger logger

runThread

private static Thread runThread

preCreateNewTotalBlks

static final int preCreateNewTotalBlks
See Also:
Constant Field Values

preCheckinTotalBlks

static final int preCheckinTotalBlks
See Also:
Constant Field Values
Constructor Detail

Main

Main()
Method Detail

getTopLevelComponent

public static Component getTopLevelComponent()

main

public static void main(String[] args)

initializeWCConnection

public static void initializeWCConnection()

initializeArchiveDirectory

public static void initializeArchiveDirectory()
                                       throws WGMException
Throws:
WGMException

executePreloadHook

public static void executePreloadHook(DesignAll _design,
                                      String function)
                               throws ApplicationInvocationException
Throws:
ApplicationInvocationException

mainWork

private void mainWork(String[] args)
Parameters:
args -

defaultAttribDefFileName

private void defaultAttribDefFileName()

setWindowSize

private void setWindowSize()

createAndShowDialog

public void createAndShowDialog()

proceed

public static boolean proceed(boolean goFlag)
This is called after we have completed the initial dialog to present additional dialogs and process the users request. It uses CurentCmdArg and ActionOptionArg to pick was server action to execute.

Returns:
boolean

getDebugModeFromEcadProperties

private boolean getDebugModeFromEcadProperties()

getRDThread

public Thread getRDThread()

proceedCreateNew

private static void proceedCreateNew(DesignAll _design,
                                     String _functionName)
                              throws Main.ReturnNow,
                                     ApplicationInvocationException
Throws:
Main.ReturnNow
ApplicationInvocationException

submitCreateNew

private static boolean submitCreateNew(DesignAll design,
                                       String functionName)
                                throws Main.ReturnNow,
                                       ApplicationInvocationException
Throws:
Main.ReturnNow
ApplicationInvocationException

proceedCheckIn

private static void proceedCheckIn(DesignAll _design,
                                   String _functionName)
                            throws Main.ReturnNow,
                                   ApplicationInvocationException
Throws:
Main.ReturnNow
ApplicationInvocationException

submitCheckIn

private static boolean submitCheckIn(DesignAll design,
                                     String functionName,
                                     boolean checkPoint)
                              throws Main.ReturnNow,
                                     ApplicationInvocationException
Throws:
Main.ReturnNow
ApplicationInvocationException

proceedCheckpoint

private static void proceedCheckpoint(DesignAll design,
                                      String functionName)
                               throws Main.ReturnNow,
                                      ApplicationInvocationException
Throws:
Main.ReturnNow
ApplicationInvocationException

submitCheckpoint

private static boolean submitCheckpoint(DesignAll design,
                                        String functionName)
                                 throws Main.ReturnNow,
                                        ApplicationInvocationException
Throws:
Main.ReturnNow
ApplicationInvocationException

proceedGetCopy

private static void proceedGetCopy(DesignAll design,
                                   String functionName)
                            throws Main.ReturnNow,
                                   ApplicationInvocationException,
                                   CancelledException
Throws:
Main.ReturnNow
ApplicationInvocationException
CancelledException

submitGetCopy

private static boolean submitGetCopy(DesignAll design,
                                     String functionName)
                              throws Main.ReturnNow,
                                     ApplicationInvocationException
Throws:
Main.ReturnNow
ApplicationInvocationException

proceedNewRevision

private static void proceedNewRevision(DesignAll design,
                                       String functionName)
                                throws Main.ReturnNow,
                                       ApplicationInvocationException
Throws:
Main.ReturnNow
ApplicationInvocationException

submitNewRevision

private static boolean submitNewRevision(DesignAll design,
                                         String functionName)
                                  throws Main.ReturnNow,
                                         ApplicationInvocationException
Throws:
Main.ReturnNow
ApplicationInvocationException

proceedCancelCheckout

private static void proceedCancelCheckout(DesignAll design,
                                          String functionName)
                                   throws Main.ReturnNow,
                                          ApplicationInvocationException
Throws:
Main.ReturnNow
ApplicationInvocationException

submitCancelCheckout

private static boolean submitCancelCheckout(DesignAll design,
                                            String functionName)
                                     throws Main.ReturnNow,
                                            ApplicationInvocationException
Throws:
Main.ReturnNow
ApplicationInvocationException

proceedCheckOut

private static void proceedCheckOut(DesignAll design,
                                    String functionName,
                                    boolean getCopy)
                             throws Main.ReturnNow,
                                    ApplicationInvocationException,
                                    CancelledException
Throws:
Main.ReturnNow
ApplicationInvocationException
CancelledException

submitCheckOut

private static boolean submitCheckOut(DesignAll design,
                                      String functionName,
                                      boolean getCopy)
                               throws Main.ReturnNow,
                                      ApplicationInvocationException
Throws:
Main.ReturnNow
ApplicationInvocationException

preValidateCreateNew

public static boolean preValidateCreateNew(DesignAll dsn)
                                    throws WGMException,
                                           WTException
checks if an iperation is likely to succeed

Throws:
DesignNotCheckedOutException
DesignNotInWindchillException
UnableToCreateClientInterfaceException
WindchillServerNotSpecifiedException
WGMException
WTException

preValidateCheckin

public static boolean preValidateCheckin(DesignAll dsn,
                                         boolean newRev)
                                  throws WGMException,
                                         WTException
checks if an iperation is likely to succeed

Throws:
DesignNotCheckedOutException
DesignNotInWindchillException
UnableToCreateClientInterfaceException
WindchillServerNotSpecifiedException
WGMException
WTException

checkForPrimaryVariantAsmNumMatch

public static void checkForPrimaryVariantAsmNumMatch(String asmNumber)
                                              throws PrimaryVariantNotMatchingAsmNumException
used in preValidateCheckin()

Parameters:
asmNumber -
Throws:
PrimaryVariantNotMatchingAsmNumException

preValidateCheckout

public static boolean preValidateCheckout(DesignAll dsn,
                                          boolean checkout)
                                   throws WGMException
checks if an iperation is likely to succeed

Parameters:
checkout - if a checkout is requested
Throws:
WGMException

processArgs

public static void processArgs(String[] args)
                        throws UnexpectedArgumentException
Just a loop processing the array of arguments. USes processArg to do all the I18N.getStr( "real" ) work.

Throws:
UnexpectedArgumentException

processArg

private static int processArg(String arg1,
                              String arg2)
                       throws UnexpectedArgumentException
Returns 0 if only arg1 is consumed or 1 if arg 2 is also used. Note that arg2 may be void.

Throws:
UnexpectedArgumentException

getTotalPre

public int getTotalPre()
returns true if it succeeds in finding a component registered as this argument and manages to set it in the Frame.

Specified by:
getTotalPre in interface IRegisterProgress

getTotalOperation

public int getTotalOperation()
Specified by:
getTotalOperation in interface IRegisterProgress

getTotalInitTime

public int getTotalInitTime()
Specified by:
getTotalInitTime in interface IRegisterProgress

checkMissingLocations

private static void checkMissingLocations(DesignAll design,
                                          int action)
                                   throws MissingLocationException
Throws:
MissingLocationException