|
Web Dynpro API Documentation | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.sap.tc.webdynpro.progmodel.model.api.WDModelFactory
Factory for Web Dynpro Models.
Model instances are referenced by their implementing class and can be assigned
a specific scope (see WDModelScopeType) and instance id.
| Constructor Summary | |
WDModelFactory()
|
|
| Method Summary | |
static java.lang.String |
getGuiHostIfBackendDebuggingForApplicationIsEnabled(java.lang.String applicationName)
returns the name of the computer hosting the Debugger Client Process if debugging for the given application is enabled. |
static IWDModel |
getModelInstance(java.lang.Class modelClazz)
factory method, which returns an instance within the default scope representing a specific model type (param modelClazz) If no instance of type modelClazz exists, a new instance is created and added within the default scope. |
static IWDModel |
getModelInstance(java.lang.Class modelClazz,
java.lang.String modelInstanceId)
factory method, which returns an instance within the default scope representing a specific model type (param modelClazz) having the specific name or id (param modelInstanceId) If no instance with the given parameters exists, a new instance is created and added within the default scope keyed by the modelInstanceId Only one instance of a model can exist within a single scope using the same modelInstanceId e.g. |
static IWDModel |
getModelInstance(java.lang.Class modelClazz,
WDModelScopeType scope)
factory method, which returns an instance within the scope of the current thread's application instance representing a specific model type (param modelClazz) If no instance of the Class modelClazz within the given scope exists, a new instance is created and added within the given scope. |
static IWDModel |
getModelInstance(java.lang.Class modelClazz,
WDModelScopeType scope,
java.lang.String modelInstanceId)
factory method, which returns an instance representing: 1) a specific model type (param modelClazz) 2) within the scope as defined by the ModelScope parameter (param scope) 3) having the specific name or id (param modelInstanceId) If no instance with the given parameters exists, a new instance is created and added within the given scope keyed by the modelInstanceId Only one instance of a model can exist within a single scope using the same modelInstanceId e.g. |
static boolean |
getTestMode()
This method sets the environment in the test mode state. |
static WDModelScopeType |
lookupDefaultScopeForModel(java.lang.Class modelClazz)
looksup the default scope of a model |
static void |
reassignModel(IWDModel model,
WDModelScopeType newScope,
java.lang.String newInstanceId)
reassigns an existing model to a new scope and/or instanceId: returns an instance with the new scope and instanceID if a model instance with the new scope and instanceID already exists, a WDModelException is thrown Only one instance of a model can exist within a single scope using the same modelInstanceId |
static void |
registerDefaultScopeForModel(java.lang.Class modelClazz,
WDModelScopeType scope)
registers the default scope of a model in the ModelFactory |
static IWDModel |
registerModelInstanceInScope(IWDModel modelInstance,
WDModelScopeType scope)
registers a model instance in the appropriate scope. |
static java.lang.String |
setBackendDebugModeForApplication(java.lang.String applicationName,
java.lang.String guiHost,
boolean turnDebugOn)
allows enabling or disabling backend debugging for a specific application on a specific host if applicationName is null, then debugging is enabled for all applications in the vm |
static void |
setTestMode(boolean testing)
This method sets the environment in the test mode state. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public WDModelFactory()
| Method Detail |
public static IWDModel getModelInstance(java.lang.Class modelClazz)
modelClazz - the specific model type class
public static IWDModel getModelInstance(java.lang.Class modelClazz,
java.lang.String modelInstanceId)
modelClazz - the specific model type classmodelInstanceId - if more than one instance of a model is used in a single scope, this represents the name or id of the model instance.
public static IWDModel getModelInstance(java.lang.Class modelClazz,
WDModelScopeType scope)
modelClazz - the specific model type classscope - the ModelScope, which defines the maximum lifespan of the model
public static IWDModel getModelInstance(java.lang.Class modelClazz,
WDModelScopeType scope,
java.lang.String modelInstanceId)
modelClazz - the specific model type classscope - the ModelScope, which defines the maximum lifespan of the modelmodelInstanceId - if more than one instance of a model is used in a single scope, this represents the name or id of the model instance.
public static void reassignModel(IWDModel model,
WDModelScopeType newScope,
java.lang.String newInstanceId)
throws WDModelException
model - the model instancenewScope - WDModelScopeType, which defines the maximum lifespan of the model, null will not change the scope!newInstanceId - if more than one instance of a model is used in a single scope, this represents the name or id of the model instance!WDModelException - if the newScope is null or if a model instance already exists with the new scope and modelInstanceIdpublic static void setTestMode(boolean testing)
public static boolean getTestMode()
public static IWDModel registerModelInstanceInScope(IWDModel modelInstance,
WDModelScopeType scope)
modelInstance - the IWDModel instance to be registeredscope - WDModelScopeType (e.g. TASK_SCOPE, APPLIATION_SCOPE)
public static java.lang.String setBackendDebugModeForApplication(java.lang.String applicationName,
java.lang.String guiHost,
boolean turnDebugOn)
applicationName - the Name of the Application for which to enable/disable DebuggingguiHost - the name of the Computer hosting the Client application for DebuggingturnDebugOn - true if debugging should be enabled, false if debugging should be disabledpublic static java.lang.String getGuiHostIfBackendDebuggingForApplicationIsEnabled(java.lang.String applicationName)
applicationName - the Name of the Application for which to check if Debugging is enabledpublic static WDModelScopeType lookupDefaultScopeForModel(java.lang.Class modelClazz)
modelClazz - the class of the model, for which to look up the default scope
public static void registerDefaultScopeForModel(java.lang.Class modelClazz,
WDModelScopeType scope)
modelClazz - the class of the model, for which to set the default scopescope - the default scope to use for instances of the given model (specified by class of model)
|
Web Dynpro API Documentation | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||