Package org.kuali.rice.krad.service
Interface DataDictionaryService
public interface DataDictionaryService
Defines the API for interacting with the data dictionary
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddDataDictionaryLocations(String namespaceCode, List<String> locations) Sequentially adds each package named (as a String) in the given List as a source of unique entries to the DataDictionary being constructedbooleanIndicates whether the data dictionary contains a bean with the given idgetAllInactivationBlockingDefinitions(Class<?> inactivationBlockedBusinessObjectClass) Returns all of the inactivation blocks registered for a particular business objectgetAttributeControlDefinition(Class<?> dataObjectClass, String attributeName) the html control type used to render the fieldgetAttributeControlDefinition(String entryName, String attributeName) the html control type used to render the fieldgetAttributeDefinition(String entryName, String attributeName) AttributeDefinition associated with the given attributeName within the given entrygetAttributeDescription(Class<?> dataObjectClass, String attributeName) detailed help text for attributegetAttributeDescription(String entryName, String attributeName) detailed help text for attributegetAttributeErrorLabel(Class<?> dataObjectClass, String attributeName) the "label (short label)" used for displaying error messagesgetAttributeErrorLabel(String entryName, String attributeName) the "label (short label)" used for displaying error messagesgetAttributeExclusiveMin(String entryName, String attributeName) getAttributeForceUppercase(Class<?> dataObjectClass, String attributeName) indicates whether or not to force input text into uppercasegetAttributeForceUppercase(String entryName, String attributeName) indicates whether or not to force input text into uppercasegetAttributeFormatter(Class<?> dataObjectClass, String attributeName) Deprecated.getAttributeFormatter(String entryName, String attributeName) Deprecated.getAttributeInclusiveMax(String entryName, String attributeName) getAttributeLabel(Class<?> dataObjectClass, String attributeName) the label to be used for displaying the attribute.getAttributeLabel(String entryName, String attributeName) the label to be used for displaying the attribute.getAttributeMaxLength(Class<?> dataObjectClass, String attributeName) the max length defined for the given attribute name.getAttributeMaxLength(String entryName, String attributeName) the max length defined for the given attribute name.getAttributeMinLength(String entryName, String attributeName) the min length defined for the given attribute name.getAttributeSecurity(String entryName, String attributeName) the AttributeSecurity object defined for the attribute's data valuegetAttributeShortLabel(Class<?> dataObjectClass, String attributeName) the short label to be used for displaying the attribute.getAttributeShortLabel(String entryName, String attributeName) the short label to be used for displaying the attribute.getAttributeSize(Class<?> dataObjectClass, String attributeName) the display size of the field if text controlgetAttributeSize(String entryName, String attributeName) the display size of the field if text controlgetAttributeSummary(Class<?> dataObjectClass, String attributeName) short help text for attributegetAttributeSummary(String entryName, String attributeName) short help text for attributegetAttributeValidatingErrorMessageKey(String entryName, String attributeName) String[]getAttributeValidatingErrorMessageParameters(String entryName, String attributeName) getAttributeValidatingExpression(Class<?> dataObjectClass, String attributeName) the regular expression defined to validate the given attribute name.getAttributeValidatingExpression(String entryName, String attributeName) the regular expression defined to validate the given attribute name.Class<? extends KeyValuesFinder> getAttributeValuesFinderClass(Class<?> dataObjectClass, String attributeName) the Class that returns a values list for this attributeClass<? extends KeyValuesFinder> getAttributeValuesFinderClass(String entryName, String attributeName) the Class that returns a values list for this attributegetCollectionDescription(Class<?> dataObjectClass, String collectionName) detailed help text for collectiongetCollectionDescription(String entryName, String collectionName) detailed help text for collectiongetCollectionElementLabel(String entryName, String collectionName, Class<?> dataObjectClass) the element label to be used for displaying the collection.getCollectionLabel(Class<?> dataObjectClass, String collectionName) the label to be used for displaying the collection.getCollectionLabel(String entryName, String collectionName) the label to be used for displaying the collection.getCollectionShortLabel(Class<?> dataObjectClass, String collectionName) the short label to be used for displaying the collection.getCollectionShortLabel(String entryName, String collectionName) the short label to be used for displaying the collection.getCollectionSummary(Class<?> dataObjectClass, String collectionName) short help text for collectiongetCollectionSummary(String entryName, String collectionName) short help text for collectionReturns an object from the dictionary by its spring bean name or idgetDictionaryBeanProperty(String beanName, String propertyName) Returns a property value for the bean with the given name from the dictionary.getDocumentClassByTypeName(String documentTypeName) Returns the document class declared in the dd for the given document type name.getDocumentLabelByClass(Class<?> documentOrBusinessObjectClass) This method returns the user friendly label based on the document or business object classgetDocumentLabelByTypeName(String documentTypeName) This method returns the user friendly label based on the workflow doc type namegetDocumentTypeNameByClass(Class<?> documentClass) Returns the document type name declared in the dd for the given document class.getGroupByAttributesForEffectiveDating(Class<?> businessObjectClass) Returns the list of attributes that should be used for grouping when determining the current status of a business object that implements InactivateableFromToReturns a mapping from property type to property editor prototype name, for use in defining editors forPropertyEditorRegistry.getRelationshipAttributeMap(String entryName, String relationshipName) returns a Map that specifies the attributes of the relationshipgetRelationshipEntriesForSourceAttribute(String entryName, String sourceAttributeName) returns a list of names for all entries whose source parameter matches the parametergetRelationshipEntriesForTargetAttribute(String entryName, String targetAttributeName) returns a list of names for all entries whose source parameter matches the parametergetRelationshipNames(String entryName) Returns all of the relationships defined for a BO in the DDgetRelationshipSourceAttributes(String entryName, String relationshipName) Class<? extends BusinessObject> getRelationshipSourceClass(String entryName, String relationshipName) getRelationshipTargetAttributes(String entryName, String relationshipName) Class<? extends BusinessObject> getRelationshipTargetClass(String entryName, String relationshipName) getValidDocumentClassByTypeName(String documentTypeName) Returns the document class declared in the dd for the given document type name.getValidDocumentTypeNameByClass(Class<?> documentClass) Returns the document type name declared in the dd for the given document class.getViewById(String viewId) Returns the View entry identified by the given idgetViewByTypeIndex(UifConstants.ViewType viewTypeName, Map<String, String> indexKey) Returns View instance identified by the view type name and indexgetViewIdByTypeIndex(UifConstants.ViewType viewTypeName, Map<String, String> indexKey) Returns the view id for the view that matches the given view type and indexbooleanhasRelationship(String entryName, String relationshipName) Determines whether there is a relationship defined for the given entry with the given nameisAttributeDefined(Class<?> dataObjectClass, String attributeName) indicates whether or not the named attribute is defined in the business object xmlisAttributeDefined(String entryName, String attributeName) indicates whether or not the named attribute is defined in the business object xmlisAttributeRequired(Class<?> dataObjectClass, String attributeName) indicates whether or not the named attribute is requiredisAttributeRequired(String entryName, String attributeName) indicates whether or not the named attribute is requiredvoidsetAdditionalDictionaryFiles(Map<String, List<String>> additionalDictionaryFiles) Adds additional dictionary files to the data dictionary (files that will not be loaded through one of the module configurations)voidsetDataDictionary(DataDictionary dataDictionary)
-
Method Details
-
setAdditionalDictionaryFiles
void setAdditionalDictionaryFiles(Map<String, List<String>> additionalDictionaryFiles) throws IOExceptionAdds additional dictionary files to the data dictionary (files that will not be loaded through one of the module configurations)Additional files must be associated with a namespace thus a map is specified with the key giving the namespace the list of files should be associated with
Duplicate entries among any of the XML files in any of these packages will result in exceptions being thrown, hence service-initialization failure
- Parameters:
additionalDictionaryFiles- map where key is namespace and value is list of dictionary files that should be added to that namespace- Throws:
IOException- if any of the given packages can't be located
-
addDataDictionaryLocations
Sequentially adds each package named (as a String) in the given List as a source of unique entries to the DataDictionary being constructedDuplicate entries among any of the XML files in any of these packages will result in exceptions being thrown, hence service-initialization failure
- Parameters:
namespaceCode- - namespace the beans loaded from the location should be associated withlocations- - list of locations to add (either classpath entries or file/folder locations)- Throws:
IOException- if any of the given packages can't be located
-
getDataDictionary
DataDictionary getDataDictionary()- Returns:
- current DataDictionary
-
setDataDictionary
-
getAttributeControlDefinition
the html control type used to render the field -
getAttributeSize
the display size of the field if text control -
getAttributeMaxLength
the max length defined for the given attribute name. -
getAttributeValidatingExpression
the regular expression defined to validate the given attribute name. -
getAttributeLabel
the label to be used for displaying the attribute. -
getAttributeShortLabel
the short label to be used for displaying the attribute. -
getAttributeErrorLabel
the "label (short label)" used for displaying error messages -
getAttributeFormatter
@Deprecated Class<? extends Formatter> getAttributeFormatter(Class<?> dataObjectClass, String attributeName) Deprecated.the formatter class used to format the attribute value -
getAttributeForceUppercase
indicates whether or not to force input text into uppercase -
getAttributeSummary
short help text for attribute -
getAttributeDescription
detailed help text for attribute -
isAttributeRequired
indicates whether or not the named attribute is required -
isAttributeDefined
indicates whether or not the named attribute is defined in the business object xml -
getAttributeValuesFinderClass
Class<? extends KeyValuesFinder> getAttributeValuesFinderClass(Class<?> dataObjectClass, String attributeName) the Class that returns a values list for this attribute -
getCollectionLabel
the label to be used for displaying the collection. -
getCollectionShortLabel
the short label to be used for displaying the collection. -
getCollectionSummary
short help text for collection -
getCollectionDescription
detailed help text for collection -
getAttributeControlDefinition
the html control type used to render the field -
getAttributeSize
the display size of the field if text control -
getAttributeMinLength
the min length defined for the given attribute name. -
getAttributeMaxLength
the max length defined for the given attribute name. -
getAttributeExclusiveMin
- Parameters:
entryName-attributeName-- Returns:
- the exclusive minimum for the specified attribute, or
nullif none.
-
getAttributeInclusiveMax
- Parameters:
entryName-attributeName-- Returns:
- the inclusive maximum for the specified attribute, or
nullif none.
-
getAttributeValidatingExpression
the regular expression defined to validate the given attribute name. -
getAttributeLabel
the label to be used for displaying the attribute. -
getAttributeShortLabel
the short label to be used for displaying the attribute. -
getAttributeErrorLabel
the "label (short label)" used for displaying error messages -
getAttributeFormatter
@Deprecated Class<? extends Formatter> getAttributeFormatter(String entryName, String attributeName) Deprecated.the formatter class used to format the attribute value -
getAttributeForceUppercase
indicates whether or not to force input text into uppercase -
getAttributeSecurity
the AttributeSecurity object defined for the attribute's data value -
getAttributeSummary
short help text for attribute -
getAttributeDescription
detailed help text for attribute -
getAttributeValidatingErrorMessageKey
-
getAttributeValidatingErrorMessageParameters
-
isAttributeRequired
indicates whether or not the named attribute is required -
isAttributeDefined
indicates whether or not the named attribute is defined in the business object xml -
getAttributeValuesFinderClass
Class<? extends KeyValuesFinder> getAttributeValuesFinderClass(String entryName, String attributeName) the Class that returns a values list for this attribute -
getAttributeDefinition
AttributeDefinition associated with the given attributeName within the given entry -
getCollectionLabel
the label to be used for displaying the collection. -
getCollectionShortLabel
the short label to be used for displaying the collection. -
getCollectionElementLabel
the element label to be used for displaying the collection. -
getCollectionSummary
short help text for collection -
getCollectionDescription
detailed help text for collection -
getRelationshipSourceClass
Class<? extends BusinessObject> getRelationshipSourceClass(String entryName, String relationshipName) - Returns:
- source Class for the given relationship, or null if there is no relationship with that name
-
getRelationshipTargetClass
Class<? extends BusinessObject> getRelationshipTargetClass(String entryName, String relationshipName) - Returns:
- target Class for the given relationship, or null if there is no relationship with that name
-
getRelationshipSourceAttributes
- Returns:
- List<String> of source attributeNames for the given relationship, or null if there is no relationship with that name
-
getRelationshipTargetAttributes
- Returns:
- List<String> of target attributeNames for the given relationship, or null if there is no relationship with that name
-
getRelationshipAttributeMap
returns a Map that specifies the attributes of the relationship- Parameters:
entryName- - Name of the Business Object entryrelationshipName- - Name of the relationship- Returns:
- Map - Target field as key, source field as value
-
getRelationshipEntriesForSourceAttribute
returns a list of names for all entries whose source parameter matches the parameter- Parameters:
entryName- Name of the Business Object entrysourceAttributeName- name of the source attribute- Returns:
- the names of all entries that use the sourceAttributeName as a primitive attribute
-
getRelationshipEntriesForTargetAttribute
returns a list of names for all entries whose source parameter matches the parameter- Parameters:
entryName- Name of the Business Object entrytargetAttributeName- name of the target attribute- Returns:
- the names of all entries that use the targetAttributeName as a primitive attribute
-
hasRelationship
Determines whether there is a relationship defined for the given entry with the given name- Parameters:
entryName- name of the BO entryrelationshipName- name of the relationship for the entry- Returns:
- true iff there is a relationship with the given name defined for the BO entry in the DD
-
getRelationshipNames
Returns all of the relationships defined for a BO in the DD- Parameters:
entryName- of the BO entry- Returns:
- a list of all DD defined mappings
-
getDocumentLabelByTypeName
This method returns the user friendly label based on the workflow doc type name- Parameters:
documentTypeName-- Returns:
- label
-
getDocumentLabelByClass
This method returns the user friendly label based on the document or business object class- Parameters:
documentOrBusinessObjectClass-- Returns:
- label
-
getDocumentTypeNameByClass
Returns the document type name declared in the dd for the given document class. If no valid document type is found 'null' is returned.- Parameters:
documentClass-- Returns:
- documentTypeName
-
getValidDocumentTypeNameByClass
Returns the document type name declared in the dd for the given document class. If no valid document type is found anUnknownDocumentTypeExceptionis thrown.- Parameters:
documentClass-- Returns:
- documentTypeName
-
getDocumentClassByTypeName
Returns the document class declared in the dd for the given document type name. If no document entry is found with given document type name, 'null' will be returned.- Parameters:
documentTypeName-- Returns:
- document Class
-
getValidDocumentClassByTypeName
Returns the document class declared in the dd for the given document type name. If no document entry is found with given document type name, andUnknownDocumentTypeExceptionwill be thrown.- Parameters:
documentTypeName-- Returns:
- document Class
-
getGroupByAttributesForEffectiveDating
Returns the list of attributes that should be used for grouping when determining the current status of a business object that implements InactivateableFromTo- Parameters:
businessObjectClass- - business object class to get configured list for- Returns:
- List of string attribute names that gives the group by list
-
getAllInactivationBlockingDefinitions
Set<InactivationBlockingMetadata> getAllInactivationBlockingDefinitions(Class<?> inactivationBlockedBusinessObjectClass) Returns all of the inactivation blocks registered for a particular business object- Parameters:
inactivationBlockedBusinessObjectClass-- Returns:
- a set of all registered inactivation blocks for a particular business object
-
getViewById
Returns the View entry identified by the given id- Parameters:
viewId- - unique id for view- Returns:
- View instance associated with the id
-
getDictionaryBean
Returns an object from the dictionary by its spring bean name or id- Parameters:
id- id or name for the bean definition- Returns:
- Object object instance created or the singleton being maintained
-
containsDictionaryBean
Indicates whether the data dictionary contains a bean with the given id- Parameters:
id- id of the bean to check for- Returns:
- boolean true if dictionary contains bean, false otherwise
-
getDictionaryBeanProperty
Returns a property value for the bean with the given name from the dictionary.- Parameters:
beanName- id or name for the bean definitionpropertyName- name of the property to retrieve- Returns:
- Object property value for property
-
getViewByTypeIndex
Returns View instance identified by the view type name and index- Parameters:
viewTypeName- - type name for the viewindexKey- - Map of index key parameters, these are the parameters the indexer used to index the view initially and needs to identify an unique view instance- Returns:
- View instance that matches the given index
-
getViewIdByTypeIndex
Returns the view id for the view that matches the given view type and index- Parameters:
viewTypeName- type name for the viewindexKey- Map of index key parameters, these are the parameters the indexer used to index the view initially and needs to identify an unique view instance- Returns:
- id for the view that matches the view type and index or null if a match is not found
-
getPropertyEditorMap
Returns a mapping from property type to property editor prototype name, for use in defining editors forPropertyEditorRegistry.- Returns:
- Mapping of property editors by property type.
-