Interface DataDictionaryService


public interface DataDictionaryService
Defines the API for interacting with the data dictionary
Author:
Kuali Rice Team (rice.collab@kuali.org)
  • Method Details

    • 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
    • setDataDictionary

      void setDataDictionary(DataDictionary 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

      @Deprecated Class<? extends org.kuali.rice.core.web.format.Formatter> getAttributeFormatter(Class<?> dataObjectClass, String attributeName)
      Deprecated.
      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 org.kuali.rice.krad.keyvalues.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

      @Deprecated Class<? extends org.kuali.rice.core.web.format.Formatter> getAttributeFormatter(String entryName, String attributeName)
      Deprecated.
      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 org.kuali.rice.krad.keyvalues.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 org.kuali.rice.krad.bo.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 org.kuali.rice.krad.bo.BusinessObject> getRelationshipTargetClass(String entryName, String 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)
      Returns:
      List<String> 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)
      Returns:
      List<String> 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
    • getDictionaryBean

      Object getDictionaryBean(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
    • containsDictionaryBean

      boolean containsDictionaryBean(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
    • getDictionaryBeanProperty

      Object getDictionaryBeanProperty(String beanName, String propertyName)
      Returns a property value for the bean with the given name from the dictionary.
      Parameters:
      beanName - id or name for the bean definition
      propertyName - name of the property to retrieve
      Returns:
      Object property value for property
    • 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
    • getViewIdByTypeIndex

      String getViewIdByTypeIndex(UifConstants.ViewType viewTypeName, Map<String,String> indexKey)
      Returns the view id for the view that matches the given view type 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:
      id for the view that matches the view type and index or null if a match is not found
    • getPropertyEditorMap

      Map<Class<?>,String> getPropertyEditorMap()
      Returns a mapping from property type to property editor prototype name, for use in defining editors for PropertyEditorRegistry.
      Returns:
      Mapping of property editors by property type.