org.kuali.rice.krad.maintenance
Class MaintenanceUtils

java.lang.Object
  extended by org.kuali.rice.krad.maintenance.MaintenanceUtils

public class MaintenanceUtils
extends Object

Provides static utility methods for use within the maintenance framework

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

Field Summary
private static org.apache.log4j.Logger LOG
           
 
Constructor Summary
MaintenanceUtils()
           
 
Method Summary
static void checkDocumentBlockingDocumentId(String blockingDocId, boolean throwExceptionIfLocked)
           
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
protected static void cleanOrphanLocks(String lockingDocumentNumber, Exception workflowException)
           
static boolean isMaintenanceDocumentCreatingNewRecord(String maintenanceAction)
           
private static boolean lockCanBeIgnored(WorkflowDocument lockedDocument)
          Guesses whether the current user should be allowed to change a document even though it is locked.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final org.apache.log4j.Logger LOG
Constructor Detail

MaintenanceUtils

public MaintenanceUtils()
Method Detail

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 for
throwExceptionIfLocked - - 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)

lockCanBeIgnored

private static boolean lockCanBeIgnored(WorkflowDocument lockedDocument)
Guesses whether the current user should be allowed to change a document even though it is locked. It probably should use Authorization instead? See KULNRVSYS-948

Parameters:
lockedDocument -
Returns:
Throws:
WorkflowException

cleanOrphanLocks

protected static void cleanOrphanLocks(String lockingDocumentNumber,
                                       Exception workflowException)

isMaintenanceDocumentCreatingNewRecord

public static boolean isMaintenanceDocumentCreatingNewRecord(String maintenanceAction)


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