-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into additions-mainservice
main has some useful stuff
- Loading branch information
Showing
11 changed files
with
238 additions
and
14 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
16 changes: 16 additions & 0 deletions
16
MainService/src/main/java/ru/espada/ep/iptip/study_groups/StudyGroupService.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 |
---|---|---|
@@ -1,5 +1,21 @@ | ||
package ru.espada.ep.iptip.study_groups; | ||
|
||
import ru.espada.ep.iptip.study_groups.models.requests.*; | ||
|
||
import java.security.Principal; | ||
import java.util.List; | ||
|
||
public interface StudyGroupService { | ||
boolean hasPermission(String name, Long studyGroupId); | ||
|
||
StudyGroupEntity createStudyGroup(Principal principal, CreateStudyGroupRequest request); | ||
StudyGroupEntity createStudyGroupWithUsers(Principal principal, CreateStudyGroupWithUsersRequest createRequest); | ||
StudyGroupEntity modifyStudyGroup(Principal principal, ModifyStudyGroupRequest request); | ||
StudyGroupEntity getStudyGroup(Principal principal, Long studyGroupId); | ||
void deleteStudyGroup(Principal principal, Long studyGroupId); | ||
|
||
void attachUserToStudyGroup(Principal principal, AttachUserToStudyGroupRequest request); | ||
void detachUserFromStudyGroup(Principal principal, DetachUserFromStudyGroupRequest request); | ||
void setStudyGroupMembersSemester(Principal principal, SetStudyGroupMembersSemesterRequest request); | ||
List<Long> getStudyGroupMembers(Principal principal, Long studyGroupId); | ||
} |
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
15 changes: 15 additions & 0 deletions
15
...n/java/ru/espada/ep/iptip/study_groups/models/requests/AttachUserToStudyGroupRequest.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,15 @@ | ||
package ru.espada.ep.iptip.study_groups.models.requests; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Builder | ||
public class AttachUserToStudyGroupRequest { | ||
private Long studyGroupId; | ||
private Long userId; | ||
} |
15 changes: 15 additions & 0 deletions
15
...rc/main/java/ru/espada/ep/iptip/study_groups/models/requests/CreateStudyGroupRequest.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,15 @@ | ||
package ru.espada.ep.iptip.study_groups.models.requests; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Builder | ||
public class CreateStudyGroupRequest { | ||
private String name; | ||
private Long facultyId; | ||
} |
19 changes: 19 additions & 0 deletions
19
...ava/ru/espada/ep/iptip/study_groups/models/requests/CreateStudyGroupWithUsersRequest.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,19 @@ | ||
package ru.espada.ep.iptip.study_groups.models.requests; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Builder | ||
public class CreateStudyGroupWithUsersRequest { | ||
private Long id; | ||
private String name; | ||
private Long facultyId; | ||
private List<Long> users; | ||
} |
15 changes: 15 additions & 0 deletions
15
...java/ru/espada/ep/iptip/study_groups/models/requests/DetachUserFromStudyGroupRequest.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,15 @@ | ||
package ru.espada.ep.iptip.study_groups.models.requests; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Builder | ||
public class DetachUserFromStudyGroupRequest { | ||
private Long studyGroupId; | ||
private Long userId; | ||
} |
16 changes: 16 additions & 0 deletions
16
...rc/main/java/ru/espada/ep/iptip/study_groups/models/requests/ModifyStudyGroupRequest.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,16 @@ | ||
package ru.espada.ep.iptip.study_groups.models.requests; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Builder | ||
public class ModifyStudyGroupRequest { | ||
private Long id; | ||
private String name; | ||
private Long facultyId; | ||
} |
15 changes: 15 additions & 0 deletions
15
.../ru/espada/ep/iptip/study_groups/models/requests/SetStudyGroupMembersSemesterRequest.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,15 @@ | ||
package ru.espada.ep.iptip.study_groups.models.requests; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Builder | ||
public class SetStudyGroupMembersSemesterRequest { | ||
private Long studyGroupId; | ||
private Long semesterId; | ||
} |
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