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
 Map<String,DataObjectEntry> getDataObjectEntries(DataDictionaryIndex index)
           
 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.
 View getImmutableViewById(UifDictionaryIndex index, String viewId)
          Gets a view instance from the pool or factory but does not replace the view, meant for view readonly access (not running the lifecycle but just checking configuration)
 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
 String getViewIdByTypeIndex(UifDictionaryIndex index, UifConstants.ViewType viewTypeName, Map<String,String> indexKey)
          Returns the view id for the view that matches the given view type and index
 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)

getDataObjectEntries

public Map<String,DataObjectEntry> getDataObjectEntries(DataDictionaryIndex index)
Specified by:
getDataObjectEntries in interface DataDictionaryMapper
Returns:
Map of (classname, DataObjectEntry) 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)
This method gets the business object entry for a concrete class

Specified by:
getBusinessObjectEntryForConcreteClass in interface DataDictionaryMapper
Returns:
business object entry

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

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
Parameters:
index - data dictionary index
documentTypeName - document type name to check for
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:
DataDictionaryMapper.getViewById(org.kuali.rice.krad.datadictionary.uif.UifDictionaryIndex, java.lang.String)

getImmutableViewById

public View getImmutableViewById(UifDictionaryIndex index,
                                 String viewId)
Gets a view instance from the pool or factory but does not replace the view, meant for view readonly access (not running the lifecycle but just checking configuration)

Specified by:
getImmutableViewById in interface DataDictionaryMapper
Parameters:
index - the view dictionary index
viewId - the unique id for the view
Returns:
View instance with the given id

getViewByTypeIndex

public 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

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

getViewIdByTypeIndex

public String getViewIdByTypeIndex(UifDictionaryIndex index,
                                   UifConstants.ViewType viewTypeName,
                                   Map<String,String> indexKey)
Returns the view id for the view that matches the given view type and index

Specified by:
getViewIdByTypeIndex 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:
id for the view that matches the view type and index or null if a match is not found

viewByTypeExist

public boolean viewByTypeExist(UifDictionaryIndex index,
                               UifConstants.ViewType viewTypeName,
                               Map<String,String> indexKey)
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

getViewPropertiesById

public org.springframework.beans.PropertyValues getViewPropertiesById(UifDictionaryIndex index,
                                                                      String viewId)
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

getViewPropertiesByType

public 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

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

getViewsForType

public List<View> getViewsForType(UifDictionaryIndex index,
                                  UifConstants.ViewType viewTypeName)
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


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.