LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.control.content
Class LyImportContentXmlController

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

public class LyImportContentXmlController
extends LyImportContentController

This class reads an XML File from export and create LyObjects from the import. The import is done within a context (may cancel) all the import. Imported objects may change the identifier of the imported objects (generate new identifiers) if overriden by the application Imported objetcs returned by the loadData or loadDataFile are juste created / set in memory : it is possible to commit/cancel import for objects following an object per object basis

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
LyImportContentXmlController(LySession session, LyController parent, LyAction action)
          Constructor.
 
Method Summary
 void addInternalObject(LyObject importedObject, LyObject internalObject)
          Accessor to the Internal objects (Struct objects) generated during the import.
 org.xml.sax.InputSource convertSourceVersion(org.xml.sax.InputSource source)
          Apply XSLT Stylesheets to convert the source version of the XML File to latest version.
 LyObjectList getInternalObjectList(LyObject importedObject)
          Accessor to the Internal objects (Struct objects) generated during the import This objects are used by imported objects in relations.
 LyViewController getViewController()
          Accessor to the view controller (Frame or dialog controller) which is the container of this view.
 boolean isValidating()
          Checks whether this parser is validating or not.
 LyObjectList loadData(org.xml.sax.InputSource source)
          Load the XML data from the specified stream.
 LyObjectList loadData(java.io.InputStream istream)
          Load the XML data from the specified stream.
 LyObjectList loadData(java.io.Reader reader)
          Load the XML data from the specified stream.
 void setValidating(boolean validating)
          Sets whether this parser is validating or not.
 
Methods inherited from class leon.control.content.LyImportContentController
getAction, getClassInfo, getFields, getLastErrorMessage, loadData, loadDataFile, setClassInfo, setFields
 
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

LyImportContentXmlController

public LyImportContentXmlController(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

loadData

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

Specified by:
loadData in class LyImportContentController
Parameters:
istream - current XML Stream to read
Returns:
the list of imported objects or null if an error occured

loadData

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

Specified by:
loadData in class LyImportContentController
Parameters:
reader - current XML Stream to read
Returns:
the list of imported objects or null if an error occured

loadData

public LyObjectList loadData(org.xml.sax.InputSource source)
Load the XML data from the specified stream.

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

addInternalObject

public void addInternalObject(LyObject importedObject,
                              LyObject internalObject)
Accessor to the Internal objects (Struct objects) generated during the import.

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

getInternalObjectList

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

Specified by:
getInternalObjectList in class LyImportContentController
Parameters:
importedObject - real imported object which caused the creation of these internal objects
Returns:
internal objects

getViewController

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

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

isValidating

public boolean isValidating()
Checks whether this parser is validating or not.

Returns:
True if validating, false otherwise.

setValidating

public void setValidating(boolean validating)
Sets whether this parser is validating or not.

Parameters:
validating - True if validating, false otherwise.

convertSourceVersion

public org.xml.sax.InputSource convertSourceVersion(org.xml.sax.InputSource source)
Apply XSLT Stylesheets to convert the source version of the XML File to latest version.

Parameters:
source - source for parsing (input version)
Returns:
source the nw source after parsing (output version)

(c) January 2013 - W4 S.A.

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