1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  package org.kuali.kfs.module.bc;
20  
21  import static org.kuali.kfs.module.bc.BCConstants.Report.BuildMode.BCAF;
22  import static org.kuali.kfs.module.bc.BCConstants.Report.BuildMode.MONTH;
23  import static org.kuali.kfs.module.bc.BCConstants.Report.BuildMode.PBGL;
24  import static org.kuali.kfs.module.bc.BCConstants.Report.ReportSelectMode.ACCOUNT;
25  import static org.kuali.kfs.module.bc.BCConstants.Report.ReportSelectMode.OBJECT_CODE;
26  import static org.kuali.kfs.module.bc.BCConstants.Report.ReportSelectMode.REASON;
27  import static org.kuali.kfs.module.bc.BCConstants.Report.ReportSelectMode.SUBFUND;
28  
29  import java.util.EnumSet;
30  
31  import org.kuali.kfs.module.bc.BCConstants.Report.BuildMode;
32  import org.kuali.kfs.module.bc.BCConstants.Report.ReportSelectMode;
33  
34  
35  
36  
37  public enum BudgetConstructionReportMode {
38      ACCOUNT_FUNDING_DETAIL_REPORT("AccountFundingDetailReport", BCAF, OBJECT_CODE, "BudgetOrgAccountFundingDetail", true), 
39      ACCOUNT_OBJECT_DETAIL_REPORT("AccountObjectDetailReport", PBGL, SUBFUND, "BudgetOrgAccountObjectDetail", true),
40      ACCOUNT_SUMMARY_REPORT("AccountSummaryReport", PBGL, SUBFUND, "BudgetOrgAccountSummary", true), 
41      LEVEL_SUMMARY_REPORT("LevelSummaryReport", PBGL, SUBFUND, "BudgetOrgLevelSummary", true),
42      MONTH_SUMMARY_REPORT("MonthSummaryReport", MONTH, SUBFUND, "BudgetOrgMonthSummary", true),
43      OBJECT_SUMMARY_REPORT("ObjectSummaryReport", PBGL, SUBFUND, "BudgetOrgObjectSummary", true),    
44      POSITION_FUNDING_DETAIL_REPORT("PositionFundingDetailReport", BCAF, OBJECT_CODE, "BudgetOrgPositionFundingDetail", true), 
45      REASON_STATISTICS_REPORT("ReasonStatisticsReport", BCAF, REASON, "BudgetOrgReasonStatistics", false),
46      REASON_SUMMARY_REPORT("ReasonSummaryReport", BCAF, REASON, "BudgetOrgReasonSummary", false), 
47      SALARY_STATISTICS_REPORT("SalaryStatisticsReport", BCAF, OBJECT_CODE, "BudgetOrgSalaryStatistics", true),
48      SALARY_SUMMARY_REPORT("SalarySummaryReport", BCAF, OBJECT_CODE, "BudgetOrgSalarySummary", false), 
49      SUBFUND_SUMMARY_REPORT("SubFundSummaryReport", PBGL, SUBFUND, "BudgetOrgSubFundSummary", true),
50      SYNCHRONIZATION_PROBLEMS_REPORT("SynchronizationProblemsReport", PBGL, ACCOUNT, "BudgetOrgSynchronizationProblems", true), 
51      TWOPLG_LIST_REPORT("TwoPLGListReport", PBGL, ACCOUNT, "BudgetOrgTwoPLGList", true),
52      ACCOUNT_EXPORT("AccountExport", PBGL, SUBFUND, true),
53      MONTHLY_EXPORT("MonthlyExport", MONTH, SUBFUND, true),
54      FUNDING_EXPORT("FundingExport", BCAF, SUBFUND, true);
55  
56  
57      public final String reportModeName;
58      public final BuildMode reportBuildMode;
59      public final ReportSelectMode reportSelectMode;
60      public final String jasperFileName;
61      public final boolean lockThreshold;
62      public final boolean export;
63  
64      
65  
66  
67      private BudgetConstructionReportMode(final String reportModeName, final BuildMode reportBuildMode, final ReportSelectMode reportSelectMode, final String jasperFileName, final boolean lockThreshold) {
68          this.reportModeName = reportModeName;
69          this.reportBuildMode = reportBuildMode;
70          this.reportSelectMode = reportSelectMode;
71          this.jasperFileName = jasperFileName;
72          this.lockThreshold = lockThreshold;
73          this.export = false;
74      }
75      
76      
77  
78  
79      private BudgetConstructionReportMode(final String reportModeName, final BuildMode reportBuildMode, final ReportSelectMode reportSelectMode, final boolean export) {
80          this.reportModeName = reportModeName;
81          this.reportBuildMode = reportBuildMode;
82          this.reportSelectMode = reportSelectMode;
83          this.lockThreshold = false;
84          this.export = export;
85          this.jasperFileName = "";
86      }
87  
88      
89  
90  
91  
92  
93  
94      public static BudgetConstructionReportMode getBudgetConstructionReportModeByName(String reportModeName) {
95          BudgetConstructionReportMode foundReportMode = null;
96          
97          for(BudgetConstructionReportMode reportMode : EnumSet.allOf(BudgetConstructionReportMode.class)) {
98              if (reportMode.reportModeName.equals(reportModeName)) {
99                  foundReportMode = reportMode;
100                 break;
101             }
102         }
103         
104         return foundReportMode;
105     }
106 }