Added support to include contexts in instances header #20012
This commit is contained in:
parent
1ae4a9074c
commit
a8b17bf00a
|
@ -28,6 +28,15 @@ public class ContextUtility {
|
|||
return getContextFullNameSet(uuids);
|
||||
}
|
||||
|
||||
public static Set<UUID> getContextUUIDSet(Collection<String> uuidStrings) throws Exception {
|
||||
Set<UUID> uuids = new HashSet<>();
|
||||
for(String uuidString : uuidStrings) {
|
||||
UUID uuid = UUID.fromString(uuidString);
|
||||
uuids.add(uuid);
|
||||
}
|
||||
return uuids;
|
||||
}
|
||||
|
||||
public static Set<String> getContextFullNameSet(Collection<UUID> uuids) throws Exception {
|
||||
ContextCache contextCache = ContextCache.getInstance();
|
||||
Set<String> contextFullNames = new HashSet<>();
|
||||
|
|
|
@ -6,6 +6,7 @@ package org.gcube.informationsystem.resourceregistry.api.rest;
|
|||
public class AccessPath {
|
||||
|
||||
public static final String HIERARCHICAL_MODE_PARAM = InstancePath.HIERARCHICAL_MODE_PARAM;
|
||||
public static final String INCLUDE_CONTEXTS_IN_HEADER_PARAM = InstancePath.INCLUDE_CONTEXTS_IN_HEADER_PARAM;
|
||||
|
||||
public static final String TYPE_PATH_PARAM = "TYPE_NAME";
|
||||
public static final String UUID_PATH_PARAM = "UUID";
|
||||
|
|
|
@ -7,4 +7,7 @@ public class InstancePath {
|
|||
public static final String POLYMORPHIC_PARAM = AccessPath.POLYMORPHIC_PARAM;
|
||||
|
||||
public static final String HIERARCHICAL_MODE_PARAM = "hierarchical";
|
||||
|
||||
public static final String INCLUDE_CONTEXTS_IN_HEADER_PARAM = "includeContextsInHeader";
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue