LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.info
Class LyControl

java.lang.Object
  extended by leon.info.LyTag
      extended by leon.info.LyInfo
          extended by leon.info.LyControl
All Implemented Interfaces:
java.lang.Cloneable, LyCommentInterface

public class LyControl
extends LyInfo

This class defines a control : Specific program associated to a class and a field and triggered on objects change.


Nested Class Summary
static class LyControl.Level
          Level values.
static class LyControl.Type
          Types of control.
 
Nested classes/interfaces inherited from class leon.info.LyTag
LyTag.Model
 
Field Summary
static java.lang.String __version
           
 
Fields inherited from class leon.info.LyInfo
__VERSION
 
Method Summary
 boolean equals(java.lang.Object control)
          Check if this control is equal to the given one.
 java.util.Hashtable<java.lang.String,LyArgument> getArgs()
          Gets table of arguments associated to this instance.
 LyArgument[] getArguments()
          Gets an array of arguments usable for calling the interface of the control.
 java.lang.String getFormula()
          Gets the formula (as a string) associated to this control.
 LyControlInterface getInstance(LyClassInfo classInfo)
          Gets instance of the java class of this control.
 LyControlInterface getInstance(LyObject object)
          Gets instance of the java class of this control.
 java.lang.Class<?> getJavaClass()
          Gets java class.
 java.lang.String getJavaName()
          Gets java name of the control.
 LyControl.Level getLevel()
          Gets level of the control.
 LyFormula getLyFormula()
          Gets the formula associated to this control.
 java.lang.String getMessage()
          Gets message of the control.
 int getPriority()
          Gets priority of the control.
 java.lang.Object getValue(java.lang.Object name)
          Gets an argument by its name.
 boolean hasType(LyControl.Type type)
          Checks whether this control performs the given type of control.
 
Methods inherited from class leon.info.LyInfo
getAlias, getApplication, getFile, getId, getInclude, getName, isIncluded, isInternal, isInternal, isLoaded, isLocked, load, setApplication, setFile, toString
 
Methods inherited from class leon.info.LyTag
clone, getCommentsEnd, getCommentsStart, getEnvironment, getModelType, getParent, getRootProject, hasAncestor, isExtern, setCommentsEnd, setCommentsStart, wasCloned
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface leon.parser.LyCommentInterface
getCommentsEnd, getCommentsStart, setCommentsEnd, setCommentsStart
 

Field Detail

__version

public static final java.lang.String __version
See Also:
Constant Field Values
Method Detail

getJavaName

public final java.lang.String getJavaName()
Gets java name of the control.


getJavaClass

public java.lang.Class<?> getJavaClass()
Gets java class.

Returns:
Java class for this control.

getInstance

public LyControlInterface getInstance(LyObject object)
Gets instance of the java class of this control.

Parameters:
classInfo - Class info for which the instance is requested.
Returns:
An instance that implements the java class

getInstance

public LyControlInterface getInstance(LyClassInfo classInfo)
Gets instance of the java class of this control.

Parameters:
classInfo - Class info for which the instance is requested.
Returns:
An instance that implements the java class

getLevel

public final LyControl.Level getLevel()
Gets level of the control.


getPriority

public final int getPriority()
Gets priority of the control.


getValue

public final java.lang.Object getValue(java.lang.Object name)
Gets an argument by its name.

Parameters:
name - Name for which a value is searched.
Returns:
Found value if any, or null if no argument was stored with the given name.
Throws:
java.lang.IllegalArgumentException - If the given name is null.

getArgs

public final java.util.Hashtable<java.lang.String,LyArgument> getArgs()
Gets table of arguments associated to this instance.

Returns:
Returns the table of all the arguments associated to this control. This is a copy of the internal hashtable that contains these arguments.

getArguments

public LyArgument[] getArguments()
Gets an array of arguments usable for calling the interface of the control.

Returns:
An array of all the arguments of this control, may be null.

hasType

public boolean hasType(LyControl.Type type)
Checks whether this control performs the given type of control.

Parameters:
type - Checked type.
Returns:
True if this control has the given type, false otherwise.

equals

public boolean equals(java.lang.Object control)
Check if this control is equal to the given one.

Overrides:
equals in class java.lang.Object

getFormula

public java.lang.String getFormula()
Gets the formula (as a string) associated to this control. The formula is provided to calculate values of this field thanks to a simple mathematics expression using other numeric fields in the same application class.

Returns:
Current formula or null if no formula is set.

getLyFormula

public final LyFormula getLyFormula()
Gets the formula associated to this control.

Returns:
Current formula or null if no formula is set.

getMessage

public final java.lang.String getMessage()
Gets message of the control.


(c) January 2013 - W4 S.A.

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