Skip to content

Commit

Permalink
feat: announcement type
Browse files Browse the repository at this point in the history
  • Loading branch information
vinceh121 committed Dec 3, 2023
1 parent 0d0224e commit 2ad312d
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 25 deletions.
52 changes: 27 additions & 25 deletions wrapper/src/main/java/me/vinceh121/jskolengo/SkolengoConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import me.vinceh121.jskolengo.entities.evaluation.Period;
import me.vinceh121.jskolengo.entities.evaluation.SkillAcquisitionColors;
import me.vinceh121.jskolengo.entities.evaluation.SkillsSetting;
import me.vinceh121.jskolengo.entities.info.Announcement;
import me.vinceh121.jskolengo.entities.info.News;
import me.vinceh121.jskolengo.entities.info.SchoolInfoAuthor;
import me.vinceh121.jskolengo.entities.info.SchoolInfoFile;
Expand All @@ -35,29 +36,30 @@ public final class SkolengoConstants {
OIDC_CALLBACK = "skoapp-prod://sign-in-callback";

public static final Class<?>[] ENTITY_CLASSES = new Class<?>[] {
Attachment.class,
School.class,
SkoAppConfig.class,
StudentUserInfo.class,
Agenda.class,
Audio.class,
CorrectedWork.class,
Homework.class,
Lesson.class,
LessonContent.class,
PedagogicContent.class,
Subject.class,
Evaluation.class,
EvaluationsSetting.class,
Period.class,
SkillAcquisitionColors.class,
SkillsSetting.class,
News.class,
SchoolInfoAuthor.class,
SchoolInfoFile.class,
SchoolInfoTechnicalUser.class,
AbstractPerson.class,
NonTeachingStaff.class,
OtherPerson.class,
Teacher.class };
Attachment.class,
School.class,
SkoAppConfig.class,
StudentUserInfo.class,
Agenda.class,
Audio.class,
CorrectedWork.class,
Homework.class,
Lesson.class,
LessonContent.class,
PedagogicContent.class,
Subject.class,
Evaluation.class,
EvaluationsSetting.class,
Period.class,
SkillAcquisitionColors.class,
SkillsSetting.class,
Announcement.class,
News.class,
SchoolInfoAuthor.class,
SchoolInfoFile.class,
SchoolInfoTechnicalUser.class,
AbstractPerson.class,
NonTeachingStaff.class,
OtherPerson.class,
Teacher.class, };
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package me.vinceh121.jskolengo.entities.info;

import com.github.jasminb.jsonapi.annotations.Type;

@Type("announcement")
public class Announcement extends News {
private String level;

public String getLevel() {
return level;
}

public void setLevel(String level) {
this.level = level;
}

@Override
public String toString() {
return "Announcement [level="
+ level
+ ", getAttachments()="
+ getAttachments()
+ ", getPublicationDateTime()="
+ getPublicationDateTime()
+ ", getTitle()="
+ getTitle()
+ ", getShortContent()="
+ getShortContent()
+ ", getContent()="
+ getContent()
+ ", getUrl()="
+ getUrl()
+ ", getLinkedInfoUrl()="
+ getLinkedInfoUrl()
+ ", getLinkedWebSiteUrl()="
+ getLinkedWebSiteUrl()
+ ", getSchool()="
+ getSchool()
+ ", getAuthor()="
+ getAuthor()
+ ", getIllustration()="
+ getIllustration()
+ ", getId()="
+ getId()
+ "]";
}

public enum Level { // XXX fill up
INFO;
}
}

0 comments on commit 2ad312d

Please sign in to comment.