/*
 * Copyright 2005-2010 The Kuali Foundation
 * 
 * Licensed under the Educational Community License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.opensource.org/licenses/ecl1.php
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.kuali.kra.institutionalproposal.proposallog;

/**
 * This class is a set of common convenience methods used by Proposal Log related classes.
 */
public final class ProposalLogUtils {
    
    private ProposalLogUtils() {
        
    }
    
    public static String getProposalLogPendingStatusCode() {
        return "1";
    }
    
    public static String getProposalLogMergedStatusCode() {
        return "2";
    }
    
    public static String getProposalLogSubmittedStatusCode() {
        return "3";
    }
    
    public static String getProposalLogVoidStatusCode() {
        return "4";
    }
    
    public static String getProposalLogTemporaryStatusCode() {
        return "5";
    }
    
    public static String getProposalLogPermanentTypeCode() {
        return "1";
    }
    
    public static String getProposalLogTemporaryTypeCode() {
        return "2";
    }

}

@@ -692,16 +692,251 @@
 log;%0D%0A%0D%0A
+import org.kuali.kra.infrastructure.Constants;%0D%0Aimport org.kuali.kra.infrastructure.KraServiceLocator;%0D%0Aimport org.kuali.kra.institutionalproposal.InstitutionalProposalConstants;%0D%0Aimport org.kuali.rice.kns.service.ParameterService;%0D%0A%0D%0A
 /**%0D%0A * 
@@ -1200,35 +1200,80 @@
 %0A        return 
-%221%22
+getCodeValue(%22PROPOSAL_LOG_PENDING_STATUS_CODE%22)
 ;%0D%0A    %7D%0D%0A    %0D%0A
@@ -1340,35 +1340,79 @@
 %0A        return 
-%222%22
+getCodeValue(%22PROPOSAL_LOG_MERGED_STATUS_CODE%22)
 ;%0D%0A    %7D%0D%0A    %0D%0A
@@ -1495,9 +1495,42 @@
 rn %22
-3
+PROPOSAL_LOG_SUBMITTED_STATUS_CODE
 %22;%0D%0A
@@ -1621,9 +1621,37 @@
 rn %22
-4
+PROPOSAL_LOG_VOID_STATUS_CODE
 %22;%0D%0A
@@ -1743,17 +1743,50 @@
 return %22
-5
+PROPOSAL_LOG_TEMPORARY_STATUS_CODE
 %22;%0D%0A    
@@ -1872,17 +1872,48 @@
 return %22
-1
+PROPOSAL_LOG_PERMANENT_TYPE_CODE
 %22;%0D%0A    
@@ -2003,10 +2003,336 @@
 rn %22
-2%22
+PROPOSAL_LOG_TEMPORARY_TYPE_CODE%22;%0D%0A    %7D%0D%0A    %0D%0A    private static String getCodeValue(String paramName) %7B%0D%0A        return KraServiceLocator.getService(ParameterService.class).getParameterValue(%0D%0A                InstitutionalProposalConstants.INSTITUTIONAL_PROPOSAL_NAMESPACE, Constants.PARAMETER_COMPONENT_DOCUMENT, paramName)
 ;%0D%0A 

Migrate hardcoded proposal log codes to system params