From 0c317804ed566472bf141e8bddc0c93650369183 Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Fri, 14 May 2021 12:32:54 +0200 Subject: [PATCH] added the getConfiguration method --- .../thredds/WorkspaceThreddsSynchronize.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/org/gcube/portal/wssynclibrary/thredds/WorkspaceThreddsSynchronize.java b/src/main/java/org/gcube/portal/wssynclibrary/thredds/WorkspaceThreddsSynchronize.java index c27ba74..d5cc386 100644 --- a/src/main/java/org/gcube/portal/wssynclibrary/thredds/WorkspaceThreddsSynchronize.java +++ b/src/main/java/org/gcube/portal/wssynclibrary/thredds/WorkspaceThreddsSynchronize.java @@ -357,7 +357,8 @@ public class WorkspaceThreddsSynchronize * @throws WorkspaceNotSynchedException the workspace not synched exception * @throws Exception the exception * - * NB. it is time consuming due to it calls the SHUB + * NB. it is time consuming due to it + * calls the SHUB */ @Override public ThSyncFolderDescriptor getConfiguration(String itemId) @@ -374,16 +375,17 @@ public class WorkspaceThreddsSynchronize } - /** * Gets the element info. * - * @param itemProperties the item properties read from SHUB by accessing to Metadata.Map() of a item - * @param itemType the item type + * @param itemProperties the item properties read from SHUB by accessing to + * Metadata.Map() of a item + * @param itemType the item type * @return the element info * @throws WorkspaceNotSynchedException the workspace not synched exception */ - public ThSyncElementInfo getElementInfo(Map itemProperties, ContainerType itemType) throws WorkspaceNotSynchedException { + public ThSyncElementInfo getElementInfo(Map itemProperties, ContainerType itemType) + throws WorkspaceNotSynchedException { if (itemProperties == null || itemProperties.isEmpty()) return null; @@ -393,21 +395,19 @@ public class WorkspaceThreddsSynchronize } - /** * Checks if is item synched. * - * @param itemId the item id + * @param itemId the item id * @param itemProperties the item properties - * @param itemType the item type + * @param itemType the item type * @return true, if is item synched - * @throws Exception the exception */ - public boolean isItemSynched(String itemId, Map itemProperties, ContainerType itemType) throws Exception { + public boolean isItemSynched(String itemId, Map itemProperties, ContainerType itemType) { ThSyncElementInfo sinInfo = null; try { - sinInfo = getElementInfo(itemProperties,itemType); + sinInfo = getElementInfo(itemProperties, itemType); } catch (WorkspaceNotSynchedException e) { logger.debug("WorkspaceNotSynchedException catched, the item id: " + itemId + " is not synched"); } catch (Exception e) {