org.kuali.rice.krad.datadictionary
Class DataDictionaryIndexMapper

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.DataDictionaryIndexMapper
All Implemented Interfaces:
DataDictionaryMapper

public class DataDictionaryIndexMapper
extends Object
implements DataDictionaryMapper

A DataDictionaryMapper that simply consults the statically initialized DataDictionaryIndex mappings

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

Constructor Summary
DataDictionaryIndexMapper()
           
 
Method Summary
 Set<InactivationBlockingMetadata> getAllInactivationBlockingMetadatas(DataDictionaryIndex index, Class<?> blockedClass)
           
 List<String> getBusinessObjectClassNames(DataDictionaryIndex index)
           
 Map<String,BusinessObjectEntry> getBusinessObjectEntries(DataDictionaryIndex index)
           
 BusinessObjectEntry getBusinessObjectEntry(DataDictionaryIndex index, String className)
           
 BusinessObjectEntry getBusinessObjectEntryForConcreteClass(DataDictionaryIndex ddIndex, String className)
          This method gets the business object entry for a concrete class
 DataObjectEntry getDataObjectEntry(DataDictionaryIndex index, String className)
           
 DataObjectEntry getDataObjectEntryForConcreteClass(DataDictionaryIndex ddIndex, String className)
          This method gets the DataOjectEntry (or subclass) for a concrete class
 DataDictionaryEntry getDictionaryObjectEntry(DataDictionaryIndex ddIndex, String className)
           
 Map<String,DocumentEntry> getDocumentEntries(DataDictionaryIndex index)
           
 DocumentEntry getDocumentEntry(DataDictionaryIndex index, String documentTypeDDKey)
          Returns the KNS document entry for the given lookup key.
 String getDocumentTypeName(DataDictionaryIndex index, String documentTypeName)
          Returns mapped document type based on the given document type.
 MaintenanceDocumentEntry getMaintenanceDocumentEntryForBusinessObjectClass(DataDictionaryIndex index, Class<?> businessObjectClass)
          Note: only MaintenanceDocuments are indexed by businessObject Class This is a special case that is referenced in one location.
 View getViewById(UifDictionaryIndex index, String viewId)
          Returns the View entry identified by the given id
 View getViewByTypeIndex(UifDictionaryIndex index, UifConstants.ViewType viewTypeName, Map<String,String> indexKey)
          Called to retrieve a View instance that is of the given type based on the index key
 org.springframework.beans.PropertyValues getViewPropertiesById(UifDictionaryIndex index, String viewId)
          Retrieves the configured property values for the view bean definition associated with the given id
 org.springframework.beans.PropertyValues getViewPropertiesByType(UifDictionaryIndex index, UifConstants.ViewType viewTypeName, Map<String,String> indexKey)
          Retrieves the configured property values for the view bean definition associated with the given type and index
 List<View> getViewsForType(UifDictionaryIndex index, UifConstants.ViewType viewTypeName)
          Gets all View prototypes configured for the given view type name
 boolean viewByTypeExist(UifDictionaryIndex index, UifConstants.ViewType viewTypeName, Map<String,String> indexKey)
          Indicates whether a View exists for the given view type and index information
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataDictionaryIndexMapper

public DataDictionaryIndexMapper()
Method Detail

getAllInactivationBlockingMetadatas

public Set<InactivationBlockingMetadata> getAllInactivationBlockingMetadatas(DataDictionaryIndex index,
                                                                             Class<?> blockedClass)
Specified by:
getAllInactivationBlockingMetadatas in interface DataDictionaryMapper
See Also:
DataDictionaryMapper.getAllInactivationBlockingMetadatas(org.kuali.rice.krad.datadictionary.DataDictionaryIndex, java.lang.Class)

getBusinessObjectClassNames

public List<String> getBusinessObjectClassNames(DataDictionaryIndex index)
Specified by:
getBusinessObjectClassNames in interface DataDictionaryMapper
Returns:
List of businessObject classnames
See Also:
DataDictionaryMapper.getBusinessObjectClassNames(org.kuali.rice.krad.datadictionary.DataDictionaryIndex)

getBusinessObjectEntries

public Map<String,BusinessObjectEntry> getBusinessObjectEntries(DataDictionaryIndex index)
Specified by:
getBusinessObjectEntries in interface DataDictionaryMapper
Returns:
Map of (classname, BusinessObjectEntry) pairs
See Also:
DataDictionaryMapper.getBusinessObjectEntries(org.kuali.rice.krad.datadictionary.DataDictionaryIndex)

