diff --git a/smp-angular/src/app/common/dialogs/confirmation-dialog/confirmation-dialog.component.html b/smp-angular/src/app/common/dialogs/confirmation-dialog/confirmation-dialog.component.html index d2791e841342354ebdd821b5dad9be312a810174..6d22c86ab3617ef25c1b0c308e8036f015fa1adb 100644 --- a/smp-angular/src/app/common/dialogs/confirmation-dialog/confirmation-dialog.component.html +++ b/smp-angular/src/app/common/dialogs/confirmation-dialog/confirmation-dialog.component.html @@ -1,26 +1,14 @@ -<div style="width: 500px;text-align: center"> - <h1 mat-dialog-title>{{title}}</h1> - <div class="panel" innerHTML={{description}}></div> - <div class="divTable"> - <div class="divTableBody"> - - <div class="divTableRow"> - - <div class="divTableCell"> - <button mat-raised-button color="primary" (click)="dialogRef.close(true)" id="yesbuttondialog_id"> - <mat-icon>check_circle</mat-icon> - <span>Yes</span> - </button> - </div> - - <div class="divTableCell"> - <button mat-raised-button color="primary" (click)="dialogRef.close(false)" id="nobuttondialog_id"> - <mat-icon>cancel</mat-icon> - <span>No</span> - </button> - </div> - - </div> - </div> - </div> -</div> +<h3 mat-dialog-title>{{title}}</h3> +<mat-dialog-content style="min-width:500px;max-width:900px"> + <div class="panel" style="word-break: break-word" innerHTML={{description}}></div> +</mat-dialog-content> +<mat-dialog-actions> + <button mat-raised-button color="primary" (click)="dialogRef.close(true)" id="yesbuttondialog_id"> + <mat-icon>check_circle</mat-icon> + <span>Yes</span> + </button> + <button mat-raised-button color="primary" (click)="dialogRef.close(false)" id="nobuttondialog_id"> + <mat-icon>cancel</mat-icon> + <span>No</span> + </button> +</mat-dialog-actions> diff --git a/smp-angular/src/app/common/panels/membership-panel/membership-panel.component.ts b/smp-angular/src/app/common/panels/membership-panel/membership-panel.component.ts index 458ea3c1166ff5a4c4c26b895ac2e12732290006..9ab9006487e9da3c61ca1c2c27054032e9e2257a 100644 --- a/smp-angular/src/app/common/panels/membership-panel/membership-panel.component.ts +++ b/smp-angular/src/app/common/panels/membership-panel/membership-panel.component.ts @@ -187,7 +187,7 @@ export class MembershipPanelComponent implements BeforeLeaveGuard { data: { title: "Remove member", description: "Action will remove member [" + this.selectedMember.username + "]! " + - "Do you wish to continue?" + "<br/><br/>Do you wish to continue?" } }).afterClosed().subscribe(result => { if (result) { diff --git a/smp-angular/src/app/common/search-table/search-table.component.ts b/smp-angular/src/app/common/search-table/search-table.component.ts index da0bdc364ecb06cc349bb6fc71893072de4ebe6c..805af60d2b7e801b407e4a8cf0889b9a2e2de48a 100644 --- a/smp-angular/src/app/common/search-table/search-table.component.ts +++ b/smp-angular/src/app/common/search-table/search-table.component.ts @@ -181,7 +181,7 @@ export class SearchTableComponent implements OnInit { this.dialog.open(ConfirmationDialogComponent, { data: { title: "Not persisted data", - description: "Action will refresh all data and not saved data will be lost. Do you wish to continue?" + description: "Action will refresh all data and not saved data will be lost. <br/><br/>Do you wish to continue?" } }).afterClosed().subscribe(result => { if (result) { diff --git a/smp-angular/src/app/edit/edit-domain/domain-group-panel/domain-group.component.ts b/smp-angular/src/app/edit/edit-domain/domain-group-panel/domain-group.component.ts index cea46c407229e156de64b655e7d843409870c133..111893532ecb1b2c78a0294ee305e131484194d3 100644 --- a/smp-angular/src/app/edit/edit-domain/domain-group-panel/domain-group.component.ts +++ b/smp-angular/src/app/edit/edit-domain/domain-group-panel/domain-group.component.ts @@ -168,7 +168,7 @@ export class DomainGroupComponent implements BeforeLeaveGuard { this.dialog.open(ConfirmationDialogComponent, { data: { title: "Delete Group " + this.selectedGroup.groupName + " from DomiSMP", - description: "Action will permanently delete group! Do you wish to continue?" + description: "Action will permanently delete group! <br/><br/> Do you wish to continue?" } }).afterClosed().subscribe(result => { if (result) { diff --git a/smp-angular/src/app/edit/edit-group/group-resource-panel/group-resource-panel.component.ts b/smp-angular/src/app/edit/edit-group/group-resource-panel/group-resource-panel.component.ts index 9f115d5e6a9c9a271018f3d6c772f77f3f1bc550..f2257d0a315e942e4f854dde8cd4260cdbc6c094 100644 --- a/smp-angular/src/app/edit/edit-group/group-resource-panel/group-resource-panel.component.ts +++ b/smp-angular/src/app/edit/edit-group/group-resource-panel/group-resource-panel.component.ts @@ -161,7 +161,7 @@ export class GroupResourcePanelComponent implements BeforeLeaveGuard { data: { title: "Delete Resource with scheme from DomiSMP", description: "Action will permanently delete resource [" + this.selected.identifierScheme + "] and identifier: [" + this.selected.identifierValue + "]! " + - "Do you wish to continue?" + "<br/><br/>Do you wish to continue?" } }).afterClosed().subscribe(result => { if (result) { diff --git a/smp-angular/src/app/edit/edit-resources/subresource-panel/subresource-panel.component.ts b/smp-angular/src/app/edit/edit-resources/subresource-panel/subresource-panel.component.ts index 3b6ab5c65b0d488a2b1d451ffe799e343f1b5e43..e230d34614de642526ba2e376eb8fb6422c14b76 100644 --- a/smp-angular/src/app/edit/edit-resources/subresource-panel/subresource-panel.component.ts +++ b/smp-angular/src/app/edit/edit-resources/subresource-panel/subresource-panel.component.ts @@ -183,7 +183,7 @@ export class SubresourcePanelComponent implements AfterViewInit, OnInit, BeforeL data: { title: "Delete Resource with scheme from DomiSMP", description: "Action will permanently delete subresource [" + this.selected.identifierScheme + "] and identifier: [" + this.selected.identifierValue + "]! " + - "Do you wish to continue?" + "<br/><br/>Do you wish to continue?" } }).afterClosed().subscribe(result => { if (result) { diff --git a/smp-angular/src/app/system-settings/admin-domain/admin-domain.component.ts b/smp-angular/src/app/system-settings/admin-domain/admin-domain.component.ts index ff60dbb4fb495e0cd826a455412d1433ee5bf4d4..071e3adb821891e2dfa2d128ab8590ebb4149a90 100644 --- a/smp-angular/src/app/system-settings/admin-domain/admin-domain.component.ts +++ b/smp-angular/src/app/system-settings/admin-domain/admin-domain.component.ts @@ -255,7 +255,7 @@ export class AdminDomainComponent implements OnInit, OnDestroy, AfterViewInit, B this.dialog.open(ConfirmationDialogComponent, { data: { title: "Delete domain [" + this.selected.domainCode + "] from DomiSMP", - description: "Action will permanently delete domain! Do you wish to continue?" + description: "Action will permanently delete domain! <br/><br/>Do you wish to continue?" } }).afterClosed().subscribe(result => { if (result) { diff --git a/smp-angular/src/app/system-settings/admin-domain/domain-sml-panel/domain-sml-integration-panel.component.ts b/smp-angular/src/app/system-settings/admin-domain/domain-sml-panel/domain-sml-integration-panel.component.ts index e88054430f2840fac33c13a186e680d4833e3cd3..b7150a7cb6fac9ca2eeb56c917f149b1f0029da3 100644 --- a/smp-angular/src/app/system-settings/admin-domain/domain-sml-panel/domain-sml-integration-panel.component.ts +++ b/smp-angular/src/app/system-settings/admin-domain/domain-sml-panel/domain-sml-integration-panel.component.ts @@ -190,7 +190,7 @@ export class DomainSmlIntegrationPanelComponent implements BeforeLeaveGuard { this.dialog.open(ConfirmationDialogComponent, { data: { title: "Unregister domain to SML", - description: "Action will unregister domain: [" + this._domain?.domainCode + "] and all its resources from SML. Do you wish to continue?" + description: "Action will unregister domain: [" + this._domain?.domainCode + "] and all its resources from SML.<br/><br/> Do you wish to continue?" } }).afterClosed().subscribe(result => { if (result) { @@ -207,7 +207,7 @@ export class DomainSmlIntegrationPanelComponent implements BeforeLeaveGuard { this.dialog.open(ConfirmationDialogComponent, { data: { title: "Register domain to SML", - description: "Action will register domain: [" + this._domain?.domainCode + "] and all its service groups to SML. Do you wish to continue?" + description: "Action will register domain: [" + this._domain?.domainCode + "] and all its service groups to SML. <br/><br/>Do you wish to continue?" } }).afterClosed().subscribe(result => { if (result) { diff --git a/smp-angular/src/app/system-settings/admin-keystore/admin-keystore.component.ts b/smp-angular/src/app/system-settings/admin-keystore/admin-keystore.component.ts index f541e8628cebd321c3280717859a7d696db5d766..816fcf30e738ed0fb254d73da902b9c4bd35d7e8 100644 --- a/smp-angular/src/app/system-settings/admin-keystore/admin-keystore.component.ts +++ b/smp-angular/src/app/system-settings/admin-keystore/admin-keystore.component.ts @@ -132,7 +132,7 @@ export class AdminKeystoreComponent implements OnInit, OnDestroy, AfterViewInit, this.dialog.open(ConfirmationDialogComponent, { data: { title: "Delete key [" + this.selected.alias + "] from keystore", - description: "Action will permanently delete key from keystore! Do you wish to continue?" + description: "Action will permanently delete key from keystore! <br/><br/>Do you wish to continue?" } }).afterClosed().subscribe(result => { if (result) { diff --git a/smp-angular/src/app/system-settings/admin-truststore/admin-truststore.component.ts b/smp-angular/src/app/system-settings/admin-truststore/admin-truststore.component.ts index 3206452f8fb89e1e4fbfca028789321842c822f3..7ae1d41775f6aa6cd270cb408e7a5dce012df477 100644 --- a/smp-angular/src/app/system-settings/admin-truststore/admin-truststore.component.ts +++ b/smp-angular/src/app/system-settings/admin-truststore/admin-truststore.component.ts @@ -114,7 +114,7 @@ export class AdminTruststoreComponent implements OnInit, OnDestroy, AfterViewIn this.dialog.open(ConfirmationDialogComponent, { data: { title: "Delete certificate " + this.selected.alias + " from truststore", - description: "Action will permanently delete certificate from truststore! Do you wish to continue?" + description: "Action will permanently delete certificate from truststore! <br/><br/>Do you wish to continue?" } }).afterClosed().subscribe(result => { if (result) { diff --git a/smp-angular/src/app/system-settings/admin-users/admin-user.component.ts b/smp-angular/src/app/system-settings/admin-users/admin-user.component.ts index 15af4cb24101f4b994c517686cfcdab64b25907f..7c5179cd556eb89edc92b10e9d3b601c13bf30ff 100644 --- a/smp-angular/src/app/system-settings/admin-users/admin-user.component.ts +++ b/smp-angular/src/app/system-settings/admin-users/admin-user.component.ts @@ -187,7 +187,7 @@ export class AdminUserComponent implements AfterViewInit, BeforeLeaveGuard { this.dialog.open(ConfirmationDialogComponent, { data: { title: "Delete user " + this.managedUserData?.username + " from DomiSMP", - description: "Action will permanently delete user! Do you wish to continue?" + description: "Action will permanently delete user!<br/><br/> Do you wish to continue?" } }).afterClosed().subscribe(result => { if (result) { diff --git a/smp-angular/src/app/system-settings/domain/domain.component.ts b/smp-angular/src/app/system-settings/domain/domain.component.ts index 2d539cab22182674b6a4c6dfa81817bd6c7b3cbe..695f26b6ece5654efd0ca5a623f39bb4d6822496 100644 --- a/smp-angular/src/app/system-settings/domain/domain.component.ts +++ b/smp-angular/src/app/system-settings/domain/domain.component.ts @@ -234,7 +234,7 @@ export class DomainComponent implements OnInit, AfterViewInit, AfterViewChecked this.dialog.open(ConfirmationDialogComponent, { data: { title: "Unregister domain to SML", - description: "Action will unregister domain: " + domainRo.domainCode + " and all its service groups from SML. Do you wish to continue?" + description: "Action will unregister domain: " + domainRo.domainCode + " and all its service groups from SML.<br/><br/>Do you wish to continue?" } }).afterClosed().subscribe(result => { if (result) { @@ -253,7 +253,7 @@ export class DomainComponent implements OnInit, AfterViewInit, AfterViewChecked this.dialog.open(ConfirmationDialogComponent, { data: { title: "Register domain to SML", - description: "Action will register domain: " + domainRo.domainCode + " and all its service groups to SML. Do you wish to continue?" + description: "Action will register domain: " + domainRo.domainCode + " and all its service groups to SML. <br/><br/>Do you wish to continue?" } }).afterClosed().subscribe(result => { if (result) { diff --git a/smp-angular/src/app/system-settings/domain/keystore-edit-dialog/keystore-edit-dialog.component.ts b/smp-angular/src/app/system-settings/domain/keystore-edit-dialog/keystore-edit-dialog.component.ts index 2e525bd354489d5376574c1a95205983bb08a3a6..b3f9be0e2ce6a8c0ccad3bc9674f57046dd4ae8f 100644 --- a/smp-angular/src/app/system-settings/domain/keystore-edit-dialog/keystore-edit-dialog.component.ts +++ b/smp-angular/src/app/system-settings/domain/keystore-edit-dialog/keystore-edit-dialog.component.ts @@ -66,7 +66,7 @@ export class KeystoreEditDialogComponent implements AfterViewChecked { this.dialog.open(ConfirmationDialogComponent, { data: { title: "Delete key/certificate " + row.alias + " from keystore", - description: "Action will permanently delete key/certificate from keystore! Do you wish to continue?" + description: "Action will permanently delete key/certificate from keystore! <br/><br/>Do you wish to continue?" } }).afterClosed().subscribe(result => { if (result) { diff --git a/smp-server-library/src/main/java/eu/europa/ec/edelivery/smp/data/model/DBResourceDefDeleteValidation.java b/smp-server-library/src/main/java/eu/europa/ec/edelivery/smp/data/model/DBResourceDefDeleteValidation.java deleted file mode 100644 index dd10ed388b374e2020173d3450c8d7951e833ca0..0000000000000000000000000000000000000000 --- a/smp-server-library/src/main/java/eu/europa/ec/edelivery/smp/data/model/DBResourceDefDeleteValidation.java +++ /dev/null @@ -1,42 +0,0 @@ -package eu.europa.ec.edelivery.smp.data.model; - - -public class DBResourceDefDeleteValidation { - - Long id; - String name; - Integer count; - - public DBResourceDefDeleteValidation() { - } - - public DBResourceDefDeleteValidation(Long id, String name, Integer count) { - this.id = id; - this.name = name; - this.count = count; - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getResourceDefName() { - return name; - } - - public void setResourceDefName(String name) { - this.name = name; - } - - public Integer getCount() { - return count; - } - - public void setCount(Integer count) { - this.count = count; - } -} diff --git a/smp-server-library/src/main/java/eu/europa/ec/edelivery/smp/data/model/ext/DBResourceDef.java b/smp-server-library/src/main/java/eu/europa/ec/edelivery/smp/data/model/ext/DBResourceDef.java index e0a97829db33162512247c5ad505d1186348d461..3bc59b963df15bfd70fd37a9f2a06cac44356e43 100644 --- a/smp-server-library/src/main/java/eu/europa/ec/edelivery/smp/data/model/ext/DBResourceDef.java +++ b/smp-server-library/src/main/java/eu/europa/ec/edelivery/smp/data/model/ext/DBResourceDef.java @@ -4,7 +4,6 @@ import eu.europa.ec.edelivery.smp.data.dao.utils.ColumnDescription; import eu.europa.ec.edelivery.smp.data.model.BaseEntity; import eu.europa.ec.edelivery.smp.data.model.CommonColumnsLengths; import eu.europa.ec.edelivery.smp.data.model.DBDomainResourceDef; -import eu.europa.ec.edelivery.smp.data.model.DBResourceDefDeleteValidation; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.hibernate.annotations.GenericGenerator; @@ -34,18 +33,6 @@ import static eu.europa.ec.edelivery.smp.data.dao.QueryNames.*; @NamedQuery(name = QUERY_RESOURCE_DEF_BY_DOMAIN, query = "SELECT d FROM DBResourceDef d JOIN d.domainResourceDefs dr where dr.domain.id = :domain_id order by d.id asc") @NamedQuery(name = QUERY_RESOURCE_DEF_URL_SEGMENT, query = "SELECT d FROM DBResourceDef d WHERE d.urlSegment = :url_segment") @NamedQuery(name = QUERY_RESOURCE_DEF_BY_IDENTIFIER, query = "SELECT d FROM DBResourceDef d WHERE d.identifier = :identifier") -@NamedNativeQuery(name = "DBResourceDefDeleteValidation.validateDefinitionUsage", - resultSetMapping = "DBResourceDefDeleteValidationMapping", - query = "select D.ID as id, D.NAME as name, COUNT(RS.ID) as useCount " + - " from SMP_RESOURCE_DEF D INNER JOIN SMP_RESOURCE RS ON (D.ID =RS.FK_RESOURCE_DEF_ID) " + - " WHERE D.ID IN (:idList)" + - " GROUP BY D.ID, D.NAME") -@SqlResultSetMapping(name = "DBResourceDefDeleteValidationMapping", classes = { - @ConstructorResult(targetClass = DBResourceDefDeleteValidation.class, - columns = {@ColumnResult(name = "id", type = Long.class), - @ColumnResult(name = "name", type = String.class), - @ColumnResult(name = "useCount", type = Integer.class)}) -}) public class DBResourceDef extends BaseEntity { private static final long serialVersionUID = 1008583888835630001L; diff --git a/smp-webapp/pom.xml b/smp-webapp/pom.xml index ea1d6a58a3056dd117f4c76cde140293d5a3a419..e2fdd3a29d1f5e74f678a808dd9a3b349a63efbb 100644 --- a/smp-webapp/pom.xml +++ b/smp-webapp/pom.xml @@ -34,11 +34,11 @@ <version>${project.version}</version> </dependency> <!-- cppa3 document --> - <!-- dependency> + <dependency> <groupId>eu.europa.ec.edelivery</groupId> <artifactId>oasis-cppa3-spi</artifactId> <version>${project.version}</version> - </dependency --> + </dependency> <dependency> <groupId>eu.europa.ec.dynamic-discovery</groupId>