Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hook parameter in ItemAPI.java #8

Merged
merged 1 commit into from Dec 12, 2013
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -70,10 +70,13 @@ public Item getItem(int itemId) {
* The data for the update
* @param silent
* True if the update should be silent, false otherwise
* @param hook
* True if hooks should be executed for the change, false otherwise
*/
public void updateItem(int itemId, ItemUpdate update, boolean silent) {
public void updateItem(int itemId, ItemUpdate update, boolean silent, boolean hook) {
getResourceFactory().getApiResource("/item/" + itemId)
.queryParam("silent", silent ? "1" : "0")
.queryParam("hook", hook ? "1" : "0")
.entity(update, MediaType.APPLICATION_JSON_TYPE).put();
}

@@ -86,11 +89,14 @@ public void updateItem(int itemId, ItemUpdate update, boolean silent) {
* The values for the fields
* @param silent
* True if the update should be silent, false otherwise
* @param hook
* True if hooks should be executed for the change, false otherwise
*/
public void updateItemValues(int itemId, List<FieldValuesUpdate> values,
boolean silent) {
boolean silent, boolean hook) {
getResourceFactory().getApiResource("/item/" + itemId + "/value/")
.queryParam("silent", silent ? "1" : "0")
.queryParam("hook", hook ? "1" : "0")
.entity(values, MediaType.APPLICATION_JSON_TYPE).put();
}

@@ -105,12 +111,15 @@ public void updateItemValues(int itemId, List<FieldValuesUpdate> values,
* The new values for the field
* @param silent
* True if the update should be silent, false otherwise
* @param hook
* True if hooks should be executed for the change, false otherwise
*/
public void updateItemFieldValues(int itemId, int fieldId,
List<Map<String, Object>> values, boolean silent) {
List<Map<String, Object>> values, boolean silent, boolean hook) {
getResourceFactory()
.getApiResource("/item/" + itemId + "/value/" + fieldId)
.queryParam("silent", silent ? "1" : "0")
.queryParam("hook", hook ? "1" : "0")
.entity(values, MediaType.APPLICATION_JSON_TYPE).put();
}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.