-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
separated 'admins-and-groupings' into 2 endpoints 'admins' & 'all-gro…
…upings' (#511)
- Loading branch information
1 parent
b6a5642
commit d6a914b
Showing
13 changed files
with
203 additions
and
167 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
50 changes: 50 additions & 0 deletions
50
src/main/java/edu/hawaii/its/api/groupings/GroupingPaths.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,50 @@ | ||
package edu.hawaii.its.api.groupings; | ||
|
||
import com.fasterxml.jackson.annotation.JsonSetter; | ||
import edu.hawaii.its.api.type.GroupingPath; | ||
import edu.hawaii.its.api.wrapper.Group; | ||
import edu.hawaii.its.api.wrapper.GroupAttributeResults; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class GroupingPaths { | ||
|
||
private String resultCode; | ||
private List<GroupingPath> groupingPaths; | ||
|
||
|
||
public GroupingPaths() { | ||
setGroupingPaths(new ArrayList<>()); | ||
setResultCode("FAILURE"); | ||
} | ||
|
||
public GroupingPaths(GroupAttributeResults groupAttributeResults) { | ||
setGroupingPaths(groupAttributeResults); | ||
setResultCode(groupAttributeResults.getResultCode()); | ||
} | ||
|
||
@JsonSetter | ||
public void setGroupingPaths(List<GroupingPath> groupingPaths) { | ||
this.groupingPaths = groupingPaths; | ||
} | ||
|
||
public void setGroupingPaths(GroupAttributeResults groupAttributeResults) { | ||
this.groupingPaths = new ArrayList<>(); | ||
for (Group group : groupAttributeResults.getGroups()) { | ||
this.groupingPaths.add(new GroupingPath(group.getGroupPath())); | ||
} | ||
} | ||
|
||
public List<GroupingPath> getGroupingPaths() { | ||
return this.groupingPaths; | ||
} | ||
|
||
public void setResultCode(String resultCode) { | ||
this.resultCode = resultCode; | ||
} | ||
|
||
public String getResultCode() { | ||
return this.resultCode; | ||
} | ||
} |
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
34 changes: 0 additions & 34 deletions
34
src/main/java/edu/hawaii/its/api/type/AdminListsHolder.java
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.