Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions admin/src/main/ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "admin-app",
"version": "6.15.6",
"version": "6.15.6-%branch%.%generateVersion%",
"scripts": {
"ng": "ng",
"start": "ng serve --host 0.0.0.0",
Expand Down Expand Up @@ -34,9 +34,9 @@
"font-awesome": "4.7.0",
"jquery": "^3.4.1",
"ngx-infinite-scroll": "14.0.1",
"ngx-ode-core": "4.7.4",
"ngx-ode-sijil": "4.7.4",
"ngx-ode-ui": "4.7.4",
"ngx-ode-core": "dev",
"ngx-ode-sijil": "dev",
"ngx-ode-ui": "dev",
"ngx-trumbowyg": "^6.0.7",
"noty": "2.4.1",
"reflect-metadata": "0.1.10",
Expand Down
12 changes: 12 additions & 0 deletions communication/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,17 @@
<version>${entCoreLibsVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-codegen</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
package org.entcore.communication.dto.bus;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.vertx.codegen.annotations.DataObject;
import io.vertx.codegen.json.annotations.JsonGen;
import io.vertx.core.json.JsonObject;

import java.util.List;

@JsonInclude(JsonInclude.Include.NON_NULL)
@DataObject
@JsonGen
public class BusUserDTO {

private String id;
private String name;
private String login;
private String username;
private String type;
private String profile;
private String lastName;
private String firstName;
private List<String> profiles;
private List<String> positionIds;
private List<String> positionNames;

public BusUserDTO() {}

public BusUserDTO(JsonObject json) {
this();
BusUserDTOConverter.fromJson(json, this);
}

public JsonObject toJson() {
JsonObject json = new JsonObject();
BusUserDTOConverter.toJson(this, json);
return json;
}

public String getId() { return id; }
public BusUserDTO setId(String id) { this.id = id; return this; }

public String getName() { return name; }
public BusUserDTO setName(String name) { this.name = name; return this; }

public String getLogin() { return login; }
public BusUserDTO setLogin(String login) { this.login = login; return this; }

public String getUsername() { return username; }
public BusUserDTO setUsername(String username) { this.username = username; return this; }

public String getType() { return type; }
public BusUserDTO setType(String type) { this.type = type; return this; }

public String getProfile() { return profile; }
public BusUserDTO setProfile(String profile) { this.profile = profile; return this; }

public String getLastName() { return lastName; }
public BusUserDTO setLastName(String lastName) { this.lastName = lastName; return this; }

public String getFirstName() { return firstName; }
public BusUserDTO setFirstName(String firstName) { this.firstName = firstName; return this; }

public List<String> getProfiles() { return profiles; }
public BusUserDTO setProfiles(List<String> profiles) { this.profiles = profiles; return this; }

public List<String> getPositionIds() { return positionIds; }
public BusUserDTO setPositionIds(List<String> positionIds) { this.positionIds = positionIds; return this; }

public List<String> getPositionNames() { return positionNames; }
public BusUserDTO setPositionNames(List<String> positionNames) { this.positionNames = positionNames; return this; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
package org.entcore.communication.dto.bus;

import io.vertx.codegen.annotations.DataObject;
import io.vertx.codegen.json.annotations.JsonGen;
import io.vertx.core.json.JsonObject;
import java.util.List;

@DataObject
@JsonGen
public class CommunicationBusDTO {

private String action;
private List<String> schoolIds;
private String schoolId;
private Integer transactionId;
private Boolean commit;
private String groupId;
private String startGroupId;
private String endGroupId;
private String direction;

public CommunicationBusDTO() {}

public CommunicationBusDTO(JsonObject json) {
this();
CommunicationBusDTOConverter.fromJson(json, this);
}

public JsonObject toJson() {
JsonObject json = new JsonObject();
CommunicationBusDTOConverter.toJson(this, json);
return json;
}

public String getAction() { return action; }
public CommunicationBusDTO setAction(String action) { this.action = action; return this; }

public List<String> getSchoolIds() { return schoolIds; }
public CommunicationBusDTO setSchoolIds(List<String> schoolIds) { this.schoolIds = schoolIds; return this; }

public String getSchoolId() { return schoolId; }
public CommunicationBusDTO setSchoolId(String schoolId) { this.schoolId = schoolId; return this; }

public Integer getTransactionId() { return transactionId; }
public CommunicationBusDTO setTransactionId(Integer transactionId) { this.transactionId = transactionId; return this; }

/** Defaults to {@code true} when absent from the JSON payload. */
public boolean isCommit() { return commit == null || commit; }
public CommunicationBusDTO setCommit(boolean commit) { this.commit = commit; return this; }

public String getGroupId() { return groupId; }
public CommunicationBusDTO setGroupId(String groupId) { this.groupId = groupId; return this; }

public String getStartGroupId() { return startGroupId; }
public CommunicationBusDTO setStartGroupId(String startGroupId) { this.startGroupId = startGroupId; return this; }

public String getEndGroupId() { return endGroupId; }
public CommunicationBusDTO setEndGroupId(String endGroupId) { this.endGroupId = endGroupId; return this; }

public String getDirection() { return direction; }
public CommunicationBusDTO setDirection(String direction) { this.direction = direction; return this; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
package org.entcore.communication.dto.bus;

import io.vertx.codegen.annotations.DataObject;
import io.vertx.codegen.json.annotations.JsonGen;
import io.vertx.core.json.JsonObject;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@DataObject
@JsonGen
public class SearchVisibleBusDTO {

private String userId;
private List<String> userIds;
private String action;
private String schoolId;
private List<String> expectedTypes = new ArrayList<>();
private String userProfile;
private String preFilter;
private String customReturn;
private boolean reverseUnion;
private Map<String, Object> additionnalParams;
// fields from the former SearchVisibleRequestDTO parent
private String search;
private boolean itSelf;
private boolean myGroup;
private boolean profile = true;

public SearchVisibleBusDTO() {}

public SearchVisibleBusDTO(JsonObject json) {
this();
SearchVisibleBusDTOConverter.fromJson(json, this);
}

public JsonObject toJson() {
JsonObject json = new JsonObject();
SearchVisibleBusDTOConverter.toJson(this, json);
return json;
}

public String getUserId() { return userId; }
public SearchVisibleBusDTO setUserId(String userId) { this.userId = userId; return this; }

public List<String> getUserIds() { return userIds; }
public SearchVisibleBusDTO setUserIds(List<String> userIds) { this.userIds = userIds; return this; }

public String getAction() { return action; }
public SearchVisibleBusDTO setAction(String action) { this.action = action; return this; }

public String getSchoolId() { return schoolId; }
public SearchVisibleBusDTO setSchoolId(String schoolId) { this.schoolId = schoolId; return this; }

public List<String> getExpectedTypes() { return expectedTypes; }
public SearchVisibleBusDTO setExpectedTypes(List<String> expectedTypes) {
this.expectedTypes = expectedTypes != null ? expectedTypes : new ArrayList<>();
return this;
}

public String getUserProfile() { return userProfile; }
public SearchVisibleBusDTO setUserProfile(String userProfile) { this.userProfile = userProfile; return this; }

public String getPreFilter() { return preFilter; }
public SearchVisibleBusDTO setPreFilter(String preFilter) { this.preFilter = preFilter; return this; }

public String getCustomReturn() { return customReturn; }
public SearchVisibleBusDTO setCustomReturn(String customReturn) { this.customReturn = customReturn; return this; }

public boolean isReverseUnion() { return reverseUnion; }
public SearchVisibleBusDTO setReverseUnion(boolean reverseUnion) { this.reverseUnion = reverseUnion; return this; }

public Map<String, Object> getAdditionnalParams() { return additionnalParams; }
public SearchVisibleBusDTO setAdditionnalParams(Map<String, Object> additionnalParams) { this.additionnalParams = additionnalParams; return this; }

public String getSearch() { return search; }
public SearchVisibleBusDTO setSearch(String search) { this.search = search; return this; }

public boolean isItSelf() { return itSelf; }
public SearchVisibleBusDTO setItSelf(boolean itSelf) { this.itSelf = itSelf; return this; }

public boolean isMyGroup() { return myGroup; }
public SearchVisibleBusDTO setMyGroup(boolean myGroup) { this.myGroup = myGroup; return this; }

/** Defaults to {@code true} when absent from the JSON payload. */
public boolean isProfile() { return profile; }
public SearchVisibleBusDTO setProfile(boolean profile) { this.profile = profile; return this; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@ModuleGen(name = "communication-dto-bus", groupPackage = "org.entcore.communication")
package org.entcore.communication.dto.bus;

import io.vertx.codegen.annotations.ModuleGen;
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package org.entcore.communication.dto.rest;

import org.entcore.communication.services.CommunicationService;

import java.util.Map;

public class AddLinkDirectionsDTO {

private final Map<String, CommunicationService.Direction> directions;

public AddLinkDirectionsDTO(Map<String, CommunicationService.Direction> directions) {
this.directions = directions;
}

public Map<String, CommunicationService.Direction> getDirections() {
return directions;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package org.entcore.communication.dto.rest;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.vertx.codegen.annotations.DataObject;
import io.vertx.codegen.json.annotations.JsonGen;
import io.vertx.core.json.JsonObject;

import java.util.List;

@JsonInclude(JsonInclude.Include.NON_NULL)
@DataObject
@JsonGen(inheritConverter = true)
public class CommuniqueWithDTO extends GroupDTO {

private List<GroupDTO> communiqueWith;

public CommuniqueWithDTO() {}

public CommuniqueWithDTO(JsonObject json) {
this();
CommuniqueWithDTOConverter.fromJson(json, this);
}

public JsonObject toJson() {
JsonObject json = new JsonObject();
CommuniqueWithDTOConverter.toJson(this, json);
return json;
}

public List<GroupDTO> getCommuniqueWith() {
return communiqueWith;
}

public CommuniqueWithDTO setCommuniqueWith(List<GroupDTO> communiqueWith) {
this.communiqueWith = communiqueWith;
return this;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package org.entcore.communication.dto.rest;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.vertx.codegen.annotations.DataObject;
import io.vertx.codegen.json.annotations.JsonGen;
import io.vertx.core.json.JsonObject;

@JsonInclude(JsonInclude.Include.NON_NULL)
@DataObject
@JsonGen
public class ContactRefDTO {

private String id;
private String displayName;

public ContactRefDTO() {}

public ContactRefDTO(JsonObject json) {
this();
ContactRefDTOConverter.fromJson(json, this);
}

public JsonObject toJson() {
JsonObject json = new JsonObject();
ContactRefDTOConverter.toJson(this, json);
return json;
}

public String getId() {
return id;
}

public ContactRefDTO setId(String id) {
this.id = id;
return this;
}

public String getDisplayName() {
return displayName;
}

public ContactRefDTO setDisplayName(String displayName) {
this.displayName = displayName;
return this;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package org.entcore.communication.dto.rest;

public class CountResultDTO {

private final int count;

public CountResultDTO(int count) {
this.count = count;
}

public int getCount() {
return count;
}
}
Loading