org.kuali.rice.kns.service.impl
Class MaintenanceDocumentServiceImpl

java.lang.Object
  extended by org.kuali.rice.kns.service.impl.MaintenanceDocumentServiceImpl
All Implemented Interfaces:
MaintenanceDocumentService

@Transactional
public class MaintenanceDocumentServiceImpl
extends Object
implements MaintenanceDocumentService

This class is the service implementation for the MaintenanceDocument structure. This is the default implementation, that is delivered with Kuali.


Field Summary
private  MaintenanceDocumentDao maintenanceDocumentDao
           
 
Constructor Summary
MaintenanceDocumentServiceImpl()
           
 
Method Summary
 void deleteLocks(String documentNumber)
          This method is here to call the same-named method in the Dao, since the service has access to the Dao, but the caller doesn't.
 String getLockingDocumentId(Maintainable maintainable, String documentNumber)
          This method attempts to find any other active documents that are pending on the same maintenance record.
 String getLockingDocumentId(MaintenanceDocument document)
          This method attempts to find any other active documents that are pending on the same maintenance record.
 MaintenanceDocumentDao getMaintenanceDocumentDao()
           
 void setMaintenanceDocumentDao(MaintenanceDocumentDao maintenanceDocumentDao)
           
 void storeLocks(List<MaintenanceLock> maintenanceLocks)
          This method is here to call the same-named method in the Dao, since the service has access to the Dao, but the caller doesn't.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maintenanceDocumentDao

private MaintenanceDocumentDao maintenanceDocumentDao
Constructor Detail

MaintenanceDocumentServiceImpl

public MaintenanceDocumentServiceImpl()
Method Detail

getLockingDocumentId

public String getLockingDocumentId(MaintenanceDocument document)
Description copied from interface: MaintenanceDocumentService
This method attempts to find any other active documents that are pending on the same maintenance record. If any are pending and locked, thereby blocking this document, then the docHeaderId/documentNumber of the blocking locked document is returned. Otherwise, if nothing is blocking, then null is returned.

Specified by:
getLockingDocumentId in interface MaintenanceDocumentService
Parameters:
document - - document to test
Returns:
A String representing the docHeaderId of any blocking document, or null if none are blocking
See Also:
MaintenanceDocumentService.getLockingDocumentId(org.kuali.rice.kns.document.MaintenanceDocument)

getLockingDocumentId

public String getLockingDocumentId(Maintainable maintainable,
                                   String documentNumber)
Description copied from interface: MaintenanceDocumentService
This method attempts to find any other active documents that are pending on the same maintenance record. If any are pending and locked, thereby blocking this document, then the docHeaderId/documentNumber of the blocking locked document is returned. Otherwise, if nothing is blocking, then null is returned.

Specified by:
getLockingDocumentId in interface MaintenanceDocumentService
Parameters:
maintainable - - maintainable representing the document to test
documentNumber - - the documentNumber/docHeaderId of the document to test
Returns:
A String representing the docHeaderId of any blocking document, or null if none are blocking
See Also:
MaintenanceDocumentService.getLockingDocumentId(org.kuali.rice.kns.maintenance.Maintainable, java.lang.String)

deleteLocks

public void deleteLocks(String documentNumber)
Description copied from interface: MaintenanceDocumentService
This method is here to call the same-named method in the Dao, since the service has access to the Dao, but the caller doesn't. This method deletes the locks for the given document number. It is called when the document is final, thus it can be unlocked, or when the locks need to be regenerated (thus they get cleared first).

Specified by:
deleteLocks in interface MaintenanceDocumentService
Parameters:
documentNumber - - document number whose locks should be deleted
See Also:
MaintenanceDocumentService.deleteLocks(String)

storeLocks

public void storeLocks(List<MaintenanceLock> maintenanceLocks)
Description copied from interface: MaintenanceDocumentService
This method is here to call the same-named method in the Dao, since the service has access to the Dao, but the caller doesn't. This method stores the given list of maintenance locks. Typically these will all be for the same document.

Specified by:
storeLocks in interface MaintenanceDocumentService
Parameters:
maintenanceLocks - - the list of maintenance locks to be stored
See Also:
org.kuali.rice.kns.service.MaintenanceDocumentService#saveLocks(List)

getMaintenanceDocumentDao

public MaintenanceDocumentDao getMaintenanceDocumentDao()
Returns:
Returns the maintenanceDocumentDao.

setMaintenanceDocumentDao

public void setMaintenanceDocumentDao(MaintenanceDocumentDao maintenanceDocumentDao)
Parameters:
maintenanceDocumentDao - The maintenanceDocumentDao to set.


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.