View Javadoc

1   /*
2    * Copyright 2011 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 1.0 (the
5    * "License"); you may not use this file except in compliance with the
6    * License.  You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl1.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
13   * implied.  See the License for the specific language governing
14   * permissions and limitations under the License.
15   */
16  package org.kuali.student.r2.common.util.constants;
17  
18  import org.kuali.student.enrollment.courseofferingset.dto.SocInfo;
19  import org.kuali.student.enrollment.courseofferingset.service.CourseOfferingSetService;
20  import org.kuali.student.r2.common.constants.CommonServiceConstants;
21  
22  import java.util.Arrays;
23  import java.util.Collections;
24  import java.util.HashSet;
25  import java.util.List;
26  import java.util.Set;
27  
28  /**
29   * Course Offering Service Constants
30   * @see LuiServiceConstants
31   *
32   * @author nwright
33   */
34  public class CourseOfferingSetServiceConstants {
35  
36      public static final String NAMESPACE = CommonServiceConstants.REF_OBJECT_URI_GLOBAL_PREFIX + "courseOfferingSet";
37      public static final String SERVICE_NAME_LOCAL_PART = CourseOfferingSetService.class.getSimpleName();
38      public static final String REF_OBJECT_URI_SOC = NAMESPACE + "/" + SocInfo.class.getSimpleName();
39      public static final String MAIN_SOC_TYPE_KEY = "kuali.soc.type.main";
40      public static final String SUBJECT_AREA_SOC_TYPE_KEY = "kuali.soc.type.subject.area";
41      public static final String UNITS_CONTENT_OWNER_SOC_TYPE_KEY = "kuali.soc.type.units.content.owner";
42      public static final String UNITS_DEPLOYMENT_OWNER_SOC_TYPE_KEY = "kuali.soc.type.units.deployment.owner";
43  
44      // SOC states (see https://wiki.kuali.org/display/STUDENT/Set+of+Course+Offerings+%28SOC%29+States)
45      // SOC states (see https://wiki.kuali.org/display/STUDENT/Course+Offering+Set+Types+and+States)
46      public static final String DRAFT_SOC_STATE_KEY = "kuali.soc.state.draft";
47      public static final String OPEN_SOC_STATE_KEY = "kuali.soc.state.open";
48      public static final String LOCKED_SOC_STATE_KEY = "kuali.soc.state.locked";
49      public static final String FINALEDITS_SOC_STATE_KEY = "kuali.soc.state.finaledits";
50      public static final String PUBLISHING_SOC_STATE_KEY = "kuali.soc.state.publishing";
51      public static final String PUBLISHED_SOC_STATE_KEY = "kuali.soc.state.published";
52      public static final String CLOSED_SOC_STATE_KEY = "kuali.soc.state.closed";
53  
54      public static final String SOC_LIFECYCLE_KEY = "kuali.soc.lifecycle";  // Not a state
55      public static final String[] SOC_LIFECYCLE_STATE_KEYS = {
56              DRAFT_SOC_STATE_KEY,
57              OPEN_SOC_STATE_KEY,
58              LOCKED_SOC_STATE_KEY,
59              FINALEDITS_SOC_STATE_KEY,
60              PUBLISHING_SOC_STATE_KEY,
61              PUBLISHED_SOC_STATE_KEY,
62              CLOSED_SOC_STATE_KEY
63      };
64  
65      // SOC scheduling states (see https://wiki.kuali.org/display/STUDENT/SOC+Scheduling+States )
66      public static final String SOC_SCHEDULING_STATE_NOT_STARTED = "kuali.soc.scheduling.state.notstarted";
67      public static final String SOC_SCHEDULING_STATE_IN_PROGRESS = "kuali.soc.scheduling.state.inprogress";
68      public static final String SOC_SCHEDULING_STATE_COMPLETED   = "kuali.soc.scheduling.state.completed";
69      public static final String[] ALL_SOC_SCHEDULING_STATES = {
70              SOC_SCHEDULING_STATE_NOT_STARTED,
71              SOC_SCHEDULING_STATE_IN_PROGRESS,
72              SOC_SCHEDULING_STATE_COMPLETED
73      };
74  
75      // rollover  types
76      public static final String ROLLOVER_RESULT_TYPE_KEY = "kuali.soc.rollover.results.type.rollover";
77      public static final String REVERSE_ROLLOVER_RESULT_TYPE_KEY = "kuali.soc.rollover.results.type.reverse";
78  
79      // states for rollover
80      public static final String SUBMITTED_RESULT_STATE_KEY = "kuali.soc.rollover.state.submitted";
81      public static final String RUNNING_RESULT_STATE_KEY = "kuali.soc.rollover.state.running";
82      public static final String FINISHED_RESULT_STATE_KEY = "kuali.soc.rollover.state.finished";
83      public static final String ABORTED_RESULT_STATE_KEY = "kuali.soc.rollover.state.aborted";
84  
85      // item types
86      public static final String CREATE_RESULT_ITEM_TYPE_KEY = "kuali.soc.rollover.result.item.type.create";
87      public static final String DELETE_RESULT_ITEM_TYPE_KEY = "kuali.soc.rollover.result.item.type.delete";
88  
89      // item  states
90      public static final String CREATED_RESULT_ITEM_STATE_KEY = "kuali.soc.rollover.result.item.state.processed.created";
91      public static final String UPDATED_RESULT_ITEM_STATE_KEY = "kuali.soc.rollover.result.item.state.processed.updated";
92      public static final String DELETED_RESULT_ITEM_STATE_KEY = "kuali.soc.rollover.result.item.state.processed.deleted";
93      public static final String ERROR_RESULT_ITEM_STATE_KEY = "kuali.soc.rollover.result.item.state.error";
94      public static final String CANCELED_RESULT_ITEM_STATE_KEY = "kuali.soc.rollover.result.item.state.canceled";
95      public static final String NEWVERSION_RESULT_ITEM_STATE_KEY = "kuali.soc.rollover.result.item.state.new.version";
96      public static final String RETIRED_RESULT_ITEM_STATE_KEY = "kuali.soc.rollover.result.item.state.retired";
97      public static final List<String> SUCCESSFUL_RESULT_ITEM_STATES = Collections.unmodifiableList(Arrays.asList(
98              CREATED_RESULT_ITEM_STATE_KEY,
99              UPDATED_RESULT_ITEM_STATE_KEY,
100             DELETED_RESULT_ITEM_STATE_KEY ));
101 
102     public static final String INFO_RESULT_ITEM_STATE_KEY = "kuali.soc.rollover.item.state.info";
103 
104     // dynamic attribute key for parameters
105     public static final String PARAMETER_SOURCE_SOC_ID_ATTR_KEY = "kuali.parameter.source.soc.id";
106     public static final String PARAMETER_TARGET_TERM_ID_ATTR_KEY = "kuali.parameter.target.term.id";
107     public static final String PARAMETER_OPTION_KEY_ATTR_KEY = "kuali.parameter.option.key";
108 
109     // dynamic attribute key for results
110     public static final String GLOBAL_RESULT_TARGET_SOC_ID_ATTR_KEY = "kuali.global.result.targetSocId";
111 
112     // which courses
113     public static final String STILL_OFFERABLE_OPTION_KEY = "kuali.rollover.whatcourses.stillofferable";
114     public static final String IF_NO_NEW_VERSION_OPTION_KEY = "kuali.rollover.whatcourses.ifnonewversion";
115     public static final String IGNORE_CANCELLED_OPTION_KEY = "kuali.rollover.whatcourses.ignorecancelled";
116     public static final String SKIP_IF_ALREADY_EXISTS_OPTION_KEY = "kuali.rollover.whatcourses.skipifalreadyexists";
117     public static final String IGNORE_CANCELLED_AO_OPTION_KEY = "kuali.rollover.whatdata.nocanceledactivityofferings";
118 
119     // what data
120     public static final String USE_CANONICAL_OPTION_KEY = "kuali.rollover.whatdata.usecanonical";
121     public static final String NO_SCHEDULE_OPTION_KEY = "kuali.rollover.whatdata.noschedule";
122     public static final String NO_INSTRUCTORS_OPTION_KEY = "kuali.rollover.whatdata.noinstructors";
123 
124     // general processing
125     public static final String LOG_SUCCESSES_OPTION_KEY = "kuali.rollover.processing.log.successes";
126     public static final String LOG_FREQUENCY_OPTION_KEY_PREFIX = "kuali.rollover.processing.log.frequency.";
127     public static final String HALT_ERRORS_MAX_OPTION_KEY_PREFIX = "kuali.rollover.processing.halt.error.max.";
128     public static final String RUN_SYNCHRONOUSLY_OPTION_KEY = "kuali.rollover.processing.run.synchronously";
129     public static final String BYPASS_BUSINESS_LOGIC_ON_SOC_STATE_CHANGE_FOR_AFT_TESTING = "kuali.aft-decorator.bypass.business.logic";
130 
131     // scheduling
132     public static final String RUN_SCHEDULING_SYNCHRONOUSLY_OPTION_KEY = "kuali.scheduling.processing.run.synchronously";
133 
134     // Whether to check target term/subterm for official states at the rolloverCourseOffering level
135     // Or at the rolloverSoc level.  If this option key exists, then no need for rolloverCourseOffering
136     // to make this check.
137     public static final String TARGET_TERM_VALIDATED_OPTION_KEY = "kuali.rollover.option.targetterm.validated";
138 
139     // KSENROLL-8062 Dynamic attributes for rolling over individual CO information that has access to "global settings"
140     public static final String ROLLOVER_ASSIST_ID_DYNATTR_KEY = "kuali.rollover.context.att.rollover.assist.id";
141 
142     // KSENROLL-9460 Option key to continue without generating examofferings
143     public static final String CONTINUE_WITHOUT_EXAM_OFFERINGS_OPTION_KEY = "kuali.rollover.option.contunue.without.exam.offerings";
144 
145     // dynamic attributes for rollover info
146     public static final String CO_CREATED_RESULT_DYNATTR_KEY = "kuali.soc.rollover.result.dynattr.course.offerings.created";
147     public static final String CO_SKIPPED_RESULT_DYNATTR_KEY = "kuali.soc.rollover.result.dynattr.course.offerings.skipped";
148     public static final String AO_CREATED_RESULT_DYNATTR_KEY = "kuali.soc.rollover.result.dynattr.activity.offerings.created";
149     public static final String AO_SKIPPED_RESULT_DYNATTR_KEY = "kuali.soc.rollover.result.dynattr.activity.offerings.skipped";
150     public static final String DATE_INITIATED_RESULT_DYNATTR_KEY = "kuali.soc.rollover.result.dynattr.date.initiated";
151     public static final String DATE_COMPLETED_RESULT_DYNATTR_KEY = "kuali.soc.rollover.result.dynattr.date.completed";
152     public static final Set<String> ALL_RESULT_DYNATTR_KEYS;
153     static { // Store all the dynamic attribute keys in a set...makes lookup easier
154         ALL_RESULT_DYNATTR_KEYS = new HashSet<String>();
155         ALL_RESULT_DYNATTR_KEYS.add(CO_CREATED_RESULT_DYNATTR_KEY);
156         ALL_RESULT_DYNATTR_KEYS.add(CO_SKIPPED_RESULT_DYNATTR_KEY);
157         ALL_RESULT_DYNATTR_KEYS.add(AO_CREATED_RESULT_DYNATTR_KEY);
158         ALL_RESULT_DYNATTR_KEYS.add(AO_SKIPPED_RESULT_DYNATTR_KEY);
159         ALL_RESULT_DYNATTR_KEYS.add(DATE_INITIATED_RESULT_DYNATTR_KEY);
160         ALL_RESULT_DYNATTR_KEYS.add(DATE_COMPLETED_RESULT_DYNATTR_KEY);
161     }
162 
163     // general processing
164     public static final String REVERSE_JUST_CREATES_OPTION_KEY = "kuali.reverse.rollover.just.creates";
165 
166     // canonical to course offering options
167     public static final String CREDITS_MATCH_SCHEDULED_HOURS_OPTION_KEY = "kuali.canonical.course.to.course.offering.credits.match.scheduled.hours";
168     public static final String NOT_COURSE_TITLE_OPTION_KEY = "kuali.canonical.course.to.course.offering.not.title";
169 
170     // Course is R1.  Grading/credit options appear to have changed in R2, so not worth copying.
171     public static final String NOT_GRADING_CREDIT_OPTION_KEY = "kuali.canonical.course.to.course.offering.not.grading.credit.options";
172     
173     public static final String ACTIVITY_OFFERINGS_CREATED_SOC_ITEM_DYNAMIC_ATTRIBUTE = "activityOfferingsCreated";
174 
175     public static final String NO_EXAM_PERIOD_WARNING_DIALOG = "warningMessageNoExamPeriod";
176 
177     /**
178      * Parameters for performing criteria searches for SOCs.
179      */
180     public static final class SearchParameters {
181         public static final String SOC_STATE = "socState";
182     }
183 }