public class Model
extends Object
Constructor and Description |
---|
Model() |
Modifier and Type | Method and Description |
---|---|
void |
addBeanDefinition(oracle.adfmf.framework.contract.adf.ManagedBeanDefinition def)
Add a bean definition to the current context.
|
static void |
addMonitorObservation(String monitorId, double duration) |
static void |
addMonitorObservation(String monitorId, String description, double duration) |
static void |
addMonitorObservations(JSONArray array) |
static RestServiceAdapter |
createRestServiceAdapter()
Get an empty REST service adapter object.
|
static void |
deviceIsReady()
Signals device is ready
|
Object |
evaluateMethodExpression(String expression, JSONArray params, String returnType, String[] paramTypes)
Evaluate the method expression passed in.
|
String |
fetchAmxPage(String page)
Return an amx file as a String from the given path.
|
String |
getContextId()
Get the current contextId / page def key.
|
String |
getContextInstanceId()
Deprecated.
deprecated in 2.2.0.0.0, no longer needed.
|
String |
getContextPageDef()
Get the current context page definition
|
String[] |
getModelInventory()
Get the list of model's methods.
|
oracle.adfmf.framework.contract.adf.NameValuePair[] |
getValue(String[] variables)
Get a set of values from their passed in EL expressions.
|
static void |
loadBundle(AdfELContext context, String baseName, String variable)
Deprecated.
deprecated in release 2.2.0.0.0, use
loadBundle(MafElContext, String, String) instead. |
static void |
loadBundle(oracle.adfmf.framework.model.MafElContext context, String baseName, String variable)
Load the given resource bundle
|
void |
loadBundle(String baseName, String variable)
Load the given resource bundle
|
static Class |
loadClassObj(String name)
Internal helper function to load classes in the current class loader.
|
String |
ping()
A simple ping test used to ensure the VM is up and functioning correctly.
|
void |
popPageFlowScope()
Pops a page flow and moves frame pointer down in the stack
|
Object[] |
processBatchRequests(Boolean abortOnError, JSONObject[] requests)
process the set of request as a batch.
|
void |
pushPageFlowScope()
Pushes a new page flow and creates a new frame pointer.
|
void |
removeBeanDefinition(oracle.adfmf.framework.contract.adf.ManagedBeanDefinition def)
Remove a bean definition from the current context.
|
void |
removeContext(String contextKey, String instanceId)
Remove the context from the collection of contexts
|
void |
removeContextInstance(String contextKey, String instanceId)
Remove the context from the collection of contexts
|
void |
resetFeature()
Reset the current feature.
|
void |
setBeanDefinitions(oracle.adfmf.framework.contract.adf.ManagedBeanDefinition[] defs)
Set the bean definitions into the current context - Clears all currently registered definitions.
|
oracle.adfmf.bindings.dbf.AmxBindingContainer |
setBindingContainer(String pagePath, boolean resetViewScope)
Set the current binding container and optionally re-set the viewScope.
|
String[] |
setContext(String contextKey)
Deprecated.
deprecated in 2.2.1.0.0, use
setCurrentContext(java.lang.String,boolean,boolean,boolean) instead. |
String[] |
setContextInstance(String contextKey, String instanceId, boolean resetState, boolean reSync)
Deprecated.
deprecated in 2.2.1.0.0, use
setCurrentContext(java.lang.String,boolean,boolean,boolean) instead. |
void |
setCurrentContext(String contextKey, boolean refreshBindings, boolean reSyncBindings, boolean newViewScope)
Set the current context.
|
oracle.adfmf.framework.contract.adf.NameValuePair[] |
setValue(oracle.adfmf.framework.contract.adf.NameValuePair[] data)
Set a set of EL values
|
static void |
waitForDeviceReady()
Wait for device is ready
|
public static Class loadClassObj(String name) throws ClassNotFoundException
name
- class nameClassNotFoundException
public String ping()
public void pushPageFlowScope()
public void popPageFlowScope()
public String[] getModelInventory()
public Object[] processBatchRequests(Boolean abortOnError, JSONObject[] requests)
abortOnError
-requests
-public void resetFeature() throws AdfException
AdfException
public oracle.adfmf.framework.contract.adf.NameValuePair[] getValue(String[] variables) throws AdfException
variables
- an array of EL expressionsAdfException
public oracle.adfmf.framework.contract.adf.NameValuePair[] setValue(oracle.adfmf.framework.contract.adf.NameValuePair[] data) throws AdfException
data
- an array of NameValuePairs (EL expression, value)AdfException
public Object evaluateMethodExpression(String expression, JSONArray params, String returnType, String[] paramTypes) throws AdfException
expression
- method expressionparams
- to the methodreturnType
- of the methodparamTypes
- of the methodAdfException
public String getContextId() throws AdfException
AdfException
public String getContextPageDef() throws AdfException
AdfException
@Deprecated public String getContextInstanceId() throws AdfException
AdfException
public void removeContext(String contextKey, String instanceId) throws AdfException
AdfException
public void removeContextInstance(String contextKey, String instanceId) throws AdfException
AdfException
public String fetchAmxPage(String page)
page
- - the path to the page to loadpublic String[] setContext(String contextKey) throws AdfException
setCurrentContext(java.lang.String,boolean,boolean,boolean)
instead.AdfException
public String[] setContextInstance(String contextKey, String instanceId, boolean resetState, boolean reSync) throws AdfException
setCurrentContext(java.lang.String,boolean,boolean,boolean)
instead.AdfException
public void setCurrentContext(String contextKey, boolean refreshBindings, boolean reSyncBindings, boolean newViewScope) throws AdfException
contextKey
- the key/ID of the new context. If the context has data bindings this will be the path found in the .cpx file.refreshBindings
- true
to refresh data bindings now, false
for deferred refresh.reSyncBindings
- true
to generate a DataChangeEvent with th new context's binding definitions.newViewScope
- should a new viewScope also be initialized, releasing the previous one?AdfException
public oracle.adfmf.bindings.dbf.AmxBindingContainer setBindingContainer(String pagePath, boolean resetViewScope) throws AdfException
pagePath
- the page path from the .cpx file. A null value will release the current binding container and set the current binding container to null.resetViewScope
- should the viewScope also be cleared?AdfException
public void addBeanDefinition(oracle.adfmf.framework.contract.adf.ManagedBeanDefinition def)
public void removeBeanDefinition(oracle.adfmf.framework.contract.adf.ManagedBeanDefinition def)
public void setBeanDefinitions(oracle.adfmf.framework.contract.adf.ManagedBeanDefinition[] defs) throws AdfException
AdfException
public void loadBundle(String baseName, String variable) throws AdfException
baseName
- of the resource bundlevariable
- of the resource bundleAdfException
@Deprecated public static void loadBundle(AdfELContext context, String baseName, String variable) throws AdfException
loadBundle(MafElContext, String, String)
instead.context
- EL contextbaseName
- of the resource bundlevariable
- of the resource bundleAdfException
public static void loadBundle(oracle.adfmf.framework.model.MafElContext context, String baseName, String variable) throws AdfException
context
- EL contextbaseName
- of the resource bundlevariable
- of the resource bundleAdfException
public static RestServiceAdapter createRestServiceAdapter()
public static void deviceIsReady()
public static void waitForDeviceReady()
Exception
- if timeout or interruptedpublic static void addMonitorObservations(JSONArray array)
public static void addMonitorObservation(String monitorId, double duration)
public static void addMonitorObservation(String monitorId, String description, double duration)