org.kuali.rice.krad.service.impl
Class DocumentDictionaryServiceImpl

java.lang.Object
  extended by org.kuali.rice.krad.service.impl.DocumentDictionaryServiceImpl
All Implemented Interfaces:
DocumentDictionaryService

public class DocumentDictionaryServiceImpl
extends Object
implements DocumentDictionaryService

Implementation of DocumentDictionaryService which reads configuration from the data dictionary

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

Constructor Summary
DocumentDictionaryServiceImpl()
           
 
Method Summary
 Boolean getAllowsCopy(Document document)
          Returns whether or not this document's data dictionary file has flagged it to allow document copies
 Boolean getAllowsNewOrCopy(String docTypeName)
          Returns whether or not this document's data dictionary file has flagged it to allow maintenance new or copy actions
 Boolean getAllowsRecordDeletion(Class dataObjectClass)
          Indicates whether the given data object class is configured to allow record deletions
 Boolean getAllowsRecordDeletion(MaintenanceDocument document)
          Indicates whether the given maintenance document is configured to allow record deletions
 Class<? extends BusinessRule> getBusinessRulesClass(Document document)
          Retrieves the configured business rule class configured for the document entry that is associated with the document type of the given document instance
protected  DataDictionary getDataDictionary()
           
protected  DataDictionaryService getDataDictionaryService()
           
 Collection getDefaultExistenceChecks(Class dataObjectClass)
          Retrieves the collection of ReferenceDefinition objects defined as DefaultExistenceChecks for the MaintenanceDocument associated with the given data object class
 Collection getDefaultExistenceChecks(Document document)
          Retrieves the collection of ReferenceDefinition objects defined as DefaultExistenceChecks for the document instance
 Collection getDefaultExistenceChecks(String docTypeName)
          Retrieves the collection of ReferenceDefinition objects defined as DefaultExistenceChecks for the document entry associated with the given document type name
 String getDescription(String documentTypeName)
          Retrieves the full description of the document as described in its data dictionary entry
 DocumentAuthorizer getDocumentAuthorizer(Document document)
          Retrieves the DocumentAuthorizer configured on the document entry for the document type associated with the document instance
 DocumentAuthorizer getDocumentAuthorizer(String documentType)
          Retrieves the DocumentAuthorizer configured on the document entry with the given document type name
 Class<?> getDocumentClassByName(String documentTypeName)
          Retrieves the document class configured on the document entry associated with the given document type name
protected  DocumentEntry getDocumentEntry(Document document)
          Retrieves the document entry for the document type of the given document instance
 DocumentEntry getDocumentEntry(String documentTypeName)
          Retrieves the document entry that is associated with the given document type name
 DocumentEntry getDocumentEntryByClass(Class<? extends Document> documentClass)
          Retrieves the document entry that is associated with the given document class
 DocumentPresentationController getDocumentPresentationController(Document document)
          Retrieves the DocumentPresentationController configured on the document entry for the document type associated with the document instance
 DocumentPresentationController getDocumentPresentationController(String documentType)
          Retrieves the DocumentPresentationController configured on the document entry with the given document type name
protected  DocumentType getDocumentType(String documentTypeName)
          Gets the workflow document type dto for the given documentTypeName
 String getDocumentTypeByClass(Class<? extends Document> documentClass)
          Retrieves the document type configured on the document entry associated with the given document class
 String getLabel(String documentTypeName)
          Retrieves the label for the document as described in its data dictionary entry
 List<String> getLockingKeys(String docTypeName)
          Retrieves the list of property names that are configured as locking keys for the maintenance document entry associated with the given document type name
 Class<? extends Maintainable> getMaintainableClass(String docTypeName)
          Retrieves the maintainable class instance that is configured in the maintenance document entry associated with the given document type name
 Class<?> getMaintenanceDataObjectClass(String docTypeName)
          Retrieves the data object class configured for the maintenance entry associated with the given document type name
protected  MaintenanceDocumentEntry getMaintenanceDocumentEntry(Class dataObjectClass)
          Retrieves the maintenance document entry associated with the given data object class
 MaintenanceDocumentEntry getMaintenanceDocumentEntry(String docTypeName)
          Retrieves the maintenance document entry that is associated with the given document type name
 String getMaintenanceDocumentTypeName(Class dataObjectClass)
          Retrieves the configured document type name for the maintenance document entry associated with the given data object class
 boolean getPreserveLockingKeysOnCopy(Class dataObjectClass)
          Indicates whether the configured locking keys for a class should be cleared on a maintenance copy action or values carried forward
 void setDataDictionaryService(DataDictionaryService dataDictionaryService)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentDictionaryServiceImpl

public DocumentDictionaryServiceImpl()
Method Detail

getLabel

public String getLabel(String documentTypeName)
Description copied from interface: DocumentDictionaryService
Retrieves the label for the document as described in its data dictionary entry

Specified by:
getLabel in interface DocumentDictionaryService
Parameters:
documentTypeName - - document type name for the document entry to retrieve label for
Returns:
String document label
See Also:
DocumentDictionaryService.getLabel(java.lang.String)

getMaintenanceDocumentTypeName

public String getMaintenanceDocumentTypeName(Class dataObjectClass)
Description copied from interface: DocumentDictionaryService
Retrieves the configured document type name for the maintenance document entry associated with the given data object class

Specified by:
getMaintenanceDocumentTypeName in interface DocumentDictionaryService
Parameters:
dataObjectClass - - data object class for maintenance entry to retrieve
Returns:
String document type name for maintenance document
See Also:
DocumentDictionaryService.getMaintenanceDocumentTypeName(java.lang.Class)

getDescription

public String getDescription(String documentTypeName)
Description copied from interface: DocumentDictionaryService
Retrieves the full description of the document as described in its data dictionary entry

Specified by:
getDescription in interface DocumentDictionaryService
Parameters:
documentTypeName - - document type name for the document entry to retrieve description for
Returns:
String documents full description
See Also:
DocumentDictionaryService.getDescription(java.lang.String)

getDefaultExistenceChecks

public Collection getDefaultExistenceChecks(Class dataObjectClass)
Description copied from interface: DocumentDictionaryService
Retrieves the collection of ReferenceDefinition objects defined as DefaultExistenceChecks for the MaintenanceDocument associated with the given data object class

Specified by:
getDefaultExistenceChecks in interface DocumentDictionaryService
Parameters:
dataObjectClass - - data object class for maintenance document
Returns:
Collection reference definitions for default existence checks
See Also:
DocumentDictionaryService.getDefaultExistenceChecks(java.lang.Class)

getDefaultExistenceChecks

public Collection getDefaultExistenceChecks(Document document)
Description copied from interface: DocumentDictionaryService
Retrieves the collection of ReferenceDefinition objects defined as DefaultExistenceChecks for the document instance

Specified by:
getDefaultExistenceChecks in interface DocumentDictionaryService
Parameters:
document - - document instance to pull document type for associated document entry
Returns:
Collection reference definitions for default existence checks
See Also:
DocumentDictionaryService.getDefaultExistenceChecks(java.lang.Class)

getDefaultExistenceChecks

public Collection getDefaultExistenceChecks(String docTypeName)
Description copied from interface: DocumentDictionaryService
Retrieves the collection of ReferenceDefinition objects defined as DefaultExistenceChecks for the document entry associated with the given document type name

Specified by:
getDefaultExistenceChecks in interface DocumentDictionaryService
Parameters:
docTypeName - - document type name for document entry to pull existence checks for
Returns:
Collection reference definitions for default existence checks
See Also:
DocumentDictionaryService.getDefaultExistenceChecks(java.lang.Class)

getMaintenanceDataObjectClass

public Class<?> getMaintenanceDataObjectClass(String docTypeName)
Description copied from interface: DocumentDictionaryService
Retrieves the data object class configured for the maintenance entry associated with the given document type name

Specified by:
getMaintenanceDataObjectClass in interface DocumentDictionaryService
Parameters:
docTypeName - - document type name associated with maintenance document entry
Returns:
Class data object class associated with maintenance document entry
See Also:
DocumentDictionaryService.getMaintenanceDataObjectClass(java.lang.String)

getMaintainableClass

public Class<? extends Maintainable> getMaintainableClass(String docTypeName)
Description copied from interface: DocumentDictionaryService
Retrieves the maintainable class instance that is configured in the maintenance document entry associated with the given document type name

Specified by:
getMaintainableClass in interface DocumentDictionaryService
Parameters:
docTypeName - - document type name to retrieve maintainable for
Returns:
Class maintainable class for document type name
See Also:
org.kuali.rice.krad.service.impl.DocumentDictionaryService#getMaintainableClass

getBusinessRulesClass

public Class<? extends BusinessRule> getBusinessRulesClass(Document document)
Description copied from interface: DocumentDictionaryService
Retrieves the configured business rule class configured for the document entry that is associated with the document type of the given document instance

