|
Nuxeo Enterprise Platform 5.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.nuxeo.ecm.webapp.bulkedit.FictiveDataModel
public class FictiveDataModel
A data model that is not tied to a particular schema, neither has anything to do with a session (CoreSession).
Used just to hold data for a FictiveDocumentModel
in a
non-constraining way.
Field Summary | |
---|---|
protected Map<String,Object> |
data
|
protected DocumentPart |
dp
|
Constructor Summary | |
---|---|
FictiveDataModel(String schema)
|
Method Summary | |
---|---|
Object |
getData(String key)
Gets the named field value. |
Collection<String> |
getDirtyFields()
Gets the collection of the dirty fields in this data model. |
Map<String,Object> |
getMap()
Gets all the fields set in this data model. |
String |
getSchema()
Gets the schema of this data model. |
Object |
getValue(String path)
Gets a value given its path. |
boolean |
isDirty()
Tests whether or not this data model is dirty (i.e. it was changed by the client). |
boolean |
isDirty(String name)
Tests whether or not the specified field from this data model is dirty. |
void |
setData(String key,
Object value)
Sets the name field. |
void |
setDirty(String name)
Marks the specified field from this data model as dirty. |
void |
setMap(Map<String,Object> data)
Sets several field at once. |
Object |
setValue(String path,
Object value)
Sets a value to a property given its path. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Map<String,Object> data
protected final DocumentPart dp
Constructor Detail |
---|
public FictiveDataModel(String schema)
Method Detail |
---|
public void setData(String key, Object value) throws PropertyException
DataModel
setData
in interface DataModel
key
- the field namevalue
- the value to set. Accept null values.
PropertyException
public Object getData(String key) throws PropertyException
DataModel
getData
in interface DataModel
key
- the field key
PropertyException
public String getSchema()
DataModel
getSchema
in interface DataModel
public Map<String,Object> getMap() throws PropertyException
DataModel
It is not guaranteed that the returned map will contain all the fields defined by the schema. It may even be empty.
The returned map is null if the data model was not yet loaded.
getMap
in interface DataModel
PropertyException
public void setMap(Map<String,Object> data) throws PropertyException
DataModel
setMap
in interface DataModel
data
- the fields to set as a map
PropertyException
public boolean isDirty()
DataModel
isDirty
in interface DataModel
public boolean isDirty(String name) throws PropertyNotFoundException
DataModel
isDirty
in interface DataModel
name
- the field name to tests
PropertyNotFoundException
public void setDirty(String name) throws PropertyNotFoundException
DataModel
setDirty
in interface DataModel
name
- the field name to be dirty
PropertyNotFoundException
public Collection<String> getDirtyFields()
DataModel
getDirtyFields
in interface DataModel
public Object getValue(String path) throws PropertyException
DataModel
The path is a subset of XPath: / and [] are supported.
getValue
in interface DataModel
path
- the property path
PropertyException
public Object setValue(String path, Object value) throws PropertyException
DataModel
setValue
in interface DataModel
PropertyException
|
Nuxeo Enterprise Platform 5.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |