org.kuali.rice.krad.service
Interface DataDictionaryService

All Known Subinterfaces:
DataDictionaryService
All Known Implementing Classes:
DataDictionaryServiceImpl, DataDictionaryServiceImpl

public interface DataDictionaryService

Defines the API for interacting with the data dictionary

Author:
Kuali Rice Team (rice.collab@kuali.org)

Method Summary
 void addDataDictionaryLocations(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 constructed
 boolean containsDictionaryObject(String id)
          Indicates whether the data dictionary contains a bean with the given id
 Set<InactivationBlockingMetadata> getAllInactivationBlockingDefinitions(Class inactivationBlockedBusinessObjectClass)
          Returns all of the inactivation blocks registered for a particular business object
 ControlDefinition getAttributeControlDefinition(Class dataObjectClass, String attributeName)
          the html control type used to render the field
 ControlDefinition getAttributeControlDefinition(String entryName, String attributeName)
          the html control type used to render the field
 AttributeDefinition getAttributeDefinition(String entryName, String attributeName)
          AttributeDefinition associated with the given attributeName within the given entry
 String getAttributeDescription(Class dataObjectClass, String attributeName)
          detailed help text for attribute
 String getAttributeDescription(String entryName, String attributeName)
          detailed help text for attribute
 String getAttributeErrorLabel(Class dataObjectClass, String attributeName)
          the "label (short label)" used for displaying error messages
 String getAttributeErrorLabel(String entryName, String attributeName)
          the "label (short label)" used for displaying error messages
 String getAttributeExclusiveMin(String entryName, String attributeName)
           
 Boolean getAttributeForceUppercase(Class dataObjectClass, String attributeName)
          indicates whether or not to force input text into uppercase
 Boolean getAttributeForceUppercase(String entryName, String attributeName)
          indicates whether or not to force input text into uppercase
 Class<? extends Formatter> getAttributeFormatter(Class dataObjectClass, String attributeName)
          the formatter class used to format the attribute value
 Class<? extends Formatter> getAttributeFormatter(String entryName, String attributeName)
          the formatter class used to format the attribute value
 String getAttributeInclusiveMax(String entryName, String attributeName)
           
 String getAttributeLabel(Class dataObjectClass, String attributeName)
          the label to be used for displaying the attribute.
 String getAttributeLabel(String entryName, String attributeName)
          the label to be used for displaying the attribute.
 Integer getAttributeMaxLength(Class dataObjectClass, String attributeName)
          the max length defined for the given attribute name.
 Integer getAttributeMaxLength(String entryName, String attributeName)
          the max length defined for the given attribute name.
 Integer getAttributeMinLength(String entryName, String attributeName)
          the min length defined for the given attribute name.
 AttributeSecurity getAttributeSecurity(String entryName, String attributeName)
          the AttributeSecurity object defined for the attribute's data value
 String getAttributeShortLabel(Class dataObjectClass, String attributeName)
          the short label to be used for displaying the attribute.
 String getAttributeShortLabel(String entryName, String attributeName)
          the short label to be used for displaying the attribute.
 Integer getAttributeSize(Class dataObjectClass, String attributeName)
          the display size of the field if text control
 Integer getAttributeSize(String entryName, String attributeName)
          the display size of the field if text control
 String getAttributeSummary(Class dataObjectClass, String attributeName)
          short help text for attribute
 String getAttributeSummary(String entryName, String attributeName)
          short help text for attribute
 String getAttributeValidatingErrorMessageKey(String entryName, String attributeName)
           
 String[] getAttributeValidatingErrorMessageParameters(String entryName, String attributeName)
           
 Pattern getAttributeValidatingExpression(Class dataObjectClass, String attributeName)
          the regular expression defined to validate the given attribute name.
 Pattern 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 attribute
 Class<? extends KeyValuesFinder> getAttributeValuesFinderClass(String entryName, String attributeName)
          the Class that returns a values list for this attribute
 String getCollectionDescription(Class dataObjectClass, String collectionName)
          detailed help text for collection
 String getCollectionDescription(String entryName, String collectionName)
          detailed help text for collection
 String getCollectionElementLabel(String entryName, String collectionName, Class dataObjectClass)
          the element label to be used for displaying the collection.
 String getCollectionLabel(Class dataObjectClass, String collectionName)
          the label to be used for displaying the collection.
 String getCollectionLabel(String entryName, String collectionName)
          the label to be used for displaying the collection.
 String getCollectionShortLabel(Class dataObjectClass, String collectionName)
          the short label to be used for displaying the collection.
 String getCollectionShortLabel(String entryName, String collectionName)
          the short label to be used for displaying the collection.
 String getCollectionSummary(Class dataObjectClass, String collectionName)
          short help text for collection
 String getCollectionSummary(String entryName, String collectionName)
          short help text for collection
 DataDictionary getDataDictionary()
           
 Object getDictionaryObject(String id)
          Returns an object from the dictionary by its spring bean name or id
 Class<? extends Document> getDocumentClassByTypeName(String documentTypeName)
          Returns the document class declared in the dd for the given document type name.
 String getDocumentLabelByClass(Class documentOrBusinessObjectClass)
          This method returns the user friendly label based on the document or business object class
 String getDocumentLabelByTypeName(String documentTypeName)
          This method returns the user friendly label based on the workflow doc type name
 String getDocumentTypeNameByClass(Class documentClass)
          Returns the document type name declared in the dd for the given document class.
 List<String> 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 InactivateableFromTo
 Map<String,String> getRelationshipAttributeMap(String entryName, String relationshipName)
          returns a Map that specifies the attributes of the relationship
 List<String> getRelationshipEntriesForSourceAttribute(String entryName, String sourceAttributeName)
          returns a list of names for all entries whose source parameter matches the parameter
 List<String> getRelationshipEntriesForTargetAttribute(String entryName, String targetAttributeName)
          returns a list of names for all entries whose source parameter matches the parameter
 List<String> getRelationshipNames(String entryName)
          Returns all of the relationships defined for a BO in the DD
 List<String> getRelationshipSourceAttributes(String entryName, String relationshipName)
           
 Class<? extends BusinessObject> getRelationshipSourceClass(String entryName, String relationshipName)
           
 List<String> getRelationshipTargetAttributes(String entryName, String relationshipName)
           
 Class<? extends BusinessObject> getRelationshipTargetClass(String entryName, String relationshipName)
           
 Class<? extends Document> getValidDocumentClassByTypeName(String documentTypeName)
          Returns the document class declared in the dd for the given document type name.
 String getValidDocumentTypeNameByClass(Class documentClass)
          Returns the document type name declared in the dd for the given document class.
 View getViewById(String viewId)
          Returns the View entry identified by the given id
 View getViewByTypeIndex(UifConstants.ViewType viewTypeName, Map<String,String> indexKey)
          Returns View instance identified by the view type name and index
 boolean hasRelationship(String entryName, String relationshipName)
          Determines whether there is a relationship defined for the given entry with the given name
 Boolean isAttributeDefined(Class dataObjectClass, String attributeName)
          indicates whether or not the named attribute is defined in the business object xml
 Boolean isAttributeDefined(String entryName, String attributeName)
          indicates whether or not the named attribute is defined in the business object xml
 Boolean isAttributeRequired(Class dataObjectClass, String attributeName)
          indicates whether or not the named attribute is required
 Boolean isAttributeRequired(String entryName, String attributeName)
          indicates whether or not the named attribute is required
 void setAdditionalDictionaryFiles(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)
 

Method Detail

setAdditionalDictionaryFiles

void setAdditionalDictionaryFiles(Map<String,List<String>> additionalDictionaryFiles)
                                  throws IOException
Adds 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

void addDataDictionaryLocations(String namespaceCode,
                                List<String> locations)
                                throws IOException
Sequentially adds each package named (as a String) in the given List as a source of unique entries to the DataDictionary being constructed

Duplicate 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 with
locations - - 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

getAttributeControlDefinition

ControlDefinition getAttributeControlDefinition(Class dataObjectClass,
                                                String attributeName)
the html control type used to render the field


getAttributeSize

Integer getAttributeSize(Class dataObjectClass,
                         String attributeName)
the display size of the field if text control


getAttributeMaxLength

Integer getAttributeMaxLength(Class dataObjectClass,
                              String attributeName)
the max length defined for the given attribute name.


getAttributeValidatingExpression

Pattern getAttributeValidatingExpression(Class dataObjectClass,
                                         String attributeName)
the regular expression defined to validate the given attribute name.


getAttributeLabel

String getAttributeLabel(Class dataObjectClass,
                         String attributeName)
the label to be used for displaying the attribute.


getAttributeShortLabel

String getAttributeShortLabel(Class dataObjectClass,
                              String attributeName)
the short label to be used for displaying the attribute.


getAttributeErrorLabel

String getAttributeErrorLabel(Class dataObjectClass,
                              String attributeName)
the "label (short label)" used for displaying error messages


getAttributeFormatter

Class<? extends Formatter> getAttributeFormatter(Class dataObjectClass,
                                                 String attributeName)
the formatter class used to format the attribute value


getAttributeForceUppercase

Boolean getAttributeForceUppercase(Class dataObjectClass,
                                   String attributeName)
indicates whether or not to force input text into uppercase


getAttributeSummary

String getAttributeSummary(Class dataObjectClass,
                           String attributeName)
short help text for attribute


getAttributeDescription

String getAttributeDescription(Class dataObjectClass,
                               String attributeName)
detailed help text for attribute


isAttributeRequired

Boolean isAttributeRequired(Class dataObjectClass,
                            String attributeName)
indicates whether or not the named attribute is required


isAttributeDefined

Boolean isAttributeDefined(Class dataObjectClass,
                           String attributeName)
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

String getCollectionLabel(Class dataObjectClass,
                          String collectionName)
the label to be used for displaying the collection.


getCollectionShortLabel

String getCollectionShortLabel(Class dataObjectClass,
                               String collectionName)
the short label to be used for displaying the collection.


getCollectionSummary

String getCollectionSummary(Class dataObjectClass,
                            String collectionName)
short help text for collection


getCollectionDescription

String getCollectionDescription(Class dataObjectClass,
                                String collectionName)
detailed help text for collection


getAttributeControlDefinition

ControlDefinition getAttributeControlDefinition(String entryName,
                                                String attributeName)
the html control type used to render the field


getAttributeSize

Integer getAttributeSize(String entryName,
                         String attributeName)
the display size of the field if text control


getAttributeMinLength

Integer getAttributeMinLength(String entryName,
                              String attributeName)
the min length defined for the given attribute name.


getAttributeMaxLength

Integer getAttributeMaxLength(String entryName,
                              String attributeName)
the max length defined for the given attribute name.


getAttributeExclusiveMin

String getAttributeExclusiveMin(String entryName,
                                String attributeName)
Parameters:
entryName -
attributeName -
Returns:
the exclusive minimum for the specified attribute, or null if none.

getAttributeInclusiveMax

String getAttributeInclusiveMax(String entryName,
                                String attributeName)
Parameters:
entryName -
attributeName -
Returns:
the inclusive maximum for the specified attribute, or null if none.

getAttributeValidatingExpression

Pattern getAttributeValidatingExpression(String entryName,
                                         String attributeName)
the regular expression defined to validate the given attribute name.


getAttributeLabel

String getAttributeLabel(String entryName,
                         String attributeName)
the label to be used for displaying the attribute.


getAttributeShortLabel

String getAttributeShortLabel(String entryName,
                              String attributeName)
the short label to be used for displaying the attribute.


getAttributeErrorLabel

String getAttributeErrorLabel(String entryName,
                              String attributeName)
the "label (short label)" used for displaying error messages


getAttributeFormatter

Class<? extends Formatter> getAttributeFormatter(String entryName,
                                                 String attributeName)
the formatter class used to format the attribute value


getAttributeForceUppercase

Boolean getAttributeForceUppercase(String entryName,
                                   String attributeName)
indicates whether or not to force input text into uppercase


getAttributeSecurity

AttributeSecurity getAttributeSecurity(String entryName,
                                       String attributeName)
the AttributeSecurity object defined for the attribute's data value


getAttributeSummary

String getAttributeSummary(String entryName,
                           String attributeName)
short help text for attribute


getAttributeDescription

String getAttributeDescription(String entryName,
                               String attributeName)
detailed help text for attribute


getAttributeValidatingErrorMessageKey

String getAttributeValidatingErrorMessageKey(String entryName,
                                             String attributeName)

getAttributeValidatingErrorMessageParameters

String[] getAttributeValidatingErrorMessageParameters(String entryName,
                                                      String attributeName)

isAttributeRequired

Boolean isAttributeRequired(String entryName,
                            String attributeName)
indicates whether or not the named attribute is required


isAttributeDefined

Boolean isAttributeDefined(String entryName,
                           String attributeName)
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 getAttributeDefinition(String entryName,
                                           String attributeName)
AttributeDefinition associated with the given attributeName within the given entry


getCollectionLabel

String getCollectionLabel(String entryName,
                          String collectionName)
the label to be used for displaying the collection.


getCollectionShortLabel

String getCollectionShortLabel(String entryName,
                               String collectionName)
the short label to be used for displaying the collection.


getCollectionElementLabel

String getCollectionElementLabel(String entryName,
                                 String collectionName,
                                 Class dataObjectClass)
the element label to be used for displaying the collection.


getCollectionSummary

String getCollectionSummary(String entryName,
                            String collectionName)
short help text for collection


getCollectionDescription

String getCollectionDescription(String entryName,
                                String collectionName)
detailed help text for collection


getRelationshipSourceClass

Class<? extends BusinessObject> getRelationshipSourceClass(String entryName,
                                                           String relationshipName)
Parameters:
entryName -
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)
Parameters:
entryName -
relationshipName -
Returns:
target Class for the given relationship, or null if there is no relationship with that name

getRelationshipSourceAttributes

List<String> getRelationshipSourceAttributes(String entryName,
                                             String relationshipName)
Parameters:
entryName -
relationshipName -
Returns:
List of source attributeNames for the given relationship, or null if there is no relationship with that name

getRelationshipTargetAttributes

List<String> getRelationshipTargetAttributes(String entryName,
                                             String relationshipName)
Parameters:
entryName -
relationshipName -
Returns:
List of target attributeNames for the given relationship, or null if there is no relationship with that name

getRelationshipAttributeMap

Map<String,String> getRelationshipAttributeMap(String entryName,
                                               String relationshipName)
returns a Map that specifies the attributes of the relationship

Parameters:
entryName - - Name of the Business Object entry
relationshipName - - Name of the relationship
Returns:
Map - Target field as key, source field as value

getRelationshipEntriesForSourceAttribute

List<String> getRelationshipEntriesForSourceAttribute(String entryName,
                                                      String sourceAttributeName)
returns a list of names for all entries whose source parameter matches the parameter

Parameters:
entryName - Name of the Business Object entry
sourceAttributeName - name of the source attribute
Returns:
the names of all entries that use the sourceAttributeName as a primitive attribute

getRelationshipEntriesForTargetAttribute

List<String> getRelationshipEntriesForTargetAttribute(String entryName,
                                                      String targetAttributeName)
