|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.informatica.ui.DataView
public abstract class DataView
Encapsulation of data entry form.
SYNOPSIS / EXAMPLE:
// initialize
DataDict dic = ...
DataViewConfig vc = ...
ViewSecurity vsec = ... [OPTIONAL]
DataView view = ...
view.setMetaData(dic.getMetaData(mdname));
try {
// feed the form with data view
view.setDataViewConfig(vc);
// Set the security constraints [optional]
view.setSecurity(vsec);
// initialize
view.init();
} catch(DataException e){
...
}
// Usually, values are introduced by subclass-specific methods
...
// Validate the view
try {
view.validate();
} catch(DataFieldException e){
...
}
// Do something with values
Object value = view.getValue("field1");
...
view.close();
You won't use this class directly, but one of the subclasses instead.
| Constructor Summary | |
|---|---|
DataView(String id)
|
|
| Method Summary | |
|---|---|
void |
close()
|
DataControl |
createDataControl(ControlName controlname)
|
Map<String,Object> |
dataToUI(Dataset ds)
|
Map<String,Object> |
dataToUI(Dataset ds,
MetaData md)
Given a dataset, uses the data values to get a map of UI field names -> UI field values. |
boolean |
equals(Object obj)
|
int |
fieldCount()
Gets the number of data view elements. |
Set |
getAllowedRoles(String opname)
Convenience method that accesses the view security object to test for allowed roles. |
DataControl |
getDataControl(ControlName controlname)
Returns the instance of the DataControl peer object with name controlname. |
Collection<DataControl> |
getDataControls()
|
DataViewConfig |
getDataViewConfig()
Gets the DataViewConfig object associated to this view. |
String |
getId()
Get the ID of this View. |
MetaData |
getMetaData()
Get the metadata that applies to this view. |
ViewSecurity |
getSecurity()
Gets the ViewSecurity instance associated to this form. |
Object |
getValue(FieldName fieldname)
Gets the value of the fieldname entity. |
int |
hashCode()
|
void |
init()
initialize the form prior to display (defaults, etc.) |
void |
setDataViewConfig(DataViewConfig vc)
load the configuration |
void |
setMetaData(MetaData md)
Set the metadata that applies to this view. |
void |
setSecurity(ViewSecurity viewsec)
Sets the security information. |
String |
toString()
|
Map<FieldName,Object> |
validate()
|
Map<FieldName,Object> |
validate(boolean checkauto)
|
Map<FieldName,Object> |
validate(boolean checkauto,
Object helper)
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DataView(String id)
| Method Detail |
|---|
public void setDataViewConfig(DataViewConfig vc)
throws DataViewException
DataViewExceptionpublic void setMetaData(MetaData md)
md - the metadata.
public void init()
throws DataException
DataException
public DataControl createDataControl(ControlName controlname)
throws DataViewException
DataViewExceptionpublic MetaData getMetaData()
public DataControl getDataControl(ControlName controlname)
controlname - name of the data control
public Collection<DataControl> getDataControls()
public int fieldCount()
public Map<FieldName,Object> validate()
throws DataException
DataException
public Map<FieldName,Object> validate(boolean checkauto)
throws DataException
DataException
public Map<FieldName,Object> validate(boolean checkauto,
Object helper)
throws DataException
DataExceptionpublic String getId()
public Object getValue(FieldName fieldname)
getValue in interface Valuesetfieldname - name of the field in database.
public void setSecurity(ViewSecurity viewsec)
viewsec - the ViewSecurity object to be associated with this view
config.public ViewSecurity getSecurity()
public Set getAllowedRoles(String opname)
public DataViewConfig getDataViewConfig()
public Map<String,Object> dataToUI(Dataset ds)
throws DatasetException
DatasetException
public Map<String,Object> dataToUI(Dataset ds,
MetaData md)
throws DatasetException
DatasetExceptionpublic void close()
public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||