1 /**
2 * Copyright 2005-2015 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.rice.krad.document;
17
18 /**
19 * Document presentation controller implementation for transactional documents.
20 *
21 * <p>
22 * Determines what actions are applicable to the given document, irrespective of user
23 * or other state. These initial actions are used as inputs for further filtering depending
24 * on context.
25 * </p>
26 *
27 * @see DocumentPresentationController
28 * @author Kuali Rice Team (rice.collab@kuali.org)
29 */
30 public class TransactionalDocumentPresentationControllerBase extends DocumentPresentationControllerBase implements TransactionalDocumentPresentationController {
31
32 private static final long serialVersionUID = 6830255382171510618L;
33
34 /**
35 * {@inheritDoc}
36 *
37 * A document should only show its close button if it is a transactional document, since closing releases its
38 * pessimistic locks.
39 */
40 public boolean canClose(Document document) {
41 return true;
42 }
43
44 }