|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.student.common.ui.client.mvc.DataModel
public class DataModel
The data model for Kuali Student. Data is stored in a map of maps and is accessed through a QueryPath.
QueryPath
Nested Class Summary | |
---|---|
static interface |
DataModel.QueryCallback<T>
|
Constructor Summary | |
---|---|
DataModel()
|
|
DataModel(ModelDefinition definition,
Data root)
|
|
DataModel(String name)
|
Method Summary | ||
---|---|---|
com.google.gwt.event.shared.HandlerRegistration |
addModelChangeHandler(ModelChangeHandler handler)
Adds a ModelChangeHandler that will be invoked for ModelChangeEvents |
|
|
get(QueryPath path)
|
|
|
get(String path)
|
|
ModelDefinition |
getDefinition()
|
|
Metadata |
getMetadata(QueryPath path)
|
|
String |
getModelName()
|
|
String |
getParentPath()
|
|
Data |
getRoot()
|
|
Data.DataType |
getType(QueryPath path)
|
|
boolean |
isValidPath(String sPath)
Checks to see if data exists for the path passed in |
|
Map<QueryPath,Object> |
query(QueryPath path)
|
|
Map<QueryPath,Object> |
query(String path)
|
|
void |
remove(QueryPath path)
|
|
void |
resetRoot()
|
|
void |
set(QueryPath path,
Boolean value)
|
|
void |
set(QueryPath path,
Data.Value value)
|
|
void |
set(QueryPath path,
Data value)
|
|
void |
set(QueryPath path,
Date value)
|
|
void |
set(QueryPath path,
Double value)
|
|
void |
set(QueryPath path,
Float value)
|
|
void |
set(QueryPath path,
Integer value)
|
|
void |
set(QueryPath path,
Long value)
|
|
void |
set(QueryPath path,
Short value)
|
|
void |
set(QueryPath path,
String value)
|
|
void |
setDefinition(ModelDefinition definition)
|
|
void |
setModelName(String modelName)
|
|
void |
setParentPath(String parentPath)
If the root element for this is a child of another data object, then the parent path must be set to the path where this child data object can be found. |
|
void |
setRoot(Data root)
Set the top level data for this DataModel |
|
void |
validate(Callback<List<ValidationResultInfo>> callback)
Validates this data model against its ModelDefinition/Metadata and returns the result to the callback |
|
void |
validateField(FieldDescriptor fd,
Callback<List<ValidationResultInfo>> callback)
Validates a single field |
|
void |
validateForMetadata(Metadata metadata,
Callback<List<ValidationResultInfo>> callback)
Validates this data model against the given metadata and returns the result to the callback |
|
void |
validateNextState(Callback<List<ValidationResultInfo>> callback)
Validates this data model against the next state in its ModelDefinition and returns the result to the callback |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataModel()
public DataModel(String name)
public DataModel(ModelDefinition definition, Data root)
Method Detail |
---|
public String getModelName()
public void setModelName(String modelName)
public <T> T get(QueryPath path)
public <T> T get(String path)
public Data getRoot()
public void resetRoot()
public void remove(QueryPath path)
public Map<QueryPath,Object> query(QueryPath path)
path
- The path in the data model
public Map<QueryPath,Object> query(String path)
path
- The path in the data model
public void set(QueryPath path, Data value)
public void set(QueryPath path, Integer value)
public void set(QueryPath path, String value)
public void set(QueryPath path, Long value)
public void set(QueryPath path, Short value)
public void set(QueryPath path, Double value)
public void set(QueryPath path, Float value)
public void set(QueryPath path, Boolean value)
public void set(QueryPath path, Date value)
public void set(QueryPath path, Data.Value value)
public Data.DataType getType(QueryPath path)
public Metadata getMetadata(QueryPath path)
public void setRoot(Data root)
root
- the root to setpublic com.google.gwt.event.shared.HandlerRegistration addModelChangeHandler(ModelChangeHandler handler)
Model
addModelChangeHandler
in interface Model
handler
- the handler to add
public ModelDefinition getDefinition()
public void setDefinition(ModelDefinition definition)
public String getParentPath()
public void setParentPath(String parentPath)
parentPath
- public void validate(Callback<List<ValidationResultInfo>> callback)
callback
- public void validateNextState(Callback<List<ValidationResultInfo>> callback)
callback
- public void validateForMetadata(Metadata metadata, Callback<List<ValidationResultInfo>> callback)
metadata
- callback
- public void validateField(FieldDescriptor fd, Callback<List<ValidationResultInfo>> callback)
fd
- callback
- public boolean isValidPath(String sPath)
sPath
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |