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.service;
17:
18: import org.kuali.core.document.TransactionalDocument;
19:
20: /**
21: * This interface defines methods that a TransactionalDocumentDictionary Service must provide. Defines the API for the interacting
22: * with TransactionalDocument-related entries in the data dictionary.
23: */
24: public interface TransactionalDocumentDictionaryService {
25: /**
26: * Returns whether or not this document's data dictionary file has flagged it to allow document copies.
27: *
28: * @param document
29: * @return True if copies are allowed, false otherwise.
30: */
31: public Boolean getAllowsCopy(TransactionalDocument document);
32:
33: /**
34: * Returns whether or not this document's data dictionary file has flagged it to allow document error correction of a document
35: * (copy and reversal).
36: *
37: * @param document
38: * @return True if error correction is allowed, false otherwise.
39: */
40: public Boolean getAllowsErrorCorrection(
41: TransactionalDocument document);
42:
43: /**
44: * Retrieves a document instance by it's class name.
45: *
46: * @param documentTypeName
47: * @return A document instance.
48: */
49: public Class getDocumentClassByName(String documentTypeName);
50:
51: /**
52: * Retrieves the summary of the transactional document as described in the data dictionary entry.
53: *
54: * @param transactionalDocumentTypeName
55: * @return The transactional document's summary.
56: */
57: public String getSummary(String transactionalDocumentTypeName);
58:
59: /**
60: * Retrieves the full description of the transactional document as described in its data dictionary entry.
61: *
62: * @param transactionalDocumentTypeName
63: * @return The transactional document's full description.
64: */
65: public String getDescription(String transactionalDocumentTypeName);
66:
67: /**
68: * Retrieves the label for the transactional document as described in its data dictionary entry.
69: *
70: * @param transactionalDocumentTypeName
71: * @return The transactional document's label.
72: */
73: public String getLabel(String transactionalDocumentTypeName);
74:
75: /**
76: * @param document
77: * @return businessRulesClass associated with the given document's type
78: */
79: public Class getBusinessRulesClass(TransactionalDocument document);
80: }
|