Merge remote-tracking branch 'origin/dev-1.1.0' into development
This commit is contained in:
commit
6af9c217a1
5 changed files with 36 additions and 12 deletions
|
@ -23,7 +23,7 @@ public class EntityDependency implements Comparable<EntityDependency> {
|
|||
public final EntityKey parent;
|
||||
@JsonProperty(value = ATTR_SELF, required = true)
|
||||
public final EntityKey self;
|
||||
@JsonProperty(value = ATTR_NAME, required = true)
|
||||
@JsonProperty(value = ATTR_NAME)
|
||||
public final String name;
|
||||
@JsonProperty(ATTR_DESCRIPTION)
|
||||
public final String description;
|
||||
|
|
|
@ -186,8 +186,14 @@ public class ExamDeletePopup {
|
|||
.withURIVariable(API.PARAM_MODEL_ID, entityKey.modelId)
|
||||
.withQueryParam(API.PARAM_BULK_ACTION_TYPE, BulkActionType.HARD_DELETE.name());
|
||||
|
||||
final Set<EntityDependency> dependencies = restCallBuilder.call().getOrThrow();
|
||||
final List<EntityDependency> list = dependencies.stream().sorted().collect(Collectors.toList());
|
||||
final Set<EntityDependency> dependencies = restCallBuilder
|
||||
.call()
|
||||
.getOrThrow();
|
||||
final List<EntityDependency> list = dependencies
|
||||
.stream()
|
||||
.sorted()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
this.pageService.<EntityDependency> staticListTableBuilder(list, null)
|
||||
.withEmptyMessage(FORM_REPORT_NONE)
|
||||
.withColumn(new ColumnDefinition<>(
|
||||
|
|
|
@ -224,9 +224,14 @@ public class SEBClientEvents implements TemplateComposer {
|
|||
.publishIf(() -> writeGrant, table.hasAnyContent());
|
||||
}
|
||||
|
||||
private PageAction getOpenDelete(final PageAction pageAction, final MultiValueMap<String, String> filterCriteria) {
|
||||
private PageAction getOpenDelete(
|
||||
final PageAction pageAction,
|
||||
final MultiValueMap<String, String> filterCriteria) {
|
||||
|
||||
try {
|
||||
final List<String> ids = this.restService.getBuilder(GetClientEventNames.class)
|
||||
|
||||
final List<String> ids = this.restService
|
||||
.getBuilder(GetClientEventNames.class)
|
||||
.withQueryParams(filterCriteria)
|
||||
.call()
|
||||
.getOrThrow()
|
||||
|
@ -234,7 +239,8 @@ public class SEBClientEvents implements TemplateComposer {
|
|||
.map(EntityName::getModelId)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
final PageAction deleteAction = pageAction.withAttribute(
|
||||
final PageAction deleteAction = pageAction
|
||||
.withAttribute(
|
||||
PageContext.AttributeKeys.ENTITY_ID_LIST,
|
||||
StringUtils.join(ids, Constants.COMMA))
|
||||
.withAttribute(
|
||||
|
|
|
@ -600,7 +600,7 @@ public class ClientConnectionDAOImpl implements ClientConnectionDAO {
|
|||
.map(rec -> new EntityDependency(
|
||||
institutionKey,
|
||||
new EntityKey(rec.getId(), EntityType.CLIENT_CONNECTION),
|
||||
rec.getExamUserSessionId(),
|
||||
getDependencyName(rec),
|
||||
rec.getClientAddress()))
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
|
@ -620,7 +620,7 @@ public class ClientConnectionDAOImpl implements ClientConnectionDAO {
|
|||
.map(rec -> new EntityDependency(
|
||||
lmsSetupKey,
|
||||
new EntityKey(rec.getId(), EntityType.CLIENT_CONNECTION),
|
||||
rec.getExamUserSessionId(),
|
||||
getDependencyName(rec),
|
||||
rec.getClientAddress()))
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
|
@ -640,7 +640,7 @@ public class ClientConnectionDAOImpl implements ClientConnectionDAO {
|
|||
.map(rec -> new EntityDependency(
|
||||
userKey,
|
||||
new EntityKey(rec.getId(), EntityType.CLIENT_CONNECTION),
|
||||
rec.getExamUserSessionId(),
|
||||
getDependencyName(rec),
|
||||
rec.getClientAddress()))
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
|
@ -656,9 +656,18 @@ public class ClientConnectionDAOImpl implements ClientConnectionDAO {
|
|||
.map(rec -> new EntityDependency(
|
||||
examKey,
|
||||
new EntityKey(rec.getId(), EntityType.CLIENT_CONNECTION),
|
||||
rec.getExamUserSessionId(),
|
||||
getDependencyName(rec),
|
||||
rec.getClientAddress()))
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
private String getDependencyName(final ClientConnectionRecord record) {
|
||||
final String examUserSessionId = record.getExamUserSessionId();
|
||||
if (StringUtils.isNotBlank(examUserSessionId)) {
|
||||
return examUserSessionId;
|
||||
}
|
||||
|
||||
return record.getConnectionToken();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -92,6 +92,9 @@ public class ClientEventDAOImpl implements ClientEventDAO {
|
|||
.and(
|
||||
ClientConnectionRecordDynamicSqlSupport.examId,
|
||||
isEqualToWhenPresent(filterMap.getClientEventExamId()))
|
||||
.and(
|
||||
ClientConnectionRecordDynamicSqlSupport.examUserSessionId,
|
||||
SqlBuilder.isLikeWhenPresent(filterMap.getSQLWildcard(ClientConnection.FILTER_ATTR_SESSION_ID)))
|
||||
.and(
|
||||
ClientEventRecordDynamicSqlSupport.clientConnectionId,
|
||||
isEqualToWhenPresent(filterMap.getClientEventConnectionId()))
|
||||
|
|
Loading…
Reference in a new issue