001/* 002 * Copyright 2022 Anyware Services 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 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 implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.ametys.plugins.hyperplanning; 017 018import java.time.ZonedDateTime; 019 020import com.indexeducation.frahtm.hpsvcw.THpSvcWCleCoursAnnule; 021 022/** 023 * Object representing a lesson from Hyperplanning 024 */ 025public class CancelledLesson 026{ 027 private THpSvcWCleCoursAnnule _courseKey; 028 private String _label; 029 private ZonedDateTime _date; 030 private String _subjectCode; 031 private String _fullLabel; 032 private String _cancelComment; 033 private String _cancelRationale; 034 035 /** 036 * Basic constructor 037 * @param key the webServiceKey of the course, this lesson belongs to 038 * @param code the code of the subject this lesson belongs to 039 * @param label the label of the subject this lesson belongs to 040 * @param fullLabel the full label of the subject this lesson belongs to 041 * @param date the original date of the lesson 042 * @param cancelRationale the cancellation rationale 043 * @param cancelComment the cancellation comment 044 */ 045 public CancelledLesson(THpSvcWCleCoursAnnule key, String code, String label, String fullLabel, ZonedDateTime date, String cancelRationale, String cancelComment) 046 { 047 _courseKey = key; 048 _subjectCode = code; 049 _label = label; 050 _fullLabel = fullLabel; 051 _cancelComment = cancelComment; 052 _cancelRationale = cancelRationale; 053 _date = date; 054 } 055 056 /** 057 * Get the course key 058 * @return the key 059 */ 060 public THpSvcWCleCoursAnnule getCourseKey() 061 { 062 return _courseKey; 063 } 064 065 /** 066 * Get the course code 067 * @return the code 068 */ 069 public String getSubjectCode() 070 { 071 return _subjectCode; 072 } 073 074 /** 075 * Get the course label 076 * @return the label 077 */ 078 public String getSubjectLabel() 079 { 080 return _label; 081 } 082 083 /** 084 * Get the full course label 085 * @return the label 086 */ 087 public String getSubjectFullLabel() 088 { 089 return _fullLabel; 090 } 091 092 /** 093 * Get the course date 094 * @return the date 095 */ 096 public ZonedDateTime getDate() 097 { 098 return _date; 099 } 100 101 /** 102 * Get the cancellation rationale 103 * @return the rationale 104 */ 105 public String getCancelRationale() 106 { 107 return _cancelRationale; 108 } 109 110 /** 111 * Get the cancellation comment 112 * @return the comment 113 */ 114 public String getCancelComment() 115 { 116 return _cancelComment; 117 } 118}