public class MetadataServiceImpl extends Object
| Constructor and Description |
|---|
MetadataServiceImpl() |
MetadataServiceImpl(DictionaryService... dictionaryServices)
Create a metadata service initializing it with all known dictionary services
|
| Modifier and Type | Method and Description |
|---|---|
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,
String workflowNode,
String documentTypeName) |
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,
String documentTypeName)
This method gets the metadata for the given object key, type, state and nextState
|
Metadata |
getMetadataByWorkflowNode(String objectKey,
String workflowNode,
String documentTypeName)
This method gets the metadata for the given object id key, workflowNode and documentTypeName
|
protected Metadata |
getMetadataFromDictionaryService(String objectKey,
String type,
String state,
String nextState,
String workflowNode,
String documentTypeName)
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
|
protected boolean |
isRepeating(FieldDefinition fd)
This method determines if a field is repeating
|
protected void |
processCaseConstraint(ConstraintMetadata constraintMetadata,
CaseConstraint caseConstraint,
String type,
String state,
String nextState,
String workflowNode)
Currently this only handles requiredness indicators for case constraints with the following field paths:
type, state, and proposal/workflowNode
|
void |
setDictionaryServices(List<DictionaryService> dictionaryServices) |
void |
setUiLookupContext(String uiLookupContext) |
protected void |
updateConstraintMetadata(ConstraintMetadata constraintMetadata,
Constraint constraint,
String type,
String state,
String nextState,
String workflowNode)
This updates the constraintMetadata with defintions from the dictionary constraint field.
|
public MetadataServiceImpl()
public MetadataServiceImpl(DictionaryService... dictionaryServices)
dictionaryServices - public void setDictionaryServices(List<DictionaryService> dictionaryServices)
public Metadata getMetadata(String objectKey, String type, String state, String nextState, String documentTypeName)
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)documentTypeName - The type of the document (value can be null)public Metadata getMetadataByWorkflowNode(String objectKey, String workflowNode, String documentTypeName)
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 - state - public Metadata getMetadata(String objectKey)
objectKey - getMetadata(String, String)protected Metadata getMetadataFromDictionaryService(String objectKey, String type, String state, String nextState, String workflowNode, String documentTypeName)
objectKey - type - state - documentTypeName - protected boolean isRepeating(FieldDefinition fd)
fd - protected ObjectStructureDefinition getObjectStructure(String objectKey)
objectKey - protected List<ConstraintMetadata> getConstraints(FieldDefinition fd, String type, String state, String nextState, String workflowNode, String documentTypeName)
protected void updateConstraintMetadata(ConstraintMetadata constraintMetadata, Constraint constraint, String type, String state, String nextState, String workflowNode)
constraintMetadata - constraint - protected void processCaseConstraint(ConstraintMetadata constraintMetadata, CaseConstraint caseConstraint, String type, String state, String nextState, String workflowNode)
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)
Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.