LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.info
Class LyInclude

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

public class LyInclude
extends LyInfo

This class represents an include of an external model. Its attributes are :


Nested Class Summary
 
Nested classes/interfaces inherited from class leon.info.LyTag
LyTag.Model
 
Field Summary
static java.lang.String __VERSION
           
static boolean _allowLoad
          The include must load its children.
static java.lang.String CMS_APPMODEL_APPLICATION_ID
           
static java.lang.String W4_APPMODEL_APPLICATION_ID
           
 
Constructor Summary
LyInclude(java.lang.String applicationId, java.lang.String file, java.lang.String version, boolean load)
          Constructor with a given id.
LyInclude(java.lang.String id, java.lang.String applicationId, java.lang.String file, java.lang.String version, boolean load)
          Constructor with a given id.
 
Method Summary
 java.lang.String getApplicationId()
          Gets the application id of the external model.
 java.lang.Object getRootElement()
          Retrieve the root element of the include.
 java.lang.String getVersion()
          Gets version of this include.
 java.lang.String getXmlFile()
          Gets the XML root file of the external model.
 boolean isLoadedOnStart()
          Checks if this include is loaded on start or on its first use.
 void loadExtraLanguage(LyEnvironment environment)
           
 void setApplication(LyApplication application)
          Sets the application for this info.
 void setXmlFile(java.lang.String xmlFile)
          Sets the XML file for this include.
 
Methods inherited from class leon.info.LyInfo
getAlias, getApplication, getFile, getId, getInclude, getName, isIncluded, isInternal, isInternal, isLoaded, isLocked, load, 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

W4_APPMODEL_APPLICATION_ID

public static final java.lang.String W4_APPMODEL_APPLICATION_ID
See Also:
Constant Field Values

CMS_APPMODEL_APPLICATION_ID

public static final java.lang.String CMS_APPMODEL_APPLICATION_ID
See Also:
Constant Field Values

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values

_allowLoad

public static boolean _allowLoad
The include must load its children.

Constructor Detail

LyInclude

public LyInclude(java.lang.String id,
                 java.lang.String applicationId,
                 java.lang.String file,
                 java.lang.String version,
                 boolean load)
Constructor with a given id.

Parameters:
applicationId - The application id of the external model. Used to load properties file.
file - The root file of the external model (could be a ini file, a XML file or a compiled model).
version - Version of loaded model.
load - True if the model is loaded on start or on its first use.

LyInclude

public LyInclude(java.lang.String applicationId,
                 java.lang.String file,
                 java.lang.String version,
                 boolean load)
Constructor with a given id.

Parameters:
applicationId - The application id of the external model. Used to load properties file.
file - The root file of the external model.
version - Version of loaded model.
load - True if the model is loaded on declaration or on its first use.
Method Detail

setApplication

public void setApplication(LyApplication application)
Sets the application for this info. Overridden to load include if needed only when application has been set.

Overrides:
setApplication in class LyInfo
Parameters:
application - The application to which the info belongs.
Throws:
java.lang.IllegalStateException - If the info already belongs to an application.

getApplicationId

public final java.lang.String getApplicationId()
Gets the application id of the external model.

Returns:
The application id.

setXmlFile

public void setXmlFile(java.lang.String xmlFile)
Sets the XML file for this include.

Parameters:
the - XML file for this include.

getXmlFile

public final java.lang.String getXmlFile()
Gets the XML root file of the external model.

Returns:
The XML root file.

getVersion

public java.lang.String getVersion()
Gets version of this include.

Returns:
Version.

isLoadedOnStart

public boolean isLoadedOnStart()
Checks if this include is loaded on start or on its first use.

Returns:
True if this include is loaded on start, false otherwise.

getRootElement

public java.lang.Object getRootElement()
Retrieve the root element of the include.

Returns:
Root element loaded by this include.

loadExtraLanguage

public void loadExtraLanguage(LyEnvironment environment)

(c) January 2013 - W4 S.A.

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