LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.info.location
Class LyGenLocation

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

public class LyGenLocation
extends LyLocation

This class implements a generic data location.


Nested Class Summary
 
Nested classes/interfaces inherited from class leon.info.LyTag
LyTag.Model
 
Field Summary
static java.lang.String __VERSION
           
static java.lang.Object PARAM_NULL
          Parameter : NULL.
 
Fields inherited from class leon.info.location.LyLocation
DEFAULT_LOCATION, ID_L_EXTEND, ID_L_INFO, ID_L_UNION
 
Constructor Summary
LyGenLocation(java.lang.String id)
          Constructor.
LyGenLocation(java.lang.String id, java.lang.String javaName, boolean persistent)
          Constructor.
 
Method Summary
 java.lang.Object getData(java.lang.Object name)
          Gets a user data by its name.
 java.util.Vector<LyData> getDataList()
          Gets list of datas associated to this instance.
 java.util.Hashtable<java.lang.Object,LyData> getDatas()
          Gets table of datas associated to this instance.
 java.lang.String getJavaName()
          Accessor to the base object name of this location.
 boolean isPersistent()
          Accessor of the persistent mode of this location.
 java.lang.Object putData(java.lang.Object name, java.lang.Object value)
          Adds user data on this instance.
 java.lang.Object removeData(java.lang.Object name)
          Removes a user data on this instance.
 
Methods inherited from class leon.info.location.LyLocation
check, getNotifier, getUrl, setNotifier
 
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
equals, 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

PARAM_NULL

public static final java.lang.Object PARAM_NULL
Parameter : NULL.

Constructor Detail

LyGenLocation

public LyGenLocation(java.lang.String id)
Constructor.

Parameters:
id - identifier of the location

LyGenLocation

public LyGenLocation(java.lang.String id,
                     java.lang.String javaName,
                     boolean persistent)
Constructor.

Parameters:
id - identifier of the location
javaName - Name of the java class of the provider.
persistent - Boolean that indicates if location is persistent or not.
Method Detail

getJavaName

public java.lang.String getJavaName()
Accessor to the base object name of this location.

Returns:
the base object name of this location

isPersistent

public boolean isPersistent()
Accessor of the persistent mode of this location.

Overrides:
isPersistent in class LyLocation
Returns:
persistent mode.

putData

public final java.lang.Object putData(java.lang.Object name,
                                      java.lang.Object value)
Adds user data on this instance. A user data is a value associated to a name stored in a hashtable.

Parameters:
name - Name of the user data. If a value was already stored for that name, this value is overriden.
value - Value of the user data.
Returns:
The previous value associated to the given name if there was one, null otherwise.
Throws:
java.lang.IllegalArgumentException - If the given name or value is null.

removeData

public final java.lang.Object removeData(java.lang.Object name)
Removes a user data on this instance.

Parameters:
name - Name of the data to be removed.
Returns:
The value that was associated to the given name if there was one, null otherwise.
Throws:
java.lang.IllegalArgumentException - If the given name is null.
java.lang.IllegalStateException - If this method is called before any data has been added (datas hashtable is null).

getData

public final java.lang.Object getData(java.lang.Object name)
Gets a user data by its name.

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

getDataList

public final java.util.Vector<LyData> getDataList()
Gets list of datas associated to this instance.

Returns:
Returns the list of all the datas associated to this object info.

getDatas

public final java.util.Hashtable<java.lang.Object,LyData> getDatas()
Gets table of datas associated to this instance.

Returns:
Returns the table of all the datas associated to this object info. This is a copy of the internal hashtable that contains these datas.

(c) January 2013 - W4 S.A.

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