Specified by:
getBusinessRulesClass in interface DocumentDictionaryService
Parameters:
document - - document instance to retrieve rule class for
Returns:
Class businessRulesClass associated with the given document type
See Also:
DocumentDictionaryService.getBusinessRulesClass(org.kuali.rice.krad.document.Document)

getAllowsCopy

public Boolean getAllowsCopy(Document document)
Description copied from interface: DocumentDictionaryService
Returns whether or not this document's data dictionary file has flagged it to allow document copies

Specified by:
getAllowsCopy in interface DocumentDictionaryService
Parameters:
document - - document instance to check copy flag for
Returns:
boolean true if copies are allowed, false otherwise
See Also:
DocumentDictionaryService.getAllowsCopy(org.kuali.rice.krad.document.Document)

getAllowsNewOrCopy

public Boolean getAllowsNewOrCopy(String docTypeName)
Description copied from interface: DocumentDictionaryService
Returns whether or not this document's data dictionary file has flagged it to allow maintenance new or copy actions

Specified by:
getAllowsNewOrCopy in interface DocumentDictionaryService
Parameters:
docTypeName - - document type name to retrieve maintenance document entry for
Returns:
boolean true if new or copy maintenance actions are allowed
See Also:
DocumentDictionaryService.getAllowsNewOrCopy(java.lang.String)

getDocumentEntry

public DocumentEntry getDocumentEntry(String documentTypeName)
Description copied from interface: DocumentDictionaryService
Retrieves the document entry that is associated with the given document type name

Specified by:
getDocumentEntry in interface DocumentDictionaryService
Parameters:
documentTypeName - - document type name to retrieve document entry for
Returns:
DocumentEntry instance associated with document type
See Also:
DocumentDictionaryService.getDocumentEntry(java.lang.String)

getDocumentEntryByClass

public DocumentEntry getDocumentEntryByClass(Class<? extends Document> documentClass)
Description copied from interface: DocumentDictionaryService
Retrieves the document entry that is associated with the given document class

Specified by:
getDocumentEntryByClass in interface DocumentDictionaryService
Parameters:
documentClass - - document class to retrieve document entry for
Returns:
DocumentEntry instance associated with document class
See Also:
DocumentDictionaryService.getDocumentEntryByClass(java.lang.Class)

getMaintenanceDocumentEntry

public MaintenanceDocumentEntry getMaintenanceDocumentEntry(String docTypeName)
Description copied from interface: DocumentDictionaryService
Retrieves the maintenance document entry that is associated with the given document type name

Specified by:
getMaintenanceDocumentEntry in interface DocumentDictionaryService
Parameters:
docTypeName - - document type name to retrieve maintenance document entry for
Returns:
MaintenanceDocumentEntry instance associated with document type
See Also:
DocumentDictionaryService.getMaintenanceDocumentEntry(java.lang.String)

getDocumentClassByName

public Class<?> getDocumentClassByName(String documentTypeName)
Description copied from interface: DocumentDictionaryService
Retrieves the document class configured on the document entry associated with the given document type name

Specified by:
getDocumentClassByName in interface DocumentDictionaryService
Parameters:
documentTypeName - - document type name to retrieve class for
Returns:
Class document class associated with document type name
See Also:
DocumentDictionaryService.getDocumentClassByName(java.lang.String)

getDocumentTypeByClass

public String getDocumentTypeByClass(Class<? extends Document> documentClass)
Description copied from interface: DocumentDictionaryService
Retrieves the document type configured on the document entry associated with the given document class

Specified by:
getDocumentTypeByClass in interface DocumentDictionaryService
Parameters:
documentClass - - class for document to retrieve the document type for
Returns:
String document type associated with document type name
See Also:
DocumentDictionaryService.getDocumentTypeByClass(java.lang.Class)

getAllowsRecordDeletion

public Boolean getAllowsRecordDeletion(Class dataObjectClass)
Description copied from interface: DocumentDictionaryService
Indicates whether the given data object class is configured to allow record deletions

Specified by:
getAllowsRecordDeletion in interface DocumentDictionaryService
Parameters:
dataObjectClass - - class for the data object to check
Returns:
Boolean true if record deletion is allowed, false if not allowed, null if not configured
See Also:
DocumentDictionaryService.getAllowsRecordDeletion(java.lang.Class)

getAllowsRecordDeletion

public Boolean getAllowsRecordDeletion(MaintenanceDocument document)
Description copied from interface: DocumentDictionaryService
Indicates whether the given maintenance document is configured to allow record deletions

