forked from sakaiproject/sakai
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FARM-5 Dates Management - Start/End Dates (sakaiproject#7407)
- Loading branch information
Showing
30 changed files
with
2,974 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0"?> | ||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.sakaiproject.sitemanage</groupId> | ||
<artifactId>sakai-site-datemanager-base</artifactId> | ||
<version>20-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<name>sakai-site-datemanager-api</name> | ||
<groupId>org.sakaiproject.datemanager.api</groupId> | ||
<artifactId>sakai-site-datemanager-api</artifactId> | ||
<packaging>jar</packaging> | ||
|
||
<properties> | ||
<deploy.target>shared</deploy.target> | ||
</properties> | ||
|
||
<dependencies> | ||
<!-- Sakai dependencies --> | ||
<!-- Third dependencies --> | ||
<dependency> | ||
<groupId>com.googlecode.json-simple</groupId> | ||
<artifactId>json-simple</artifactId> | ||
<version>${json.simple.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
29 changes: 29 additions & 0 deletions
29
...anage/datemanager/api/src/java/org/sakaiproject/datemanager/api/DateManagerConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/********************************************************************************** | ||
Copyright (c) 2019 Apereo Foundation | ||
Licensed under the Educational Community License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://opensource.org/licenses/ecl2 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
**********************************************************************************/ | ||
|
||
package org.sakaiproject.datemanager.api; | ||
|
||
public class DateManagerConstants { | ||
public static final String COMMON_ID_ASSIGNMENTS = "sakai.assignment.grades"; | ||
public static final String COMMON_ID_ASSESSMENTS = "sakai.samigo"; | ||
public static final String COMMON_ID_SIGNUP = "sakai.signup"; | ||
public static final String COMMON_ID_GRADEBOOK = "sakai.gradebookng"; | ||
public static final String COMMON_ID_RESOURCES = "sakai.resources"; | ||
public static final String COMMON_ID_CALENDAR = "sakai.schedule"; | ||
public static final String COMMON_ID_FORUMS = "sakai.forums"; | ||
public static final String COMMON_ID_ANNOUNCEMENTS = "sakai.announcements"; | ||
public static final String COMMON_ID_LESSONS = "sakai.lessonbuildertool"; | ||
|
||
public static final String DATEPICKER_DATETIME_FORMAT = "yyyy-MM-dd'T'HH:mm:ss"; | ||
public static final int LIST_VIEW_YEAR_RANGE = 18; | ||
} |
78 changes: 78 additions & 0 deletions
78
...-manage/datemanager/api/src/java/org/sakaiproject/datemanager/api/DateManagerService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
/********************************************************************************** | ||
Copyright (c) 2019 Apereo Foundation | ||
Licensed under the Educational Community License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://opensource.org/licenses/ecl2 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
**********************************************************************************/ | ||
|
||
package org.sakaiproject.datemanager.api; | ||
|
||
import java.time.Instant; | ||
import java.util.Locale; | ||
import java.util.TimeZone; | ||
|
||
import org.json.simple.JSONArray; | ||
|
||
import org.sakaiproject.datemanager.api.model.DateManagerValidation; | ||
|
||
public interface DateManagerService { | ||
// Global methods | ||
public String getCurrentUserId(); | ||
public String getCurrentSiteId(); | ||
public Locale getUserLocale(); | ||
public String getMessage(String messageId); | ||
public Instant parseStringToInstant(String timestamp, TimeZone userTimeZone); | ||
public boolean currentSiteContainsTool(String commonId); | ||
public String getToolTitle(String commonId); | ||
|
||
// Assignments methods | ||
public JSONArray getAssignmentsForContext(String siteId); | ||
public DateManagerValidation validateAssignments(String siteId, JSONArray assignments) throws Exception; | ||
public void updateAssignments(DateManagerValidation assignmentsValidation) throws Exception; | ||
|
||
// Assessments methods | ||
public JSONArray getAssessmentsForContext(String siteId); | ||
public DateManagerValidation validateAssessments(String siteId, JSONArray assessments) throws Exception; | ||
public void updateAssessments(DateManagerValidation assessmentsValidation) throws Exception; | ||
|
||
// Gradebook methods | ||
public JSONArray getGradebookItemsForContext(String siteId); | ||
public DateManagerValidation validateGradebookItems(String siteId, JSONArray gradebookItems) throws Exception; | ||
public void updateGradebookItems(DateManagerValidation gradebookItemsValidation) throws Exception; | ||
|
||
// Signup methods | ||
public JSONArray getSignupMeetingsForContext(String siteId); | ||
public DateManagerValidation validateSignupMeetings(String siteId, JSONArray signupMeetings) throws Exception; | ||
public void updateSignupMeetings(DateManagerValidation signupValidation) throws Exception; | ||
|
||
// Resources methods | ||
public JSONArray getResourcesForContext(String siteId); | ||
public DateManagerValidation validateResources(String siteId, JSONArray resources) throws Exception; | ||
public void updateResources(DateManagerValidation resourceValidation) throws Exception; | ||
|
||
// Calendar methods | ||
public JSONArray getCalendarEventsForContext(String siteId); | ||
public DateManagerValidation validateCalendarEvents(String siteId, JSONArray calendarEvents) throws Exception; | ||
public void updateCalendarEvents(DateManagerValidation calendarValidation) throws Exception; | ||
|
||
// Forum methods | ||
public JSONArray getForumsForContext(String siteId); | ||
public DateManagerValidation validateForums(String siteId, JSONArray forums) throws Exception; | ||
public void updateForums(DateManagerValidation forumValidation) throws Exception; | ||
|
||
// Announcement methods | ||
public JSONArray getAnnouncementsForContext(String siteId); | ||
public DateManagerValidation validateAnnouncements(String siteId, JSONArray announcements) throws Exception; | ||
public void updateAnnouncements(DateManagerValidation announcementValidation) throws Exception; | ||
|
||
// Lessons methods | ||
public JSONArray getLessonsForContext(String siteId); | ||
public DateManagerValidation validateLessons(String siteId, JSONArray lessons) throws Exception; | ||
public void updateLessons(DateManagerValidation lessonsValidation) throws Exception; | ||
} |
25 changes: 25 additions & 0 deletions
25
...age/datemanager/api/src/java/org/sakaiproject/datemanager/api/model/DateManagerError.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/********************************************************************************** | ||
Copyright (c) 2019 Apereo Foundation | ||
Licensed under the Educational Community License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://opensource.org/licenses/ecl2 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
**********************************************************************************/ | ||
|
||
package org.sakaiproject.datemanager.api.model; | ||
|
||
import lombok.AllArgsConstructor; | ||
|
||
@AllArgsConstructor | ||
public class DateManagerError { | ||
public String field; | ||
public String msg; | ||
public String toolId; | ||
public String toolTitle; | ||
public int idx; | ||
} |
26 changes: 26 additions & 0 deletions
26
...ge/datemanager/api/src/java/org/sakaiproject/datemanager/api/model/DateManagerUpdate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/********************************************************************************** | ||
Copyright (c) 2019 Apereo Foundation | ||
Licensed under the Educational Community License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://opensource.org/licenses/ecl2 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
**********************************************************************************/ | ||
|
||
package org.sakaiproject.datemanager.api.model; | ||
|
||
import java.time.Instant; | ||
|
||
import lombok.AllArgsConstructor; | ||
|
||
@AllArgsConstructor | ||
public class DateManagerUpdate { | ||
public Object object; | ||
public Instant openDate; | ||
public Instant dueDate; | ||
public Instant acceptUntilDate; | ||
} |
27 changes: 27 additions & 0 deletions
27
...atemanager/api/src/java/org/sakaiproject/datemanager/api/model/DateManagerValidation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/********************************************************************************** | ||
Copyright (c) 2019 Apereo Foundation | ||
Licensed under the Educational Community License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://opensource.org/licenses/ecl2 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
**********************************************************************************/ | ||
|
||
package org.sakaiproject.datemanager.api.model; | ||
|
||
import java.util.List; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Getter @Setter | ||
@NoArgsConstructor | ||
public class DateManagerValidation { | ||
private List<DateManagerError> errors; | ||
private List<Object> updates; | ||
} |
Oops, something went wrong.