added the getConfiguration method
This commit is contained in:
parent
60a2e10117
commit
0c317804ed
|
@ -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<String, Object> itemProperties, ContainerType itemType) throws WorkspaceNotSynchedException {
|
||||
public ThSyncElementInfo getElementInfo(Map<String, Object> 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<String, Object> itemProperties, ContainerType itemType) throws Exception {
|
||||
public boolean isItemSynched(String itemId, Map<String, Object> 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) {
|
||||
|
|
Loading…
Reference in New Issue