LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.info.misc
Class LyWSFormula

java.lang.Object
  extended by leon.info.misc.LyFormula
      extended by leon.info.misc.LyWSFormula
All Implemented Interfaces:
LyClassControl, LyControlInterface, LyFieldInfoControl, LyFilterElement

public class LyWSFormula
extends LyFormula

Class used to compute a formula on a LyFieldInfo using an external Web service.


Field Summary
static java.lang.String _EXPECTED_SYNTAX
           
static java.lang.String _NO_INSTANCE_COMPLEX
           
static java.lang.String _STATIC_VALUE
           
static java.lang.String _WS_OPERATION_RETURN
           
static java.lang.String _WS_PREFIX
           
static java.lang.Object CACHE_LOCK
           
 
Fields inherited from interface leon.info.LyFilterElement
__VERSION
 
Fields inherited from interface leon.data.datainterface.LyClassControl
__VERSION
 
Fields inherited from interface leon.data.datainterface.LyFieldInfoControl
__VERSION
 
Fields inherited from interface leon.data.datainterface.LyControlInterface
STATUS_ERROR, STATUS_OK, STATUS_WARNING
 
Constructor Summary
LyWSFormula(LyInfo info, java.lang.String expression)
          Constructs a formula for a given info.
 
Method Summary
 java.lang.Class<?> getClassByName(java.lang.String className)
          get class define by className
 java.lang.Object getFromCache(java.lang.String keyCache)
          get value in cache object
 java.lang.Object getInvokeMethodReturn(java.lang.reflect.Method m, java.lang.Object operation, java.lang.Object value)
          invoke method by operation object method has'nt an object return
 java.util.Map<java.lang.Object,java.lang.reflect.Method> getMethodByName(java.lang.Class<?> cls, java.lang.String name, java.lang.Object value)
          This method can do to get a method by operation name in class
 java.lang.Object getObjectClass(java.lang.String className)
          This method can do get the object by your className
 java.lang.Object getServiceStubObject(java.lang.String serviceName)
          This method permit to get an object service stub by service Name
 java.lang.Object getValue(LyObject instance)
          Evaluate the formula Return depends on the fieldInto type All values are contained in the LyObject
 java.lang.Object getValue(LyValueSet values)
          Evaluate the formula Return depends on the fieldInto type The value set must contains all the values necessary to compute the formula
 void putCache(java.lang.String keyCache, java.lang.Object returnedValue)
          add value in cache
 void removeFromCache(java.lang.String keyCache)
          remove value in cache
 
Methods inherited from class leon.info.misc.LyFormula
checkExpression, checkNewValue, cloneFormula, contains, formulaFactory, getDependencies, getExpression, getFormulaFields, getFormulaNames, getImports, getName, match, match, setInverted, validate, writeXml
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CACHE_LOCK

public static final java.lang.Object CACHE_LOCK

_EXPECTED_SYNTAX

public static java.lang.String _EXPECTED_SYNTAX

_NO_INSTANCE_COMPLEX

public static java.lang.String _NO_INSTANCE_COMPLEX

_STATIC_VALUE

public static java.lang.String _STATIC_VALUE

_WS_PREFIX

public static java.lang.String _WS_PREFIX

_WS_OPERATION_RETURN

public static java.lang.String _WS_OPERATION_RETURN
Constructor Detail

LyWSFormula

public LyWSFormula(LyInfo info,
                   java.lang.String expression)
Constructs a formula for a given info.

Method Detail

getValue

public java.lang.Object getValue(LyObject instance)
Evaluate the formula Return depends on the fieldInto type All values are contained in the LyObject

Specified by:
getValue in class LyFormula
Returns:
an Object

getValue

public java.lang.Object getValue(LyValueSet values)
Evaluate the formula Return depends on the fieldInto type The value set must contains all the values necessary to compute the formula

Specified by:
getValue in class LyFormula

getServiceStubObject

public java.lang.Object getServiceStubObject(java.lang.String serviceName)
This method permit to get an object service stub by service Name

Parameters:
stubClass -
Returns:
an Object

getClassByName

public java.lang.Class<?> getClassByName(java.lang.String className)
get class define by className

Parameters:
className -
Returns:

getObjectClass

public java.lang.Object getObjectClass(java.lang.String className)
This method can do get the object by your className

Parameters:
cls -
Returns:
an Object

getMethodByName

public java.util.Map<java.lang.Object,java.lang.reflect.Method> getMethodByName(java.lang.Class<?> cls,
                                                                                java.lang.String name,
                                                                                java.lang.Object value)
This method can do to get a method by operation name in class

Parameters:
cls -
name -
valueClass -
Returns:

getInvokeMethodReturn

public java.lang.Object getInvokeMethodReturn(java.lang.reflect.Method m,
                                              java.lang.Object operation,
                                              java.lang.Object value)
invoke method by operation object method has'nt an object return

Parameters:
m -
operation -
value -
Returns:

getFromCache

public java.lang.Object getFromCache(java.lang.String keyCache)
get value in cache object

Parameters:
keyCache -
Returns:

putCache

public void putCache(java.lang.String keyCache,
                     java.lang.Object returnedValue)
add value in cache

Parameters:
keyCache -
returnedValue -

removeFromCache

public void removeFromCache(java.lang.String keyCache)
remove value in cache

Parameters:
keyCache -

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com