com.altair.hwm.toolkit.frame
Class HWMAppFrameModel

java.lang.Object
  extended by com.altair.hwm.toolkit.frame.HWMFrameModel
      extended by com.altair.hwm.toolkit.frame.HWMAppFrameModel
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener

public class HWMAppFrameModel
extends HWMFrameModel

Title: HWMAppFrameModel

Description: The model for the app frame

Company: Altair Engineering, Inc.


Field Summary
 
Fields inherited from class com.altair.hwm.toolkit.frame.HWMFrameModel
PROP_FRAME_MODELACTIVE
 
Constructor Summary
HWMAppFrameModel(java.awt.Component frameEPIC, IHWMFrame ihwmFrame)
          Constructor
 
Method Summary
 HWMTplProps GetActiveTplProps()
          Get the process definition properties for the currently active model instance
 int GetAppType()
          Rteurn the application type
 java.lang.String GetDefaultTemplateName()
          Return the default process definition to use
 java.lang.String GetDefaultTemplateNameWOExtension()
          Return the default process definition without extension
 HWMClassLoader GetFrameWorkClassLoader()
          Gets ClassLaoder from HWMframemodel.
 IHWMUserExit GetUserExit()
          Get the instance of the user exit
 void Init()
          Initialize the app frame model Add the mandatory jars to CP
 boolean IsDesignerMode()
          Returns a flag if its designer or app mode.
 boolean IsTemplateHDMEnabled()
          Checks if the template is HDM enabled
 void OnMigrateProject(java.lang.String strProject, java.lang.String strNewTemplate)
          Migrates the old project file to follow the new process definition.
 HWMModelInstance OnNewFile(java.lang.String strFileName)
          Creates the new file
 HWMModelInstance OnOpenFile(java.lang.String strFileName, boolean bForce)
          Open the file with given name
 void SetActiveInstance(HWMModelInstance hwmModelInstance)
          Sets the active instance.
 void SetDefaultTemplate(java.lang.String strDefTpl)
          Set the default process definition that should be used in app mode
 
Methods inherited from class com.altair.hwm.toolkit.frame.HWMFrameModel
addPropertyChangeListener, ClearAll, GetActiveModelInstance, GetEPICFrame, GetHWPMInteraction, GetIHWMFrame, GetInstance, GetInstanceIndex, GetModelInstances, GetNumModelInstances, GetTplProps, Initialize, IsPMMode, OnCloseFile, OnExit, OnSaveAsFile, OnSaveFile, propertyChange, Quit, removePropertyChangeListener, SetActiveInstance, SetActiveInstance, SetHWPMInteraction
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HWMAppFrameModel

public HWMAppFrameModel(java.awt.Component frameEPIC,
                        IHWMFrame ihwmFrame)
Constructor

Parameters:
frameEPIC - The main frame for EPIC
ihwmFrame - The handle to IHWMFrame interface
Throws:
java.lang.Exception
Method Detail

GetActiveTplProps

public HWMTplProps GetActiveTplProps()
Get the process definition properties for the currently active model instance

Overrides:
GetActiveTplProps in class HWMFrameModel
Returns:
HWMTplProps The process definition properties for the currently active model instance

GetDefaultTemplateName

public java.lang.String GetDefaultTemplateName()
Return the default process definition to use

Returns:
String The default process definition set

GetDefaultTemplateNameWOExtension

public java.lang.String GetDefaultTemplateNameWOExtension()
Return the default process definition without extension

Returns:
String The default process definition set

Init

public void Init()
          throws java.lang.Exception
Initialize the app frame model Add the mandatory jars to CP

Throws:
java.lang.Exception

SetDefaultTemplate

public void SetDefaultTemplate(java.lang.String strDefTpl)
                        throws java.lang.Exception
Set the default process definition that should be used in app mode

Parameters:
strDefTpl - The default process definition name
Throws:
java.lang.Exception

GetAppType

public int GetAppType()
Rteurn the application type

Returns:
int One of the HWMModelInstance.APPTYPE_XXX constants

OnNewFile

public HWMModelInstance OnNewFile(java.lang.String strFileName)
                           throws java.lang.Exception
Creates the new file

Parameters:
strFileName - The name of the new file to create
Returns:
HWMModelInstance The newly created model instance
Throws:
java.lang.Exception

OnOpenFile

public HWMModelInstance OnOpenFile(java.lang.String strFileName,
                                   boolean bForce)
                            throws java.io.FileNotFoundException,
                                   java.lang.Exception
Open the file with given name

Parameters:
strFileName - The name of the file to open
bForce - If true, the prj is opened using the def pmt even if the pmt file name in prj does not match with the def pmt name
Returns:
HWMModelInstance The newly created model instance
Throws:
java.io.FileNotFoundException - - Thrown when the pmt file cannot be found Exception - when any other error occurs
java.lang.Exception

IsDesignerMode

public boolean IsDesignerMode()
Returns a flag if its designer or app mode. Implemented by derived classes

Specified by:
IsDesignerMode in class HWMFrameModel
Returns:
boolean true if designer else false

OnMigrateProject

public void OnMigrateProject(java.lang.String strProject,
                             java.lang.String strNewTemplate)
                      throws java.lang.Exception
Migrates the old project file to follow the new process definition. The project file has all the information regarding the properties of the individual beans. The instance will be asked to migrate and it will propogate the same down to other modules like the page mgr model etc. The workflow model and the process definition props will be retrieved from the new new process definition whereas the data model will be retrieved from the old project The way migration works is- It'll update the new prj with data that has changed from the old default prj to the old prj.

Parameters:
strProject - -- The name of the project to migrate
strNewTemplate - -- The new process definition to be followed
Throws:
java.lang.Exception - - when any other error occurs

GetUserExit

public IHWMUserExit GetUserExit()
Get the instance of the user exit

Returns:
IHWMUserExit Instance of the exit function

SetActiveInstance

public void SetActiveInstance(HWMModelInstance hwmModelInstance)
                       throws java.lang.Exception
Sets the active instance. Let PM interaction know about this model instance

Overrides:
SetActiveInstance in class HWMFrameModel
Parameters:
hwmModelInstance - The current model instance
Throws:
java.lang.Exception

IsTemplateHDMEnabled

public boolean IsTemplateHDMEnabled()
Checks if the template is HDM enabled

Returns:
boolean A flag indicating if HDM is enabled

GetFrameWorkClassLoader

public HWMClassLoader GetFrameWorkClassLoader()
Gets ClassLaoder from HWMframemodel. Function is only exposed at the object level, not at the interface level. Gets the classloades which has the classes loaded before the template is loaded. NOTE: After the template is loaded, the classloader is expanded and can be retrieved from the template properties. example: HWMClassLoader hwmClassLoader=GetTplProps().GetClassLoader();