it.eng.spagobi.behaviouralmodel.lov.bo
Class FixedListDetail

java.lang.Object
  extended by it.eng.spagobi.behaviouralmodel.lov.bo.DependenciesPostProcessingLov
      extended by it.eng.spagobi.behaviouralmodel.lov.bo.FixedListDetail
All Implemented Interfaces:
ILovDetail, java.io.Serializable

public class FixedListDetail
extends DependenciesPostProcessingLov
implements ILovDetail

Defines method to manage lov of fixed list type

See Also:
Serialized Form

Constructor Summary
FixedListDetail()
          constructor.
FixedListDetail(java.lang.String dataDefinition)
          constructor.
 
Method Summary
 void add(java.lang.String value, java.lang.String description)
          Adds a lov to the lov Detail List.
static FixedListDetail fromXML(java.lang.String dataDefinition)
          Splits an XML string by using some SourceBean object methods in order to obtain the source LovDetail objects whom XML has been built.
 java.lang.String getDescriptionColumnName()
          Gets the description column name.
 java.util.List getInvisibleColumnNames()
          Gets the invisible column names.
 java.util.List getItems()
          Gets item of the fixed list.
 java.lang.String getLovResult(it.eng.spago.security.IEngUserProfile profile, java.util.List<ObjParuse> dependencies, ExecutionInstance executionInstance)
          Returns the result of the lov for a given user and for a particular execution instance with the given dependencies (optional).
 java.lang.String getLovType()
          Gets the type of the lov.
 java.util.List getProfileAttributeNames()
          Gets the list of names of the profile attributes required.
 java.util.List getTreeLevelsColumns()
          Gets the levels names of the tree lov
 java.lang.String getValueColumnName()
          Gets the value column name.
 java.util.List getVisibleColumnNames()
          Gets the visible column names.
 void loadFromXML(java.lang.String dataDefinition)
          loads the lov from an xml string.
 void remove(java.lang.String value, java.lang.String description)
          Deletes a lov from the lov Detail List.
 boolean requireProfileAttributes()
          Checks if the lov requires one or more profile attributes.
 void setDescriptionColumnName(java.lang.String descriptionColumnName)
          Sets the description column name.
 void setInvisibleColumnNames(java.util.List invisibleColumnNames)
          Sets the invisible column names.
 void setLovs(java.util.List items)
          Sets items of the fixed list.
 void setLovType(java.lang.String lovType)
          Sets the type of the lov.
 void setTreeLevelsColumns(java.util.List treeLevelsColumns)
          Sets the levels names of the tree lov
 void setValueColumnName(java.lang.String valueColumnName)
          Sets the value column name.
 void setVisibleColumnNames(java.util.List visibleColumnNames)
          Sets the visible column names.
 java.lang.String toXML()
          serialize the lov to an xml string.
 
Methods inherited from class it.eng.spagobi.behaviouralmodel.lov.bo.DependenciesPostProcessingLov
intersectLists, processDependencies
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedListDetail

public FixedListDetail()
constructor.


FixedListDetail

public FixedListDetail(java.lang.String dataDefinition)
                throws it.eng.spago.base.SourceBeanException
constructor.

Parameters:
dataDefinition - the data definition
Throws:
it.eng.spago.base.SourceBeanException - the source bean exception
Method Detail

loadFromXML

public void loadFromXML(java.lang.String dataDefinition)
                 throws it.eng.spago.base.SourceBeanException
loads the lov from an xml string.

Specified by:
loadFromXML in interface ILovDetail
Parameters:
dataDefinition - the xml definition of the lov
Throws:
it.eng.spago.base.SourceBeanException - the source bean exception

toXML

public java.lang.String toXML()
serialize the lov to an xml string.

Specified by:
toXML in interface ILovDetail
Returns:
the serialized xml string

getLovResult

public java.lang.String getLovResult(it.eng.spago.security.IEngUserProfile profile,
                                     java.util.List<ObjParuse> dependencies,
                                     ExecutionInstance executionInstance)
                              throws java.lang.Exception
Description copied from interface: ILovDetail
Returns the result of the lov for a given user and for a particular execution instance with the given dependencies (optional).

Specified by:
getLovResult in interface ILovDetail
Parameters:
profile - the profile of the user
dependencies - the dependencies to be considered for the lov. It may be null, since when testing a lov, there is no correlation.
executionInstance - the execution instance object, that contains the BIObject being executed. It may be null, since when testing a lov, there is no execution instance.
Returns:
the string result of the lov
Throws:
java.lang.Exception - the exception
See Also:
throws Exception;

getProfileAttributeNames

