Renamed method from SHub interface:
gePropertyMap -> getMetadata getValues -> getMap updated pom version at 0.4.0 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/Common/storagehub-client-wrapper@174506 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
4c0d1d7df5
commit
610504689b
2
pom.xml
2
pom.xml
|
@ -10,7 +10,7 @@
|
|||
</parent>
|
||||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>storagehub-client-wrapper</artifactId>
|
||||
<version>0.3.0-SNAPSHOT</version>
|
||||
<version>0.4.0-SNAPSHOT</version>
|
||||
<name>storagehub-client-wrapper</name>
|
||||
<description>This is a wrapper of storagehub-client library. It allows to interact with storagehub in a simplified way by exposing several utilities. Moreover, It exposes object as defined in (the old) HL interfaces</description>
|
||||
<scm>
|
||||
|
|
|
@ -111,7 +111,7 @@ public class HLMapper {
|
|||
|
||||
PropertyMap pm = null;
|
||||
if(metadata!=null)
|
||||
pm = new PropertyMap(metadata.getValues());
|
||||
pm = new PropertyMap(metadata.getMap());
|
||||
|
||||
//IN CASE OF EMPTY MAP RETURNS NULL
|
||||
if(pm!=null && pm.getValues()!=null && pm.getValues().isEmpty())
|
||||
|
@ -198,7 +198,7 @@ public class HLMapper {
|
|||
// for (String key : map.keySet()) {
|
||||
// logger.debug("Key: "+key+ "value: "+map.get(key));
|
||||
// }
|
||||
String isPublic = (String) item.getPropertyMap().getValues().get("isPublic");
|
||||
String isPublic = (String) item.getMetadata().getMap().get("isPublic");
|
||||
logger.debug("The item name: "+item.getName()+ " has isPublic property like: "+isPublic);
|
||||
isPublicItem = isPublic!=null?isPublic.toLowerCase().contains("true"):false;
|
||||
}catch(Exception e){
|
||||
|
@ -269,7 +269,7 @@ public class HLMapper {
|
|||
PropertyMap pm = null;
|
||||
if(withMapProperties || isFolder){
|
||||
//System.out.println("Setting map: "+item.getPropertyMap().getValues());
|
||||
pm = toPropertyMap(item.getPropertyMap());
|
||||
pm = toPropertyMap(item.getMetadata());
|
||||
}
|
||||
|
||||
//CONVERTING TRASH ITEM
|
||||
|
|
|
@ -34,7 +34,7 @@ public class ObjectMapper {
|
|||
public static List<String> toListLogins(SharedFolder sharedfolder){
|
||||
|
||||
Metadata users = sharedfolder.getUsers();
|
||||
Map<String, Object> mapMember = users.getValues();
|
||||
Map<String, Object> mapMember = users.getMap();
|
||||
List<String> listUsers = new ArrayList<String>(mapMember.size());
|
||||
listUsers.addAll(mapMember.keySet());
|
||||
logger.debug("Returning "+listUsers.size()+" member/s for sharedFolder with id: "+sharedfolder.getId());
|
||||
|
|
|
@ -15,6 +15,7 @@ import org.gcube.common.storagehubwrapper.shared.tohl.impl.FileItem;
|
|||
import org.gcube.common.storagehubwrapper.shared.tohl.impl.ImageFile;
|
||||
import org.gcube.common.storagehubwrapper.shared.tohl.impl.PDFFile;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -78,7 +79,7 @@ public class WorkspaceInstance {
|
|||
|
||||
}
|
||||
|
||||
//@Test
|
||||
@Test
|
||||
public void getChildren() throws Exception{
|
||||
System.out.println("Get children test");
|
||||
|
||||
|
@ -90,8 +91,8 @@ public class WorkspaceInstance {
|
|||
|
||||
int i = 0;
|
||||
for (WorkspaceItem workspaceItem : children) {
|
||||
System.out.println(++i+")"+workspaceItem);
|
||||
System.out.println(workspaceItem.getType() +" "+workspaceItem.getClass());
|
||||
System.out.println(++i+")"+workspaceItem.getId() + " name: "+workspaceItem.getName() + " type: "+workspaceItem.getType() +" class: "+workspaceItem.getClass());
|
||||
//System.out.println(workspaceItem.getType() +" "+workspaceItem.getClass());
|
||||
|
||||
|
||||
// System.out.println(++i+")");
|
||||
|
|
Loading…
Reference in New Issue