id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
163,500 | box/box-java-sdk | src/main/java/com/box/sdk/BoxRetentionPolicy.java | BoxRetentionPolicy.getAll | public static Iterable<BoxRetentionPolicy.Info> getAll(final BoxAPIConnection api, String ... fields) {
return getAll(null, null, null, DEFAULT_LIMIT, api, fields);
} | java | public static Iterable<BoxRetentionPolicy.Info> getAll(final BoxAPIConnection api, String ... fields) {
return getAll(null, null, null, DEFAULT_LIMIT, api, fields);
} | [
"public",
"static",
"Iterable",
"<",
"BoxRetentionPolicy",
".",
"Info",
">",
"getAll",
"(",
"final",
"BoxAPIConnection",
"api",
",",
"String",
"...",
"fields",
")",
"{",
"return",
"getAll",
"(",
"null",
",",
"null",
",",
"null",
",",
"DEFAULT_LIMIT",
",",
... | Returns all the retention policies.
@param api the API connection to be used by the resource.
@param fields the fields to retrieve.
@return an iterable with all the retention policies. | [
"Returns",
"all",
"the",
"retention",
"policies",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxRetentionPolicy.java#L346-L348 |
163,501 | box/box-java-sdk | src/main/java/com/box/sdk/BoxRetentionPolicy.java | BoxRetentionPolicy.getAll | public static Iterable<BoxRetentionPolicy.Info> getAll(
String name, String type, String userID, int limit, final BoxAPIConnection api, String ... fields) {
QueryStringBuilder queryString = new QueryStringBuilder();
if (name != null) {
queryString.appendParam("policy_name", n... | java | public static Iterable<BoxRetentionPolicy.Info> getAll(
String name, String type, String userID, int limit, final BoxAPIConnection api, String ... fields) {
QueryStringBuilder queryString = new QueryStringBuilder();
if (name != null) {
queryString.appendParam("policy_name", n... | [
"public",
"static",
"Iterable",
"<",
"BoxRetentionPolicy",
".",
"Info",
">",
"getAll",
"(",
"String",
"name",
",",
"String",
"type",
",",
"String",
"userID",
",",
"int",
"limit",
",",
"final",
"BoxAPIConnection",
"api",
",",
"String",
"...",
"fields",
")",
... | Returns all the retention policies with specified filters.
@param name a name to filter the retention policies by. A trailing partial match search is performed.
Set to null if no name filtering is required.
@param type a policy type to filter the retention policies by. Set to null if no type filtering is required.
@par... | [
"Returns",
"all",
"the",
"retention",
"policies",
"with",
"specified",
"filters",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxRetentionPolicy.java#L361-L386 |
163,502 | box/box-java-sdk | src/main/java/com/box/sdk/EventStream.java | EventStream.start | public void start() {
if (this.started) {
throw new IllegalStateException("Cannot start the EventStream because it isn't stopped.");
}
final long initialPosition;
if (this.startingPosition == STREAM_POSITION_NOW) {
BoxAPIRequest request = new BoxAPIRequest(this.... | java | public void start() {
if (this.started) {
throw new IllegalStateException("Cannot start the EventStream because it isn't stopped.");
}
final long initialPosition;
if (this.startingPosition == STREAM_POSITION_NOW) {
BoxAPIRequest request = new BoxAPIRequest(this.... | [
"public",
"void",
"start",
"(",
")",
"{",
"if",
"(",
"this",
".",
"started",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Cannot start the EventStream because it isn't stopped.\"",
")",
";",
"}",
"final",
"long",
"initialPosition",
";",
"if",
"(",
... | Starts this EventStream and begins long polling the API.
@throws IllegalStateException if the EventStream is already started. | [
"Starts",
"this",
"EventStream",
"and",
"begins",
"long",
"polling",
"the",
"API",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/EventStream.java#L109-L137 |
163,503 | box/box-java-sdk | src/main/java/com/box/sdk/EventStream.java | EventStream.isDuplicate | protected boolean isDuplicate(String eventID) {
if (this.receivedEvents == null) {
this.receivedEvents = new LRUCache<String>();
}
return !this.receivedEvents.add(eventID);
} | java | protected boolean isDuplicate(String eventID) {
if (this.receivedEvents == null) {
this.receivedEvents = new LRUCache<String>();
}
return !this.receivedEvents.add(eventID);
} | [
"protected",
"boolean",
"isDuplicate",
"(",
"String",
"eventID",
")",
"{",
"if",
"(",
"this",
".",
"receivedEvents",
"==",
"null",
")",
"{",
"this",
".",
"receivedEvents",
"=",
"new",
"LRUCache",
"<",
"String",
">",
"(",
")",
";",
"}",
"return",
"!",
"... | Indicates whether or not an event ID is a duplicate.
<p>This method can be overridden by a subclass in order to provide custom de-duping logic.</p>
@param eventID the event ID.
@return true if the event is a duplicate; otherwise false. | [
"Indicates",
"whether",
"or",
"not",
"an",
"event",
"ID",
"is",
"a",
"duplicate",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/EventStream.java#L147-L153 |
163,504 | box/box-java-sdk | src/main/java/com/box/sdk/BoxRetentionPolicyAssignment.java | BoxRetentionPolicyAssignment.createAssignmentToEnterprise | public static BoxRetentionPolicyAssignment.Info createAssignmentToEnterprise(BoxAPIConnection api,
String policyID) {
return createAssignment(api, policyID, new JsonObject().add("type", TYPE_ENTERPRISE), null);
} | java | public static BoxRetentionPolicyAssignment.Info createAssignmentToEnterprise(BoxAPIConnection api,
String policyID) {
return createAssignment(api, policyID, new JsonObject().add("type", TYPE_ENTERPRISE), null);
} | [
"public",
"static",
"BoxRetentionPolicyAssignment",
".",
"Info",
"createAssignmentToEnterprise",
"(",
"BoxAPIConnection",
"api",
",",
"String",
"policyID",
")",
"{",
"return",
"createAssignment",
"(",
"api",
",",
"policyID",
",",
"new",
"JsonObject",
"(",
")",
".",
... | Assigns retention policy with givenID to the enterprise.
@param api the API connection to be used by the created assignment.
@param policyID id of the assigned retention policy.
@return info about created assignment. | [
"Assigns",
"retention",
"policy",
"with",
"givenID",
"to",
"the",
"enterprise",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxRetentionPolicyAssignment.java#L65-L68 |
163,505 | box/box-java-sdk | src/main/java/com/box/sdk/BoxRetentionPolicyAssignment.java | BoxRetentionPolicyAssignment.createAssignmentToFolder | public static BoxRetentionPolicyAssignment.Info createAssignmentToFolder(BoxAPIConnection api, String policyID,
String folderID) {
return createAssignment(api, policyID, new JsonObject().add("type", TYPE_FOLDER).add("id", folderID), ... | java | public static BoxRetentionPolicyAssignment.Info createAssignmentToFolder(BoxAPIConnection api, String policyID,
String folderID) {
return createAssignment(api, policyID, new JsonObject().add("type", TYPE_FOLDER).add("id", folderID), ... | [
"public",
"static",
"BoxRetentionPolicyAssignment",
".",
"Info",
"createAssignmentToFolder",
"(",
"BoxAPIConnection",
"api",
",",
"String",
"policyID",
",",
"String",
"folderID",
")",
"{",
"return",
"createAssignment",
"(",
"api",
",",
"policyID",
",",
"new",
"JsonO... | Assigns retention policy with givenID to the folder.
@param api the API connection to be used by the created assignment.
@param policyID id of the assigned retention policy.
@param folderID id of the folder to assign policy to.
@return info about created assignment. | [
"Assigns",
"retention",
"policy",
"with",
"givenID",
"to",
"the",
"folder",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxRetentionPolicyAssignment.java#L77-L80 |
163,506 | box/box-java-sdk | src/main/java/com/box/sdk/BoxRetentionPolicyAssignment.java | BoxRetentionPolicyAssignment.createAssignmentToMetadata | public static BoxRetentionPolicyAssignment.Info createAssignmentToMetadata(BoxAPIConnection api,
String policyID,
String templateID,
... | java | public static BoxRetentionPolicyAssignment.Info createAssignmentToMetadata(BoxAPIConnection api,
String policyID,
String templateID,
... | [
"public",
"static",
"BoxRetentionPolicyAssignment",
".",
"Info",
"createAssignmentToMetadata",
"(",
"BoxAPIConnection",
"api",
",",
"String",
"policyID",
",",
"String",
"templateID",
",",
"MetadataFieldFilter",
"...",
"filter",
")",
"{",
"JsonObject",
"assignTo",
"=",
... | Assigns a retention policy to all items with a given metadata template, optionally matching on fields.
@param api the API connection to be used by the created assignment.
@param policyID id of the assigned retention policy.
@param templateID the ID of the metadata template to assign the policy to.
@param filter optiona... | [
"Assigns",
"a",
"retention",
"policy",
"to",
"all",
"items",
"with",
"a",
"given",
"metadata",
"template",
"optionally",
"matching",
"on",
"fields",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxRetentionPolicyAssignment.java#L90-L103 |
163,507 | box/box-java-sdk | src/main/java/com/box/sdk/BoxRetentionPolicyAssignment.java | BoxRetentionPolicyAssignment.createAssignment | private static BoxRetentionPolicyAssignment.Info createAssignment(BoxAPIConnection api, String policyID,
JsonObject assignTo, JsonArray filter) {
URL url = ASSIGNMENTS_URL_TEMPLATE.build(api.getBaseURL());
BoxJSONRequest request = ... | java | private static BoxRetentionPolicyAssignment.Info createAssignment(BoxAPIConnection api, String policyID,
JsonObject assignTo, JsonArray filter) {
URL url = ASSIGNMENTS_URL_TEMPLATE.build(api.getBaseURL());
BoxJSONRequest request = ... | [
"private",
"static",
"BoxRetentionPolicyAssignment",
".",
"Info",
"createAssignment",
"(",
"BoxAPIConnection",
"api",
",",
"String",
"policyID",
",",
"JsonObject",
"assignTo",
",",
"JsonArray",
"filter",
")",
"{",
"URL",
"url",
"=",
"ASSIGNMENTS_URL_TEMPLATE",
".",
... | Assigns retention policy with givenID to folder or enterprise.
@param api the API connection to be used by the created assignment.
@param policyID id of the assigned retention policy.
@param assignTo object representing folder or enterprise to assign policy to.
@return info about created assignment. | [
"Assigns",
"retention",
"policy",
"with",
"givenID",
"to",
"folder",
"or",
"enterprise",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxRetentionPolicyAssignment.java#L112-L131 |
163,508 | box/box-java-sdk | src/main/java/com/box/sdk/Metadata.java | Metadata.getAllMetadata | public static Iterable<Metadata> getAllMetadata(BoxItem item, String ... fields) {
QueryStringBuilder builder = new QueryStringBuilder();
if (fields.length > 0) {
builder.appendParam("fields", fields);
}
return new BoxResourceIterable<Metadata>(
item.getAPI(),... | java | public static Iterable<Metadata> getAllMetadata(BoxItem item, String ... fields) {
QueryStringBuilder builder = new QueryStringBuilder();
if (fields.length > 0) {
builder.appendParam("fields", fields);
}
return new BoxResourceIterable<Metadata>(
item.getAPI(),... | [
"public",
"static",
"Iterable",
"<",
"Metadata",
">",
"getAllMetadata",
"(",
"BoxItem",
"item",
",",
"String",
"...",
"fields",
")",
"{",
"QueryStringBuilder",
"builder",
"=",
"new",
"QueryStringBuilder",
"(",
")",
";",
"if",
"(",
"fields",
".",
"length",
">... | Used to retrieve all metadata associated with the item.
@param item item to get metadata for.
@param fields the optional fields to retrieve.
@return An iterable of metadata instances associated with the item. | [
"Used",
"to",
"retrieve",
"all",
"metadata",
"associated",
"with",
"the",
"item",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/Metadata.java#L106-L122 |
163,509 | box/box-java-sdk | src/main/java/com/box/sdk/Metadata.java | Metadata.add | public Metadata add(String path, String value) {
this.values.add(this.pathToProperty(path), value);
this.addOp("add", path, value);
return this;
} | java | public Metadata add(String path, String value) {
this.values.add(this.pathToProperty(path), value);
this.addOp("add", path, value);
return this;
} | [
"public",
"Metadata",
"add",
"(",
"String",
"path",
",",
"String",
"value",
")",
"{",
"this",
".",
"values",
".",
"add",
"(",
"this",
".",
"pathToProperty",
"(",
"path",
")",
",",
"value",
")",
";",
"this",
".",
"addOp",
"(",
"\"add\"",
",",
"path",
... | Adds a new metadata value.
@param path the path that designates the key. Must be prefixed with a "/".
@param value the value.
@return this metadata object. | [
"Adds",
"a",
"new",
"metadata",
"value",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/Metadata.java#L170-L174 |
163,510 | box/box-java-sdk | src/main/java/com/box/sdk/Metadata.java | Metadata.add | public Metadata add(String path, List<String> values) {
JsonArray arr = new JsonArray();
for (String value : values) {
arr.add(value);
}
this.values.add(this.pathToProperty(path), arr);
this.addOp("add", path, arr);
return this;
} | java | public Metadata add(String path, List<String> values) {
JsonArray arr = new JsonArray();
for (String value : values) {
arr.add(value);
}
this.values.add(this.pathToProperty(path), arr);
this.addOp("add", path, arr);
return this;
} | [
"public",
"Metadata",
"add",
"(",
"String",
"path",
",",
"List",
"<",
"String",
">",
"values",
")",
"{",
"JsonArray",
"arr",
"=",
"new",
"JsonArray",
"(",
")",
";",
"for",
"(",
"String",
"value",
":",
"values",
")",
"{",
"arr",
".",
"add",
"(",
"va... | Adds a new metadata value of array type.
@param path the path to the field.
@param values the collection of values.
@return the metadata object for chaining. | [
"Adds",
"a",
"new",
"metadata",
"value",
"of",
"array",
"type",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/Metadata.java#L194-L202 |
163,511 | box/box-java-sdk | src/main/java/com/box/sdk/Metadata.java | Metadata.replace | public Metadata replace(String path, String value) {
this.values.set(this.pathToProperty(path), value);
this.addOp("replace", path, value);
return this;
} | java | public Metadata replace(String path, String value) {
this.values.set(this.pathToProperty(path), value);
this.addOp("replace", path, value);
return this;
} | [
"public",
"Metadata",
"replace",
"(",
"String",
"path",
",",
"String",
"value",
")",
"{",
"this",
".",
"values",
".",
"set",
"(",
"this",
".",
"pathToProperty",
"(",
"path",
")",
",",
"value",
")",
";",
"this",
".",
"addOp",
"(",
"\"replace\"",
",",
... | Replaces an existing metadata value.
@param path the path that designates the key. Must be prefixed with a "/".
@param value the value.
@return this metadata object. | [
"Replaces",
"an",
"existing",
"metadata",
"value",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/Metadata.java#L210-L214 |
163,512 | box/box-java-sdk | src/main/java/com/box/sdk/Metadata.java | Metadata.remove | public Metadata remove(String path) {
this.values.remove(this.pathToProperty(path));
this.addOp("remove", path, (String) null);
return this;
} | java | public Metadata remove(String path) {
this.values.remove(this.pathToProperty(path));
this.addOp("remove", path, (String) null);
return this;
} | [
"public",
"Metadata",
"remove",
"(",
"String",
"path",
")",
"{",
"this",
".",
"values",
".",
"remove",
"(",
"this",
".",
"pathToProperty",
"(",
"path",
")",
")",
";",
"this",
".",
"addOp",
"(",
"\"remove\"",
",",
"path",
",",
"(",
"String",
")",
"nul... | Removes an existing metadata value.
@param path the path that designates the key. Must be prefixed with a "/".
@return this metadata object. | [
"Removes",
"an",
"existing",
"metadata",
"value",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/Metadata.java#L233-L237 |
163,513 | box/box-java-sdk | src/main/java/com/box/sdk/Metadata.java | Metadata.get | @Deprecated
public String get(String path) {
final JsonValue value = this.values.get(this.pathToProperty(path));
if (value == null) {
return null;
}
if (!value.isString()) {
return value.toString();
}
return value.asString();
} | java | @Deprecated
public String get(String path) {
final JsonValue value = this.values.get(this.pathToProperty(path));
if (value == null) {
return null;
}
if (!value.isString()) {
return value.toString();
}
return value.asString();
} | [
"@",
"Deprecated",
"public",
"String",
"get",
"(",
"String",
"path",
")",
"{",
"final",
"JsonValue",
"value",
"=",
"this",
".",
"values",
".",
"get",
"(",
"this",
".",
"pathToProperty",
"(",
"path",
")",
")",
";",
"if",
"(",
"value",
"==",
"null",
")... | Returns a value.
@param path the path that designates the key. Must be prefixed with a "/".
@return the metadata property value.
@deprecated Metadata#get() does not handle all possible metadata types; use Metadata#getValue() instead | [
"Returns",
"a",
"value",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/Metadata.java#L272-L282 |
163,514 | box/box-java-sdk | src/main/java/com/box/sdk/Metadata.java | Metadata.getDate | public Date getDate(String path) throws ParseException {
return BoxDateFormat.parse(this.getValue(path).asString());
} | java | public Date getDate(String path) throws ParseException {
return BoxDateFormat.parse(this.getValue(path).asString());
} | [
"public",
"Date",
"getDate",
"(",
"String",
"path",
")",
"throws",
"ParseException",
"{",
"return",
"BoxDateFormat",
".",
"parse",
"(",
"this",
".",
"getValue",
"(",
"path",
")",
".",
"asString",
"(",
")",
")",
";",
"}"
] | Get a value from a date metadata field.
@param path the key path in the metadata object. Must be prefixed with a "/".
@return the metadata value as a Date.
@throws ParseException when the value cannot be parsed as a valid date | [
"Get",
"a",
"value",
"from",
"a",
"date",
"metadata",
"field",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/Metadata.java#L318-L320 |
163,515 | box/box-java-sdk | src/main/java/com/box/sdk/Metadata.java | Metadata.getMultiSelect | public List<String> getMultiSelect(String path) {
List<String> values = new ArrayList<String>();
for (JsonValue val : this.getValue(path).asArray()) {
values.add(val.asString());
}
return values;
} | java | public List<String> getMultiSelect(String path) {
List<String> values = new ArrayList<String>();
for (JsonValue val : this.getValue(path).asArray()) {
values.add(val.asString());
}
return values;
} | [
"public",
"List",
"<",
"String",
">",
"getMultiSelect",
"(",
"String",
"path",
")",
"{",
"List",
"<",
"String",
">",
"values",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"for",
"(",
"JsonValue",
"val",
":",
"this",
".",
"getValue",
"... | Get a value from a multiselect metadata field.
@param path the key path in the metadata object. Must be prefixed with a "/".
@return the list of values set in the field. | [
"Get",
"a",
"value",
"from",
"a",
"multiselect",
"metadata",
"field",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/Metadata.java#L327-L334 |
163,516 | box/box-java-sdk | src/main/java/com/box/sdk/Metadata.java | Metadata.getPropertyPaths | public List<String> getPropertyPaths() {
List<String> result = new ArrayList<String>();
for (String property : this.values.names()) {
if (!property.startsWith("$")) {
result.add(this.propertyToPath(property));
}
}
return result;
} | java | public List<String> getPropertyPaths() {
List<String> result = new ArrayList<String>();
for (String property : this.values.names()) {
if (!property.startsWith("$")) {
result.add(this.propertyToPath(property));
}
}
return result;
} | [
"public",
"List",
"<",
"String",
">",
"getPropertyPaths",
"(",
")",
"{",
"List",
"<",
"String",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"for",
"(",
"String",
"property",
":",
"this",
".",
"values",
".",
"names",
"("... | Returns a list of metadata property paths.
@return the list of metdata property paths. | [
"Returns",
"a",
"list",
"of",
"metadata",
"property",
"paths",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/Metadata.java#L340-L350 |
163,517 | box/box-java-sdk | src/main/java/com/box/sdk/Metadata.java | Metadata.pathToProperty | private String pathToProperty(String path) {
if (path == null || !path.startsWith("/")) {
throw new IllegalArgumentException("Path must be prefixed with a \"/\".");
}
return path.substring(1);
} | java | private String pathToProperty(String path) {
if (path == null || !path.startsWith("/")) {
throw new IllegalArgumentException("Path must be prefixed with a \"/\".");
}
return path.substring(1);
} | [
"private",
"String",
"pathToProperty",
"(",
"String",
"path",
")",
"{",
"if",
"(",
"path",
"==",
"null",
"||",
"!",
"path",
".",
"startsWith",
"(",
"\"/\"",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Path must be prefixed with a \\\"/\\\"... | Converts a JSON patch path to a JSON property name.
Currently the metadata API only supports flat maps.
@param path the path that designates the key. Must be prefixed with a "/".
@return the JSON property name. | [
"Converts",
"a",
"JSON",
"patch",
"path",
"to",
"a",
"JSON",
"property",
"name",
".",
"Currently",
"the",
"metadata",
"API",
"only",
"supports",
"flat",
"maps",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/Metadata.java#L386-L391 |
163,518 | box/box-java-sdk | src/main/java/com/box/sdk/Metadata.java | Metadata.addOp | private void addOp(String op, String path, String value) {
if (this.operations == null) {
this.operations = new JsonArray();
}
this.operations.add(new JsonObject()
.add("op", op)
.add("path", path)
.add("value", value));
} | java | private void addOp(String op, String path, String value) {
if (this.operations == null) {
this.operations = new JsonArray();
}
this.operations.add(new JsonObject()
.add("op", op)
.add("path", path)
.add("value", value));
} | [
"private",
"void",
"addOp",
"(",
"String",
"op",
",",
"String",
"path",
",",
"String",
"value",
")",
"{",
"if",
"(",
"this",
".",
"operations",
"==",
"null",
")",
"{",
"this",
".",
"operations",
"=",
"new",
"JsonArray",
"(",
")",
";",
"}",
"this",
... | Adds a patch operation.
@param op the operation type. Must be add, replace, remove, or test.
@param path the path that designates the key. Must be prefixed with a "/".
@param value the value to be set. | [
"Adds",
"a",
"patch",
"operation",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/Metadata.java#L411-L420 |
163,519 | box/box-java-sdk | src/main/java/com/box/sdk/BoxCollaboration.java | BoxCollaboration.create | protected static BoxCollaboration.Info create(BoxAPIConnection api, JsonObject accessibleBy, JsonObject item,
BoxCollaboration.Role role, Boolean notify, Boolean canViewPath) {
String queryString = "";
if (notify != null) {
queryString = ne... | java | protected static BoxCollaboration.Info create(BoxAPIConnection api, JsonObject accessibleBy, JsonObject item,
BoxCollaboration.Role role, Boolean notify, Boolean canViewPath) {
String queryString = "";
if (notify != null) {
queryString = ne... | [
"protected",
"static",
"BoxCollaboration",
".",
"Info",
"create",
"(",
"BoxAPIConnection",
"api",
",",
"JsonObject",
"accessibleBy",
",",
"JsonObject",
"item",
",",
"BoxCollaboration",
".",
"Role",
"role",
",",
"Boolean",
"notify",
",",
"Boolean",
"canViewPath",
"... | Create a new collaboration object.
@param api the API connection used to make the request.
@param accessibleBy the JSON object describing who should be collaborated.
@param item the JSON object describing which item to collaborate.
@param role the role to give the collaborators.
@param notify ... | [
"Create",
"a",
"new",
"collaboration",
"object",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxCollaboration.java#L68-L99 |
163,520 | box/box-java-sdk | src/main/java/com/box/sdk/BoxCollaboration.java | BoxCollaboration.getPendingCollaborations | public static Collection<Info> getPendingCollaborations(BoxAPIConnection api) {
URL url = PENDING_COLLABORATIONS_URL.build(api.getBaseURL());
BoxAPIRequest request = new BoxAPIRequest(api, url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject responseJSON ... | java | public static Collection<Info> getPendingCollaborations(BoxAPIConnection api) {
URL url = PENDING_COLLABORATIONS_URL.build(api.getBaseURL());
BoxAPIRequest request = new BoxAPIRequest(api, url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject responseJSON ... | [
"public",
"static",
"Collection",
"<",
"Info",
">",
"getPendingCollaborations",
"(",
"BoxAPIConnection",
"api",
")",
"{",
"URL",
"url",
"=",
"PENDING_COLLABORATIONS_URL",
".",
"build",
"(",
"api",
".",
"getBaseURL",
"(",
")",
")",
";",
"BoxAPIRequest",
"request"... | Gets all pending collaboration invites for the current user.
@param api the API connection to use.
@return a collection of pending collaboration infos. | [
"Gets",
"all",
"pending",
"collaboration",
"invites",
"for",
"the",
"current",
"user",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxCollaboration.java#L107-L125 |
163,521 | box/box-java-sdk | src/main/java/com/box/sdk/BoxCollaboration.java | BoxCollaboration.getInfo | public Info getInfo() {
BoxAPIConnection api = this.getAPI();
URL url = COLLABORATION_URL_TEMPLATE.build(api.getBaseURL(), this.getID());
BoxAPIRequest request = new BoxAPIRequest(api, url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject jsonObjec... | java | public Info getInfo() {
BoxAPIConnection api = this.getAPI();
URL url = COLLABORATION_URL_TEMPLATE.build(api.getBaseURL(), this.getID());
BoxAPIRequest request = new BoxAPIRequest(api, url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject jsonObjec... | [
"public",
"Info",
"getInfo",
"(",
")",
"{",
"BoxAPIConnection",
"api",
"=",
"this",
".",
"getAPI",
"(",
")",
";",
"URL",
"url",
"=",
"COLLABORATION_URL_TEMPLATE",
".",
"build",
"(",
"api",
".",
"getBaseURL",
"(",
")",
",",
"this",
".",
"getID",
"(",
")... | Gets information about this collaboration.
@return info about this collaboration. | [
"Gets",
"information",
"about",
"this",
"collaboration",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxCollaboration.java#L132-L140 |
163,522 | box/box-java-sdk | src/main/java/com/box/sdk/BoxCollaboration.java | BoxCollaboration.updateInfo | public void updateInfo(Info info) {
BoxAPIConnection api = this.getAPI();
URL url = COLLABORATION_URL_TEMPLATE.build(api.getBaseURL(), this.getID());
BoxJSONRequest request = new BoxJSONRequest(api, url, "PUT");
request.setBody(info.getPendingChanges());
BoxAPIResponse boxAPIRes... | java | public void updateInfo(Info info) {
BoxAPIConnection api = this.getAPI();
URL url = COLLABORATION_URL_TEMPLATE.build(api.getBaseURL(), this.getID());
BoxJSONRequest request = new BoxJSONRequest(api, url, "PUT");
request.setBody(info.getPendingChanges());
BoxAPIResponse boxAPIRes... | [
"public",
"void",
"updateInfo",
"(",
"Info",
"info",
")",
"{",
"BoxAPIConnection",
"api",
"=",
"this",
".",
"getAPI",
"(",
")",
";",
"URL",
"url",
"=",
"COLLABORATION_URL_TEMPLATE",
".",
"build",
"(",
"api",
".",
"getBaseURL",
"(",
")",
",",
"this",
".",... | Updates the information about this collaboration with any info fields that have been modified locally.
@param info the updated info. | [
"Updates",
"the",
"information",
"about",
"this",
"collaboration",
"with",
"any",
"info",
"fields",
"that",
"have",
"been",
"modified",
"locally",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxCollaboration.java#L162-L175 |
163,523 | box/box-java-sdk | src/main/java/com/box/sdk/BoxCollaboration.java | BoxCollaboration.delete | public void delete() {
BoxAPIConnection api = this.getAPI();
URL url = COLLABORATION_URL_TEMPLATE.build(api.getBaseURL(), this.getID());
BoxAPIRequest request = new BoxAPIRequest(api, url, "DELETE");
BoxAPIResponse response = request.send();
response.disconnect();
} | java | public void delete() {
BoxAPIConnection api = this.getAPI();
URL url = COLLABORATION_URL_TEMPLATE.build(api.getBaseURL(), this.getID());
BoxAPIRequest request = new BoxAPIRequest(api, url, "DELETE");
BoxAPIResponse response = request.send();
response.disconnect();
} | [
"public",
"void",
"delete",
"(",
")",
"{",
"BoxAPIConnection",
"api",
"=",
"this",
".",
"getAPI",
"(",
")",
";",
"URL",
"url",
"=",
"COLLABORATION_URL_TEMPLATE",
".",
"build",
"(",
"api",
".",
"getBaseURL",
"(",
")",
",",
"this",
".",
"getID",
"(",
")"... | Deletes this collaboration. | [
"Deletes",
"this",
"collaboration",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxCollaboration.java#L180-L187 |
163,524 | box/box-java-sdk | src/main/java/com/box/sdk/BoxLegalHoldAssignment.java | BoxLegalHoldAssignment.create | public static BoxLegalHoldAssignment.Info create(BoxAPIConnection api,
String policyID, String resourceType, String resourceID) {
URL url = ASSIGNMENTS_URL_TEMPLATE.build(api.getBaseURL());
BoxJSONRequest request = new BoxJSONRequest(api, url, "POST")... | java | public static BoxLegalHoldAssignment.Info create(BoxAPIConnection api,
String policyID, String resourceType, String resourceID) {
URL url = ASSIGNMENTS_URL_TEMPLATE.build(api.getBaseURL());
BoxJSONRequest request = new BoxJSONRequest(api, url, "POST")... | [
"public",
"static",
"BoxLegalHoldAssignment",
".",
"Info",
"create",
"(",
"BoxAPIConnection",
"api",
",",
"String",
"policyID",
",",
"String",
"resourceType",
",",
"String",
"resourceID",
")",
"{",
"URL",
"url",
"=",
"ASSIGNMENTS_URL_TEMPLATE",
".",
"build",
"(",
... | Creates new legal hold policy assignment.
@param api the API connection to be used by the resource.
@param policyID ID of policy to create assignment for.
@param resourceType type of target resource. Can be 'file_version', 'file', 'folder', or 'user'.
@param resourceID ID of the target resource.
@return info about crea... | [
"Creates",
"new",
"legal",
"hold",
"policy",
"assignment",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxLegalHoldAssignment.java#L72-L87 |
163,525 | box/box-java-sdk | src/main/java/com/box/sdk/RetentionPolicyParams.java | RetentionPolicyParams.addCustomNotificationRecipient | public void addCustomNotificationRecipient(String userID) {
BoxUser user = new BoxUser(null, userID);
this.customNotificationRecipients.add(user.new Info());
} | java | public void addCustomNotificationRecipient(String userID) {
BoxUser user = new BoxUser(null, userID);
this.customNotificationRecipients.add(user.new Info());
} | [
"public",
"void",
"addCustomNotificationRecipient",
"(",
"String",
"userID",
")",
"{",
"BoxUser",
"user",
"=",
"new",
"BoxUser",
"(",
"null",
",",
"userID",
")",
";",
"this",
".",
"customNotificationRecipients",
".",
"add",
"(",
"user",
".",
"new",
"Info",
"... | Add a user by ID to the list of people to notify when the retention period is ending.
@param userID The ID of the user to add to the list. | [
"Add",
"a",
"user",
"by",
"ID",
"to",
"the",
"list",
"of",
"people",
"to",
"notify",
"when",
"the",
"retention",
"period",
"is",
"ending",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/RetentionPolicyParams.java#L85-L89 |
163,526 | box/box-java-sdk | src/main/java/com/box/sdk/BoxCollection.java | BoxCollection.getAllCollections | public static Iterable<BoxCollection.Info> getAllCollections(final BoxAPIConnection api) {
return new Iterable<BoxCollection.Info>() {
public Iterator<BoxCollection.Info> iterator() {
URL url = GET_COLLECTIONS_URL_TEMPLATE.build(api.getBaseURL());
return new BoxCollec... | java | public static Iterable<BoxCollection.Info> getAllCollections(final BoxAPIConnection api) {
return new Iterable<BoxCollection.Info>() {
public Iterator<BoxCollection.Info> iterator() {
URL url = GET_COLLECTIONS_URL_TEMPLATE.build(api.getBaseURL());
return new BoxCollec... | [
"public",
"static",
"Iterable",
"<",
"BoxCollection",
".",
"Info",
">",
"getAllCollections",
"(",
"final",
"BoxAPIConnection",
"api",
")",
"{",
"return",
"new",
"Iterable",
"<",
"BoxCollection",
".",
"Info",
">",
"(",
")",
"{",
"public",
"Iterator",
"<",
"Bo... | Gets an iterable of all the collections for the given user.
@param api the API connection to be used when retrieving the collections.
@return an iterable containing info about all the collections. | [
"Gets",
"an",
"iterable",
"of",
"all",
"the",
"collections",
"for",
"the",
"given",
"user",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxCollection.java#L44-L51 |
163,527 | box/box-java-sdk | src/main/java/com/box/sdk/BoxCollection.java | BoxCollection.getItemsRange | public PartialCollection<BoxItem.Info> getItemsRange(long offset, long limit, String... fields) {
QueryStringBuilder builder = new QueryStringBuilder()
.appendParam("offset", offset)
.appendParam("limit", limit);
if (fields.length > 0) {
builder.appendParam("... | java | public PartialCollection<BoxItem.Info> getItemsRange(long offset, long limit, String... fields) {
QueryStringBuilder builder = new QueryStringBuilder()
.appendParam("offset", offset)
.appendParam("limit", limit);
if (fields.length > 0) {
builder.appendParam("... | [
"public",
"PartialCollection",
"<",
"BoxItem",
".",
"Info",
">",
"getItemsRange",
"(",
"long",
"offset",
",",
"long",
"limit",
",",
"String",
"...",
"fields",
")",
"{",
"QueryStringBuilder",
"builder",
"=",
"new",
"QueryStringBuilder",
"(",
")",
".",
"appendPa... | Retrieves a specific range of items in this collection.
@param offset the index of the first item to retrieve.
@param limit the maximum number of items to retrieve after the offset.
@param fields the fields to retrieve.
@return a partial collection containing the specified range of items. | [
"Retrieves",
"a",
"specific",
"range",
"of",
"items",
"in",
"this",
"collection",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxCollection.java#L86-L111 |
163,528 | box/box-java-sdk | src/main/java/com/box/sdk/BoxCollection.java | BoxCollection.iterator | @Override
public Iterator<BoxItem.Info> iterator() {
URL url = GET_COLLECTION_ITEMS_URL.build(this.getAPI().getBaseURL(), BoxCollection.this.getID());
return new BoxItemIterator(BoxCollection.this.getAPI(), url);
} | java | @Override
public Iterator<BoxItem.Info> iterator() {
URL url = GET_COLLECTION_ITEMS_URL.build(this.getAPI().getBaseURL(), BoxCollection.this.getID());
return new BoxItemIterator(BoxCollection.this.getAPI(), url);
} | [
"@",
"Override",
"public",
"Iterator",
"<",
"BoxItem",
".",
"Info",
">",
"iterator",
"(",
")",
"{",
"URL",
"url",
"=",
"GET_COLLECTION_ITEMS_URL",
".",
"build",
"(",
"this",
".",
"getAPI",
"(",
")",
".",
"getBaseURL",
"(",
")",
",",
"BoxCollection",
".",... | Returns an iterator over the items in this collection.
@return an iterator over the items in this collection. | [
"Returns",
"an",
"iterator",
"over",
"the",
"items",
"in",
"this",
"collection",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxCollection.java#L117-L121 |
163,529 | box/box-java-sdk | src/main/java/com/box/sdk/BoxCollaborationWhitelistExemptTarget.java | BoxCollaborationWhitelistExemptTarget.create | public static BoxCollaborationWhitelistExemptTarget.Info create(final BoxAPIConnection api, String userID) {
URL url = COLLABORATION_WHITELIST_EXEMPT_TARGET_ENTRIES_URL_TEMPLATE.build(api.getBaseURL());
BoxJSONRequest request = new BoxJSONRequest(api, url, HttpMethod.POST);
JsonObject requestJSO... | java | public static BoxCollaborationWhitelistExemptTarget.Info create(final BoxAPIConnection api, String userID) {
URL url = COLLABORATION_WHITELIST_EXEMPT_TARGET_ENTRIES_URL_TEMPLATE.build(api.getBaseURL());
BoxJSONRequest request = new BoxJSONRequest(api, url, HttpMethod.POST);
JsonObject requestJSO... | [
"public",
"static",
"BoxCollaborationWhitelistExemptTarget",
".",
"Info",
"create",
"(",
"final",
"BoxAPIConnection",
"api",
",",
"String",
"userID",
")",
"{",
"URL",
"url",
"=",
"COLLABORATION_WHITELIST_EXEMPT_TARGET_ENTRIES_URL_TEMPLATE",
".",
"build",
"(",
"api",
"."... | Creates a collaboration whitelist for a Box User with a given ID.
@param api the API connection to be used by the collaboration whitelist.
@param userID the ID of the Box User to add to the collaboration whitelist.
@return information about the collaboration whitelist created for user. | [
"Creates",
"a",
"collaboration",
"whitelist",
"for",
"a",
"Box",
"User",
"with",
"a",
"given",
"ID",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxCollaborationWhitelistExemptTarget.java#L56-L71 |
163,530 | box/box-java-sdk | src/main/java/com/box/sdk/BoxCollaborationWhitelistExemptTarget.java | BoxCollaborationWhitelistExemptTarget.getInfo | public BoxCollaborationWhitelistExemptTarget.Info getInfo() {
URL url = COLLABORATION_WHITELIST_EXEMPT_TARGET_ENTRY_URL_TEMPLATE.build(this.getAPI().getBaseURL(),
this.getID());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, HttpMethod.GET);
BoxJSONResponse respons... | java | public BoxCollaborationWhitelistExemptTarget.Info getInfo() {
URL url = COLLABORATION_WHITELIST_EXEMPT_TARGET_ENTRY_URL_TEMPLATE.build(this.getAPI().getBaseURL(),
this.getID());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, HttpMethod.GET);
BoxJSONResponse respons... | [
"public",
"BoxCollaborationWhitelistExemptTarget",
".",
"Info",
"getInfo",
"(",
")",
"{",
"URL",
"url",
"=",
"COLLABORATION_WHITELIST_EXEMPT_TARGET_ENTRY_URL_TEMPLATE",
".",
"build",
"(",
"this",
".",
"getAPI",
"(",
")",
".",
"getBaseURL",
"(",
")",
",",
"this",
"... | Retrieves information for a collaboration whitelist for a given whitelist ID.
@return information about this {@link BoxCollaborationWhitelistExemptTarget}. | [
"Retrieves",
"information",
"for",
"a",
"collaboration",
"whitelist",
"for",
"a",
"given",
"whitelist",
"ID",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxCollaborationWhitelistExemptTarget.java#L78-L85 |
163,531 | box/box-java-sdk | src/main/java/com/box/sdk/BoxDeveloperEditionAPIConnection.java | BoxDeveloperEditionAPIConnection.getAppEnterpriseConnection | public static BoxDeveloperEditionAPIConnection getAppEnterpriseConnection(String enterpriseId, String clientId,
String clientSecret, JWTEncryptionPreferences encryptionPref, IAccessTokenCache accessTokenCache) {
BoxDeveloperEditionAPIConnection connection = new BoxDeveloperEditionAPIConnection(ente... | java | public static BoxDeveloperEditionAPIConnection getAppEnterpriseConnection(String enterpriseId, String clientId,
String clientSecret, JWTEncryptionPreferences encryptionPref, IAccessTokenCache accessTokenCache) {
BoxDeveloperEditionAPIConnection connection = new BoxDeveloperEditionAPIConnection(ente... | [
"public",
"static",
"BoxDeveloperEditionAPIConnection",
"getAppEnterpriseConnection",
"(",
"String",
"enterpriseId",
",",
"String",
"clientId",
",",
"String",
"clientSecret",
",",
"JWTEncryptionPreferences",
"encryptionPref",
",",
"IAccessTokenCache",
"accessTokenCache",
")",
... | Creates a new Box Developer Edition connection with enterprise token leveraging an access token cache.
@param enterpriseId the enterprise ID to use for requesting access token.
@param clientId the client ID to use when exchanging the JWT assertion for an access token.
@param clientSecret ... | [
"Creates",
"a",
"new",
"Box",
"Developer",
"Edition",
"connection",
"with",
"enterprise",
"token",
"leveraging",
"an",
"access",
"token",
"cache",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxDeveloperEditionAPIConnection.java#L193-L202 |
163,532 | box/box-java-sdk | src/main/java/com/box/sdk/BoxDeveloperEditionAPIConnection.java | BoxDeveloperEditionAPIConnection.getAppEnterpriseConnection | public static BoxDeveloperEditionAPIConnection getAppEnterpriseConnection(BoxConfig boxConfig) {
BoxDeveloperEditionAPIConnection connection = getAppEnterpriseConnection(boxConfig.getEnterpriseId(),
boxConfig.getClientId(), boxConfig.getClientSecret(), boxConfig.getJWTEncryptionPreferences());
... | java | public static BoxDeveloperEditionAPIConnection getAppEnterpriseConnection(BoxConfig boxConfig) {
BoxDeveloperEditionAPIConnection connection = getAppEnterpriseConnection(boxConfig.getEnterpriseId(),
boxConfig.getClientId(), boxConfig.getClientSecret(), boxConfig.getJWTEncryptionPreferences());
... | [
"public",
"static",
"BoxDeveloperEditionAPIConnection",
"getAppEnterpriseConnection",
"(",
"BoxConfig",
"boxConfig",
")",
"{",
"BoxDeveloperEditionAPIConnection",
"connection",
"=",
"getAppEnterpriseConnection",
"(",
"boxConfig",
".",
"getEnterpriseId",
"(",
")",
",",
"boxCon... | Creates a new Box Developer Edition connection with enterprise token leveraging BoxConfig.
@param boxConfig box configuration settings object
@return a new instance of BoxAPIConnection. | [
"Creates",
"a",
"new",
"Box",
"Developer",
"Edition",
"connection",
"with",
"enterprise",
"token",
"leveraging",
"BoxConfig",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxDeveloperEditionAPIConnection.java#L209-L215 |
163,533 | box/box-java-sdk | src/main/java/com/box/sdk/BoxDeveloperEditionAPIConnection.java | BoxDeveloperEditionAPIConnection.getAppUserConnection | public static BoxDeveloperEditionAPIConnection getAppUserConnection(String userId, String clientId,
String clientSecret, JWTEncryptionPreferences encryptionPref, IAccessTokenCache accessTokenCache) {
BoxDeveloperEditionAPIConnection connection = new BoxDeveloperEditionAPIConnection(userId,
... | java | public static BoxDeveloperEditionAPIConnection getAppUserConnection(String userId, String clientId,
String clientSecret, JWTEncryptionPreferences encryptionPref, IAccessTokenCache accessTokenCache) {
BoxDeveloperEditionAPIConnection connection = new BoxDeveloperEditionAPIConnection(userId,
... | [
"public",
"static",
"BoxDeveloperEditionAPIConnection",
"getAppUserConnection",
"(",
"String",
"userId",
",",
"String",
"clientId",
",",
"String",
"clientSecret",
",",
"JWTEncryptionPreferences",
"encryptionPref",
",",
"IAccessTokenCache",
"accessTokenCache",
")",
"{",
"Box... | Creates a new Box Developer Edition connection with App User token.
@param userId the user ID to use for an App User.
@param clientId the client ID to use when exchanging the JWT assertion for an access token.
@param clientSecret the client secret to use when exchanging the JWT asse... | [
"Creates",
"a",
"new",
"Box",
"Developer",
"Edition",
"connection",
"with",
"App",
"User",
"token",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxDeveloperEditionAPIConnection.java#L265-L274 |
163,534 | box/box-java-sdk | src/main/java/com/box/sdk/BoxDeveloperEditionAPIConnection.java | BoxDeveloperEditionAPIConnection.getAppUserConnection | public static BoxDeveloperEditionAPIConnection getAppUserConnection(String userId, BoxConfig boxConfig) {
return getAppUserConnection(userId, boxConfig.getClientId(), boxConfig.getClientSecret(),
boxConfig.getJWTEncryptionPreferences());
} | java | public static BoxDeveloperEditionAPIConnection getAppUserConnection(String userId, BoxConfig boxConfig) {
return getAppUserConnection(userId, boxConfig.getClientId(), boxConfig.getClientSecret(),
boxConfig.getJWTEncryptionPreferences());
} | [
"public",
"static",
"BoxDeveloperEditionAPIConnection",
"getAppUserConnection",
"(",
"String",
"userId",
",",
"BoxConfig",
"boxConfig",
")",
"{",
"return",
"getAppUserConnection",
"(",
"userId",
",",
"boxConfig",
".",
"getClientId",
"(",
")",
",",
"boxConfig",
".",
... | Creates a new Box Developer Edition connection with App User token levaraging BoxConfig.
@param userId the user ID to use for an App User.
@param boxConfig box configuration settings object
@return a new instance of BoxAPIConnection. | [
"Creates",
"a",
"new",
"Box",
"Developer",
"Edition",
"connection",
"with",
"App",
"User",
"token",
"levaraging",
"BoxConfig",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxDeveloperEditionAPIConnection.java#L282-L285 |
163,535 | box/box-java-sdk | src/main/java/com/box/sdk/BoxDeveloperEditionAPIConnection.java | BoxDeveloperEditionAPIConnection.authenticate | public void authenticate() {
URL url;
try {
url = new URL(this.getTokenURL());
} catch (MalformedURLException e) {
assert false : "An invalid token URL indicates a bug in the SDK.";
throw new RuntimeException("An invalid token URL indicates a bug in the SDK.",... | java | public void authenticate() {
URL url;
try {
url = new URL(this.getTokenURL());
} catch (MalformedURLException e) {
assert false : "An invalid token URL indicates a bug in the SDK.";
throw new RuntimeException("An invalid token URL indicates a bug in the SDK.",... | [
"public",
"void",
"authenticate",
"(",
")",
"{",
"URL",
"url",
";",
"try",
"{",
"url",
"=",
"new",
"URL",
"(",
"this",
".",
"getTokenURL",
"(",
")",
")",
";",
"}",
"catch",
"(",
"MalformedURLException",
"e",
")",
"{",
"assert",
"false",
":",
"\"An in... | Authenticates the API connection for Box Developer Edition. | [
"Authenticates",
"the",
"API",
"connection",
"for",
"Box",
"Developer",
"Edition",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxDeveloperEditionAPIConnection.java#L311-L377 |
163,536 | box/box-java-sdk | src/main/java/com/box/sdk/BoxDeveloperEditionAPIConnection.java | BoxDeveloperEditionAPIConnection.refresh | public void refresh() {
this.getRefreshLock().writeLock().lock();
try {
this.authenticate();
} catch (BoxAPIException e) {
this.notifyError(e);
this.getRefreshLock().writeLock().unlock();
throw e;
}
this.notifyRefresh();
t... | java | public void refresh() {
this.getRefreshLock().writeLock().lock();
try {
this.authenticate();
} catch (BoxAPIException e) {
this.notifyError(e);
this.getRefreshLock().writeLock().unlock();
throw e;
}
this.notifyRefresh();
t... | [
"public",
"void",
"refresh",
"(",
")",
"{",
"this",
".",
"getRefreshLock",
"(",
")",
".",
"writeLock",
"(",
")",
".",
"lock",
"(",
")",
";",
"try",
"{",
"this",
".",
"authenticate",
"(",
")",
";",
"}",
"catch",
"(",
"BoxAPIException",
"e",
")",
"{"... | Refresh's this connection's access token using Box Developer Edition.
@throws IllegalStateException if this connection's access token cannot be refreshed. | [
"Refresh",
"s",
"this",
"connection",
"s",
"access",
"token",
"using",
"Box",
"Developer",
"Edition",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxDeveloperEditionAPIConnection.java#L391-L404 |
163,537 | box/box-java-sdk | src/main/java/com/box/sdk/BoxFile.java | BoxFile.addTask | public BoxTask.Info addTask(BoxTask.Action action, String message, Date dueAt) {
JsonObject itemJSON = new JsonObject();
itemJSON.add("type", "file");
itemJSON.add("id", this.getID());
JsonObject requestJSON = new JsonObject();
requestJSON.add("item", itemJSON);
requestJ... | java | public BoxTask.Info addTask(BoxTask.Action action, String message, Date dueAt) {
JsonObject itemJSON = new JsonObject();
itemJSON.add("type", "file");
itemJSON.add("id", this.getID());
JsonObject requestJSON = new JsonObject();
requestJSON.add("item", itemJSON);
requestJ... | [
"public",
"BoxTask",
".",
"Info",
"addTask",
"(",
"BoxTask",
".",
"Action",
"action",
",",
"String",
"message",
",",
"Date",
"dueAt",
")",
"{",
"JsonObject",
"itemJSON",
"=",
"new",
"JsonObject",
"(",
")",
";",
"itemJSON",
".",
"add",
"(",
"\"type\"",
",... | Adds a new task to this file. The task can have an optional message to include, and a due date.
@param action the action the task assignee will be prompted to do.
@param message an optional message to include with the task.
@param dueAt the day at which this task is due.
@return information about the newly added ta... | [
"Adds",
"a",
"new",
"task",
"to",
"this",
"file",
".",
"The",
"task",
"can",
"have",
"an",
"optional",
"message",
"to",
"include",
"and",
"a",
"due",
"date",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFile.java#L233-L258 |
163,538 | box/box-java-sdk | src/main/java/com/box/sdk/BoxFile.java | BoxFile.getDownloadURL | public URL getDownloadURL() {
URL url = CONTENT_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET");
request.setFollowRedirects(false);
BoxRedirectResponse response = (BoxRedirectResponse) request.send();
... | java | public URL getDownloadURL() {
URL url = CONTENT_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET");
request.setFollowRedirects(false);
BoxRedirectResponse response = (BoxRedirectResponse) request.send();
... | [
"public",
"URL",
"getDownloadURL",
"(",
")",
"{",
"URL",
"url",
"=",
"CONTENT_URL_TEMPLATE",
".",
"build",
"(",
"this",
".",
"getAPI",
"(",
")",
".",
"getBaseURL",
"(",
")",
",",
"this",
".",
"getID",
"(",
")",
")",
";",
"BoxAPIRequest",
"request",
"="... | Gets an expiring URL for downloading a file directly from Box. This can be user,
for example, for sending as a redirect to a browser to cause the browser
to download the file directly from Box.
@return the temporary download URL | [
"Gets",
"an",
"expiring",
"URL",
"for",
"downloading",
"a",
"file",
"directly",
"from",
"Box",
".",
"This",
"can",
"be",
"user",
"for",
"example",
"for",
"sending",
"as",
"a",
"redirect",
"to",
"a",
"browser",
"to",
"cause",
"the",
"browser",
"to",
"down... | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFile.java#L267-L275 |
163,539 | box/box-java-sdk | src/main/java/com/box/sdk/BoxFile.java | BoxFile.downloadRange | public void downloadRange(OutputStream output, long rangeStart, long rangeEnd) {
this.downloadRange(output, rangeStart, rangeEnd, null);
} | java | public void downloadRange(OutputStream output, long rangeStart, long rangeEnd) {
this.downloadRange(output, rangeStart, rangeEnd, null);
} | [
"public",
"void",
"downloadRange",
"(",
"OutputStream",
"output",
",",
"long",
"rangeStart",
",",
"long",
"rangeEnd",
")",
"{",
"this",
".",
"downloadRange",
"(",
"output",
",",
"rangeStart",
",",
"rangeEnd",
",",
"null",
")",
";",
"}"
] | Downloads a part of this file's contents, starting at rangeStart and stopping at rangeEnd.
@param output the stream to where the file will be written.
@param rangeStart the byte offset at which to start the download.
@param rangeEnd the byte offset at which to stop the download. | [
"Downloads",
"a",
"part",
"of",
"this",
"file",
"s",
"contents",
"starting",
"at",
"rangeStart",
"and",
"stopping",
"at",
"rangeEnd",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFile.java#L329-L331 |
163,540 | box/box-java-sdk | src/main/java/com/box/sdk/BoxFile.java | BoxFile.downloadRange | public void downloadRange(OutputStream output, long rangeStart, long rangeEnd, ProgressListener listener) {
URL url = CONTENT_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET");
if (rangeEnd > 0) {
reques... | java | public void downloadRange(OutputStream output, long rangeStart, long rangeEnd, ProgressListener listener) {
URL url = CONTENT_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET");
if (rangeEnd > 0) {
reques... | [
"public",
"void",
"downloadRange",
"(",
"OutputStream",
"output",
",",
"long",
"rangeStart",
",",
"long",
"rangeEnd",
",",
"ProgressListener",
"listener",
")",
"{",
"URL",
"url",
"=",
"CONTENT_URL_TEMPLATE",
".",
"build",
"(",
"this",
".",
"getAPI",
"(",
")",
... | Downloads a part of this file's contents, starting at rangeStart and stopping at rangeEnd, while reporting the
progress to a ProgressListener.
@param output the stream to where the file will be written.
@param rangeStart the byte offset at which to start the download.
@param rangeEnd the byte offset at which to ... | [
"Downloads",
"a",
"part",
"of",
"this",
"file",
"s",
"contents",
"starting",
"at",
"rangeStart",
"and",
"stopping",
"at",
"rangeEnd",
"while",
"reporting",
"the",
"progress",
"to",
"a",
"ProgressListener",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFile.java#L342-L367 |
163,541 | box/box-java-sdk | src/main/java/com/box/sdk/BoxFile.java | BoxFile.rename | public void rename(String newName) {
URL url = FILE_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "PUT");
JsonObject updateInfo = new JsonObject();
updateInfo.add("name", newName);
request.setBody(u... | java | public void rename(String newName) {
URL url = FILE_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "PUT");
JsonObject updateInfo = new JsonObject();
updateInfo.add("name", newName);
request.setBody(u... | [
"public",
"void",
"rename",
"(",
"String",
"newName",
")",
"{",
"URL",
"url",
"=",
"FILE_URL_TEMPLATE",
".",
"build",
"(",
"this",
".",
"getAPI",
"(",
")",
".",
"getBaseURL",
"(",
")",
",",
"this",
".",
"getID",
"(",
")",
")",
";",
"BoxJSONRequest",
... | Renames this file.
@param newName the new name of the file. | [
"Renames",
"this",
"file",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFile.java#L436-L446 |
163,542 | box/box-java-sdk | src/main/java/com/box/sdk/BoxFile.java | BoxFile.getRepresentationContent | public void getRepresentationContent(String representationHint, String assetPath, OutputStream output) {
List<Representation> reps = this.getInfoWithRepresentations(representationHint).getRepresentations();
if (reps.size() < 1) {
throw new BoxAPIException("No matching representations found"... | java | public void getRepresentationContent(String representationHint, String assetPath, OutputStream output) {
List<Representation> reps = this.getInfoWithRepresentations(representationHint).getRepresentations();
if (reps.size() < 1) {
throw new BoxAPIException("No matching representations found"... | [
"public",
"void",
"getRepresentationContent",
"(",
"String",
"representationHint",
",",
"String",
"assetPath",
",",
"OutputStream",
"output",
")",
"{",
"List",
"<",
"Representation",
">",
"reps",
"=",
"this",
".",
"getInfoWithRepresentations",
"(",
"representationHint... | Fetches the contents of a file representation with asset path and writes them to the provided output stream.
@see <a href=https://developer.box.com/reference#section-x-rep-hints-header>X-Rep-Hints Header</a>
@param representationHint the X-Rep-Hints query for the representation to fetch.
@param assetPath the path of th... | [
"Fetches",
"the",
"contents",
"of",
"a",
"file",
"representation",
"with",
"asset",
"path",
"and",
"writes",
"them",
"to",
"the",
"provided",
"output",
"stream",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFile.java#L511-L543 |
163,543 | box/box-java-sdk | src/main/java/com/box/sdk/BoxFile.java | BoxFile.getVersions | public Collection<BoxFileVersion> getVersions() {
URL url = VERSIONS_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject jsonObject = J... | java | public Collection<BoxFileVersion> getVersions() {
URL url = VERSIONS_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject jsonObject = J... | [
"public",
"Collection",
"<",
"BoxFileVersion",
">",
"getVersions",
"(",
")",
"{",
"URL",
"url",
"=",
"VERSIONS_URL_TEMPLATE",
".",
"build",
"(",
"this",
".",
"getAPI",
"(",
")",
".",
"getBaseURL",
"(",
")",
",",
"this",
".",
"getID",
"(",
")",
")",
";"... | Gets any previous versions of this file. Note that only users with premium accounts will be able to retrieve
previous versions of their files.
@return a list of previous file versions. | [
"Gets",
"any",
"previous",
"versions",
"of",
"this",
"file",
".",
"Note",
"that",
"only",
"users",
"with",
"premium",
"accounts",
"will",
"be",
"able",
"to",
"retrieve",
"previous",
"versions",
"of",
"their",
"files",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFile.java#L629-L642 |
163,544 | box/box-java-sdk | src/main/java/com/box/sdk/BoxFile.java | BoxFile.canUploadVersion | public boolean canUploadVersion(String name, long fileSize) {
URL url = CONTENT_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "OPTIONS");
JsonObject preflightInfo = new JsonObject();
if (name != null) {
... | java | public boolean canUploadVersion(String name, long fileSize) {
URL url = CONTENT_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "OPTIONS");
JsonObject preflightInfo = new JsonObject();
if (name != null) {
... | [
"public",
"boolean",
"canUploadVersion",
"(",
"String",
"name",
",",
"long",
"fileSize",
")",
"{",
"URL",
"url",
"=",
"CONTENT_URL_TEMPLATE",
".",
"build",
"(",
"this",
".",
"getAPI",
"(",
")",
".",
"getBaseURL",
"(",
")",
",",
"this",
".",
"getID",
"(",... | Checks if a new version of the file can be uploaded with the specified name and size.
@param name the new name for the file.
@param fileSize the size of the new version content in bytes.
@return whether or not the file version can be uploaded. | [
"Checks",
"if",
"a",
"new",
"version",
"of",
"the",
"file",
"can",
"be",
"uploaded",
"with",
"the",
"specified",
"name",
"and",
"size",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFile.java#L688-L715 |
163,545 | box/box-java-sdk | src/main/java/com/box/sdk/BoxFile.java | BoxFile.getThumbnail | public byte[] getThumbnail(ThumbnailFileType fileType, int minWidth, int minHeight, int maxWidth, int maxHeight) {
QueryStringBuilder builder = new QueryStringBuilder();
builder.appendParam("min_width", minWidth);
builder.appendParam("min_height", minHeight);
builder.appendParam("max_wid... | java | public byte[] getThumbnail(ThumbnailFileType fileType, int minWidth, int minHeight, int maxWidth, int maxHeight) {
QueryStringBuilder builder = new QueryStringBuilder();
builder.appendParam("min_width", minWidth);
builder.appendParam("min_height", minHeight);
builder.appendParam("max_wid... | [
"public",
"byte",
"[",
"]",
"getThumbnail",
"(",
"ThumbnailFileType",
"fileType",
",",
"int",
"minWidth",
",",
"int",
"minHeight",
",",
"int",
"maxWidth",
",",
"int",
"maxHeight",
")",
"{",
"QueryStringBuilder",
"builder",
"=",
"new",
"QueryStringBuilder",
"(",
... | Retrieves a thumbnail, or smaller image representation, of this file. Sizes of 32x32, 64x64, 128x128,
and 256x256 can be returned in the .png format and sizes of 32x32, 94x94, 160x160, and 320x320 can be returned
in the .jpg format.
@param fileType either PNG of JPG
@param minWidth minimum width
@param minHeight min... | [
"Retrieves",
"a",
"thumbnail",
"or",
"smaller",
"image",
"representation",
"of",
"this",
"file",
".",
"Sizes",
"of",
"32x32",
"64x64",
"128x128",
"and",
"256x256",
"can",
"be",
"returned",
"in",
"the",
".",
"png",
"format",
"and",
"sizes",
"of",
"32x32",
"... | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFile.java#L911-L947 |
163,546 | box/box-java-sdk | src/main/java/com/box/sdk/BoxFile.java | BoxFile.getComments | public List<BoxComment.Info> getComments() {
URL url = GET_COMMENTS_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject responseJSON = J... | java | public List<BoxComment.Info> getComments() {
URL url = GET_COMMENTS_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject responseJSON = J... | [
"public",
"List",
"<",
"BoxComment",
".",
"Info",
">",
"getComments",
"(",
")",
"{",
"URL",
"url",
"=",
"GET_COMMENTS_URL_TEMPLATE",
".",
"build",
"(",
"this",
".",
"getAPI",
"(",
")",
".",
"getBaseURL",
"(",
")",
",",
"this",
".",
"getID",
"(",
")",
... | Gets a list of any comments on this file.
@return a list of comments on this file. | [
"Gets",
"a",
"list",
"of",
"any",
"comments",
"on",
"this",
"file",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFile.java#L954-L971 |
163,547 | box/box-java-sdk | src/main/java/com/box/sdk/BoxFile.java | BoxFile.getTasks | public List<BoxTask.Info> getTasks(String... fields) {
QueryStringBuilder builder = new QueryStringBuilder();
if (fields.length > 0) {
builder.appendParam("fields", fields).toString();
}
URL url = GET_TASKS_URL_TEMPLATE.buildWithQuery(this.getAPI().getBaseURL(), builder.toStr... | java | public List<BoxTask.Info> getTasks(String... fields) {
QueryStringBuilder builder = new QueryStringBuilder();
if (fields.length > 0) {
builder.appendParam("fields", fields).toString();
}
URL url = GET_TASKS_URL_TEMPLATE.buildWithQuery(this.getAPI().getBaseURL(), builder.toStr... | [
"public",
"List",
"<",
"BoxTask",
".",
"Info",
">",
"getTasks",
"(",
"String",
"...",
"fields",
")",
"{",
"QueryStringBuilder",
"builder",
"=",
"new",
"QueryStringBuilder",
"(",
")",
";",
"if",
"(",
"fields",
".",
"length",
">",
"0",
")",
"{",
"builder",... | Gets a list of any tasks on this file with requested fields.
@param fields optional fields to retrieve for this task.
@return a list of tasks on this file. | [
"Gets",
"a",
"list",
"of",
"any",
"tasks",
"on",
"this",
"file",
"with",
"requested",
"fields",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFile.java#L979-L1000 |
163,548 | box/box-java-sdk | src/main/java/com/box/sdk/BoxFile.java | BoxFile.createMetadata | public Metadata createMetadata(String typeName, Metadata metadata) {
String scope = Metadata.scopeBasedOnType(typeName);
return this.createMetadata(typeName, scope, metadata);
} | java | public Metadata createMetadata(String typeName, Metadata metadata) {
String scope = Metadata.scopeBasedOnType(typeName);
return this.createMetadata(typeName, scope, metadata);
} | [
"public",
"Metadata",
"createMetadata",
"(",
"String",
"typeName",
",",
"Metadata",
"metadata",
")",
"{",
"String",
"scope",
"=",
"Metadata",
".",
"scopeBasedOnType",
"(",
"typeName",
")",
";",
"return",
"this",
".",
"createMetadata",
"(",
"typeName",
",",
"sc... | Creates metadata on this file in the specified template type.
@param typeName the metadata template type name.
@param metadata the new metadata values.
@return the metadata returned from the server. | [
"Creates",
"metadata",
"on",
"this",
"file",
"in",
"the",
"specified",
"template",
"type",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFile.java#L1019-L1022 |
163,549 | box/box-java-sdk | src/main/java/com/box/sdk/BoxFile.java | BoxFile.updateClassification | public String updateClassification(String classificationType) {
Metadata metadata = new Metadata("enterprise", Metadata.CLASSIFICATION_TEMPLATE_KEY);
metadata.add("/Box__Security__Classification__Key", classificationType);
Metadata classification = this.updateMetadata(metadata);
return ... | java | public String updateClassification(String classificationType) {
Metadata metadata = new Metadata("enterprise", Metadata.CLASSIFICATION_TEMPLATE_KEY);
metadata.add("/Box__Security__Classification__Key", classificationType);
Metadata classification = this.updateMetadata(metadata);
return ... | [
"public",
"String",
"updateClassification",
"(",
"String",
"classificationType",
")",
"{",
"Metadata",
"metadata",
"=",
"new",
"Metadata",
"(",
"\"enterprise\"",
",",
"Metadata",
".",
"CLASSIFICATION_TEMPLATE_KEY",
")",
";",
"metadata",
".",
"add",
"(",
"\"/Box__Sec... | Updates a metadata classification on the specified file.
@param classificationType the metadata classification type.
@return the new metadata classification type updated on the file. | [
"Updates",
"a",
"metadata",
"classification",
"on",
"the",
"specified",
"file",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFile.java#L1099-L1105 |
163,550 | box/box-java-sdk | src/main/java/com/box/sdk/BoxFile.java | BoxFile.setClassification | public String setClassification(String classificationType) {
Metadata metadata = new Metadata().add(Metadata.CLASSIFICATION_KEY, classificationType);
Metadata classification = null;
try {
classification = this.createMetadata(Metadata.CLASSIFICATION_TEMPLATE_KEY, "enterprise", metada... | java | public String setClassification(String classificationType) {
Metadata metadata = new Metadata().add(Metadata.CLASSIFICATION_KEY, classificationType);
Metadata classification = null;
try {
classification = this.createMetadata(Metadata.CLASSIFICATION_TEMPLATE_KEY, "enterprise", metada... | [
"public",
"String",
"setClassification",
"(",
"String",
"classificationType",
")",
"{",
"Metadata",
"metadata",
"=",
"new",
"Metadata",
"(",
")",
".",
"add",
"(",
"Metadata",
".",
"CLASSIFICATION_KEY",
",",
"classificationType",
")",
";",
"Metadata",
"classificati... | Attempts to add classification to a file. If classification already exists then do update.
@param classificationType the metadata classification type.
@return the metadata classification type on the file. | [
"Attempts",
"to",
"add",
"classification",
"to",
"a",
"file",
".",
"If",
"classification",
"already",
"exists",
"then",
"do",
"update",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFile.java#L1113-L1130 |
163,551 | box/box-java-sdk | src/main/java/com/box/sdk/BoxFile.java | BoxFile.lock | public BoxLock lock(Date expiresAt, boolean isDownloadPrevented) {
String queryString = new QueryStringBuilder().appendParam("fields", "lock").toString();
URL url = FILE_URL_TEMPLATE.buildWithQuery(this.getAPI().getBaseURL(), queryString, this.getID());
BoxAPIRequest request = new BoxAPIRequest(... | java | public BoxLock lock(Date expiresAt, boolean isDownloadPrevented) {
String queryString = new QueryStringBuilder().appendParam("fields", "lock").toString();
URL url = FILE_URL_TEMPLATE.buildWithQuery(this.getAPI().getBaseURL(), queryString, this.getID());
BoxAPIRequest request = new BoxAPIRequest(... | [
"public",
"BoxLock",
"lock",
"(",
"Date",
"expiresAt",
",",
"boolean",
"isDownloadPrevented",
")",
"{",
"String",
"queryString",
"=",
"new",
"QueryStringBuilder",
"(",
")",
".",
"appendParam",
"(",
"\"fields\"",
",",
"\"lock\"",
")",
".",
"toString",
"(",
")",... | Locks a file.
@param expiresAt expiration date of the lock.
@param isDownloadPrevented is downloading of file prevented when locked.
@return the lock returned from the server. | [
"Locks",
"a",
"file",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFile.java#L1199-L1222 |
163,552 | box/box-java-sdk | src/main/java/com/box/sdk/BoxFile.java | BoxFile.unlock | public void unlock() {
String queryString = new QueryStringBuilder().appendParam("fields", "lock").toString();
URL url = FILE_URL_TEMPLATE.buildWithQuery(this.getAPI().getBaseURL(), queryString, this.getID());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "PUT");
JsonObj... | java | public void unlock() {
String queryString = new QueryStringBuilder().appendParam("fields", "lock").toString();
URL url = FILE_URL_TEMPLATE.buildWithQuery(this.getAPI().getBaseURL(), queryString, this.getID());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "PUT");
JsonObj... | [
"public",
"void",
"unlock",
"(",
")",
"{",
"String",
"queryString",
"=",
"new",
"QueryStringBuilder",
"(",
")",
".",
"appendParam",
"(",
"\"fields\"",
",",
"\"lock\"",
")",
".",
"toString",
"(",
")",
";",
"URL",
"url",
"=",
"FILE_URL_TEMPLATE",
".",
"build... | Unlocks a file. | [
"Unlocks",
"a",
"file",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFile.java#L1227-L1237 |
163,553 | box/box-java-sdk | src/main/java/com/box/sdk/BoxFile.java | BoxFile.updateMetadata | public Metadata updateMetadata(Metadata metadata) {
String scope;
if (metadata.getScope().equals(Metadata.GLOBAL_METADATA_SCOPE)) {
scope = Metadata.GLOBAL_METADATA_SCOPE;
} else {
scope = Metadata.ENTERPRISE_METADATA_SCOPE;
}
URL url = METADATA_URL_TEMPL... | java | public Metadata updateMetadata(Metadata metadata) {
String scope;
if (metadata.getScope().equals(Metadata.GLOBAL_METADATA_SCOPE)) {
scope = Metadata.GLOBAL_METADATA_SCOPE;
} else {
scope = Metadata.ENTERPRISE_METADATA_SCOPE;
}
URL url = METADATA_URL_TEMPL... | [
"public",
"Metadata",
"updateMetadata",
"(",
"Metadata",
"metadata",
")",
"{",
"String",
"scope",
";",
"if",
"(",
"metadata",
".",
"getScope",
"(",
")",
".",
"equals",
"(",
"Metadata",
".",
"GLOBAL_METADATA_SCOPE",
")",
")",
"{",
"scope",
"=",
"Metadata",
... | Updates the file metadata.
@param metadata the new metadata values.
@return the metadata returned from the server. | [
"Updates",
"the",
"file",
"metadata",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFile.java#L1289-L1304 |
163,554 | box/box-java-sdk | src/main/java/com/box/sdk/BoxFile.java | BoxFile.createUploadSession | public BoxFileUploadSession.Info createUploadSession(long fileSize) {
URL url = UPLOAD_SESSION_URL_TEMPLATE.build(this.getAPI().getBaseUploadURL(), this.getID());
BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "POST");
request.addHeader("Content-Type", "application/json");
... | java | public BoxFileUploadSession.Info createUploadSession(long fileSize) {
URL url = UPLOAD_SESSION_URL_TEMPLATE.build(this.getAPI().getBaseUploadURL(), this.getID());
BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "POST");
request.addHeader("Content-Type", "application/json");
... | [
"public",
"BoxFileUploadSession",
".",
"Info",
"createUploadSession",
"(",
"long",
"fileSize",
")",
"{",
"URL",
"url",
"=",
"UPLOAD_SESSION_URL_TEMPLATE",
".",
"build",
"(",
"this",
".",
"getAPI",
"(",
")",
".",
"getBaseUploadURL",
"(",
")",
",",
"this",
".",
... | Creates an upload session to create a new version of a file in chunks.
This will first verify that the version can be created and then open a session for uploading pieces of the file.
@param fileSize the size of the file that will be uploaded.
@return the created upload session instance. | [
"Creates",
"an",
"upload",
"session",
"to",
"create",
"a",
"new",
"version",
"of",
"a",
"file",
"in",
"chunks",
".",
"This",
"will",
"first",
"verify",
"that",
"the",
"version",
"can",
"be",
"created",
"and",
"then",
"open",
"a",
"session",
"for",
"uploa... | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFile.java#L1392-L1408 |
163,555 | box/box-java-sdk | src/main/java/com/box/sdk/EventLog.java | EventLog.getEnterpriseEvents | public static EventLog getEnterpriseEvents(BoxAPIConnection api, Date after, Date before, BoxEvent.Type... types) {
return getEnterpriseEvents(api, null, after, before, ENTERPRISE_LIMIT, types);
} | java | public static EventLog getEnterpriseEvents(BoxAPIConnection api, Date after, Date before, BoxEvent.Type... types) {
return getEnterpriseEvents(api, null, after, before, ENTERPRISE_LIMIT, types);
} | [
"public",
"static",
"EventLog",
"getEnterpriseEvents",
"(",
"BoxAPIConnection",
"api",
",",
"Date",
"after",
",",
"Date",
"before",
",",
"BoxEvent",
".",
"Type",
"...",
"types",
")",
"{",
"return",
"getEnterpriseEvents",
"(",
"api",
",",
"null",
",",
"after",
... | Gets all the enterprise events that occurred within a specified date range.
@param api the API connection to use.
@param after the lower bound on the timestamp of the events returned.
@param before the upper bound on the timestamp of the events returned.
@param types an optional list of event types to filter b... | [
"Gets",
"all",
"the",
"enterprise",
"events",
"that",
"occurred",
"within",
"a",
"specified",
"date",
"range",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/EventLog.java#L74-L76 |
163,556 | box/box-java-sdk | src/main/java/com/box/sdk/BoxStoragePolicy.java | BoxStoragePolicy.getInfo | public BoxStoragePolicy.Info getInfo(String... fields) {
QueryStringBuilder builder = new QueryStringBuilder();
if (fields.length > 0) {
builder.appendParam("fields", fields);
}
URL url = STORAGE_POLICY_WITH_ID_URL_TEMPLATE.buildWithQuery(this.getAPI().getBaseURL(), builder.t... | java | public BoxStoragePolicy.Info getInfo(String... fields) {
QueryStringBuilder builder = new QueryStringBuilder();
if (fields.length > 0) {
builder.appendParam("fields", fields);
}
URL url = STORAGE_POLICY_WITH_ID_URL_TEMPLATE.buildWithQuery(this.getAPI().getBaseURL(), builder.t... | [
"public",
"BoxStoragePolicy",
".",
"Info",
"getInfo",
"(",
"String",
"...",
"fields",
")",
"{",
"QueryStringBuilder",
"builder",
"=",
"new",
"QueryStringBuilder",
"(",
")",
";",
"if",
"(",
"fields",
".",
"length",
">",
"0",
")",
"{",
"builder",
".",
"appen... | Gets information for a Box Storage Policy with optional fields.
@param fields the fields to retrieve.
@return info about this item containing only the specified fields, including storage policy. | [
"Gets",
"information",
"for",
"a",
"Box",
"Storage",
"Policy",
"with",
"optional",
"fields",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxStoragePolicy.java#L46-L57 |
163,557 | box/box-java-sdk | src/main/java/com/box/sdk/LargeFileUpload.java | LargeFileUpload.upload | public BoxFile.Info upload(BoxAPIConnection boxApi, String folderId, InputStream stream, URL url,
String fileName, long fileSize) throws InterruptedException, IOException {
//Create a upload session
BoxFileUploadSession.Info session = this.createUploadSession(boxApi, folde... | java | public BoxFile.Info upload(BoxAPIConnection boxApi, String folderId, InputStream stream, URL url,
String fileName, long fileSize) throws InterruptedException, IOException {
//Create a upload session
BoxFileUploadSession.Info session = this.createUploadSession(boxApi, folde... | [
"public",
"BoxFile",
".",
"Info",
"upload",
"(",
"BoxAPIConnection",
"boxApi",
",",
"String",
"folderId",
",",
"InputStream",
"stream",
",",
"URL",
"url",
",",
"String",
"fileName",
",",
"long",
"fileSize",
")",
"throws",
"InterruptedException",
",",
"IOExceptio... | Uploads a new large file.
@param boxApi the API connection to be used by the upload session.
@param folderId the id of the folder in which the file will be uploaded.
@param stream the input stream that feeds the content of the file.
@param url the upload session URL.
@param fileName the name of the file to be created.
... | [
"Uploads",
"a",
"new",
"large",
"file",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/LargeFileUpload.java#L91-L96 |
163,558 | box/box-java-sdk | src/main/java/com/box/sdk/LargeFileUpload.java | LargeFileUpload.generateDigest | public String generateDigest(InputStream stream) {
MessageDigest digest = null;
try {
digest = MessageDigest.getInstance(DIGEST_ALGORITHM_SHA1);
} catch (NoSuchAlgorithmException ae) {
throw new BoxAPIException("Digest algorithm not found", ae);
}
//Calcu... | java | public String generateDigest(InputStream stream) {
MessageDigest digest = null;
try {
digest = MessageDigest.getInstance(DIGEST_ALGORITHM_SHA1);
} catch (NoSuchAlgorithmException ae) {
throw new BoxAPIException("Digest algorithm not found", ae);
}
//Calcu... | [
"public",
"String",
"generateDigest",
"(",
"InputStream",
"stream",
")",
"{",
"MessageDigest",
"digest",
"=",
"null",
";",
"try",
"{",
"digest",
"=",
"MessageDigest",
".",
"getInstance",
"(",
"DIGEST_ALGORITHM_SHA1",
")",
";",
"}",
"catch",
"(",
"NoSuchAlgorithm... | Generates the Base64 encoded SHA-1 hash for content available in the stream.
It can be used to calculate the hash of a file.
@param stream the input stream of the file or data.
@return the Base64 encoded hash string. | [
"Generates",
"the",
"Base64",
"encoded",
"SHA",
"-",
"1",
"hash",
"for",
"content",
"available",
"in",
"the",
"stream",
".",
"It",
"can",
"be",
"used",
"to",
"calculate",
"the",
"hash",
"of",
"a",
"file",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/LargeFileUpload.java#L220-L242 |
163,559 | box/box-java-sdk | src/main/java/com/box/sdk/BoxSharedLink.java | BoxSharedLink.setPermissions | public void setPermissions(Permissions permissions) {
if (this.permissions == permissions) {
return;
}
this.removeChildObject("permissions");
this.permissions = permissions;
this.addChildObject("permissions", permissions);
} | java | public void setPermissions(Permissions permissions) {
if (this.permissions == permissions) {
return;
}
this.removeChildObject("permissions");
this.permissions = permissions;
this.addChildObject("permissions", permissions);
} | [
"public",
"void",
"setPermissions",
"(",
"Permissions",
"permissions",
")",
"{",
"if",
"(",
"this",
".",
"permissions",
"==",
"permissions",
")",
"{",
"return",
";",
"}",
"this",
".",
"removeChildObject",
"(",
"\"permissions\"",
")",
";",
"this",
".",
"permi... | Sets the permissions associated with this shared link.
@param permissions the new permissions for this shared link. | [
"Sets",
"the",
"permissions",
"associated",
"with",
"this",
"shared",
"link",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxSharedLink.java#L175-L183 |
163,560 | box/box-java-sdk | src/main/java/com/box/sdk/BoxTrash.java | BoxTrash.deleteFolder | public void deleteFolder(String folderID) {
URL url = FOLDER_INFO_URL_TEMPLATE.build(this.api.getBaseURL(), folderID);
BoxAPIRequest request = new BoxAPIRequest(this.api, url, "DELETE");
BoxAPIResponse response = request.send();
response.disconnect();
} | java | public void deleteFolder(String folderID) {
URL url = FOLDER_INFO_URL_TEMPLATE.build(this.api.getBaseURL(), folderID);
BoxAPIRequest request = new BoxAPIRequest(this.api, url, "DELETE");
BoxAPIResponse response = request.send();
response.disconnect();
} | [
"public",
"void",
"deleteFolder",
"(",
"String",
"folderID",
")",
"{",
"URL",
"url",
"=",
"FOLDER_INFO_URL_TEMPLATE",
".",
"build",
"(",
"this",
".",
"api",
".",
"getBaseURL",
"(",
")",
",",
"folderID",
")",
";",
"BoxAPIRequest",
"request",
"=",
"new",
"Bo... | Permanently deletes a trashed folder.
@param folderID the ID of the trashed folder to permanently delete. | [
"Permanently",
"deletes",
"a",
"trashed",
"folder",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxTrash.java#L53-L58 |
163,561 | box/box-java-sdk | src/main/java/com/box/sdk/BoxTrash.java | BoxTrash.getFolderInfo | public BoxFolder.Info getFolderInfo(String folderID) {
URL url = FOLDER_INFO_URL_TEMPLATE.build(this.api.getBaseURL(), folderID);
BoxAPIRequest request = new BoxAPIRequest(this.api, url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject jsonObject = JsonObje... | java | public BoxFolder.Info getFolderInfo(String folderID) {
URL url = FOLDER_INFO_URL_TEMPLATE.build(this.api.getBaseURL(), folderID);
BoxAPIRequest request = new BoxAPIRequest(this.api, url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject jsonObject = JsonObje... | [
"public",
"BoxFolder",
".",
"Info",
"getFolderInfo",
"(",
"String",
"folderID",
")",
"{",
"URL",
"url",
"=",
"FOLDER_INFO_URL_TEMPLATE",
".",
"build",
"(",
"this",
".",
"api",
".",
"getBaseURL",
"(",
")",
",",
"folderID",
")",
";",
"BoxAPIRequest",
"request"... | Gets information about a trashed folder.
@param folderID the ID of the trashed folder.
@return info about the trashed folder. | [
"Gets",
"information",
"about",
"a",
"trashed",
"folder",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxTrash.java#L65-L73 |
163,562 | box/box-java-sdk | src/main/java/com/box/sdk/BoxTrash.java | BoxTrash.getFolderInfo | public BoxFolder.Info getFolderInfo(String folderID, String... fields) {
String queryString = new QueryStringBuilder().appendParam("fields", fields).toString();
URL url = FOLDER_INFO_URL_TEMPLATE.buildWithQuery(this.api.getBaseURL(), queryString, folderID);
BoxAPIRequest request = new BoxAPIRequ... | java | public BoxFolder.Info getFolderInfo(String folderID, String... fields) {
String queryString = new QueryStringBuilder().appendParam("fields", fields).toString();
URL url = FOLDER_INFO_URL_TEMPLATE.buildWithQuery(this.api.getBaseURL(), queryString, folderID);
BoxAPIRequest request = new BoxAPIRequ... | [
"public",
"BoxFolder",
".",
"Info",
"getFolderInfo",
"(",
"String",
"folderID",
",",
"String",
"...",
"fields",
")",
"{",
"String",
"queryString",
"=",
"new",
"QueryStringBuilder",
"(",
")",
".",
"appendParam",
"(",
"\"fields\"",
",",
"fields",
")",
".",
"to... | Gets information about a trashed folder that's limited to a list of specified fields.
@param folderID the ID of the trashed folder.
@param fields the fields to retrieve.
@return info about the trashed folder containing only the specified fields. | [
"Gets",
"information",
"about",
"a",
"trashed",
"folder",
"that",
"s",
"limited",
"to",
"a",
"list",
"of",
"specified",
"fields",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxTrash.java#L81-L90 |
163,563 | box/box-java-sdk | src/main/java/com/box/sdk/BoxTrash.java | BoxTrash.restoreFolder | public BoxFolder.Info restoreFolder(String folderID) {
URL url = RESTORE_FOLDER_URL_TEMPLATE.build(this.api.getBaseURL(), folderID);
BoxAPIRequest request = new BoxAPIRequest(this.api, url, "POST");
JsonObject requestJSON = new JsonObject()
.add("", "");
request.setBody(r... | java | public BoxFolder.Info restoreFolder(String folderID) {
URL url = RESTORE_FOLDER_URL_TEMPLATE.build(this.api.getBaseURL(), folderID);
BoxAPIRequest request = new BoxAPIRequest(this.api, url, "POST");
JsonObject requestJSON = new JsonObject()
.add("", "");
request.setBody(r... | [
"public",
"BoxFolder",
".",
"Info",
"restoreFolder",
"(",
"String",
"folderID",
")",
"{",
"URL",
"url",
"=",
"RESTORE_FOLDER_URL_TEMPLATE",
".",
"build",
"(",
"this",
".",
"api",
".",
"getBaseURL",
"(",
")",
",",
"folderID",
")",
";",
"BoxAPIRequest",
"reque... | Restores a trashed folder back to its original location.
@param folderID the ID of the trashed folder.
@return info about the restored folder. | [
"Restores",
"a",
"trashed",
"folder",
"back",
"to",
"its",
"original",
"location",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxTrash.java#L97-L108 |
163,564 | box/box-java-sdk | src/main/java/com/box/sdk/BoxTrash.java | BoxTrash.restoreFolder | public BoxFolder.Info restoreFolder(String folderID, String newName, String newParentID) {
JsonObject requestJSON = new JsonObject();
if (newName != null) {
requestJSON.add("name", newName);
}
if (newParentID != null) {
JsonObject parent = new JsonObject();
... | java | public BoxFolder.Info restoreFolder(String folderID, String newName, String newParentID) {
JsonObject requestJSON = new JsonObject();
if (newName != null) {
requestJSON.add("name", newName);
}
if (newParentID != null) {
JsonObject parent = new JsonObject();
... | [
"public",
"BoxFolder",
".",
"Info",
"restoreFolder",
"(",
"String",
"folderID",
",",
"String",
"newName",
",",
"String",
"newParentID",
")",
"{",
"JsonObject",
"requestJSON",
"=",
"new",
"JsonObject",
"(",
")",
";",
"if",
"(",
"newName",
"!=",
"null",
")",
... | Restores a trashed folder to a new location with a new name.
@param folderID the ID of the trashed folder.
@param newName an optional new name to give the folder. This can be null to use the folder's original name.
@param newParentID an optional new parent ID for the folder. This can be null to use the folder... | [
"Restores",
"a",
"trashed",
"folder",
"to",
"a",
"new",
"location",
"with",
"a",
"new",
"name",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxTrash.java#L118-L139 |
163,565 | box/box-java-sdk | src/main/java/com/box/sdk/BoxTrash.java | BoxTrash.deleteFile | public void deleteFile(String fileID) {
URL url = FILE_INFO_URL_TEMPLATE.build(this.api.getBaseURL(), fileID);
BoxAPIRequest request = new BoxAPIRequest(this.api, url, "DELETE");
BoxAPIResponse response = request.send();
response.disconnect();
} | java | public void deleteFile(String fileID) {
URL url = FILE_INFO_URL_TEMPLATE.build(this.api.getBaseURL(), fileID);
BoxAPIRequest request = new BoxAPIRequest(this.api, url, "DELETE");
BoxAPIResponse response = request.send();
response.disconnect();
} | [
"public",
"void",
"deleteFile",
"(",
"String",
"fileID",
")",
"{",
"URL",
"url",
"=",
"FILE_INFO_URL_TEMPLATE",
".",
"build",
"(",
"this",
".",
"api",
".",
"getBaseURL",
"(",
")",
",",
"fileID",
")",
";",
"BoxAPIRequest",
"request",
"=",
"new",
"BoxAPIRequ... | Permanently deletes a trashed file.
@param fileID the ID of the trashed folder to permanently delete. | [
"Permanently",
"deletes",
"a",
"trashed",
"file",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxTrash.java#L145-L150 |
163,566 | box/box-java-sdk | src/main/java/com/box/sdk/BoxTrash.java | BoxTrash.getFileInfo | public BoxFile.Info getFileInfo(String fileID) {
URL url = FILE_INFO_URL_TEMPLATE.build(this.api.getBaseURL(), fileID);
BoxAPIRequest request = new BoxAPIRequest(this.api, url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject jsonObject = JsonObject.readFro... | java | public BoxFile.Info getFileInfo(String fileID) {
URL url = FILE_INFO_URL_TEMPLATE.build(this.api.getBaseURL(), fileID);
BoxAPIRequest request = new BoxAPIRequest(this.api, url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject jsonObject = JsonObject.readFro... | [
"public",
"BoxFile",
".",
"Info",
"getFileInfo",
"(",
"String",
"fileID",
")",
"{",
"URL",
"url",
"=",
"FILE_INFO_URL_TEMPLATE",
".",
"build",
"(",
"this",
".",
"api",
".",
"getBaseURL",
"(",
")",
",",
"fileID",
")",
";",
"BoxAPIRequest",
"request",
"=",
... | Gets information about a trashed file.
@param fileID the ID of the trashed file.
@return info about the trashed file. | [
"Gets",
"information",
"about",
"a",
"trashed",
"file",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxTrash.java#L157-L165 |
163,567 | box/box-java-sdk | src/main/java/com/box/sdk/BoxTrash.java | BoxTrash.getFileInfo | public BoxFile.Info getFileInfo(String fileID, String... fields) {
String queryString = new QueryStringBuilder().appendParam("fields", fields).toString();
URL url = FILE_INFO_URL_TEMPLATE.buildWithQuery(this.api.getBaseURL(), queryString, fileID);
BoxAPIRequest request = new BoxAPIRequest(this.a... | java | public BoxFile.Info getFileInfo(String fileID, String... fields) {
String queryString = new QueryStringBuilder().appendParam("fields", fields).toString();
URL url = FILE_INFO_URL_TEMPLATE.buildWithQuery(this.api.getBaseURL(), queryString, fileID);
BoxAPIRequest request = new BoxAPIRequest(this.a... | [
"public",
"BoxFile",
".",
"Info",
"getFileInfo",
"(",
"String",
"fileID",
",",
"String",
"...",
"fields",
")",
"{",
"String",
"queryString",
"=",
"new",
"QueryStringBuilder",
"(",
")",
".",
"appendParam",
"(",
"\"fields\"",
",",
"fields",
")",
".",
"toString... | Gets information about a trashed file that's limited to a list of specified fields.
@param fileID the ID of the trashed file.
@param fields the fields to retrieve.
@return info about the trashed file containing only the specified fields. | [
"Gets",
"information",
"about",
"a",
"trashed",
"file",
"that",
"s",
"limited",
"to",
"a",
"list",
"of",
"specified",
"fields",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxTrash.java#L173-L182 |
163,568 | box/box-java-sdk | src/main/java/com/box/sdk/BoxTrash.java | BoxTrash.restoreFile | public BoxFile.Info restoreFile(String fileID) {
URL url = RESTORE_FILE_URL_TEMPLATE.build(this.api.getBaseURL(), fileID);
BoxAPIRequest request = new BoxAPIRequest(this.api, url, "POST");
JsonObject requestJSON = new JsonObject()
.add("", "");
request.setBody(requestJSON... | java | public BoxFile.Info restoreFile(String fileID) {
URL url = RESTORE_FILE_URL_TEMPLATE.build(this.api.getBaseURL(), fileID);
BoxAPIRequest request = new BoxAPIRequest(this.api, url, "POST");
JsonObject requestJSON = new JsonObject()
.add("", "");
request.setBody(requestJSON... | [
"public",
"BoxFile",
".",
"Info",
"restoreFile",
"(",
"String",
"fileID",
")",
"{",
"URL",
"url",
"=",
"RESTORE_FILE_URL_TEMPLATE",
".",
"build",
"(",
"this",
".",
"api",
".",
"getBaseURL",
"(",
")",
",",
"fileID",
")",
";",
"BoxAPIRequest",
"request",
"="... | Restores a trashed file back to its original location.
@param fileID the ID of the trashed file.
@return info about the restored file. | [
"Restores",
"a",
"trashed",
"file",
"back",
"to",
"its",
"original",
"location",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxTrash.java#L189-L200 |
163,569 | box/box-java-sdk | src/main/java/com/box/sdk/BoxTrash.java | BoxTrash.restoreFile | public BoxFile.Info restoreFile(String fileID, String newName, String newParentID) {
JsonObject requestJSON = new JsonObject();
if (newName != null) {
requestJSON.add("name", newName);
}
if (newParentID != null) {
JsonObject parent = new JsonObject();
... | java | public BoxFile.Info restoreFile(String fileID, String newName, String newParentID) {
JsonObject requestJSON = new JsonObject();
if (newName != null) {
requestJSON.add("name", newName);
}
if (newParentID != null) {
JsonObject parent = new JsonObject();
... | [
"public",
"BoxFile",
".",
"Info",
"restoreFile",
"(",
"String",
"fileID",
",",
"String",
"newName",
",",
"String",
"newParentID",
")",
"{",
"JsonObject",
"requestJSON",
"=",
"new",
"JsonObject",
"(",
")",
";",
"if",
"(",
"newName",
"!=",
"null",
")",
"{",
... | Restores a trashed file to a new location with a new name.
@param fileID the ID of the trashed file.
@param newName an optional new name to give the file. This can be null to use the file's original name.
@param newParentID an optional new parent ID for the file. This can be null to use the file's original
... | [
"Restores",
"a",
"trashed",
"file",
"to",
"a",
"new",
"location",
"with",
"a",
"new",
"name",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxTrash.java#L210-L231 |
163,570 | box/box-java-sdk | src/main/java/com/box/sdk/BoxTrash.java | BoxTrash.iterator | public Iterator<BoxItem.Info> iterator() {
URL url = GET_ITEMS_URL.build(this.api.getBaseURL());
return new BoxItemIterator(this.api, url);
} | java | public Iterator<BoxItem.Info> iterator() {
URL url = GET_ITEMS_URL.build(this.api.getBaseURL());
return new BoxItemIterator(this.api, url);
} | [
"public",
"Iterator",
"<",
"BoxItem",
".",
"Info",
">",
"iterator",
"(",
")",
"{",
"URL",
"url",
"=",
"GET_ITEMS_URL",
".",
"build",
"(",
"this",
".",
"api",
".",
"getBaseURL",
"(",
")",
")",
";",
"return",
"new",
"BoxItemIterator",
"(",
"this",
".",
... | Returns an iterator over the items in the trash.
@return an iterator over the items in the trash. | [
"Returns",
"an",
"iterator",
"over",
"the",
"items",
"in",
"the",
"trash",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxTrash.java#L237-L240 |
163,571 | box/box-java-sdk | src/main/java/com/box/sdk/MetadataTemplate.java | MetadataTemplate.createMetadataTemplate | public static MetadataTemplate createMetadataTemplate(BoxAPIConnection api, String scope, String templateKey,
String displayName, boolean hidden, List<Field> fields) {
JsonObject jsonObject = new JsonObject();
jsonObject.add("scope", scope);
jsonObject.add("displayName", displayName... | java | public static MetadataTemplate createMetadataTemplate(BoxAPIConnection api, String scope, String templateKey,
String displayName, boolean hidden, List<Field> fields) {
JsonObject jsonObject = new JsonObject();
jsonObject.add("scope", scope);
jsonObject.add("displayName", displayName... | [
"public",
"static",
"MetadataTemplate",
"createMetadataTemplate",
"(",
"BoxAPIConnection",
"api",
",",
"String",
"scope",
",",
"String",
"templateKey",
",",
"String",
"displayName",
",",
"boolean",
"hidden",
",",
"List",
"<",
"Field",
">",
"fields",
")",
"{",
"J... | Creates new metadata template.
@param api the API connection to be used.
@param scope the scope of the object.
@param templateKey a unique identifier for the template.
@param displayName the display name of the field.
@param hidden whether this template is hidden in the UI.
@param fields the ordered set of fields for t... | [
"Creates",
"new",
"metadata",
"template",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/MetadataTemplate.java#L198-L229 |
163,572 | box/box-java-sdk | src/main/java/com/box/sdk/MetadataTemplate.java | MetadataTemplate.getFieldJsonObject | private static JsonObject getFieldJsonObject(Field field) {
JsonObject fieldObj = new JsonObject();
fieldObj.add("type", field.getType());
fieldObj.add("key", field.getKey());
fieldObj.add("displayName", field.getDisplayName());
String fieldDesc = field.getDescription();
... | java | private static JsonObject getFieldJsonObject(Field field) {
JsonObject fieldObj = new JsonObject();
fieldObj.add("type", field.getType());
fieldObj.add("key", field.getKey());
fieldObj.add("displayName", field.getDisplayName());
String fieldDesc = field.getDescription();
... | [
"private",
"static",
"JsonObject",
"getFieldJsonObject",
"(",
"Field",
"field",
")",
"{",
"JsonObject",
"fieldObj",
"=",
"new",
"JsonObject",
"(",
")",
";",
"fieldObj",
".",
"add",
"(",
"\"type\"",
",",
"field",
".",
"getType",
"(",
")",
")",
";",
"fieldOb... | Gets the JsonObject representation of the given field object.
@param field represents a template field
@return the json object | [
"Gets",
"the",
"JsonObject",
"representation",
"of",
"the",
"given",
"field",
"object",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/MetadataTemplate.java#L236-L265 |
163,573 | box/box-java-sdk | src/main/java/com/box/sdk/MetadataTemplate.java | MetadataTemplate.updateMetadataTemplate | public static MetadataTemplate updateMetadataTemplate(BoxAPIConnection api, String scope, String template,
List<FieldOperation> fieldOperations) {
JsonArray array = new JsonArray();
for (FieldOperation fieldOperation : fieldOperations) {
JsonObject jsonObject = getFieldOperatio... | java | public static MetadataTemplate updateMetadataTemplate(BoxAPIConnection api, String scope, String template,
List<FieldOperation> fieldOperations) {
JsonArray array = new JsonArray();
for (FieldOperation fieldOperation : fieldOperations) {
JsonObject jsonObject = getFieldOperatio... | [
"public",
"static",
"MetadataTemplate",
"updateMetadataTemplate",
"(",
"BoxAPIConnection",
"api",
",",
"String",
"scope",
",",
"String",
"template",
",",
"List",
"<",
"FieldOperation",
">",
"fieldOperations",
")",
"{",
"JsonArray",
"array",
"=",
"new",
"JsonArray",
... | Updates the schema of an existing metadata template.
@param api the API connection to be used
@param scope the scope of the object
@param template Unique identifier of the template
@param fieldOperations the fields that needs to be updated / added in the template
@return the updated metadata template | [
"Updates",
"the",
"schema",
"of",
"an",
"existing",
"metadata",
"template",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/MetadataTemplate.java#L276-L295 |
163,574 | box/box-java-sdk | src/main/java/com/box/sdk/MetadataTemplate.java | MetadataTemplate.deleteMetadataTemplate | public static void deleteMetadataTemplate(BoxAPIConnection api, String scope, String template) {
URL url = METADATA_TEMPLATE_URL_TEMPLATE.build(api.getBaseURL(), scope, template);
BoxJSONRequest request = new BoxJSONRequest(api, url, "DELETE");
request.send();
} | java | public static void deleteMetadataTemplate(BoxAPIConnection api, String scope, String template) {
URL url = METADATA_TEMPLATE_URL_TEMPLATE.build(api.getBaseURL(), scope, template);
BoxJSONRequest request = new BoxJSONRequest(api, url, "DELETE");
request.send();
} | [
"public",
"static",
"void",
"deleteMetadataTemplate",
"(",
"BoxAPIConnection",
"api",
",",
"String",
"scope",
",",
"String",
"template",
")",
"{",
"URL",
"url",
"=",
"METADATA_TEMPLATE_URL_TEMPLATE",
".",
"build",
"(",
"api",
".",
"getBaseURL",
"(",
")",
",",
... | Deletes the schema of an existing metadata template.
@param api the API connection to be used
@param scope the scope of the object
@param template Unique identifier of the template | [
"Deletes",
"the",
"schema",
"of",
"an",
"existing",
"metadata",
"template",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/MetadataTemplate.java#L304-L310 |
163,575 | box/box-java-sdk | src/main/java/com/box/sdk/MetadataTemplate.java | MetadataTemplate.getFieldOperationJsonObject | private static JsonObject getFieldOperationJsonObject(FieldOperation fieldOperation) {
JsonObject jsonObject = new JsonObject();
jsonObject.add("op", fieldOperation.getOp().toString());
String fieldKey = fieldOperation.getFieldKey();
if (fieldKey != null) {
jsonObject.add("f... | java | private static JsonObject getFieldOperationJsonObject(FieldOperation fieldOperation) {
JsonObject jsonObject = new JsonObject();
jsonObject.add("op", fieldOperation.getOp().toString());
String fieldKey = fieldOperation.getFieldKey();
if (fieldKey != null) {
jsonObject.add("f... | [
"private",
"static",
"JsonObject",
"getFieldOperationJsonObject",
"(",
"FieldOperation",
"fieldOperation",
")",
"{",
"JsonObject",
"jsonObject",
"=",
"new",
"JsonObject",
"(",
")",
";",
"jsonObject",
".",
"add",
"(",
"\"op\"",
",",
"fieldOperation",
".",
"getOp",
... | Gets the JsonObject representation of the Field Operation.
@param fieldOperation represents the template update operation
@return the json object | [
"Gets",
"the",
"JsonObject",
"representation",
"of",
"the",
"Field",
"Operation",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/MetadataTemplate.java#L317-L397 |
163,576 | box/box-java-sdk | src/main/java/com/box/sdk/MetadataTemplate.java | MetadataTemplate.getJsonArray | private static JsonArray getJsonArray(List<String> keys) {
JsonArray array = new JsonArray();
for (String key : keys) {
array.add(key);
}
return array;
} | java | private static JsonArray getJsonArray(List<String> keys) {
JsonArray array = new JsonArray();
for (String key : keys) {
array.add(key);
}
return array;
} | [
"private",
"static",
"JsonArray",
"getJsonArray",
"(",
"List",
"<",
"String",
">",
"keys",
")",
"{",
"JsonArray",
"array",
"=",
"new",
"JsonArray",
"(",
")",
";",
"for",
"(",
"String",
"key",
":",
"keys",
")",
"{",
"array",
".",
"add",
"(",
"key",
")... | Gets the Json Array representation of the given list of strings.
@param keys List of strings
@return the JsonArray represents the list of keys | [
"Gets",
"the",
"Json",
"Array",
"representation",
"of",
"the",
"given",
"list",
"of",
"strings",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/MetadataTemplate.java#L404-L411 |
163,577 | box/box-java-sdk | src/main/java/com/box/sdk/MetadataTemplate.java | MetadataTemplate.getMetadataTemplateByID | public static MetadataTemplate getMetadataTemplateByID(BoxAPIConnection api, String templateID) {
URL url = METADATA_TEMPLATE_BY_ID_URL_TEMPLATE.build(api.getBaseURL(), templateID);
BoxAPIRequest request = new BoxAPIRequest(api, url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.... | java | public static MetadataTemplate getMetadataTemplateByID(BoxAPIConnection api, String templateID) {
URL url = METADATA_TEMPLATE_BY_ID_URL_TEMPLATE.build(api.getBaseURL(), templateID);
BoxAPIRequest request = new BoxAPIRequest(api, url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.... | [
"public",
"static",
"MetadataTemplate",
"getMetadataTemplateByID",
"(",
"BoxAPIConnection",
"api",
",",
"String",
"templateID",
")",
"{",
"URL",
"url",
"=",
"METADATA_TEMPLATE_BY_ID_URL_TEMPLATE",
".",
"build",
"(",
"api",
".",
"getBaseURL",
"(",
")",
",",
"template... | Geta the specified metadata template by its ID.
@param api the API connection to be used.
@param templateID the ID of the template to get.
@return the metadata template object. | [
"Geta",
"the",
"specified",
"metadata",
"template",
"by",
"its",
"ID",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/MetadataTemplate.java#L460-L466 |
163,578 | box/box-java-sdk | src/main/java/com/box/sdk/BoxSearchParameters.java | BoxSearchParameters.clearParameters | public boolean clearParameters() {
this.query = null;
this.fields = null;
this.scope = null;
this.fileExtensions = null;
this.createdRange = null;
this.updatedRange = null;
this.sizeRange = null;
this.ownerUserIds = null;
this.ancestorFolderIds = n... | java | public boolean clearParameters() {
this.query = null;
this.fields = null;
this.scope = null;
this.fileExtensions = null;
this.createdRange = null;
this.updatedRange = null;
this.sizeRange = null;
this.ownerUserIds = null;
this.ancestorFolderIds = n... | [
"public",
"boolean",
"clearParameters",
"(",
")",
"{",
"this",
".",
"query",
"=",
"null",
";",
"this",
".",
"fields",
"=",
"null",
";",
"this",
".",
"scope",
"=",
"null",
";",
"this",
".",
"fileExtensions",
"=",
"null",
";",
"this",
".",
"createdRange"... | Clears the Parameters before performing a new search.
@return this.true; | [
"Clears",
"the",
"Parameters",
"before",
"performing",
"a",
"new",
"search",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxSearchParameters.java#L47-L64 |
163,579 | box/box-java-sdk | src/main/java/com/box/sdk/BoxSearchParameters.java | BoxSearchParameters.isNullOrEmpty | private boolean isNullOrEmpty(Object paramValue) {
boolean isNullOrEmpty = false;
if (paramValue == null) {
isNullOrEmpty = true;
}
if (paramValue instanceof String) {
if (((String) paramValue).trim().equalsIgnoreCase("")) {
isNullOrEmpty = true;
... | java | private boolean isNullOrEmpty(Object paramValue) {
boolean isNullOrEmpty = false;
if (paramValue == null) {
isNullOrEmpty = true;
}
if (paramValue instanceof String) {
if (((String) paramValue).trim().equalsIgnoreCase("")) {
isNullOrEmpty = true;
... | [
"private",
"boolean",
"isNullOrEmpty",
"(",
"Object",
"paramValue",
")",
"{",
"boolean",
"isNullOrEmpty",
"=",
"false",
";",
"if",
"(",
"paramValue",
"==",
"null",
")",
"{",
"isNullOrEmpty",
"=",
"true",
";",
"}",
"if",
"(",
"paramValue",
"instanceof",
"Stri... | Checks String to see if the parameter is null.
@param paramValue Object that will be checked if null.
@return this.true if the parameter that is being checked is not null | [
"Checks",
"String",
"to",
"see",
"if",
"the",
"parameter",
"is",
"null",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxSearchParameters.java#L285-L298 |
163,580 | box/box-java-sdk | src/main/java/com/box/sdk/BoxSearchParameters.java | BoxSearchParameters.formatBoxMetadataFilterRequest | private JsonArray formatBoxMetadataFilterRequest() {
JsonArray boxMetadataFilterRequestArray = new JsonArray();
JsonObject boxMetadataFilter = new JsonObject()
.add("templateKey", this.metadataFilter.getTemplateKey())
.add("scope", this.metadataFilter.getScope())
... | java | private JsonArray formatBoxMetadataFilterRequest() {
JsonArray boxMetadataFilterRequestArray = new JsonArray();
JsonObject boxMetadataFilter = new JsonObject()
.add("templateKey", this.metadataFilter.getTemplateKey())
.add("scope", this.metadataFilter.getScope())
... | [
"private",
"JsonArray",
"formatBoxMetadataFilterRequest",
"(",
")",
"{",
"JsonArray",
"boxMetadataFilterRequestArray",
"=",
"new",
"JsonArray",
"(",
")",
";",
"JsonObject",
"boxMetadataFilter",
"=",
"new",
"JsonObject",
"(",
")",
".",
"add",
"(",
"\"templateKey\"",
... | Add BoxMetaDataFilter to the JsonArray boxMetadataFilterRequestArray.
@param @param bmf accepts a filter that has templateKey, scope, and filters populated.
@return JsonArray that is formated Json request | [
"Add",
"BoxMetaDataFilter",
"to",
"the",
"JsonArray",
"boxMetadataFilterRequestArray",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxSearchParameters.java#L304-L314 |
163,581 | box/box-java-sdk | src/main/java/com/box/sdk/BoxSearchParameters.java | BoxSearchParameters.listToCSV | private String listToCSV(List<String> list) {
String csvStr = "";
for (String item : list) {
csvStr += "," + item;
}
return csvStr.length() > 1 ? csvStr.substring(1) : csvStr;
} | java | private String listToCSV(List<String> list) {
String csvStr = "";
for (String item : list) {
csvStr += "," + item;
}
return csvStr.length() > 1 ? csvStr.substring(1) : csvStr;
} | [
"private",
"String",
"listToCSV",
"(",
"List",
"<",
"String",
">",
"list",
")",
"{",
"String",
"csvStr",
"=",
"\"\"",
";",
"for",
"(",
"String",
"item",
":",
"list",
")",
"{",
"csvStr",
"+=",
"\",\"",
"+",
"item",
";",
"}",
"return",
"csvStr",
".",
... | Concat a List into a CSV String.
@param list list to concat
@return csv string | [
"Concat",
"a",
"List",
"into",
"a",
"CSV",
"String",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxSearchParameters.java#L321-L328 |
163,582 | box/box-java-sdk | src/main/java/com/box/sdk/BoxSearchParameters.java | BoxSearchParameters.getQueryParameters | public QueryStringBuilder getQueryParameters() {
QueryStringBuilder builder = new QueryStringBuilder();
if (this.isNullOrEmpty(this.query) && this.metadataFilter == null) {
throw new BoxAPIException(
"BoxSearchParameters requires either a search query or Metadata filter to b... | java | public QueryStringBuilder getQueryParameters() {
QueryStringBuilder builder = new QueryStringBuilder();
if (this.isNullOrEmpty(this.query) && this.metadataFilter == null) {
throw new BoxAPIException(
"BoxSearchParameters requires either a search query or Metadata filter to b... | [
"public",
"QueryStringBuilder",
"getQueryParameters",
"(",
")",
"{",
"QueryStringBuilder",
"builder",
"=",
"new",
"QueryStringBuilder",
"(",
")",
";",
"if",
"(",
"this",
".",
"isNullOrEmpty",
"(",
"this",
".",
"query",
")",
"&&",
"this",
".",
"metadataFilter",
... | Get the Query Paramaters to be used for search request.
@return this.QueryStringBuilder. | [
"Get",
"the",
"Query",
"Paramaters",
"to",
"be",
"used",
"for",
"search",
"request",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxSearchParameters.java#L333-L403 |
163,583 | box/box-java-sdk | src/main/java/com/box/sdk/MetadataFieldFilter.java | MetadataFieldFilter.getJsonObject | public JsonObject getJsonObject() {
JsonObject obj = new JsonObject();
obj.add("field", this.field);
obj.add("value", this.value);
return obj;
} | java | public JsonObject getJsonObject() {
JsonObject obj = new JsonObject();
obj.add("field", this.field);
obj.add("value", this.value);
return obj;
} | [
"public",
"JsonObject",
"getJsonObject",
"(",
")",
"{",
"JsonObject",
"obj",
"=",
"new",
"JsonObject",
"(",
")",
";",
"obj",
".",
"add",
"(",
"\"field\"",
",",
"this",
".",
"field",
")",
";",
"obj",
".",
"add",
"(",
"\"value\"",
",",
"this",
".",
"va... | Get the JSON representation of the metadata field filter.
@return the JSON object representing the filter. | [
"Get",
"the",
"JSON",
"representation",
"of",
"the",
"metadata",
"field",
"filter",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/MetadataFieldFilter.java#L40-L48 |
163,584 | box/box-java-sdk | src/main/java/com/box/sdk/BoxAPIConnection.java | BoxAPIConnection.restore | public static BoxAPIConnection restore(String clientID, String clientSecret, String state) {
BoxAPIConnection api = new BoxAPIConnection(clientID, clientSecret);
api.restore(state);
return api;
} | java | public static BoxAPIConnection restore(String clientID, String clientSecret, String state) {
BoxAPIConnection api = new BoxAPIConnection(clientID, clientSecret);
api.restore(state);
return api;
} | [
"public",
"static",
"BoxAPIConnection",
"restore",
"(",
"String",
"clientID",
",",
"String",
"clientSecret",
",",
"String",
"state",
")",
"{",
"BoxAPIConnection",
"api",
"=",
"new",
"BoxAPIConnection",
"(",
"clientID",
",",
"clientSecret",
")",
";",
"api",
".",
... | Restores a BoxAPIConnection from a saved state.
@see #save
@param clientID the client ID to use with the connection.
@param clientSecret the client secret to use with the connection.
@param state the saved state that was created with {@link #save}.
@return a restored API connection. | [
"Restores",
"a",
"BoxAPIConnection",
"from",
"a",
"saved",
"state",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxAPIConnection.java#L146-L150 |
163,585 | box/box-java-sdk | src/main/java/com/box/sdk/BoxAPIConnection.java | BoxAPIConnection.getAuthorizationURL | public static URL getAuthorizationURL(String clientID, URI redirectUri, String state, List<String> scopes) {
URLTemplate template = new URLTemplate(AUTHORIZATION_URL);
QueryStringBuilder queryBuilder = new QueryStringBuilder().appendParam("client_id", clientID)
.appendParam("response_typ... | java | public static URL getAuthorizationURL(String clientID, URI redirectUri, String state, List<String> scopes) {
URLTemplate template = new URLTemplate(AUTHORIZATION_URL);
QueryStringBuilder queryBuilder = new QueryStringBuilder().appendParam("client_id", clientID)
.appendParam("response_typ... | [
"public",
"static",
"URL",
"getAuthorizationURL",
"(",
"String",
"clientID",
",",
"URI",
"redirectUri",
",",
"String",
"state",
",",
"List",
"<",
"String",
">",
"scopes",
")",
"{",
"URLTemplate",
"template",
"=",
"new",
"URLTemplate",
"(",
"AUTHORIZATION_URL",
... | Return the authorization URL which is used to perform the authorization_code based OAuth2 flow.
@param clientID the client ID to use with the connection.
@param redirectUri the URL to which Box redirects the browser when authentication completes.
@param state the text string that you choose.
Box sends the same string t... | [
"Return",
"the",
"authorization",
"URL",
"which",
"is",
"used",
"to",
"perform",
"the",
"authorization_code",
"based",
"OAuth2",
"flow",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxAPIConnection.java#L162-L184 |
163,586 | box/box-java-sdk | src/main/java/com/box/sdk/BoxAPIConnection.java | BoxAPIConnection.authenticate | public void authenticate(String authCode) {
URL url = null;
try {
url = new URL(this.tokenURL);
} catch (MalformedURLException e) {
assert false : "An invalid token URL indicates a bug in the SDK.";
throw new RuntimeException("An invalid token URL indicates a ... | java | public void authenticate(String authCode) {
URL url = null;
try {
url = new URL(this.tokenURL);
} catch (MalformedURLException e) {
assert false : "An invalid token URL indicates a bug in the SDK.";
throw new RuntimeException("An invalid token URL indicates a ... | [
"public",
"void",
"authenticate",
"(",
"String",
"authCode",
")",
"{",
"URL",
"url",
"=",
"null",
";",
"try",
"{",
"url",
"=",
"new",
"URL",
"(",
"this",
".",
"tokenURL",
")",
";",
"}",
"catch",
"(",
"MalformedURLException",
"e",
")",
"{",
"assert",
... | Authenticates the API connection by obtaining access and refresh tokens using the auth code that was obtained
from the first half of OAuth.
@param authCode the auth code obtained from the first half of the OAuth process. | [
"Authenticates",
"the",
"API",
"connection",
"by",
"obtaining",
"access",
"and",
"refresh",
"tokens",
"using",
"the",
"auth",
"code",
"that",
"was",
"obtained",
"from",
"the",
"first",
"half",
"of",
"OAuth",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxAPIConnection.java#L191-L215 |
163,587 | box/box-java-sdk | src/main/java/com/box/sdk/BoxAPIConnection.java | BoxAPIConnection.needsRefresh | public boolean needsRefresh() {
boolean needsRefresh;
this.refreshLock.readLock().lock();
long now = System.currentTimeMillis();
long tokenDuration = (now - this.lastRefresh);
needsRefresh = (tokenDuration >= this.expires - REFRESH_EPSILON);
this.refreshLock.readLock().u... | java | public boolean needsRefresh() {
boolean needsRefresh;
this.refreshLock.readLock().lock();
long now = System.currentTimeMillis();
long tokenDuration = (now - this.lastRefresh);
needsRefresh = (tokenDuration >= this.expires - REFRESH_EPSILON);
this.refreshLock.readLock().u... | [
"public",
"boolean",
"needsRefresh",
"(",
")",
"{",
"boolean",
"needsRefresh",
";",
"this",
".",
"refreshLock",
".",
"readLock",
"(",
")",
".",
"lock",
"(",
")",
";",
"long",
"now",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"long",
"tokenDu... | Determines if this connection's access token has expired and needs to be refreshed.
@return true if the access token needs to be refreshed; otherwise false. | [
"Determines",
"if",
"this",
"connection",
"s",
"access",
"token",
"has",
"expired",
"and",
"needs",
"to",
"be",
"refreshed",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxAPIConnection.java#L530-L540 |
163,588 | box/box-java-sdk | src/main/java/com/box/sdk/BoxAPIConnection.java | BoxAPIConnection.refresh | public void refresh() {
this.refreshLock.writeLock().lock();
if (!this.canRefresh()) {
this.refreshLock.writeLock().unlock();
throw new IllegalStateException("The BoxAPIConnection cannot be refreshed because it doesn't have a "
+ "refresh token.");
}
... | java | public void refresh() {
this.refreshLock.writeLock().lock();
if (!this.canRefresh()) {
this.refreshLock.writeLock().unlock();
throw new IllegalStateException("The BoxAPIConnection cannot be refreshed because it doesn't have a "
+ "refresh token.");
}
... | [
"public",
"void",
"refresh",
"(",
")",
"{",
"this",
".",
"refreshLock",
".",
"writeLock",
"(",
")",
".",
"lock",
"(",
")",
";",
"if",
"(",
"!",
"this",
".",
"canRefresh",
"(",
")",
")",
"{",
"this",
".",
"refreshLock",
".",
"writeLock",
"(",
")",
... | Refresh's this connection's access token using its refresh token.
@throws IllegalStateException if this connection's access token cannot be refreshed. | [
"Refresh",
"s",
"this",
"connection",
"s",
"access",
"token",
"using",
"its",
"refresh",
"token",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxAPIConnection.java#L546-L590 |
163,589 | box/box-java-sdk | src/main/java/com/box/sdk/BoxAPIConnection.java | BoxAPIConnection.restore | public void restore(String state) {
JsonObject json = JsonObject.readFrom(state);
String accessToken = json.get("accessToken").asString();
String refreshToken = json.get("refreshToken").asString();
long lastRefresh = json.get("lastRefresh").asLong();
long expires = json.get("expi... | java | public void restore(String state) {
JsonObject json = JsonObject.readFrom(state);
String accessToken = json.get("accessToken").asString();
String refreshToken = json.get("refreshToken").asString();
long lastRefresh = json.get("lastRefresh").asLong();
long expires = json.get("expi... | [
"public",
"void",
"restore",
"(",
"String",
"state",
")",
"{",
"JsonObject",
"json",
"=",
"JsonObject",
".",
"readFrom",
"(",
"state",
")",
";",
"String",
"accessToken",
"=",
"json",
".",
"get",
"(",
"\"accessToken\"",
")",
".",
"asString",
"(",
")",
";"... | Restores a saved connection state into this BoxAPIConnection.
@see #save
@param state the saved state that was created with {@link #save}. | [
"Restores",
"a",
"saved",
"connection",
"state",
"into",
"this",
"BoxAPIConnection",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxAPIConnection.java#L598-L621 |
163,590 | box/box-java-sdk | src/main/java/com/box/sdk/BoxAPIConnection.java | BoxAPIConnection.getLowerScopedToken | public ScopedToken getLowerScopedToken(List<String> scopes, String resource) {
assert (scopes != null);
assert (scopes.size() > 0);
URL url = null;
try {
url = new URL(this.getTokenURL());
} catch (MalformedURLException e) {
assert false : "An invalid refr... | java | public ScopedToken getLowerScopedToken(List<String> scopes, String resource) {
assert (scopes != null);
assert (scopes.size() > 0);
URL url = null;
try {
url = new URL(this.getTokenURL());
} catch (MalformedURLException e) {
assert false : "An invalid refr... | [
"public",
"ScopedToken",
"getLowerScopedToken",
"(",
"List",
"<",
"String",
">",
"scopes",
",",
"String",
"resource",
")",
"{",
"assert",
"(",
"scopes",
"!=",
"null",
")",
";",
"assert",
"(",
"scopes",
".",
"size",
"(",
")",
">",
"0",
")",
";",
"URL",
... | Get a lower-scoped token restricted to a resource for the list of scopes that are passed.
@param scopes the list of scopes to which the new token should be restricted for
@param resource the resource for which the new token has to be obtained
@return scopedToken which has access token and other details | [
"Get",
"a",
"lower",
"-",
"scoped",
"token",
"restricted",
"to",
"a",
"resource",
"for",
"the",
"list",
"of",
"scopes",
"that",
"are",
"passed",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxAPIConnection.java#L680-L733 |
163,591 | box/box-java-sdk | src/main/java/com/box/sdk/BoxAPIConnection.java | BoxAPIConnection.save | public String save() {
JsonObject state = new JsonObject()
.add("accessToken", this.accessToken)
.add("refreshToken", this.refreshToken)
.add("lastRefresh", this.lastRefresh)
.add("expires", this.expires)
.add("userAgent", this.userAgent)
.... | java | public String save() {
JsonObject state = new JsonObject()
.add("accessToken", this.accessToken)
.add("refreshToken", this.refreshToken)
.add("lastRefresh", this.lastRefresh)
.add("expires", this.expires)
.add("userAgent", this.userAgent)
.... | [
"public",
"String",
"save",
"(",
")",
"{",
"JsonObject",
"state",
"=",
"new",
"JsonObject",
"(",
")",
".",
"add",
"(",
"\"accessToken\"",
",",
"this",
".",
"accessToken",
")",
".",
"add",
"(",
"\"refreshToken\"",
",",
"this",
".",
"refreshToken",
")",
".... | Saves the state of this connection to a string so that it can be persisted and restored at a later time.
<p>Note that proxy settings aren't automatically saved or restored. This is mainly due to security concerns
around persisting proxy authentication details to the state string. If your connection uses a proxy, you w... | [
"Saves",
"the",
"state",
"of",
"this",
"connection",
"to",
"a",
"string",
"so",
"that",
"it",
"can",
"be",
"persisted",
"and",
"restored",
"at",
"a",
"later",
"time",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxAPIConnection.java#L773-L786 |
163,592 | box/box-java-sdk | src/main/java/com/box/sdk/BoxDevicePin.java | BoxDevicePin.getInfo | public Info getInfo(String ... fields) {
QueryStringBuilder builder = new QueryStringBuilder();
if (fields.length > 0) {
builder.appendParam("fields", fields);
}
URL url = DEVICE_PIN_URL_TEMPLATE.buildWithQuery(this.getAPI().getBaseURL(), builder.toString(), this.getID()... | java | public Info getInfo(String ... fields) {
QueryStringBuilder builder = new QueryStringBuilder();
if (fields.length > 0) {
builder.appendParam("fields", fields);
}
URL url = DEVICE_PIN_URL_TEMPLATE.buildWithQuery(this.getAPI().getBaseURL(), builder.toString(), this.getID()... | [
"public",
"Info",
"getInfo",
"(",
"String",
"...",
"fields",
")",
"{",
"QueryStringBuilder",
"builder",
"=",
"new",
"QueryStringBuilder",
"(",
")",
";",
"if",
"(",
"fields",
".",
"length",
">",
"0",
")",
"{",
"builder",
".",
"appendParam",
"(",
"\"fields\"... | Gets information about the device pin.
@param fields the fields to retrieve.
@return info about the device pin. | [
"Gets",
"information",
"about",
"the",
"device",
"pin",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxDevicePin.java#L50-L60 |
163,593 | box/box-java-sdk | src/main/java/com/box/sdk/BoxDevicePin.java | BoxDevicePin.delete | public void delete() {
URL url = DEVICE_PIN_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "DELETE");
BoxAPIResponse response = request.send();
response.disconnect();
} | java | public void delete() {
URL url = DEVICE_PIN_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "DELETE");
BoxAPIResponse response = request.send();
response.disconnect();
} | [
"public",
"void",
"delete",
"(",
")",
"{",
"URL",
"url",
"=",
"DEVICE_PIN_URL_TEMPLATE",
".",
"build",
"(",
"this",
".",
"getAPI",
"(",
")",
".",
"getBaseURL",
"(",
")",
",",
"this",
".",
"getID",
"(",
")",
")",
";",
"BoxAPIRequest",
"request",
"=",
... | Deletes the device pin. | [
"Deletes",
"the",
"device",
"pin",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxDevicePin.java#L105-L110 |
163,594 | box/box-java-sdk | src/main/java/com/box/sdk/BoxMetadataCascadePolicy.java | BoxMetadataCascadePolicy.forceApply | public void forceApply(String conflictResolution) {
URL url = FORCE_METADATA_CASCADE_POLICIES_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "POST");
JsonObject requestJSON = new JsonObject()
.add("co... | java | public void forceApply(String conflictResolution) {
URL url = FORCE_METADATA_CASCADE_POLICIES_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "POST");
JsonObject requestJSON = new JsonObject()
.add("co... | [
"public",
"void",
"forceApply",
"(",
"String",
"conflictResolution",
")",
"{",
"URL",
"url",
"=",
"FORCE_METADATA_CASCADE_POLICIES_URL_TEMPLATE",
".",
"build",
"(",
"this",
".",
"getAPI",
"(",
")",
".",
"getBaseURL",
"(",
")",
",",
"this",
".",
"getID",
"(",
... | If a policy already exists on a folder, this will apply that policy to all existing files and sub folders within
the target folder.
@param conflictResolution the desired behavior for conflict-resolution. Set to either none or overwrite. | [
"If",
"a",
"policy",
"already",
"exists",
"on",
"a",
"folder",
"this",
"will",
"apply",
"that",
"policy",
"to",
"all",
"existing",
"files",
"and",
"sub",
"folders",
"within",
"the",
"target",
"folder",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxMetadataCascadePolicy.java#L141-L149 |
163,595 | box/box-java-sdk | src/main/java/com/box/sdk/BoxTask.java | BoxTask.addAssignment | public BoxTaskAssignment.Info addAssignment(BoxUser assignTo) {
JsonObject taskJSON = new JsonObject();
taskJSON.add("type", "task");
taskJSON.add("id", this.getID());
JsonObject assignToJSON = new JsonObject();
assignToJSON.add("id", assignTo.getID());
JsonObject reque... | java | public BoxTaskAssignment.Info addAssignment(BoxUser assignTo) {
JsonObject taskJSON = new JsonObject();
taskJSON.add("type", "task");
taskJSON.add("id", this.getID());
JsonObject assignToJSON = new JsonObject();
assignToJSON.add("id", assignTo.getID());
JsonObject reque... | [
"public",
"BoxTaskAssignment",
".",
"Info",
"addAssignment",
"(",
"BoxUser",
"assignTo",
")",
"{",
"JsonObject",
"taskJSON",
"=",
"new",
"JsonObject",
"(",
")",
";",
"taskJSON",
".",
"add",
"(",
"\"type\"",
",",
"\"task\"",
")",
";",
"taskJSON",
".",
"add",
... | Adds a new assignment to this task.
@param assignTo the user to assign the assignment to.
@return information about the newly added task assignment. | [
"Adds",
"a",
"new",
"assignment",
"to",
"this",
"task",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxTask.java#L57-L77 |
163,596 | box/box-java-sdk | src/main/java/com/box/sdk/BoxTask.java | BoxTask.getAssignments | public List<BoxTaskAssignment.Info> getAssignments() {
URL url = GET_ASSIGNMENTS_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject res... | java | public List<BoxTaskAssignment.Info> getAssignments() {
URL url = GET_ASSIGNMENTS_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject res... | [
"public",
"List",
"<",
"BoxTaskAssignment",
".",
"Info",
">",
"getAssignments",
"(",
")",
"{",
"URL",
"url",
"=",
"GET_ASSIGNMENTS_URL_TEMPLATE",
".",
"build",
"(",
"this",
".",
"getAPI",
"(",
")",
".",
"getBaseURL",
"(",
")",
",",
"this",
".",
"getID",
... | Gets any assignments for this task.
@return a list of assignments for this task. | [
"Gets",
"any",
"assignments",
"for",
"this",
"task",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxTask.java#L110-L127 |
163,597 | box/box-java-sdk | src/main/java/com/box/sdk/BoxTask.java | BoxTask.getAllAssignments | public Iterable<BoxTaskAssignment.Info> getAllAssignments(String ... fields) {
final QueryStringBuilder builder = new QueryStringBuilder();
if (fields.length > 0) {
builder.appendParam("fields", fields);
}
return new Iterable<BoxTaskAssignment.Info>() {
public Ite... | java | public Iterable<BoxTaskAssignment.Info> getAllAssignments(String ... fields) {
final QueryStringBuilder builder = new QueryStringBuilder();
if (fields.length > 0) {
builder.appendParam("fields", fields);
}
return new Iterable<BoxTaskAssignment.Info>() {
public Ite... | [
"public",
"Iterable",
"<",
"BoxTaskAssignment",
".",
"Info",
">",
"getAllAssignments",
"(",
"String",
"...",
"fields",
")",
"{",
"final",
"QueryStringBuilder",
"builder",
"=",
"new",
"QueryStringBuilder",
"(",
")",
";",
"if",
"(",
"fields",
".",
"length",
">",... | Gets an iterable of all the assignments of this task.
@param fields the fields to retrieve.
@return an iterable containing info about all the assignments. | [
"Gets",
"an",
"iterable",
"of",
"all",
"the",
"assignments",
"of",
"this",
"task",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxTask.java#L134-L146 |
163,598 | box/box-java-sdk | src/main/java/com/box/sdk/BoxJSONObject.java | BoxJSONObject.getPendingChanges | public String getPendingChanges() {
JsonObject jsonObject = this.getPendingJSONObject();
if (jsonObject == null) {
return null;
}
return jsonObject.toString();
} | java | public String getPendingChanges() {
JsonObject jsonObject = this.getPendingJSONObject();
if (jsonObject == null) {
return null;
}
return jsonObject.toString();
} | [
"public",
"String",
"getPendingChanges",
"(",
")",
"{",
"JsonObject",
"jsonObject",
"=",
"this",
".",
"getPendingJSONObject",
"(",
")",
";",
"if",
"(",
"jsonObject",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"jsonObject",
".",
"toString",... | Gets a JSON string containing any pending changes to this object that can be sent back to the Box API.
@return a JSON string containing the pending changes. | [
"Gets",
"a",
"JSON",
"string",
"containing",
"any",
"pending",
"changes",
"to",
"this",
"object",
"that",
"can",
"be",
"sent",
"back",
"to",
"the",
"Box",
"API",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxJSONObject.java#L66-L73 |
163,599 | box/box-java-sdk | src/main/java/com/box/sdk/BoxJSONObject.java | BoxJSONObject.update | void update(JsonObject jsonObject) {
for (JsonObject.Member member : jsonObject) {
if (member.getValue().isNull()) {
continue;
}
this.parseJSONMember(member);
}
this.clearPendingChanges();
} | java | void update(JsonObject jsonObject) {
for (JsonObject.Member member : jsonObject) {
if (member.getValue().isNull()) {
continue;
}
this.parseJSONMember(member);
}
this.clearPendingChanges();
} | [
"void",
"update",
"(",
"JsonObject",
"jsonObject",
")",
"{",
"for",
"(",
"JsonObject",
".",
"Member",
"member",
":",
"jsonObject",
")",
"{",
"if",
"(",
"member",
".",
"getValue",
"(",
")",
".",
"isNull",
"(",
")",
")",
"{",
"continue",
";",
"}",
"thi... | Updates this BoxJSONObject using the information in a JSON object.
@param jsonObject the JSON object containing updated information. | [
"Updates",
"this",
"BoxJSONObject",
"using",
"the",
"information",
"in",
"a",
"JSON",
"object",
"."
] | 35b4ba69417f9d6a002c19dfaab57527750ef349 | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxJSONObject.java#L187-L197 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.