info.informatica.ui
Class DefaultDataViewConfig

java.lang.Object
  extended by info.informatica.ui.DefaultDataViewConfig
All Implemented Interfaces:
DataViewConfig
Direct Known Subclasses:
HTTPViewConfig

public abstract class DefaultDataViewConfig
extends Object
implements DataViewConfig

DefaultDataViewConfig: a defaults-based DataViewConfig abstract class

Author:
amengual at informatica dot info

Constructor Summary
DefaultDataViewConfig()
           
 
Method Summary
 void addMetadataName(String mdname)
           
 DataView createDataView(String viewname)
          Creates an instance of the DataView associated to this ViewConfig.
 String getControlClass(ControlName ui_name)
          Gets the class name that represents the UI element identified by ui_name
 Map<String,Object> getControlDefaults()
          Get the defaults of the fields, as specified in the View configuration.
 ControlName getControlName(FieldName field_name)
          Gets the name that the given field_name would have in this User Interface.
abstract  Iterator<ControlName> getControlNames()
          Gets the names of the UI entity fields associated to UI items.
 FieldName getFieldName(ControlName ui_name)
          Gets the field name associated to the given User Interface object name.
 LocalLabels getLocalLabels()
          Gets the localized labels for the current view locale.
 String getViewClass()
          Gets the name of the DataView class associated to this ViewConfig.
 boolean isMetadataName(String name)
          Checks whether the given name is one of the datasource metadata names associated to the view.
 String pickMetadataName()
           
 void setDefaultUIClass(String classname)
           
 void setLocalLabels(LocalLabels labels)
          Sets the localized labels for the current view locale.
 void setViewClass(String classname)
          Sets the name of the class used to produce the DataView
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDataViewConfig

public DefaultDataViewConfig()
Method Detail

getControlName

public ControlName getControlName(FieldName field_name)
Description copied from interface: DataViewConfig
Gets the name that the given field_name would have in this User Interface.

If there are more than one, returns any of them. If there is none, should return null (some basic implementations may always return a valid control name).

Specified by:
getControlName in interface DataViewConfig
Parameters:
field_name - the (data) field name.
Returns:
the (user interface) control name.

getFieldName

public FieldName getFieldName(ControlName ui_name)
Description copied from interface: DataViewConfig
Gets the field name associated to the given User Interface object name.

Specified by:
getFieldName in interface DataViewConfig

setDefaultUIClass

public void setDefaultUIClass(String classname)

getControlClass

public String getControlClass(ControlName ui_name)
Description copied from interface: DataViewConfig
Gets the class name that represents the UI element identified by ui_name

Specified by:
getControlClass in interface DataViewConfig

setViewClass

public void setViewClass(String classname)
Description copied from interface: DataViewConfig
Sets the name of the class used to produce the DataView

Specified by:
setViewClass in interface DataViewConfig
Parameters:
classname - Name of the DataView-inherited class associated to this ViewConfig.

getViewClass

public String getViewClass()
Description copied from interface: DataViewConfig
Gets the name of the DataView class associated to this ViewConfig.

Specified by:
getViewClass in interface DataViewConfig
Returns:
the name of the DataView associated to this ViewConfig.

createDataView

public DataView createDataView(String viewname)
                        throws DataViewException
Description copied from interface: DataViewConfig
Creates an instance of the DataView associated to this ViewConfig.

Specified by:
createDataView in interface DataViewConfig
Parameters:
viewname - the name of the view.
Returns:
a new DataView associated to this ViewConfig.
Throws:
DataViewException

setLocalLabels

public void setLocalLabels(LocalLabels labels)
Description copied from interface: DataViewConfig
Sets the localized labels for the current view locale.

Specified by:
setLocalLabels in interface DataViewConfig
Parameters:
labels - the local labels.

getLocalLabels

public LocalLabels getLocalLabels()
Description copied from interface: DataViewConfig
Gets the localized labels for the current view locale.

Specified by:
getLocalLabels in interface DataViewConfig
Returns:
the local labels, or null if not available.

getControlDefaults

public Map<String,Object> getControlDefaults()
Description copied from interface: DataViewConfig
Get the defaults of the fields, as specified in the View configuration.

Specified by:
getControlDefaults in interface DataViewConfig
Returns:
a Map with the field default values, as they were specified in the View configuration. An empty Map indicates no defaults were specified.

getControlNames

public abstract Iterator<ControlName> getControlNames()
Description copied from interface: DataViewConfig
Gets the names of the UI entity fields associated to UI items.

Specified by:
getControlNames in interface DataViewConfig

addMetadataName

public void addMetadataName(String mdname)
Specified by:
addMetadataName in interface DataViewConfig

isMetadataName

public boolean isMetadataName(String name)
Description copied from interface: DataViewConfig
Checks whether the given name is one of the datasource metadata names associated to the view.

Specified by:
isMetadataName in interface DataViewConfig
Returns:
true if it is one of the datasource names associated to the view, or false if not.

pickMetadataName

public String pickMetadataName()
Specified by:
pickMetadataName in interface DataViewConfig