View Javadoc
1   /*
2    * Copyright 2007 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.fp.document.authorization;
17  
18  import java.util.Map;
19  
20  import org.apache.commons.logging.Log;
21  import org.apache.commons.logging.LogFactory;
22  import org.kuali.ole.fp.document.CashManagementDocument;
23  import org.kuali.ole.sys.document.authorization.FinancialSystemTransactionalDocumentAuthorizerBase;
24  import org.kuali.rice.kim.api.KimConstants;
25  
26  /**
27   * DocumentAuthorizer containing authorization code for CashManagement documents
28   */
29  public class CashManagementDocumentAuthorizer extends FinancialSystemTransactionalDocumentAuthorizerBase {
30      protected static Log LOG = LogFactory.getLog(CashManagementDocumentAuthorizer.class);
31  
32      /**
33       * @see org.kuali.rice.krad.document.authorization.DocumentAuthorizerBase#addRoleQualification(org.kuali.rice.krad.bo.BusinessObject,
34       *      java.util.Map)
35       */
36      @Override
37      protected void addRoleQualification(Object dataObject, Map<String, String> attributes) {
38          CashManagementDocument cashManagementDocument = (CashManagementDocument) dataObject;
39          attributes.put(KimConstants.AttributeConstants.CAMPUS_CODE, cashManagementDocument.getCampusCode());
40  
41          super.addRoleQualification(dataObject, attributes);
42      }
43  }