getDataObjectEntryForConcreteClass

public DataObjectEntry getDataObjectEntryForConcreteClass(DataDictionaryIndex ddIndex,
                                                          String className)
Description copied from interface: DataDictionaryMapper
This method gets the DataOjectEntry (or subclass) for a concrete class

Specified by:
getDataObjectEntryForConcreteClass in interface DataDictionaryMapper
Returns:
the DataObjectEntry for the class or null if not found
See Also:
DataDictionaryMapper.getDataObjectEntryForConcreteClass(org.kuali.rice.krad.datadictionary.DataDictionaryIndex, java.lang.String)

getBusinessObjectEntryForConcreteClass

public BusinessObjectEntry getBusinessObjectEntryForConcreteClass(DataDictionaryIndex ddIndex,
                                                                  String className)
Description copied from interface: DataDictionaryMapper
This method gets the business object entry for a concrete class

Specified by:
getBusinessObjectEntryForConcreteClass in interface DataDictionaryMapper
Returns:
See Also:
org.kuali.rice.krad.datadictionary.DataDictionaryMapper#getBusinessObjectEntryForConcreteClass(java.lang.String)

getDictionaryObjectEntry

public DataDictionaryEntry getDictionaryObjectEntry(DataDictionaryIndex ddIndex,
                                                    String className)
Specified by:
getDictionaryObjectEntry in interface DataDictionaryMapper
Returns:
DataDictionaryEntryBase for the named class, or null if none exists
See Also:
DataDictionaryMapper.getDictionaryObjectEntry(org.kuali.rice.krad.datadictionary.DataDictionaryIndex, java.lang.String)

getDataObjectEntry

public DataObjectEntry getDataObjectEntry(DataDictionaryIndex index,
                                          String className)
Specified by:
getDataObjectEntry in interface DataDictionaryMapper
Returns:
DataObjectEntry for the named class, or null if none exists
See Also:
DataDictionaryMapper.getDataObjectEntry(org.kuali.rice.krad.datadictionary.DataDictionaryIndex, java.lang.String)

getBusinessObjectEntry

public BusinessObjectEntry getBusinessObjectEntry(DataDictionaryIndex index,
                                                  String className)
Specified by:
getBusinessObjectEntry in interface DataDictionaryMapper
Returns:
BusinessObjectEntry for the named class, or null if none exists

getDocumentEntries

public Map<String,DocumentEntry> getDocumentEntries(DataDictionaryIndex index)
Specified by:
getDocumentEntries in interface DataDictionaryMapper
See Also:
DataDictionaryMapper.getDocumentEntries(org.kuali.rice.krad.datadictionary.DataDictionaryIndex)

getDocumentEntry

public DocumentEntry getDocumentEntry(DataDictionaryIndex index,
                                      String documentTypeDDKey)
Description copied from interface: DataDictionaryMapper
Returns the KNS document entry for the given lookup key. The documentTypeDDKey is interpreted successively in the following ways until a mapping is found (or none if found):
  1. KEW/workflow document type
  2. business object class name
  3. maintainable class name
This mapping is compiled when DataDictionary files are parsed on startup (or demand). Currently this means the mapping is static, and one-to-one (one KNS document maps directly to one and only one key).

Specified by:
getDocumentEntry in interface DataDictionaryMapper
documentTypeDDKey - the KEW/workflow document type name
Returns:
the KNS DocumentEntry if it exists
See Also:
DataDictionaryMapper.getDocumentEntry(org.kuali.rice.krad.datadictionary.DataDictionaryIndex, java.lang.String)

getDocumentTypeName

public String getDocumentTypeName(DataDictionaryIndex index,
                                  String documentTypeName)
Description copied from interface: DataDictionaryMapper
Returns mapped document type based on the given document type.

Specified by:
getDocumentTypeName in interface DataDictionaryMapper
Returns:
new document type or null if given documentType was not found.
See Also:
DataDictionaryMapper.getDocumentTypeName(org.kuali.rice.krad.datadictionary.DataDictionaryIndex, java.lang.String)

getMaintenanceDocumentEntryForBusinessObjectClass

public MaintenanceDocumentEntry getMaintenanceDocumentEntryForBusinessObjectClass(DataDictionaryIndex index,
                                                                                  Class<?> businessObjectClass)
Description copied from interface: DataDictionaryMapper
Note: only MaintenanceDocuments are indexed by businessObject Class This is a special case that is referenced in one location. Do we need another map for this stuff??

