View Javadoc
1   package org.kuali.ole.module.purap.document.authorization;
2   
3   import org.apache.commons.lang.StringUtils;
4   import org.kuali.ole.module.purap.PurapConstants;
5   import org.kuali.ole.select.document.OLEPlatformRecordDocument;
6   import org.kuali.rice.krad.document.Document;
7   
8   /**
9    * Created by chenchulakshmig on 10/15/14.
10   */
11  public class PlatformDocumentPresentationController extends PurchasingAccountsPayableDocumentPresentationController {
12  
13      @Override
14      public boolean canCopy (Document document) {
15          OLEPlatformRecordDocument olePlatformRecordDocument = (OLEPlatformRecordDocument) document;
16          if (super.canCopy(document)) {
17              if (!StringUtils.equalsIgnoreCase(olePlatformRecordDocument.getDocumentHeader().getWorkflowDocument().getStatus().name(), PurapConstants.PlatformStatuses.APPDOC_INITIATE)) {
18                  return true;
19              }
20          }
21          return false;
22  
23      }
24  }