1 /*
2 * Copyright 2008 The Kuali Foundation
3 *
4 * Licensed under the Educational Community License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
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.ole.sys.document.datadictionary;
17
18 import org.kuali.ole.sys.businessobject.AccountingLine;
19 import org.kuali.ole.sys.document.web.AccountingLineViewField;
20 import org.kuali.ole.sys.document.web.AccountingLineViewOverrideField;
21 import org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition;
22
23 /**
24 * The definition of an override field associated with an accounting line view field
25 */
26 public class AccountingLineViewOverrideFieldDefinition extends MaintainableFieldDefinition {
27 private boolean allowEditDespiteReadOnlyParentWhenAccoutingLineEditable = false;
28
29 /**
30 * Creates an override field
31 * @param parentField the AccountingLineViewField which will own the created OverrideField
32 * @param accountingLineClass the class of the AccountingLine being rendered
33 * @return a properly created AccountingLineViewOverrideField
34 */
35 public AccountingLineViewOverrideField getOverrideFieldForDefinition(AccountingLineViewField parentField, Class<? extends AccountingLine> accountingLineClass) {
36 return new AccountingLineViewOverrideField(parentField, this, accountingLineClass);
37 }
38
39 /**
40 * Gets the allowEditDespiteReadOnlyParentWhenAccoutingLineEditable attribute.
41 * @return Returns the allowEditDespiteReadOnlyParentWhenAccoutingLineEditable.
42 */
43 public boolean isAllowEditDespiteReadOnlyParentWhenAccoutingLineEditable() {
44 return allowEditDespiteReadOnlyParentWhenAccoutingLineEditable;
45 }
46
47 /**
48 * Sets the allowEditDespiteReadOnlyParentWhenAccoutingLineEditable attribute value.
49 * @param allowEditDespiteReadOnlyParentWhenAccoutingLineEditable The allowEditDespiteReadOnlyParentWhenAccoutingLineEditable to set.
50 */
51 public void setAllowEditDespiteReadOnlyParentWhenAccoutingLineEditable(boolean allowOverrideWithReadOnlyParentWhenAccoutingLineEditable) {
52 this.allowEditDespiteReadOnlyParentWhenAccoutingLineEditable = allowOverrideWithReadOnlyParentWhenAccoutingLineEditable;
53 }
54 }