public java.util.List getProfileAttributeNames()
                                        throws java.lang.Exception
Gets the list of names of the profile attributes required.

Specified by:
getProfileAttributeNames in interface ILovDetail
Returns:
list of profile attribute names
Throws:
java.lang.Exception - the exception

requireProfileAttributes

public boolean requireProfileAttributes()
                                 throws java.lang.Exception
Checks if the lov requires one or more profile attributes.

Specified by:
requireProfileAttributes in interface ILovDetail
Returns:
true if the lov require one or more profile attributes, false otherwise
Throws:
java.lang.Exception - the exception

add

public void add(java.lang.String value,
                java.lang.String description)
Adds a lov to the lov Detail List.

Parameters:
description - The added lov description
value - the value

remove

public void remove(java.lang.String value,
                   java.lang.String description)
Deletes a lov from the lov Detail List.

Parameters:
value - The deleted lov name
description - The deleted lov description

fromXML

public static FixedListDetail fromXML(java.lang.String dataDefinition)
                               throws it.eng.spago.base.SourceBeanException
Splits an XML string by using some SourceBean object methods in order to obtain the source LovDetail objects whom XML has been built.

Parameters:
dataDefinition - The XML input String
Returns:
The corrispondent LovDetailList object
Throws:
it.eng.spago.base.SourceBeanException - If a SourceBean Exception occurred

getItems

public java.util.List getItems()
Gets item of the fixed list.

Returns:
items of the fixed list

setLovs

public void setLovs(java.util.List items)
Sets items of the fixed list.

Parameters:
items - the items to set

getDescriptionColumnName

public java.lang.String getDescriptionColumnName()
Description copied from interface: ILovDetail
Gets the description column name.

Specified by:
getDescriptionColumnName in interface ILovDetail
Returns:
the description column name

setDescriptionColumnName

public void setDescriptionColumnName(java.lang.String descriptionColumnName)
Description copied from interface: ILovDetail
Sets the description column name.

Specified by:
setDescriptionColumnName in interface ILovDetail
Parameters:
descriptionColumnName - the new description column name

getInvisibleColumnNames

public java.util.List getInvisibleColumnNames()
Description copied from interface: ILovDetail
Gets the invisible column names.

Specified by:
getInvisibleColumnNames in interface ILovDetail
Returns:
the invisible column names

setInvisibleColumnNames

public void setInvisibleColumnNames(java.util.List invisibleColumnNames)
Description copied from interface: ILovDetail
Sets the invisible column names.

Specified by:
setInvisibleColumnNames in interface ILovDetail
Parameters:
invisibleColumnNames - the new invisible column names

getValueColumnName

public java.lang.String getValueColumnName()
Description copied from interface: ILovDetail
Gets the value column name.

Specified by:
getValueColumnName in interface ILovDetail
Returns:
the value column name

setValueColumnName

public void setValueColumnName(java.lang.String valueColumnName)
Description copied from interface: ILovDetail
Sets the value column name.

Specified by:
setValueColumnName in interface ILovDetail
Parameters:
valueColumnName - the new value column name

getVisibleColumnNames

public java.util.List getVisibleColumnNames()
Description copied from interface: ILovDetail
Gets the visible column names.

Specified by:
getVisibleColumnNames in interface ILovDetail
Returns:
the visible column names

setVisibleColumnNames

public void setVisibleColumnNames(java.util.List visibleColumnNames)
Description copied from interface: ILovDetail
Sets the visible column names.

Specified by:
setVisibleColumnNames in interface ILovDetail
Parameters:
visibleColumnNames - the new visible column names

getLovType

public java.lang.String getLovType()
Description copied from interface: ILovDetail
Gets the type of the lov. Now the available types are: simple, tree

Specified by:
getLovType in interface ILovDetail
Returns:
name the type of the lov

setLovType

public void setLovType(java.lang.String lovType)
Description copied from interface: ILovDetail
Sets the type of the lov. Now the available types are: simple, tree

Specified by:
setLovType in interface ILovDetail
Parameters:
lovType - the type of the lov

getTreeLevelsColumns

public java.util.List getTreeLevelsColumns()
Description copied from interface: ILovDetail
Gets the levels names of the tree lov

Specified by:
getTreeLevelsColumns in interface ILovDetail
Returns:
treeLevelColumns levels names of the tree lov

setTreeLevelsColumns

public void setTreeLevelsColumns(java.util.List treeLevelsColumns)
Description copied from interface: ILovDetail
Sets the levels names of the tree lov

Specified by:
setTreeLevelsColumns in interface ILovDetail
Parameters:
treeLevelsColumns - levels names of the tree lov