Package org.kuali.rice.krad.maintenance
Class MaintenanceUtils
java.lang.Object
org.kuali.rice.krad.maintenance.MaintenanceUtils
Provides static utility methods for use within the maintenance framework
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckDocumentBlockingDocumentId(String blockingDocId, boolean throwExceptionIfLocked) static voidcheckForLockingDocument(MaintenanceDocument document, boolean throwExceptionIfLocked) Determines if there is another maintenance document that has a lock on the same key as the given document, and therefore will block the maintenance document from being submittedprotected static voidcleanOrphanLocks(String lockingDocumentNumber, Exception workflowException) static booleanisMaintenanceDocumentCreatingNewRecord(String maintenanceAction) Determines if the maintenance document action creates a new record.
-
Constructor Details
-
MaintenanceUtils
public MaintenanceUtils()
-
-
Method Details
-
checkForLockingDocument
public static void checkForLockingDocument(MaintenanceDocument document, boolean throwExceptionIfLocked) Determines if there is another maintenance document that has a lock on the same key as the given document, and therefore will block the maintenance document from being submitted- Parameters:
document- - maintenance document instance to check locking forthrowExceptionIfLocked- - indicates if an exception should be thrown in the case of found locking document, if false only an error will be added
-
checkDocumentBlockingDocumentId
public static void checkDocumentBlockingDocumentId(String blockingDocId, boolean throwExceptionIfLocked) -
cleanOrphanLocks
-
isMaintenanceDocumentCreatingNewRecord
Determines if the maintenance document action creates a new record.When taking an action on a maintenance document, some actions cause the creation of a new record, while some don't. For example, editing does not create a record, but copying does.
- Parameters:
maintenanceAction-- Returns:
- boolean
-