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

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

@Transactional
public class InactivationBlockingDetectionServiceImpl
extends Object
implements InactivationBlockingDetectionService

Performs checking of inactivation blocking

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

Field Summary
protected  DataObjectMetaDataService dataObjectMetaDataService
           
protected  LegacyDataAdapter legacyDataAdapter
           
 
Constructor Summary
InactivationBlockingDetectionServiceImpl()
           
 
Method Summary
protected  QueryByCriteria buildInactivationBlockerCriteria(Object blockedObject, InactivationBlockingMetadata inactivationBlockingMetadata)
           
protected  Map<String,String> buildInactivationBlockerQueryMap(BusinessObject blockedBo, InactivationBlockingMetadata inactivationBlockingMetadata)
          Deprecated. 
 Collection<?> detectAllBlockingRecords(Object dataObject, InactivationBlockingMetadata inactivationBlockingMetadata)
          Implementation which calls the legacy listAllBlockerRecords(org.kuali.rice.krad.bo.BusinessObject, org.kuali.rice.krad.datadictionary.InactivationBlockingMetadata) if the given data object is a legacy object.
 boolean detectBlockingRecord(Object dataObject, InactivationBlockingMetadata inactivationBlockingMetadata)
          Implementation which calls the legacy hasABlockingRecord(org.kuali.rice.krad.bo.BusinessObject, org.kuali.rice.krad.datadictionary.InactivationBlockingMetadata) if the given data object is a legacy object.
 DataObjectService getDataObjectService()
           
 boolean hasABlockingRecord(BusinessObject blockedBo, InactivationBlockingMetadata inactivationBlockingMetadata)
          Deprecated. 
 Collection<BusinessObject> listAllBlockerRecords(BusinessObject blockedBo, InactivationBlockingMetadata inactivationBlockingMetadata)
          Deprecated. 
 void setDataObjectMetaDataService(DataObjectMetaDataService dataObjectMetaDataService)
           
 void setDataObjectService(DataObjectService dataObjectService)
           
 void setLegacyDataAdapter(LegacyDataAdapter legacyDataAdapter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataObjectMetaDataService

protected DataObjectMetaDataService dataObjectMetaDataService

legacyDataAdapter

protected LegacyDataAdapter legacyDataAdapter
Constructor Detail

InactivationBlockingDetectionServiceImpl

public InactivationBlockingDetectionServiceImpl()
Method Detail

listAllBlockerRecords

@Deprecated
public Collection<BusinessObject> listAllBlockerRecords(BusinessObject blockedBo,
                                                                   InactivationBlockingMetadata inactivationBlockingMetadata)
Deprecated. 

Note we are checking the active getting after retrieving potential blocking records instead of setting criteria on the active field. This is because some implementations of MutableInactivatable might not have the active field, for example instances of InactivatableFromTo

Specified by:
listAllBlockerRecords in interface InactivationBlockingDetectionService
Parameters:
blockedBo - a BO that is potentially inactivation blocked
Returns:
true iff there was a record that blocks the blockedBo using the metadata in inactivationBlockingMetadata
See Also:
InactivationBlockingDetectionService.listAllBlockerRecords(org.kuali.rice.krad.bo.BusinessObject, org.kuali.rice.krad.datadictionary.InactivationBlockingMetadata), MutableInactivatable

hasABlockingRecord

@Deprecated
public boolean hasABlockingRecord(BusinessObject blockedBo,
                                             InactivationBlockingMetadata inactivationBlockingMetadata)
Deprecated. 

Note we are checking the active getting after retrieving potential blocking records instead of setting criteria on the active field. This is because some implementations of MutableInactivatable might not have the active field, for example instances of InactivatableFromTo

Specified by:
hasABlockingRecord in interface InactivationBlockingDetectionService
Parameters:
blockedBo - a BO that is potentially inactivation blocked
Returns:
true iff there was a record that blocks the blockedBo using the metadata in inactivationBlockingMetadata
See Also:
InactivationBlockingDetectionService.hasABlockingRecord(org.kuali.rice.krad.bo.BusinessObject, org.kuali.rice.krad.datadictionary.InactivationBlockingMetadata), MutableInactivatable

buildInactivationBlockerQueryMap

@Deprecated
protected Map<String,String> buildInactivationBlockerQueryMap(BusinessObject blockedBo,
                                                                         InactivationBlockingMetadata inactivationBlockingMetadata)
Deprecated. 


detectBlockingRecord

public boolean detectBlockingRecord(Object dataObject,
                                    InactivationBlockingMetadata inactivationBlockingMetadata)
Implementation which calls the legacy hasABlockingRecord(org.kuali.rice.krad.bo.BusinessObject, org.kuali.rice.krad.datadictionary.InactivationBlockingMetadata) if the given data object is a legacy object. Calls new code to make the equivalent check if the given object is non-legacy.

Specified by:
detectBlockingRecord in interface InactivationBlockingDetectionService
Parameters:
dataObject - data object to check for inactivation blocking
inactivationBlockingMetadata - metadata to use for the inactivation blocking check
Returns:
true if there is any record which would block inactivation of the given data object, false otherwise

detectAllBlockingRecords

public Collection<?> detectAllBlockingRecords(Object dataObject,
                                              InactivationBlockingMetadata inactivationBlockingMetadata)
Implementation which calls the legacy listAllBlockerRecords(org.kuali.rice.krad.bo.BusinessObject, org.kuali.rice.krad.datadictionary.InactivationBlockingMetadata) if the given data object is a legacy object. Calls new code to make the equivalent check if the given object is non-legacy.

Specified by:
detectAllBlockingRecords in interface InactivationBlockingDetectionService
Parameters:
dataObject - data object to check for inactivation blocking
inactivationBlockingMetadata - metadata to use for the inactivation blocking check
Returns:
an immutable list of records which are blocking inactivation of the given data object

buildInactivationBlockerCriteria

protected QueryByCriteria buildInactivationBlockerCriteria(Object blockedObject,
                                                           InactivationBlockingMetadata inactivationBlockingMetadata)

setDataObjectMetaDataService

public void setDataObjectMetaDataService(DataObjectMetaDataService dataObjectMetaDataService)

setLegacyDataAdapter

public void setLegacyDataAdapter(LegacyDataAdapter legacyDataAdapter)

getDataObjectService

public DataObjectService getDataObjectService()

setDataObjectService

public void setDataObjectService(DataObjectService dataObjectService)


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