|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.student.common.assembly.dictionary.MetadataServiceImpl
public class MetadataServiceImpl
This class provides metadata lookup for service dto objects.
Nested Class Summary | |
---|---|
private static class |
MetadataServiceImpl.RecursionCounter
|
Field Summary | |
---|---|
private Map<String,DictionaryService> |
dictionaryServiceMap
|
(package private) Logger |
LOG
|
private List<UILookupConfig> |
lookupObjectStructures
|
private String |
uiLookupContext
|
Constructor Summary | |
---|---|
MetadataServiceImpl(DictionaryService... dictionaryServices)
Create a metadata service initializing it with all known dictionary services |
Method Summary | |
---|---|
private void |
addLookupstoMetadata(String objectKey,
Metadata metadata,
String type)
|
private String |
calcSimpleName(String objectKey)
|
protected Data.Value |
convertDefaultValue(Data.DataType dataType,
Object value)
Convert Object value to respective DataType. |
protected Data.Value |
convertDefaultValue(Object value)
|
protected Data.DataType |
convertDictionaryDataType(DataType dataType)
|
protected List<ConstraintMetadata> |
getConstraints(FieldDefinition fd,
String type,
String state,
String nextState)
|
Metadata |
getMetadata(String objectKey)
This method gets the metadata for the given object key for state DRAFT. |
Metadata |
getMetadata(String objectKey,
String state)
This method gets the metadata for the given object key and state |
Metadata |
getMetadata(String objectKey,
String type,
String state)
This method gets the metadata for the given object key, type and state |
Metadata |
getMetadata(String objectKey,
String type,
String state,
String nextState)
This method gets the metadata for the given object key, type, state and nextState |
protected Metadata |
getMetadataFromDictionaryService(String objectKey,
String type,
String state,
String nextState)
This invokes the appropriate dictionary service to get the object structure and then converts it to a metadata structure. |
protected ObjectStructureDefinition |
getObjectStructure(String objectKey)
This method gets the object structure for given objectKey from a dictionaryService |
private static String[] |
getPathTokens(String fieldPath)
|
private Map<String,Metadata> |
getProperties(ObjectStructureDefinition objectStructure,
String type,
String state,
String nextState,
MetadataServiceImpl.RecursionCounter counter)
This method is used to convert a list of dictionary fields into metadata properties |
private void |
init()
|
protected boolean |
isRepeating(FieldDefinition fd)
This method determines if a field is repeating |
private LookupMetadata |
mapLookupDatatoMeta(UILookupData lookupData)
|
private LookupParamMetadata |
mapLookupParamMetadata(CommonLookupParam param)
|
private boolean |
matchesObjectKey(String objectKey,
String path)
|
private boolean |
matchesType(String paramType,
String lookupType)
|
protected void |
processCaseConstraint(ConstraintMetadata constraintMetadata,
CaseConstraint caseConstraint,
String type,
String state,
String nextState)
|
void |
setUiLookupContext(String uiLookupContext)
|
protected void |
updateConstraintMetadata(ConstraintMetadata constraintMetadata,
Constraint constraint,
String type,
String state,
String nextState)
This updates the constraintMetadata with defintions from the dictionary constraint field. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
final Logger LOG
private Map<String,DictionaryService> dictionaryServiceMap
private List<UILookupConfig> lookupObjectStructures
private String uiLookupContext
Constructor Detail |
---|
public MetadataServiceImpl(DictionaryService... dictionaryServices)
dictionaryServices
- Method Detail |
---|
public Metadata getMetadata(String objectKey, String type, String state, String nextState)
objectKey
- type
- The type of the object (value can be null)state
- The state for which to retrieve object constraints (value can be null)nextState
- The state to to check requiredForNextState indicators (value can be null)
public Metadata getMetadata(String objectKey, String type, String state)
objectKey
- type
- The type of the object (value can be null)state
- The state for which to retrieve object constraints (value can be null)
public Metadata getMetadata(String objectKey, String state)
objectKey
- type
- The type of the object (value can be null)public Metadata getMetadata(String objectKey)
objectKey
-
getMetadata(String, String)
protected Metadata getMetadataFromDictionaryService(String objectKey, String type, String state, String nextState)
objectKey
- type
- state
-
private Map<String,Metadata> getProperties(ObjectStructureDefinition objectStructure, String type, String state, String nextState, MetadataServiceImpl.RecursionCounter counter)
fields
- type
- state
-
protected boolean isRepeating(FieldDefinition fd)
fd
-
protected ObjectStructureDefinition getObjectStructure(String objectKey)
objectKey
-
protected List<ConstraintMetadata> getConstraints(FieldDefinition fd, String type, String state, String nextState)
protected void updateConstraintMetadata(ConstraintMetadata constraintMetadata, Constraint constraint, String type, String state, String nextState)
constraintMetadata
- constraint
- protected void processCaseConstraint(ConstraintMetadata constraintMetadata, CaseConstraint caseConstraint, String type, String state, String nextState)
protected Data.Value convertDefaultValue(Data.DataType dataType, Object value)
dataType
- value
-
protected Data.Value convertDefaultValue(Object value)
protected Data.DataType convertDictionaryDataType(DataType dataType)
public void setUiLookupContext(String uiLookupContext)
private void init()
private String calcSimpleName(String objectKey)
private boolean matchesObjectKey(String objectKey, String path)
private boolean matchesType(String paramType, String lookupType)
private void addLookupstoMetadata(String objectKey, Metadata metadata, String type)
private LookupMetadata mapLookupDatatoMeta(UILookupData lookupData)
private LookupParamMetadata mapLookupParamMetadata(CommonLookupParam param)
private static String[] getPathTokens(String fieldPath)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |