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;
|
public final EntityKey parent;
|
||||||
@JsonProperty(value = ATTR_SELF, required = true)
|
@JsonProperty(value = ATTR_SELF, required = true)
|
||||||
public final EntityKey self;
|
public final EntityKey self;
|
||||||
@JsonProperty(value = ATTR_NAME, required = true)
|
@JsonProperty(value = ATTR_NAME)
|
||||||
public final String name;
|
public final String name;
|
||||||
@JsonProperty(ATTR_DESCRIPTION)
|
@JsonProperty(ATTR_DESCRIPTION)
|
||||||
public final String description;
|
public final String description;
|
||||||
|
|
|
@ -186,8 +186,14 @@ public class ExamDeletePopup {
|
||||||
.withURIVariable(API.PARAM_MODEL_ID, entityKey.modelId)
|
.withURIVariable(API.PARAM_MODEL_ID, entityKey.modelId)
|
||||||
.withQueryParam(API.PARAM_BULK_ACTION_TYPE, BulkActionType.HARD_DELETE.name());
|
.withQueryParam(API.PARAM_BULK_ACTION_TYPE, BulkActionType.HARD_DELETE.name());
|
||||||
|
|
||||||
final Set<EntityDependency> dependencies = restCallBuilder.call().getOrThrow();
|
final Set<EntityDependency> dependencies = restCallBuilder
|
||||||
final List<EntityDependency> list = dependencies.stream().sorted().collect(Collectors.toList());
|
.call()
|
||||||
|
.getOrThrow();
|
||||||
|
final List<EntityDependency> list = dependencies
|
||||||
|
.stream()
|
||||||
|
.sorted()
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
this.pageService.<EntityDependency> staticListTableBuilder(list, null)
|
this.pageService.<EntityDependency> staticListTableBuilder(list, null)
|
||||||
.withEmptyMessage(FORM_REPORT_NONE)
|
.withEmptyMessage(FORM_REPORT_NONE)
|
||||||
.withColumn(new ColumnDefinition<>(
|
.withColumn(new ColumnDefinition<>(
|
||||||
|
|
|
@ -224,9 +224,14 @@ public class SEBClientEvents implements TemplateComposer {
|
||||||
.publishIf(() -> writeGrant, table.hasAnyContent());
|
.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 {
|
try {
|
||||||
final List<String> ids = this.restService.getBuilder(GetClientEventNames.class)
|
|
||||||
|
final List<String> ids = this.restService
|
||||||
|
.getBuilder(GetClientEventNames.class)
|
||||||
.withQueryParams(filterCriteria)
|
.withQueryParams(filterCriteria)
|
||||||
.call()
|
.call()
|
||||||
.getOrThrow()
|
.getOrThrow()
|
||||||
|
@ -234,9 +239,10 @@ public class SEBClientEvents implements TemplateComposer {
|
||||||
.map(EntityName::getModelId)
|
.map(EntityName::getModelId)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
final PageAction deleteAction = pageAction.withAttribute(
|
final PageAction deleteAction = pageAction
|
||||||
PageContext.AttributeKeys.ENTITY_ID_LIST,
|
.withAttribute(
|
||||||
StringUtils.join(ids, Constants.COMMA))
|
PageContext.AttributeKeys.ENTITY_ID_LIST,
|
||||||
|
StringUtils.join(ids, Constants.COMMA))
|
||||||
.withAttribute(
|
.withAttribute(
|
||||||
PageContext.AttributeKeys.ENTITY_LIST_TYPE,
|
PageContext.AttributeKeys.ENTITY_LIST_TYPE,
|
||||||
EntityType.CLIENT_EVENT.name());
|
EntityType.CLIENT_EVENT.name());
|
||||||
|
|
|
@ -600,7 +600,7 @@ public class ClientConnectionDAOImpl implements ClientConnectionDAO {
|
||||||
.map(rec -> new EntityDependency(
|
.map(rec -> new EntityDependency(
|
||||||
institutionKey,
|
institutionKey,
|
||||||
new EntityKey(rec.getId(), EntityType.CLIENT_CONNECTION),
|
new EntityKey(rec.getId(), EntityType.CLIENT_CONNECTION),
|
||||||
rec.getExamUserSessionId(),
|
getDependencyName(rec),
|
||||||
rec.getClientAddress()))
|
rec.getClientAddress()))
|
||||||
.collect(Collectors.toList()));
|
.collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
|
@ -620,7 +620,7 @@ public class ClientConnectionDAOImpl implements ClientConnectionDAO {
|
||||||
.map(rec -> new EntityDependency(
|
.map(rec -> new EntityDependency(
|
||||||
lmsSetupKey,
|
lmsSetupKey,
|
||||||
new EntityKey(rec.getId(), EntityType.CLIENT_CONNECTION),
|
new EntityKey(rec.getId(), EntityType.CLIENT_CONNECTION),
|
||||||
rec.getExamUserSessionId(),
|
getDependencyName(rec),
|
||||||
rec.getClientAddress()))
|
rec.getClientAddress()))
|
||||||
.collect(Collectors.toList()));
|
.collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
|
@ -640,7 +640,7 @@ public class ClientConnectionDAOImpl implements ClientConnectionDAO {
|
||||||
.map(rec -> new EntityDependency(
|
.map(rec -> new EntityDependency(
|
||||||
userKey,
|
userKey,
|
||||||
new EntityKey(rec.getId(), EntityType.CLIENT_CONNECTION),
|
new EntityKey(rec.getId(), EntityType.CLIENT_CONNECTION),
|
||||||
rec.getExamUserSessionId(),
|
getDependencyName(rec),
|
||||||
rec.getClientAddress()))
|
rec.getClientAddress()))
|
||||||
.collect(Collectors.toList()));
|
.collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
|
@ -656,9 +656,18 @@ public class ClientConnectionDAOImpl implements ClientConnectionDAO {
|
||||||
.map(rec -> new EntityDependency(
|
.map(rec -> new EntityDependency(
|
||||||
examKey,
|
examKey,
|
||||||
new EntityKey(rec.getId(), EntityType.CLIENT_CONNECTION),
|
new EntityKey(rec.getId(), EntityType.CLIENT_CONNECTION),
|
||||||
rec.getExamUserSessionId(),
|
getDependencyName(rec),
|
||||||
rec.getClientAddress()))
|
rec.getClientAddress()))
|
||||||
.collect(Collectors.toList()));
|
.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(
|
.and(
|
||||||
ClientConnectionRecordDynamicSqlSupport.examId,
|
ClientConnectionRecordDynamicSqlSupport.examId,
|
||||||
isEqualToWhenPresent(filterMap.getClientEventExamId()))
|
isEqualToWhenPresent(filterMap.getClientEventExamId()))
|
||||||
|
.and(
|
||||||
|
ClientConnectionRecordDynamicSqlSupport.examUserSessionId,
|
||||||
|
SqlBuilder.isLikeWhenPresent(filterMap.getSQLWildcard(ClientConnection.FILTER_ATTR_SESSION_ID)))
|
||||||
.and(
|
.and(
|
||||||
ClientEventRecordDynamicSqlSupport.clientConnectionId,
|
ClientEventRecordDynamicSqlSupport.clientConnectionId,
|
||||||
isEqualToWhenPresent(filterMap.getClientEventConnectionId()))
|
isEqualToWhenPresent(filterMap.getClientEventConnectionId()))
|
||||||
|
|
Loading…
Reference in a new issue