|
|
|
@ -6,7 +6,6 @@ import java.net.URI;
|
|
|
|
|
import java.net.URL;
|
|
|
|
|
import java.net.URLEncoder;
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.Objects;
|
|
|
|
@ -43,18 +42,19 @@ import org.glassfish.jersey.media.multipart.MultiPartFeature;
|
|
|
|
|
import org.glassfish.jersey.media.multipart.file.FileDataBodyPart;
|
|
|
|
|
import org.glassfish.jersey.media.multipart.file.StreamDataBodyPart;
|
|
|
|
|
|
|
|
|
|
public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
|
|
|
|
|
private final ProxyDelegate<GXWebTargetAdapterRequest> delegate;
|
|
|
|
|
public class DefaultItemManager extends DefaultManagerClient implements ItemManagerClient {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final String CONTENT_DISPOSITION= "Content-Disposition";
|
|
|
|
|
private static final String CONTENT_TYPE= "Content-Type";
|
|
|
|
|
private static final String CONTENT_LENGHT= "Content-Length";
|
|
|
|
|
|
|
|
|
|
public DefaultItemManager(ProxyDelegate<GXWebTargetAdapterRequest> config){
|
|
|
|
|
this.delegate = config;
|
|
|
|
|
public DefaultItemManager(ProxyDelegate<GXWebTargetAdapterRequest> delegate) {
|
|
|
|
|
super(delegate);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public StreamDescriptor resolvePublicLink(String identifier) throws StorageHubException{
|
|
|
|
@ -64,7 +64,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
Objects.requireNonNull(identifier, "id cannot be null");
|
|
|
|
|
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path("publiclink").path(identifier);
|
|
|
|
|
Map<String, Object[]> params = new HashMap<>();
|
|
|
|
|
Map<String, Object[]> params = initQueryParameters();
|
|
|
|
|
|
|
|
|
|
GXInboundResponse response = myManager.queryParams(params).get();
|
|
|
|
|
|
|
|
|
@ -104,14 +104,15 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
public ItemList call(GXWebTargetAdapterRequest manager) throws StorageHubException, Exception {
|
|
|
|
|
Objects.requireNonNull(id, "id cannot be null");
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path(id).path("children");
|
|
|
|
|
Map<String, Object[]> params = new HashMap<>();
|
|
|
|
|
Map<String, Object[]> params = initQueryParameters();
|
|
|
|
|
if (excludeNodes !=null && excludeNodes.length>0)
|
|
|
|
|
params.put("exclude",excludeNodes);
|
|
|
|
|
|
|
|
|
|
if (onlyOfType!=null)
|
|
|
|
|
params.put("onlyType", new Object[] {resolveNodeType(onlyOfType)});
|
|
|
|
|
params.put("showHidden", new Object[] {showHidden});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GXInboundResponse response = myManager.queryParams(params).get();
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
@ -145,7 +146,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
Objects.requireNonNull(id, "id cannot be null");
|
|
|
|
|
try {
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path(id).path("children").path("paged");
|
|
|
|
|
Map<String, Object[]> params = new HashMap<>();
|
|
|
|
|
Map<String, Object[]> params = initQueryParameters();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (excludeNodes !=null && excludeNodes.length>0)
|
|
|
|
@ -158,6 +159,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
params.put("limit", new Object[] {limit});
|
|
|
|
|
params.put("showHidden", new Object[] {showHidden});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GXInboundResponse response = myManager.queryParams(params).get();
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
@ -211,7 +213,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
public ItemList call(GXWebTargetAdapterRequest manager) throws StorageHubException, Exception {
|
|
|
|
|
Objects.requireNonNull(id, "id cannot be null");
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path(id).path("search");
|
|
|
|
|
Map<String, Object[]> params = new HashMap<>();
|
|
|
|
|
Map<String, Object[]> params = initQueryParameters();
|
|
|
|
|
if (excludeNodes !=null && excludeNodes.length>0)
|
|
|
|
|
params.put("exclude",excludeNodes);
|
|
|
|
|
|
|
|
|
@ -221,6 +223,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
params.put("name", new String[] {URLEncoder.encode( nameToMatch, "UTF-8" )});
|
|
|
|
|
params.put("excludeTrashed", new Object[] {excludeTrashed});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GXInboundResponse response = myManager.queryParams(params).get();
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
@ -259,12 +262,13 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
public Integer call(GXWebTargetAdapterRequest manager) throws Exception {
|
|
|
|
|
Objects.requireNonNull(id, "id cannot be null");
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path(id).path("children").path("count");
|
|
|
|
|
Map<String, Object[]> params = new HashMap<>();
|
|
|
|
|
Map<String, Object[]> params = initQueryParameters();
|
|
|
|
|
if (onlyOfType!=null)
|
|
|
|
|
params.put("onlyType", new Object[] {resolveNodeType(onlyOfType)});
|
|
|
|
|
|
|
|
|
|
params.put("showHidden", new Object[] {showHidden});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GXInboundResponse response = myManager.queryParams(params).get();
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
@ -312,11 +316,11 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
public StreamDescriptor call(GXWebTargetAdapterRequest manager) throws Exception {
|
|
|
|
|
Objects.requireNonNull(id, "id cannot be null");
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path(id).path("download");
|
|
|
|
|
Map<String, Object[]> params = new HashMap<>();
|
|
|
|
|
Map<String, Object[]> params = initQueryParameters();
|
|
|
|
|
|
|
|
|
|
if (excludeNodes !=null && excludeNodes.length>0)
|
|
|
|
|
params.put("exclude",excludeNodes);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GXInboundResponse response = myManager.queryParams(params).get();
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
@ -349,7 +353,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
Objects.requireNonNull(id, "id cannot be null");
|
|
|
|
|
Objects.requireNonNull(version, "version cannot be null");
|
|
|
|
|
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path(id).path("versions").path(version).path("download");
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path(id).queryParams(initQueryParameters()).path("versions").path(version).path("download");
|
|
|
|
|
|
|
|
|
|
GXInboundResponse response = myManager.get();
|
|
|
|
|
|
|
|
|
@ -384,7 +388,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
Objects.requireNonNull(id, "id cannot be null");
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path(id).path("versions");
|
|
|
|
|
|
|
|
|
|
GXInboundResponse response = myManager.get();
|
|
|
|
|
GXInboundResponse response = myManager.queryParams(initQueryParameters()).get();
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
|
if (response.hasException())
|
|
|
|
@ -415,7 +419,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
public ItemWrapper<Item> call(GXWebTargetAdapterRequest manager) throws Exception {
|
|
|
|
|
Objects.requireNonNull(id, "id cannot be null");
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path(id);
|
|
|
|
|
Map<String, Object[]> params = new HashMap<>();
|
|
|
|
|
Map<String, Object[]> params = initQueryParameters();
|
|
|
|
|
|
|
|
|
|
if (excludeNodes !=null && excludeNodes.length>0)
|
|
|
|
|
params.put("exclude",excludeNodes);
|
|
|
|
@ -454,7 +458,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
Objects.requireNonNull(path, "path cannot be null");
|
|
|
|
|
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path(id).path("path");
|
|
|
|
|
Map<String, Object[]> params = new HashMap<>();
|
|
|
|
|
Map<String, Object[]> params = initQueryParameters();
|
|
|
|
|
|
|
|
|
|
params.put("path",new String[] {path});
|
|
|
|
|
|
|
|
|
@ -492,7 +496,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
@Override
|
|
|
|
|
public ItemWrapper<Item> call(GXWebTargetAdapterRequest manager) throws Exception {
|
|
|
|
|
Objects.requireNonNull(id, "id cannot be null");
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path(id).path("rootSharedFolder");
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path(id).queryParams(initQueryParameters()).path("rootSharedFolder");
|
|
|
|
|
GXInboundResponse response = myManager.get();
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
@ -526,7 +530,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
public URL call(GXWebTargetAdapterRequest manager) throws Exception {
|
|
|
|
|
Objects.requireNonNull(id, "id cannot be null");
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path(id).path("publiclink");
|
|
|
|
|
GXInboundResponse response = myManager.get();
|
|
|
|
|
GXInboundResponse response = myManager.queryParams(initQueryParameters()).get();
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
|
if (response.hasException())
|
|
|
|
@ -559,7 +563,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
Objects.requireNonNull(version, "version cannot be null");
|
|
|
|
|
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path(id).path("publiclink");
|
|
|
|
|
Map<String, Object[]> params = new HashMap<>();
|
|
|
|
|
Map<String, Object[]> params = initQueryParameters();
|
|
|
|
|
params.put("version",new Object[] {version});
|
|
|
|
|
GXInboundResponse response = myManager.queryParams(params).get();
|
|
|
|
|
|
|
|
|
@ -595,7 +599,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
Objects.requireNonNull(id, "name cannot be null");
|
|
|
|
|
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path(id).path("items");
|
|
|
|
|
Map<String, Object[]> params = new HashMap<>();
|
|
|
|
|
Map<String, Object[]> params = initQueryParameters();
|
|
|
|
|
|
|
|
|
|
if (excludeNodes !=null && excludeNodes.length>0)
|
|
|
|
|
params.put("exclude",excludeNodes);
|
|
|
|
@ -657,13 +661,12 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BodyPart fdp = new StreamDataBodyPart("file", stream);
|
|
|
|
|
fdp.getHeaders().put("Content-Disposition",Arrays.asList(contentDisposition.toString()));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
multipart.bodyPart(fdp);
|
|
|
|
|
|
|
|
|
|
Entity<FormDataMultiPart> entity = Entity.entity(multipart, MediaType.MULTIPART_FORM_DATA);
|
|
|
|
|
|
|
|
|
|
response = myManager.post(entity);
|
|
|
|
|
response = myManager.queryParams(initQueryParameters()).header("Content-Disposition",Arrays.asList(contentDisposition.toString())).post(entity);
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
|
if (response.hasException()) {
|
|
|
|
@ -709,7 +712,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
|
|
|
|
|
Entity<FormDataMultiPart> entity = Entity.entity(multipart, MediaType.MULTIPART_FORM_DATA);
|
|
|
|
|
|
|
|
|
|
response = myManager.post(entity);
|
|
|
|
|
response = myManager.queryParams(initQueryParameters()).post(entity);
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
|
if (response.hasException()) {
|
|
|
|
@ -749,7 +752,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
formData.add("description", description);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GXInboundResponse response = myManager.post(Entity.entity(formData, MediaType.APPLICATION_FORM_URLENCODED));
|
|
|
|
|
GXInboundResponse response = myManager.queryParams(initQueryParameters()).post(Entity.entity(formData, MediaType.APPLICATION_FORM_URLENCODED));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
@ -791,7 +794,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
if (contentLength >0)
|
|
|
|
|
myManager = myManager.header("Content-Length", contentLength);
|
|
|
|
|
|
|
|
|
|
GXInboundResponse response = myManager.post(Entity.entity(multipart, MediaType.MULTIPART_FORM_DATA_TYPE));
|
|
|
|
|
GXInboundResponse response = myManager.queryParams(initQueryParameters()).post(Entity.entity(multipart, MediaType.MULTIPART_FORM_DATA_TYPE));
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
|
if (response.hasException())
|
|
|
|
@ -856,7 +859,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
formData.add("hidden", Boolean.toString(hidden));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GXInboundResponse response = myManager.post(Entity.entity(formData, MediaType.APPLICATION_FORM_URLENCODED));
|
|
|
|
|
GXInboundResponse response = myManager.queryParams(initQueryParameters()).post(Entity.entity(formData, MediaType.APPLICATION_FORM_URLENCODED));
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
|
if (response.hasException())
|
|
|
|
@ -897,7 +900,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
formData.add("value", url.toString());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GXInboundResponse response = myManager.post(Entity.entity(formData, MediaType.APPLICATION_FORM_URLENCODED));
|
|
|
|
|
GXInboundResponse response = myManager.queryParams(initQueryParameters()).post(Entity.entity(formData, MediaType.APPLICATION_FORM_URLENCODED));
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
|
if (response.hasException())
|
|
|
|
@ -932,7 +935,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
.path("create").path("GCUBEITEM");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GXInboundResponse response = myManager.post(Entity.json(item));
|
|
|
|
|
GXInboundResponse response = myManager.queryParams(initQueryParameters()).post(Entity.json(item));
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
|
if (response.hasException())
|
|
|
|
@ -970,7 +973,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
multipart.field("defaultAccessType", accessType, MediaType.APPLICATION_JSON_TYPE);
|
|
|
|
|
multipart.field("users", users, MediaType.APPLICATION_JSON_TYPE);
|
|
|
|
|
|
|
|
|
|
GXInboundResponse response = myManager.put(Entity.entity(multipart, MediaType.MULTIPART_FORM_DATA_TYPE));
|
|
|
|
|
GXInboundResponse response = myManager.queryParams(initQueryParameters()).put(Entity.entity(multipart, MediaType.MULTIPART_FORM_DATA_TYPE));
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
|
if (response.hasException())
|
|
|
|
@ -1005,7 +1008,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
|
|
|
|
|
try (FormDataMultiPart multipart = new FormDataMultiPart()){
|
|
|
|
|
multipart.field("users", users, MediaType.APPLICATION_JSON_TYPE);
|
|
|
|
|
GXInboundResponse response = myManager.put(Entity.entity(multipart, MediaType.MULTIPART_FORM_DATA_TYPE));
|
|
|
|
|
GXInboundResponse response = myManager.queryParams(initQueryParameters()).put(Entity.entity(multipart, MediaType.MULTIPART_FORM_DATA_TYPE));
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
|
if (response.hasException())
|
|
|
|
@ -1040,7 +1043,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
public Void call(GXWebTargetAdapterRequest manager) throws Exception {
|
|
|
|
|
Objects.requireNonNull(id, "id cannot be null");
|
|
|
|
|
|
|
|
|
|
HashMap<String, Object[]> queryParam = new HashMap<String, Object[]>();
|
|
|
|
|
Map<String, Object[]> queryParam = initQueryParameters();
|
|
|
|
|
queryParam.put("force", new Object[] {force});
|
|
|
|
|
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path(id);
|
|
|
|
@ -1074,7 +1077,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
Objects.requireNonNull(id, "id cannot be null");
|
|
|
|
|
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path(id).path("anchestors");
|
|
|
|
|
Map<String, Object[]> params = new HashMap<>();
|
|
|
|
|
Map<String, Object[]> params = initQueryParameters();
|
|
|
|
|
|
|
|
|
|
if (excludeNodes !=null && excludeNodes.length>0)
|
|
|
|
|
params.put("exclude",excludeNodes);
|
|
|
|
@ -1108,7 +1111,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
public ACLList call(GXWebTargetAdapterRequest manager) throws Exception {
|
|
|
|
|
Objects.requireNonNull(id, "id cannot be null");
|
|
|
|
|
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path(id).path("acls");
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.queryParams(initQueryParameters()).path(id).path("acls");
|
|
|
|
|
GXInboundResponse response = myManager.get();
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
@ -1139,7 +1142,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
public Boolean call(GXWebTargetAdapterRequest manager) throws Exception {
|
|
|
|
|
Objects.requireNonNull(id, "id cannot be null");
|
|
|
|
|
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path(id).path("acls").path("write");
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.queryParams(initQueryParameters()).path(id).path("acls").path("write");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GXInboundResponse response = myManager.get();
|
|
|
|
@ -1177,7 +1180,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
Objects.requireNonNull(user, "user cannot be null");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path(id).path("acls");
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.queryParams(initQueryParameters()).path(id).path("acls");
|
|
|
|
|
|
|
|
|
|
try (FormDataMultiPart multipart = new FormDataMultiPart()){
|
|
|
|
|
multipart.field("access", accessType, MediaType.APPLICATION_JSON_TYPE);
|
|
|
|
@ -1216,7 +1219,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
Objects.requireNonNull(user, "user cannot be null");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path(id).path("acls").path(user);
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.queryParams(initQueryParameters()).path(id).path("acls").path(user);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GXInboundResponse response = myManager.delete();
|
|
|
|
@ -1260,7 +1263,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
formData.add("fileName", newFilename);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GXInboundResponse response = myManager.put(Entity.form(formData));
|
|
|
|
|
GXInboundResponse response = myManager.queryParams(initQueryParameters()).put(Entity.form(formData));
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
|
if (response.hasException())
|
|
|
|
@ -1298,7 +1301,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
formData.add("publish", Boolean.toString(publish));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GXInboundResponse response = myManager.put(Entity.form(formData));
|
|
|
|
|
GXInboundResponse response = myManager.queryParams(initQueryParameters()).put(Entity.form(formData));
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
|
if (response.hasException())
|
|
|
|
@ -1336,7 +1339,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
formData.add("destinationId", destinationFolderId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GXInboundResponse response = myManager.put(Entity.form(formData));
|
|
|
|
|
GXInboundResponse response = myManager.queryParams(initQueryParameters()).put(Entity.form(formData));
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
|
if (response.hasException())
|
|
|
|
@ -1372,7 +1375,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
formData.add("newName", newName);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GXInboundResponse response = myManager.put(Entity.form(formData));
|
|
|
|
|
GXInboundResponse response = myManager.queryParams(initQueryParameters()).put(Entity.form(formData));
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
|
if (response.hasException())
|
|
|
|
@ -1408,7 +1411,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path(id)
|
|
|
|
|
.path("hidden");
|
|
|
|
|
|
|
|
|
|
GXInboundResponse response = myManager.put(Entity.json(value));
|
|
|
|
|
GXInboundResponse response = myManager.queryParams(initQueryParameters()).put(Entity.json(value));
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
|
if (response.hasException())
|
|
|
|
@ -1442,7 +1445,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
GXWebTargetAdapterRequest myManager = manager.path(id)
|
|
|
|
|
.path("description");
|
|
|
|
|
|
|
|
|
|
GXInboundResponse response = myManager.put(Entity.json(description));
|
|
|
|
|
GXInboundResponse response = myManager.queryParams(initQueryParameters()).put(Entity.json(description));
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
|
if (response.hasException())
|
|
|
|
@ -1477,7 +1480,7 @@ public class DefaultItemManager implements ItemManagerClient {
|
|
|
|
|
.path("metadata");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GXInboundResponse response = myManager.put(Entity.json(metadata));
|
|
|
|
|
GXInboundResponse response = myManager.queryParams(initQueryParameters()).put(Entity.json(metadata));
|
|
|
|
|
|
|
|
|
|
if (response.isErrorResponse()) {
|
|
|
|
|
if (response.hasException())
|
|
|
|
|