Specified by:
getMaintenanceDocumentEntryForBusinessObjectClass in interface DataDictionaryMapper
Returns:
DocumentEntry associated with the given Class, or null if there is none
See Also:
DataDictionaryMapper.getMaintenanceDocumentEntryForBusinessObjectClass(org.kuali.rice.krad.datadictionary.DataDictionaryIndex, java.lang.Class)

getViewById

public View getViewById(UifDictionaryIndex index,
                        String viewId)
Description copied from interface: DataDictionaryMapper
Returns the View entry identified by the given id

Specified by:
getViewById in interface DataDictionaryMapper
Parameters:
index - - the view dictionary index
viewId - - unique id for view
Returns:
View instance associated with the id
See Also:
org.kuali.rice.krad.datadictionary.DataDictionaryMapper#getViewById(org.kuali.rice.krad.datadictionary.view.ViewDictionaryIndex, java.lang.String)

getViewByTypeIndex

public View getViewByTypeIndex(UifDictionaryIndex index,
                               UifConstants.ViewType viewTypeName,
                               Map<String,String> indexKey)
Description copied from interface: DataDictionaryMapper
Called to retrieve a View instance that is of the given type based on the index key

Specified by:
getViewByTypeIndex in interface DataDictionaryMapper
Parameters:
index - - the view dictionary index
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
See Also:
org.kuali.rice.krad.datadictionary.DataDictionaryMapper#getViewByTypeIndex(UifDictionaryIndex, java.lang.String, java.util.Map)

viewByTypeExist

public boolean viewByTypeExist(UifDictionaryIndex index,
                               UifConstants.ViewType viewTypeName,
                               Map<String,String> indexKey)
Description copied from interface: DataDictionaryMapper
Indicates whether a View exists for the given view type and index information

Specified by:
viewByTypeExist in interface DataDictionaryMapper
Parameters:
index - - the view dictionary index
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:
boolean true if view exists, false if not
See Also:
org.kuali.rice.krad.datadictionary.DataDictionaryIndexMapper#viewByTypeExist(UifDictionaryIndex, java.lang.String, java.util.Map)

getViewPropertiesById

public org.springframework.beans.PropertyValues getViewPropertiesById(UifDictionaryIndex index,
                                                                      String viewId)
Description copied from interface: DataDictionaryMapper
Retrieves the configured property values for the view bean definition associated with the given id

Since constructing the View object can be expensive, when metadata only is needed this method can be used to retrieve the configured property values. Note this looks at the merged bean definition

Specified by:
getViewPropertiesById in interface DataDictionaryMapper
Parameters:
index - - the view dictionary index
viewId - - id for the view to retrieve
Returns:
PropertyValues configured on the view bean definition, or null if view is not found
See Also:
org.kuali.rice.krad.datadictionary.DataDictionaryMapper#getViewPropertiesById(org.kuali.rice.krad.datadictionary.view.ViewDictionaryIndex, java.lang.String)

getViewPropertiesByType

public org.springframework.beans.PropertyValues getViewPropertiesByType(UifDictionaryIndex index,
                                                                        UifConstants.ViewType viewTypeName,
                                                                        Map<String,String> indexKey)
Description copied from interface: DataDictionaryMapper
Retrieves the configured property values for the view bean definition associated with the given type and index

Since constructing the View object can be expensive, when metadata only is needed this method can be used to retrieve the configured property values. Note this looks at the merged bean definition

Specified by:
getViewPropertiesByType in interface DataDictionaryMapper
Parameters:
index - - the view dictionary index
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:
PropertyValues configured on the view bean definition, or null if view is not found
See Also:
org.kuali.rice.krad.datadictionary.DataDictionaryIndexMapper#getViewPropertiesByType(UifDictionaryIndex, java.lang.String, java.util.Map)

getViewsForType

public List<View> getViewsForType(UifDictionaryIndex index,
                                  UifConstants.ViewType viewTypeName)
Description copied from interface: DataDictionaryMapper
Gets all View prototypes configured for the given view type name

Specified by:
getViewsForType in interface DataDictionaryMapper
Parameters:
index - - the view dictionary index
viewTypeName - - view type name to retrieve
Returns:
List view prototypes with the given type name, or empty list
See Also:
org.kuali.rice.krad.datadictionary.DataDictionaryMapper#getViewsForType(UifDictionaryIndex, java.lang.String)


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