01: /*
02: * Copyright 2005-2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.kuali.core.dao;
17:
18: import java.util.Collection;
19: import java.util.List;
20:
21: import org.kuali.core.document.MaintenanceLock;
22:
23: /**
24: * This interface defines basic methods that MaintenanceDocument Dao's must provide
25: *
26: *
27: */
28: public interface MaintenanceDocumentDao {
29:
30: public Collection getPendingDocumentsForClass(
31: Class businessObjectClass);
32:
33: /**
34: *
35: * This method looks for a document that is locking the given lockingRepresentation. If one is found, then it
36: * retrieves the documentNumber, and returns it.
37: *
38: * @param lockingRepresentation - locking representation to check for
39: * @param documentNumber - document number to ignore, optional argument
40: * @return returns an empty string if no locking document is found, otherwise returns the documentNumber of the locking document
41: *
42: */
43: public String getLockingDocumentNumber(
44: String lockingRepresentation, String documentNumber);
45:
46: /**
47: * This method deletes the locks for the given document number. It is called when the document is final,
48: * thus it can be unlocked, or when the locks need to be regenerated (thus they get cleared first).
49: *
50: * @param documentNumber - document number whose locks should be deleted
51: */
52: public void deleteLocks(String documentNumber);
53:
54: /**
55: * This method stores the given list of maintenance locks. Typically these will all be for the same document.
56: *
57: * @param maintenanceLocks - the list of maintenance locks to be stored
58: */
59: public void storeLocks(List<MaintenanceLock> maintenanceLocks);
60:
61: }
|