returns a list of names for all entries whose source parameter matches the parameter

Parameters:
entryName - Name of the Business Object entry
targetAttributeName - name of the target attribute
Returns:
the names of all entries that use the targetAttributeName as a primitive attribute

hasRelationship

boolean hasRelationship(String entryName,
                        String relationshipName)
Determines whether there is a relationship defined for the given entry with the given name

Parameters:
entryName - name of the BO entry
relationshipName - 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

List<String> getRelationshipNames(String entryName)
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

String getDocumentLabelByTypeName(String documentTypeName)
This method returns the user friendly label based on the workflow doc type name

Parameters:
documentTypeName -
Returns:
label

getDocumentLabelByClass

String getDocumentLabelByClass(Class documentOrBusinessObjectClass)
This method returns the user friendly label based on the document or business object class

Parameters:
documentOrBusinessObjectClass -
Returns:
label

getDocumentTypeNameByClass

String getDocumentTypeNameByClass(Class documentClass)
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

String getValidDocumentTypeNameByClass(Class documentClass)
Returns the document type name declared in the dd for the given document class. If no valid document type is found an UnknownDocumentTypeException is thrown.

Parameters:
documentClass -
Returns:
documentTypeName

getDocumentClassByTypeName

Class<? extends Document> getDocumentClassByTypeName(String documentTypeName)
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

Class<? extends Document> getValidDocumentClassByTypeName(String documentTypeName)
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, and UnknownDocumentTypeException will be thrown.

Parameters:
documentTypeName -
Returns:
document Class

getGroupByAttributesForEffectiveDating

List<String> 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 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

View getViewById(String viewId)
Returns the View entry identified by the given id

Parameters:
viewId - - unique id for view
Returns:
View instance associated with the id

getDictionaryObject

Object getDictionaryObject(String id)
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

containsDictionaryObject

boolean containsDictionaryObject(String id)
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

getViewByTypeIndex

View getViewByTypeIndex(UifConstants.ViewType viewTypeName,
                        Map<String,String> indexKey)
Returns View instance identified by the view type name and index

Parameters:
viewTypeName - - type name for the view
indexKey - - 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


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.