View Javadoc
1   /*
2    * Copyright 2009 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.service.impl;
17  
18  import java.util.List;
19  
20  import org.kuali.ole.sys.OLEConstants;
21  import org.kuali.ole.sys.businessobject.ElectronicPaymentClaim;
22  import org.kuali.ole.sys.service.ElectronicPaymentClaimingDocumentGenerationStrategy;
23  import org.kuali.ole.sys.service.ElectronicPaymentClaimingService;
24  import org.kuali.rice.kim.api.identity.Person;
25  
26  /**
27   * for those cases when admins claim a payment without an associated document
28   */
29  public class ElectronicPaymentClaimingDocumentGenerationStrategyImpl implements ElectronicPaymentClaimingDocumentGenerationStrategy {
30      private org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(ElectronicPaymentClaimingDocumentGenerationStrategyImpl.class);
31      
32      private ElectronicPaymentClaimingService electronicPaymentClaimingService;
33  
34      /**
35       * @see org.kuali.ole.sys.service.ElectronicPaymentClaimingDocumentGenerationStrategy#createDocumentFromElectronicPayments(java.util.List, org.kuali.rice.kim.api.identity.Person)
36       */
37      public String createDocumentFromElectronicPayments(List<ElectronicPaymentClaim> electronicPayments, Person user) {
38          return null;
39      }
40  
41      /**
42       * @see org.kuali.ole.sys.service.ElectronicPaymentClaimingDocumentGenerationStrategy#getDocumentCode()
43       */
44      public String getDocumentCode() {
45          return null;
46      }
47  
48      /**
49       * @see org.kuali.ole.sys.service.ElectronicPaymentClaimingDocumentGenerationStrategy#getDocumentLabel()
50       */
51      public String getDocumentLabel() {
52          return "No Document";
53      }
54      
55      /**
56       * @see org.kuali.ole.sys.service.ElectronicPaymentClaimingDocumentGenerationStrategy#getClaimingDocumentWorkflowDocumentType()
57       * 
58       * return null in the case of no document available
59       */
60      public String getClaimingDocumentWorkflowDocumentType() {
61          return OLEConstants.EMPTY_STRING;
62      }
63  
64      /**
65       * @see org.kuali.ole.sys.service.ElectronicPaymentClaimingDocumentGenerationStrategy#isDocumentReferenceValid(java.lang.String)
66       */
67      public boolean isDocumentReferenceValid(String referenceDocumentNumber) {
68          return false;
69      }
70  
71      /**
72       * @see org.kuali.ole.sys.service.ElectronicPaymentClaimingDocumentGenerationStrategy#userMayUseToClaim(org.kuali.rice.kim.api.identity.Person)
73       */
74      public boolean userMayUseToClaim(Person claimingUser) {
75          return electronicPaymentClaimingService.isAuthorizedForClaimingElectronicPayment(claimingUser, null);
76      }
77  
78      /**
79       * Sets the electronicPaymentClaimingService attribute value.
80       * @param electronicPaymentClaimingService The electronicPaymentClaimingService to set.
81       */
82      public void setElectronicPaymentClaimingService(ElectronicPaymentClaimingService electronicPaymentClaimingService) {
83          this.electronicPaymentClaimingService = electronicPaymentClaimingService;
84      }
85  }