001/* 002 * Copyright 2011 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 1.0 (the 005 * "License"); you may not use this file except in compliance with the 006 * License. You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl1.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 013 * implied. See the License for the specific language governing 014 * permissions and limitations under the License. 015 */ 016package org.kuali.student.r2.common.util.constants; 017 018import org.kuali.student.enrollment.courseofferingset.dto.SocInfo; 019import org.kuali.student.enrollment.courseofferingset.service.CourseOfferingSetService; 020import org.kuali.student.r2.common.constants.CommonServiceConstants; 021 022import java.util.Arrays; 023import java.util.Collections; 024import java.util.HashSet; 025import java.util.List; 026import java.util.Set; 027 028/** 029 * Course Offering Service Constants 030 * @see LuiServiceConstants 031 * 032 * @author nwright 033 */ 034public class CourseOfferingSetServiceConstants { 035 036 public static final String NAMESPACE = CommonServiceConstants.REF_OBJECT_URI_GLOBAL_PREFIX + "courseOfferingSet"; 037 public static final String SERVICE_NAME_LOCAL_PART = CourseOfferingSetService.class.getSimpleName(); 038 public static final String REF_OBJECT_URI_SOC = NAMESPACE + "/" + SocInfo.class.getSimpleName(); 039 public static final String MAIN_SOC_TYPE_KEY = "kuali.soc.type.main"; 040 public static final String SUBJECT_AREA_SOC_TYPE_KEY = "kuali.soc.type.subject.area"; 041 public static final String UNITS_CONTENT_OWNER_SOC_TYPE_KEY = "kuali.soc.type.units.content.owner"; 042 public static final String UNITS_DEPLOYMENT_OWNER_SOC_TYPE_KEY = "kuali.soc.type.units.deployment.owner"; 043 044 // SOC states (see https://wiki.kuali.org/display/STUDENT/Set+of+Course+Offerings+%28SOC%29+States) 045 // SOC states (see https://wiki.kuali.org/display/STUDENT/Course+Offering+Set+Types+and+States) 046 public static final String DRAFT_SOC_STATE_KEY = "kuali.soc.state.draft"; 047 public static final String OPEN_SOC_STATE_KEY = "kuali.soc.state.open"; 048 public static final String LOCKED_SOC_STATE_KEY = "kuali.soc.state.locked"; 049 public static final String FINALEDITS_SOC_STATE_KEY = "kuali.soc.state.finaledits"; 050 public static final String PUBLISHING_SOC_STATE_KEY = "kuali.soc.state.publishing"; 051 public static final String PUBLISHED_SOC_STATE_KEY = "kuali.soc.state.published"; 052 public static final String CLOSED_SOC_STATE_KEY = "kuali.soc.state.closed"; 053 054 public static final String SOC_LIFECYCLE_KEY = "kuali.soc.lifecycle"; // Not a state 055 public static final String[] SOC_LIFECYCLE_STATE_KEYS = { 056 DRAFT_SOC_STATE_KEY, 057 OPEN_SOC_STATE_KEY, 058 LOCKED_SOC_STATE_KEY, 059 FINALEDITS_SOC_STATE_KEY, 060 PUBLISHING_SOC_STATE_KEY, 061 PUBLISHED_SOC_STATE_KEY, 062 CLOSED_SOC_STATE_KEY 063 }; 064 065 // SOC scheduling states (see https://wiki.kuali.org/display/STUDENT/SOC+Scheduling+States ) 066 public static final String SOC_SCHEDULING_STATE_NOT_STARTED = "kuali.soc.scheduling.state.notstarted"; 067 public static final String SOC_SCHEDULING_STATE_IN_PROGRESS = "kuali.soc.scheduling.state.inprogress"; 068 public static final String SOC_SCHEDULING_STATE_COMPLETED = "kuali.soc.scheduling.state.completed"; 069 public static final String[] ALL_SOC_SCHEDULING_STATES = { 070 SOC_SCHEDULING_STATE_NOT_STARTED, 071 SOC_SCHEDULING_STATE_IN_PROGRESS, 072 SOC_SCHEDULING_STATE_COMPLETED 073 }; 074 075 // rollover types 076 public static final String ROLLOVER_RESULT_TYPE_KEY = "kuali.soc.rollover.results.type.rollover"; 077 public static final String REVERSE_ROLLOVER_RESULT_TYPE_KEY = "kuali.soc.rollover.results.type.reverse"; 078 079 // states for rollover 080 public static final String SUBMITTED_RESULT_STATE_KEY = "kuali.soc.rollover.state.submitted"; 081 public static final String RUNNING_RESULT_STATE_KEY = "kuali.soc.rollover.state.running"; 082 public static final String FINISHED_RESULT_STATE_KEY = "kuali.soc.rollover.state.finished"; 083 public static final String ABORTED_RESULT_STATE_KEY = "kuali.soc.rollover.state.aborted"; 084 085 // item types 086 public static final String CREATE_RESULT_ITEM_TYPE_KEY = "kuali.soc.rollover.result.item.type.create"; 087 public static final String DELETE_RESULT_ITEM_TYPE_KEY = "kuali.soc.rollover.result.item.type.delete"; 088 089 // item states 090 public static final String CREATED_RESULT_ITEM_STATE_KEY = "kuali.soc.rollover.result.item.state.processed.created"; 091 public static final String UPDATED_RESULT_ITEM_STATE_KEY = "kuali.soc.rollover.result.item.state.processed.updated"; 092 public static final String DELETED_RESULT_ITEM_STATE_KEY = "kuali.soc.rollover.result.item.state.processed.deleted"; 093 public static final String ERROR_RESULT_ITEM_STATE_KEY = "kuali.soc.rollover.result.item.state.error"; 094 public static final String CANCELED_RESULT_ITEM_STATE_KEY = "kuali.soc.rollover.result.item.state.canceled"; 095 public static final String NEWVERSION_RESULT_ITEM_STATE_KEY = "kuali.soc.rollover.result.item.state.new.version"; 096 public static final String RETIRED_RESULT_ITEM_STATE_KEY = "kuali.soc.rollover.result.item.state.retired"; 097 public static final List<String> SUCCESSFUL_RESULT_ITEM_STATES = Collections.unmodifiableList(Arrays.asList( 098 CREATED_RESULT_ITEM_STATE_KEY, 099 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.continue.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}