Specified by:
getAllowsRecordDeletion in interface DocumentDictionaryService
Parameters:
document - - maintenance document instance to check
Returns:
Boolean true if record deletion is allowed, false if not allowed, null if not configured
See Also:
DocumentDictionaryService.getAllowsRecordDeletion(java.lang.Class)

getLockingKeys

public List<String> getLockingKeys(String docTypeName)
Description copied from interface: DocumentDictionaryService
Retrieves the list of property names that are configured as locking keys for the maintenance document entry associated with the given document type name

Specified by:
getLockingKeys in interface DocumentDictionaryService
Parameters:
docTypeName - - document type name to retrieve maintenance document entry for
Returns:
List list of locking key property names
See Also:
DocumentDictionaryService.getLockingKeys(java.lang.String)

getPreserveLockingKeysOnCopy

public boolean getPreserveLockingKeysOnCopy(Class dataObjectClass)
Description copied from interface: DocumentDictionaryService
Indicates whether the configured locking keys for a class should be cleared on a maintenance copy action or values carried forward

Specified by:
getPreserveLockingKeysOnCopy in interface DocumentDictionaryService
Parameters:
dataObjectClass - - class for the data object to check
Returns:
boolean true if locking keys should be copied, false if they should be cleared
See Also:
DocumentDictionaryService.getPreserveLockingKeysOnCopy(java.lang.Class)

getDocumentAuthorizer

public DocumentAuthorizer getDocumentAuthorizer(String documentType)
Description copied from interface: DocumentDictionaryService
Retrieves the DocumentAuthorizer configured on the document entry with the given document type name

Specified by:
getDocumentAuthorizer in interface DocumentDictionaryService
Parameters:
documentType - - document type name to retrieve document entry and associated authorizer for
Returns:
DocumentAuthorizer authorizer instance
See Also:
DocumentDictionaryService.getDocumentAuthorizer(java.lang.String)

getDocumentAuthorizer

public DocumentAuthorizer getDocumentAuthorizer(Document document)
Description copied from interface: DocumentDictionaryService
Retrieves the DocumentAuthorizer configured on the document entry for the document type associated with the document instance

Specified by:
getDocumentAuthorizer in interface DocumentDictionaryService
Parameters:
document - - document instance to retrieve document entry and associated authorizer for
Returns:
DocumentAuthorizer authorizer instance
See Also:
DocumentDictionaryService.getDocumentAuthorizer(java.lang.String)

getDocumentPresentationController

public DocumentPresentationController getDocumentPresentationController(String documentType)
Description copied from interface: DocumentDictionaryService
Retrieves the DocumentPresentationController configured on the document entry with the given document type name

Specified by:
getDocumentPresentationController in interface DocumentDictionaryService
Parameters:
documentType - - document type name to retrieve document entry and associated presentation controller for
Returns:
DocumentPresentationController instance
See Also:
DocumentDictionaryService.getDocumentPresentationController(java.lang.String)

getDocumentPresentationController

public DocumentPresentationController getDocumentPresentationController(Document document)
Description copied from interface: DocumentDictionaryService
Retrieves the DocumentPresentationController configured on the document entry for the document type associated with the document instance

Specified by:
getDocumentPresentationController in interface DocumentDictionaryService
Parameters:
document - - document instance to retrieve document entry and associated presentation controller for
Returns:
DocumentPresentationController instance
See Also:
DocumentDictionaryService.getDocumentPresentationController(java.lang.String)

getMaintenanceDocumentEntry

protected MaintenanceDocumentEntry getMaintenanceDocumentEntry(Class dataObjectClass)
Retrieves the maintenance document entry associated with the given data object class

Parameters:
dataObjectClass - - data object class to retrieve maintenance document entry for
Returns:
MaintenanceDocumentEntry for associated data object class

getDocumentEntry

protected DocumentEntry getDocumentEntry(Document document)
Retrieves the document entry for the document type of the given document instance

Parameters:
document - - document instance to retrieve document entry for
Returns:
DocumentEntry instance found for document type

getDocumentType

protected DocumentType getDocumentType(String documentTypeName)
Gets the workflow document type dto for the given documentTypeName

Parameters:
documentTypeName - - document type name to retrieve document type dto
Returns:
DocumentType for given document type name

getDataDictionary

protected DataDictionary getDataDictionary()

getDataDictionaryService

protected DataDictionaryService getDataDictionaryService()

setDataDictionaryService

public void setDataDictionaryService(DataDictionaryService dataDictionaryService)


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