LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.control.content
Class LyImportContentController

java.lang.Object
  extended by leon.control.LyController
      extended by leon.control.content.LyImportContentController
All Implemented Interfaces:
LyGetSessionInterface, LyGuiListener, LyEvaluator, LyDemandListener
Direct Known Subclasses:
LyImportContentXmlController

public abstract class LyImportContentController
extends LyController

This class is the shared code between import on logical level.

See Also:
LyImportController, LyImportTableController

Field Summary
static java.lang.String __VERSION
          File version
 
Fields inherited from class leon.control.LyController
_nbControllers, _nextId, CONTROLLER_ID_SEP, DEFAULT_IMAGE_FORMAT, DEMAND_HELP, ID_SEP
 
Constructor Summary
LyImportContentController(LySession session, LyController parent, LyAction action)
          Constructor.
 
Method Summary
 LyAction getAction()
          Accessor to the action associated to this controller.
 LyClassInfo getClassInfo()
          Class info : content description.
 LyInfoList<LyFieldInfo> getFields()
          Accessor to the list of fields for import.
abstract  LyObjectList getInternalObjectList(LyObject importedObject)
          Accessor to the Internal objects (Struct objects) generated during the import This objects are used by imported objects in relations.
 java.lang.String getLastErrorMessage()
          Accessor to the Last error that was shown during import This may be used to check by code if import was Ok.
 LyViewController getViewController()
          Accessor to the view controller (Frame or dialog controller) which is the container of this view.
abstract  LyObjectList loadData(java.io.InputStream istream)
          Load the XML data from the specified stream.
abstract  LyObjectList loadData(java.io.Reader reader)
          Load the XML data from the specified stream.
 LyObjectList loadData(java.lang.String buffer)
          Load the XML data from the specified buffer as an XML String.
 LyObjectList loadDataFile(java.lang.String filePath)
          Load the XML data from the specified file.
 void setClassInfo(LyClassInfo classInfo)
          Class info : content description.
 void setFields(LyInfoList<LyFieldInfo> fields)
          Accessor to the list of fields for import.
 
Methods inherited from class leon.control.LyController
actionDemand, activateViewDemand, clearViewCache, demandPerformed, dragDropDemand, free, getApplication, getBehavior, getBehaviorInterface, getBuilder, getClassInfo, getComponent, getEnvironment, getId, getImage, getImage, getImage, getImage, getImageFromPrefix, getImageFromPrefix, getImageFromPrefix, getKeyValue, getLastModified, getName, getObjectId, getParent, getSession, getUserData, getView, getViewManager, hasViewController, helpDemand, hideView, hideView, isFreed, isIdle, menuDemand, selectionDemand, setBuilder, setBuilderClass, setIdle, setLastModified, setName, setUserData, showError, showError, showView, showWarning, toString, updateViewFromValues
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
File version

See Also:
Constant Field Values
Constructor Detail

LyImportContentController

public LyImportContentController(LySession session,
                                 LyController parent,
                                 LyAction action)
Constructor.

Parameters:
session - current session associated to the controller. The controller automatically registers on the specified session.
parent - parent controller (or null for 'root' controller).
action - related action.
Method Detail

getAction

public LyAction getAction()
Accessor to the action associated to this controller. Area controllers are usually associated to an action, but this parameter may be null.

Returns:
The reference to associated action

loadData

public LyObjectList loadData(java.lang.String buffer)
Load the XML data from the specified buffer as an XML String.

Parameters:
buffer - current buffer to read
Returns:
the list of imported objects or null if an error occured

loadDataFile

public LyObjectList loadDataFile(java.lang.String filePath)
Load the XML data from the specified file.

Parameters:
filePath - filename to read.
Returns:
the list of imported objects or null if an error occured

loadData

public abstract LyObjectList loadData(java.io.InputStream istream)
Load the XML data from the specified stream.

Parameters:
istream - current XML Stream to read
Returns:
the list of imported objects or null if an error occured

loadData

public abstract LyObjectList loadData(java.io.Reader reader)
Load the XML data from the specified stream.

Parameters:
reader - current XML Stream to read
Returns:
the list of imported objects or null if an error occured

getInternalObjectList

public abstract LyObjectList getInternalObjectList(LyObject importedObject)
Accessor to the Internal objects (Struct objects) generated during the import This objects are used by imported objects in relations.

Parameters:
importedObject - real imported object which caused the creation of these internal objects
Returns:
internal objects

setClassInfo

public void setClassInfo(LyClassInfo classInfo)
Class info : content description. (application class)

Parameters:
classInfo - the classInfo being imported

getClassInfo

public LyClassInfo getClassInfo()
Class info : content description. (application class)

Returns:
the classInfo being shown in this table

setFields

public void setFields(LyInfoList<LyFieldInfo> fields)
Accessor to the list of fields for import.

Parameters:
fields - the list of fields to be read from the import file

getFields

public LyInfoList<LyFieldInfo> getFields()
Accessor to the list of fields for import.

Returns:
the list of fields to be read from the import file

getViewController

public LyViewController getViewController()
Accessor to the view controller (Frame or dialog controller) which is the container of this view.

Specified by:
getViewController in class LyController
Returns:
the reference to a view controller, default returns null since no view is related to this controller.

getLastErrorMessage

public java.lang.String getLastErrorMessage()
Accessor to the Last error that was shown during import This may be used to check by code if import was Ok.

Returns:
the last message or null if no error occured

(c) January 2013 - W4 S.A.

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