LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.app.behavior
Class LyImportContentBehavior

java.lang.Object
  extended by leon.app.behavior.LyBehavior
      extended by leon.app.behavior.LyImportContentBehavior
All Implemented Interfaces:
LyBehaviorInterface, LyGetSessionInterface

public class LyImportContentBehavior
extends LyBehavior

This class is used by the import action (parameter _importContentBehavior) to modify the content which is imported during the import process.


Field Summary
static java.lang.String __VERSION
          File version
 
Constructor Summary
LyImportContentBehavior()
          Construct a class behavior.
 
Method Summary
 LyObjectList completeImport(LyImportContentController controller, LySimpleObjectList importedObjects)
          Complete the import process : really create / set objects in current context.
 boolean endImport(LyImportContentController controller)
          Ends the import action of the given controller.
 java.lang.String getFieldValue(LyImportContentController controller, LyClassInfo classInfo, LyFieldInfo fieldInfo, java.lang.String value)
          Checks that the given imported value of the given field info is correct and modify it if necessary.
 LyValueSet getImportedValues(LyImportContentController controller, LyObject object, boolean internalObject)
          Fetchs the complete set of values of te given object.
 boolean startImport(LyImportContentController controller)
          Starts the import action for the given controller.
 
Methods inherited from class leon.app.behavior.LyBehavior
free, getSession, handleDemand, init
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
File version

See Also:
Constant Field Values
Constructor Detail

LyImportContentBehavior

public LyImportContentBehavior()
Construct a class behavior.

Method Detail

startImport

public boolean startImport(LyImportContentController controller)
Starts the import action for the given controller.
The default implementation does nothing and returns true.

Parameters:
controller - the current Controller instance
Returns:
true if the action starts correctly, false otherwise.

getFieldValue

public java.lang.String getFieldValue(LyImportContentController controller,
                                      LyClassInfo classInfo,
                                      LyFieldInfo fieldInfo,
                                      java.lang.String value)
Checks that the given imported value of the given field info is correct and modify it if necessary.
The default implementation does nothing and return the given value 'as is'.

Parameters:
controller - the current Controller instance
classInfo - the field class info
fieldInfo - the imported field info
value - the imported value
Returns:
a correct field value

completeImport

public LyObjectList completeImport(LyImportContentController controller,
                                   LySimpleObjectList importedObjects)
Complete the import process : really create / set objects in current context.

Parameters:
controller - the current Controller instance
importedObjects - object that where found in import, they are not yet created or setted for real
Returns:
the new list of imported objects which have been created/setted for real in the application in current context

getImportedValues

public LyValueSet getImportedValues(LyImportContentController controller,
                                    LyObject object,
                                    boolean internalObject)
Fetchs the complete set of values of te given object.

Parameters:
controller - the current import controller
object - the object to complete
internalObject - indicates if the given object is internal or not
Returns:
a set containing values for all fields info of the object classinfo

endImport

public boolean endImport(LyImportContentController controller)
Ends the import action of the given controller.
The default implementation does nothing and returns true.

Parameters:
controller - the current LyAreaController instance
Returns:
true if the action performed correctly, false otherwise

(c) January 2013 - W4 S.A.

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