Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonioG70 committed Nov 25, 2024
1 parent 9740af0 commit b6c94a0
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ public class ViewerConstants {
public static final String DENORMALIZATION_STATUS_PREFIX = "denormalization-";

public static final String INTERNAL_ZIP_LOB_FOLDER = "lobs/";
public static final String SIARDDK_RESEARCH_INDEX_PATH = "/Schemas/standard/researchIndex.xsd";
public static final String SIARDDK_DEFAULT_SCHEMA_NAME = "public";

/*
* SOLR CONFIGSETS
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ private void populateNavigationPanels() {
if (ApplicationType.getType().equals(ViewerConstants.APPLICATION_ENV_SERVER)) {
DatabaseService.Util.call((Set<String> databasePermissions) -> {
ContextService.Util.call((Set<AuthorizationGroup> authorizationGroups) -> {
permissionsNavigationPanel = PermissionsNavigationPanel.getInstance(database, databasePermissions, authorizationGroups);
permissionsNavigationPanel = PermissionsNavigationPanel.getInstance(database, databasePermissions,
authorizationGroups);
if (permissionsNavigationPanel.hasPermissionsOrGroups()) {
navigationPanels.add(permissionsNavigationPanel.build());
}
Expand Down Expand Up @@ -207,9 +208,11 @@ private void setupFooterButtons() {
if (ApplicationType.getType().equals(ViewerConstants.APPLICATION_ENV_DESKTOP)) {
message = messages.SIARDHomePageTextForDeleteAllFromDesktop();
}
if (database.getVersion().equals(ViewerConstants.SIARD_DK_1007) || database.getVersion().equals(ViewerConstants.SIARD_DK_128)) {
if (database.getVersion().equals(ViewerConstants.SIARD_DK_1007)
|| database.getVersion().equals(ViewerConstants.SIARD_DK_128)) {
Dialogs.showInformationDialog(messages.SIARDHomePageDialogTitleForDelete(),
"SIARD deletion only supports SIARD version 2.1.", messages.basicActionUnderstood(), "btn btn-link");
messages.SIARDHomePageDialogTextForDeleteNotAvailable(ViewerConstants.SIARD_V21),
messages.basicActionUnderstood(), "btn btn-link");
} else {
CommonDialogs.showConfirmDialog(messages.SIARDHomePageDialogTitleForDelete(), message,
messages.basicActionCancel(), messages.basicActionConfirm(), CommonDialogs.Level.DANGER, "500px",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ public NavigationPanel build() {
btnDelete.addClickHandler(event -> {
if (database.getVersion().equals(ViewerConstants.SIARD_DK_1007)
|| database.getVersion().equals(ViewerConstants.SIARD_DK_128)) {
Dialogs.showInformationDialog("Delete metadata information",
"Metadata deletion only supports SIARD version 2.1.", messages.basicActionUnderstood(), "btn btn-link");
Dialogs.showInformationDialog(messages.SIARDHomePageTitleForDeleteSIARDNotAvailable(),
messages.SIARDHomePageTextForDeleteSIARDNotAvailable(ViewerConstants.SIARD_V21),
messages.basicActionUnderstood(), "btn btn-link");
} else {
if (!database.getStatus().equals(ViewerDatabaseStatus.REMOVING)
&& !database.getStatus().equals(ViewerDatabaseStatus.INGESTING)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -606,8 +606,8 @@ private static void convertSIARDMetadataToSolr(Path siardPath, String databaseUU
Reporter reporter = new NoOpReporter();
SIARDEdition siardEdition = SIARDEdition.newInstance();
if (siardVersion.equals(ViewerConstants.SIARD_DK)) {
siardEdition.editModule(new SIARDDKEditFactory()).editModuleParameter(
SIARDDKEditFactory.PARAMETER_FOLDER, Collections.singletonList(siardPath.toAbsolutePath().toString()));
siardEdition.editModule(new SIARDDKEditFactory()).editModuleParameter(SIARDDKEditFactory.PARAMETER_FOLDER,
Collections.singletonList(siardPath.toAbsolutePath().toString()));
} else if (siardVersion.equals(ViewerConstants.SIARD_V21)) {
siardEdition.editModule(new SIARDEditFactory()).editModuleParameter(SIARDEditFactory.PARAMETER_FILE,
Collections.singletonList(siardPath.toAbsolutePath().toString()));
Expand Down Expand Up @@ -719,11 +719,13 @@ private static void convertSIARDtoSolr(Path siardPath, String databaseUUID, Stri
if (siardVersion.equals(ViewerConstants.SIARD_DK_128)) {
databaseMigration.importModule(new SIARDDK128ModuleFactory())
.importModuleParameter(SIARDDK128ModuleFactory.PARAMETER_FOLDER, siardPath.toAbsolutePath().toString())
.importModuleParameter(SIARDDK128ModuleFactory.PARAMETER_AS_SCHEMA, "public");
.importModuleParameter(SIARDDK128ModuleFactory.PARAMETER_AS_SCHEMA,
ViewerConstants.SIARDDK_DEFAULT_SCHEMA_NAME);
} else if (siardVersion.equals(ViewerConstants.SIARD_DK_1007)) {
databaseMigration.importModule(new SIARDDK1007ModuleFactory())
.importModuleParameter(SIARDDK1007ModuleFactory.PARAMETER_FOLDER, siardPath.toAbsolutePath().toString())
.importModuleParameter(SIARDDK1007ModuleFactory.PARAMETER_AS_SCHEMA, "public");
.importModuleParameter(SIARDDK1007ModuleFactory.PARAMETER_AS_SCHEMA,
ViewerConstants.SIARDDK_DEFAULT_SCHEMA_NAME);
} else if (siardVersion.equals(ViewerConstants.SIARD_V21)) {
databaseMigration.importModule(new SIARD2ModuleFactory())
.importModuleParameter(SIARD2ModuleFactory.PARAMETER_FILE, siardPath.toAbsolutePath().toString())
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/config/i18n/client/ClientMessages.java
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,8 @@ public interface ClientMessages extends Messages {

String SIARDHomePageDialogTitleForDelete();

String SIARDHomePageDialogTextForDeleteNotAvailable(String version);

String SIARDHomePageDialogTitleForDeleteBrowseContent();

String SIARDHomePageDialogTitleForDeleteValidationReport();
Expand All @@ -841,6 +843,10 @@ public interface ClientMessages extends Messages {

SafeHtml SIARDHomePageTextForDeleteSIARD();

String SIARDHomePageTitleForDeleteSIARDNotAvailable();

String SIARDHomePageTextForDeleteSIARDNotAvailable(String version);

SafeHtml SIARDHomePageTextForDeleteSIARDReportValidation();

String SIARDHomePageTextForIngestNotSupported();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,13 +329,16 @@ SIARDHomePageDialogTitleForBrowsing=Browsing
SIARDHomePageTextForIngestNotSupported=Browsing the data only supports SIARD version 2.1, in order to browse the SIARD export it using the option '"'migrate to SIARD'"' available in the '"'SIARD'"' options.
SIARDHomePageTextForIngestSuccess=SIARD data successfully imported
SIARDHomePageDialogTitleForDelete=Delete
SIARDHomePageDialogTextForDeleteNotAvailable=SIARD deletion only supports SIARD version {}
SIARDHomePageDialogTitleForDeleteValidationReport=Delete validation report
SIARDHomePageDialogTitleForDeleteBrowseContent=Delete browse content
SIARDHomePageTextForDeleteAllFromServer=Are you sure you want to {startBold,<b>}remove{endBold,</b>} the SIARD structure, data and the file from the server? If you are aware of the consequences confirm the action, otherwise cancel.
SIARDHomePageTextForDeleteAllFromDesktop=Are you sure you want to {startBold,<b>}remove{endBold,</b>} the SIARD structure and data from the application? If you are aware of the consequences confirm the action, otherwise cancel.
SIARDHomePageTextForDeleteFromSolr=Are you sure you want to {startBold,<b>}remove{endBold,</b>} the SIARD data from the application? If you are aware of the consequences confirm the action, otherwise cancel.
SIARDHomePageTextForDeleteSIARD=Are you sure you want to {startBold,<b>}remove{endBold,</b>} the SIARD file from the server? Removing the SIARD will make the download of LOBs unavailable. If you are aware of the consequences confirm the action, otherwise cancel.
SIARDHomePageTextForDeleteSIARDReportValidation=Are you sure you want to {startBold,<b>}delete{endBold,</b>} the validation report file? If you are aware of the consequences confirm the action, otherwise cancel.
SIARDHomePageTitleForDeleteSIARDNotAvailable=Delete metadata information
SIARDHomePageTextForDeleteSIARDNotAvailable=Metadata deletion only supports SIARD version {}
SIARDHomePageTextForRequiredSIARDFile=SIARD file not found on the system and is required to perform this action.
SIARDHomePageOptionsHeaderForPermissions=Permissions
SIARDHomePageOptionsDescriptionForPermissions=See the roles that are authorized to browse this database.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,13 +326,16 @@ SIARDHomePageDialogTitleForBrowsing=Navegação
SIARDHomePageTextForIngestNotSupported=A navegação pelos dados é apenas suportada para a versão 2.1 do SIARD.
SIARDHomePageTextForIngestSuccess=Os dados do SIARD foram importados com sucesso
SIARDHomePageDialogTitleForDelete=Eliminar
SIARDHomePageDialogTextForDeleteNotAvailable=Eliminação de SIARDs apenas suportada para a versão {}
SIARDHomePageDialogTitleForDeleteValidationReport=Eliminar o relatório de validação
SIARDHomePageDialogTitleForDeleteBrowseContent=Eliminar o conteúdo da navegação
SIARDHomePageTextForDeleteAllFromServer=Tem a certeza que deseja {startBold,<b>}eliminar endBold,</b>} o SIARD da aplicação? Esta operação irá eliminar os metadados, dados (se ingerido) e o ficheiro SIARD. Se está consciente das consequências confirme a ação, caso contrário cancele.
SIARDHomePageTextForDeleteAllFromDesktop=Tem a certeza que deseja {startBold,<b>}eliminar{endBold,</b>} o SIARD da aplicação? Esta operação irá eliminar os metadados e os dados (se ingerido). Se está consciente das consequências confirme a ação, caso contrário cancele.
SIARDHomePageTextForDeleteFromSolr=Tem a certeza que deseja {startBold,<b>}apagar{endBold,</b>} os dados do SIARD? Essa ação irá remover da aplicação o conteudo do SIARD. Se está consciente das consequências confirme a ação, caso contrário cancele.
SIARDHomePageTextForDeleteSIARD=Tem a certeza que deseja {startBold,<b>}eliminar{endBold,</b>} o ficheiro SIARD? Esta operação irá eliminar o ficheiro SIARD do sistema. A remoção fará com que os LOB fiquem indisponíveis para descarregar. Se está consciente das consequências confirme a ação, caso contrário cancele.
SIARDHomePageTextForDeleteSIARDReportValidation=Tem a certeza que deseja {startBold,<b>}eliminar{endBold,</b>} o relatório de validação do SIARD? Esta operação irá eliminar o ficheiro do sistema. Se está consciente das consequências confirme a ação, caso contrário cancele.
SIARDHomePageTitleForDeleteSIARDNotAvailable=Informação sobre eliminação de metadados
SIARDHomePageTextForDeleteSIARDNotAvailable=A eliminação de metadados de SIARDs é apenas suportada na versão {}
SIARDHomePageTextForRequiredSIARDFile=Ficheiro SIARD não encontrado no sistema e é necessário para executar essa ação
SIARDHomePageOptionsHeaderForPermissions=Permissões
SIARDHomePageOptionsDescriptionForPermissions=Consulte as funções que estão autorizadas a navegar nesta base de dados.
Expand Down

0 comments on commit b6c94a0

Please sign in to comment.