|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.datadictionary.DataDictionary
public class DataDictionary
Encapsulates a bean factory and indexes to the beans within the factory for providing framework metadata
Field Summary | |
---|---|
protected ArrayList<String> |
beanValidationFiles
|
protected DefaultListableBeanFactory |
ddBeans
|
protected DataDictionaryIndex |
ddIndex
|
protected DataDictionaryMapper |
ddMapper
|
protected Map<String,List<String>> |
moduleDictionaryFiles
|
protected List<String> |
moduleLoadOrder
|
static PersistenceStructureService |
persistenceStructureService
|
protected UifDictionaryIndex |
uifIndex
|
protected static boolean |
validateEBOs
|
protected org.springframework.beans.factory.xml.XmlBeanDefinitionReader |
xmlReader
|
Constructor Summary | |
---|---|
DataDictionary()
|
Method Summary | |
---|---|
void |
addConfigFileLocation(String namespaceCode,
String location)
Adds a location of files or a individual resource to the data dictionary |
protected void |
addModuleDictionaryFile(String namespaceCode,
String location)
Adds a file location to the list of dictionary files for the given namespace code |
static PropertyDescriptor |
buildReadDescriptor(Class propertyClass,
String propertyName)
|
static PropertyDescriptor |
buildSimpleReadDescriptor(Class propertyClass,
String propertyName)
|
boolean |
containsDictionaryObject(String id)
Indicates whether the data dictionary contains a bean with the given id |
Set<InactivationBlockingMetadata> |
getAllInactivationBlockingMetadatas(Class blockedClass)
|
static Class |
getAttributeClass(Class boClass,
String attributeName)
This method determines the Class of the attributeName passed in. |
List<String> |
getBeanNamesForNamespace(String namespaceCode)
Retrieves the list of dictionary bean names that are associated with the given namespace code |
List<String> |
getBusinessObjectClassNames()
|
Map<String,BusinessObjectEntry> |
getBusinessObjectEntries()
|
BusinessObjectEntry |
getBusinessObjectEntry(String className)
Deprecated. |
BusinessObjectEntry |
getBusinessObjectEntryForConcreteClass(String className)
This method gets the business object entry for a concrete class |
static Class |
getCollectionElementClass(Class boClass,
String collectionName)
This method determines the Class of the elements in the collectionName passed in. |
DataObjectEntry |
getDataObjectEntry(String className)
|
Object |
getDictionaryObject(String beanName)
Returns an object from the dictionary by its spring bean name |
DataDictionaryEntry |
getDictionaryObjectEntry(String className)
|
Map<String,DocumentEntry> |
getDocumentEntries()
|
DocumentEntry |
getDocumentEntry(String documentTypeDDKey)
Returns the KNS document entry for the given lookup key. |
protected org.springframework.core.io.Resource |
getFileResource(String sourceName)
|
View |
getImmutableViewById(String viewId)
Returns the View entry identified by the given id, meant for view readonly access (not running the lifecycle but just checking configuration) |
MaintenanceDocumentEntry |
getMaintenanceDocumentEntryForBusinessObjectClass(Class<?> businessObjectClass)
Note: only MaintenanceDocuments are indexed by businessObject Class This is a special case that is referenced in one location. |
Map<String,List<String>> |
getModuleDictionaryFiles()
Mapping of namespace codes to dictionary files that are associated with that namespace |
List<String> |
getModuleLoadOrder()
Order modules should be loaded into the dictionary |
String |
getNamespaceForBeanDefinition(String beanName)
Retrieves the namespace code the given bean name is associated with |
static PersistenceStructureService |
getPersistenceStructureService()
|
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 |
String |
getViewIdByTypeIndex(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(String viewId)
Retrieves the configured property values for the view bean definition associated with the given id |
org.springframework.beans.PropertyValues |
getViewPropertiesByType(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(UifConstants.ViewType viewTypeName)
Gets all View prototypes configured for the given view type
name |
protected void |
indexSource(String namespaceCode,
File dir)
|
protected void |
indexSource(String namespaceCode,
String sourceName)
Processes a given source for XML files to populate the dictionary with |
static boolean |
isCollectionPropertyOf(Class targetClass,
String propertyName)
|
static boolean |
isPropertyOf(Class targetClass,
String propertyName)
|
void |
loadDictionaryBeans(DefaultListableBeanFactory beans,
Map<String,List<String>> moduleDictionaryFiles,
DataDictionaryIndex index,
ArrayList<String> validationFiles)
Populates and processes the dictionary bean factory based on the configured files |
void |
parseDataDictionaryConfigurationFiles(boolean allowConcurrentValidation)
Populates and processes the dictionary bean factory based on the configured files and performs indexing |
void |
performBeanOverrides()
This method gathers beans of type BeanOverride and invokes each one's performOverride() method. |
void |
performDictionaryPostProcessing(boolean allowConcurrentValidation)
Invokes post processors and builds indexes for the beans contained in the dictionary |
void |
setDataDictionaryMapper(DataDictionaryMapper mapper)
Sets the DataDictionaryMapper |
void |
setModuleDictionaryFiles(Map<String,List<String>> moduleDictionaryFiles)
Setter for the map of module dictionary files |
void |
setModuleLoadOrder(List<String> moduleLoadOrder)
Setter for the list of namespace codes indicating the module load order |
static void |
setupProcessor(DefaultListableBeanFactory beans)
Sets up the bean post processor and conversion service |
void |
validateDD()
|
void |
validateDD(boolean validateEbos)
|
boolean |
viewByTypeExist(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 |
Field Detail |
---|
protected static boolean validateEBOs
protected DefaultListableBeanFactory ddBeans
protected org.springframework.beans.factory.xml.XmlBeanDefinitionReader xmlReader
protected DataDictionaryIndex ddIndex
protected UifDictionaryIndex uifIndex
protected DataDictionaryMapper ddMapper
protected Map<String,List<String>> moduleDictionaryFiles
protected List<String> moduleLoadOrder
protected ArrayList<String> beanValidationFiles
public static PersistenceStructureService persistenceStructureService
Constructor Detail |
---|
public DataDictionary()
Method Detail |
---|
public void parseDataDictionaryConfigurationFiles(boolean allowConcurrentValidation)
allowConcurrentValidation
- - indicates whether the indexing should occur on a different thread
or the same threadpublic static void setupProcessor(DefaultListableBeanFactory beans)
beans
- - The bean factory for the the dictionary beanspublic void loadDictionaryBeans(DefaultListableBeanFactory beans, Map<String,List<String>> moduleDictionaryFiles, DataDictionaryIndex index, ArrayList<String> validationFiles)
beans
- - The bean factory for the dictionary beanmoduleDictionaryFiles
- - List of bean xml filesindex
- - Index of the data dictionary beansvalidationFiles
- - The List of bean xml files loaded into the bean filepublic void performDictionaryPostProcessing(boolean allowConcurrentValidation)
allowConcurrentValidation
- - indicates whether the indexing should occur on a different thread
or the same threadpublic void validateDD(boolean validateEbos)
public void validateDD()
public void addConfigFileLocation(String namespaceCode, String location) throws IOException
The location can either be an XML file on the classpath or a file or folder location within the file system. If a folder location is given, the folder and all sub-folders will be traversed and any XML files will be added to the dictionary
namespaceCode
- - namespace the beans loaded from the location should be associated withlocation
- - classpath resource or file system location
IOException
protected void indexSource(String namespaceCode, String sourceName) throws IOException
namespaceCode
- - namespace the beans loaded from the location should be associated withsourceName
- - a file system or classpath resource locator
IOException
protected org.springframework.core.io.Resource getFileResource(String sourceName)
protected void indexSource(String namespaceCode, File dir)
protected void addModuleDictionaryFile(String namespaceCode, String location)
namespaceCode
- - namespace to add location forlocation
- - file or resource location to addpublic Map<String,List<String>> getModuleDictionaryFiles()
public void setModuleDictionaryFiles(Map<String,List<String>> moduleDictionaryFiles)
moduleDictionaryFiles
- public List<String> getModuleLoadOrder()
Modules are loaded in the order they are found in this list. If not explicity set, they will be loaded in the order their dictionary file locations are added
public void setModuleLoadOrder(List<String> moduleLoadOrder)
moduleLoadOrder
- public void setDataDictionaryMapper(DataDictionaryMapper mapper)
mapper
- the datadictionary mapper@Deprecated public BusinessObjectEntry getBusinessObjectEntry(String className)
className
-
public DataObjectEntry getDataObjectEntry(String className)
className
-
public BusinessObjectEntry getBusinessObjectEntryForConcreteClass(String className)
className
-
public List<String> getBusinessObjectClassNames()
public Map<String,BusinessObjectEntry> getBusinessObjectEntries()
public DataDictionaryEntry getDictionaryObjectEntry(String className)
className
-
public DocumentEntry getDocumentEntry(String documentTypeDDKey)
documentTypeDDKey
- the KEW/workflow document type name
public MaintenanceDocumentEntry getMaintenanceDocumentEntryForBusinessObjectClass(Class<?> businessObjectClass)
businessObjectClass
-
public Map<String,DocumentEntry> getDocumentEntries()
public View getViewById(String viewId)
viewId
- unique id for view
public View getImmutableViewById(String viewId)
viewId
- unique id for view
public View getViewByTypeIndex(UifConstants.ViewType viewTypeName, Map<String,String> indexKey)
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
public String getViewIdByTypeIndex(UifConstants.ViewType viewTypeName, Map<String,String> indexKey)
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
public boolean viewByTypeExist(UifConstants.ViewType viewTypeName, Map<String,String> indexKey)
View
exists for the given view type and index information
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
public List<View> getViewsForType(UifConstants.ViewType viewTypeName)
View
prototypes configured for the given view type
name
viewTypeName
- - view type name to retrieve
public Object getDictionaryObject(String beanName)
beanName
- - id or name for the bean definition
public boolean containsDictionaryObject(String id)
id
- - id of the bean to check for
public org.springframework.beans.PropertyValues getViewPropertiesById(String viewId)
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
viewId
- - id for the view to retrieve
public org.springframework.beans.PropertyValues getViewPropertiesByType(UifConstants.ViewType viewTypeName, Map<String,String> indexKey)
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
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
public List<String> getBeanNamesForNamespace(String namespaceCode)
namespaceCode
- - namespace code to retrieve associated bean names for
public String getNamespaceForBeanDefinition(String beanName)
beanName
- - name of the dictionary bean to find namespace code for
public static boolean isPropertyOf(Class targetClass, String propertyName)
targetClass
- propertyName
-
CompletionException
- if there is a problem accessing the named property on the given classpublic static boolean isCollectionPropertyOf(Class targetClass, String propertyName)
targetClass
- propertyName
-
CompletionException
- if there is a problem accessing the named property on the given classpublic static PersistenceStructureService getPersistenceStructureService()
public static Class getAttributeClass(Class boClass, String attributeName)
boClass
- - Class that the attributeName property exists in.attributeName
- - Name of the attribute you want a class for.
public static Class getCollectionElementClass(Class boClass, String collectionName)
boClass
- Class that the collectionName collection exists in.collectionName
- the name of the collection you want the element class for
public static PropertyDescriptor buildReadDescriptor(Class propertyClass, String propertyName)
propertyClass
- propertyName
-
public static PropertyDescriptor buildSimpleReadDescriptor(Class propertyClass, String propertyName)
propertyClass
- propertyName
-
public Set<InactivationBlockingMetadata> getAllInactivationBlockingMetadatas(Class blockedClass)
public void performBeanOverrides()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |