/** * Displays the action path. * * @param action The requested action. * @return The action path. */ @Override protected String actionPath(String action) { if (action.equals("edit")) return path + "/deployment-client"; return super.actionPath(action); }
/** * Returns the action path. * * @param action The requested action. * @return The action path. */ @Override protected String actionPath(String action) { if (action.equals("edit")) return path + "/distributedSearch"; return super.actionPath(action); }
/** * Returns the action path. * * @param action The requested action. * @return The action path. */ @Override protected String actionPath(String action) { if (action.equals("control")) return path + "/control"; return super.actionPath(action); }
/** {@inheritDoc} */ @Override protected String actionPath(String action) { if (action.equals("acknowledge")) return path + "/acknowledge"; if (action.equals("dispatch")) return path + "/dispatch"; if (action.equals("history")) return path + "/history"; return super.actionPath(action); }
/** * Removes this entity from its corresponding collection. */ public void remove() { service.delete(actionPath("remove")); }
/** * Disables the entity that is named by this endpoint. This method is * available on almost every endpoint. */ public void disable() { service.post(actionPath("disable")); invalidate(); }
/** * Enables the entity that is named by this endpoint. This method is * available on almost every endpoint. */ public void enable() { service.post(actionPath("enable")); invalidate(); }
/** * Updates the entity with the values you previously set using the setter * methods, and any additional specified arguments. The specified arguments * take precedent over the values that were set using the setter methods. * * @param args The arguments to update. */ public void update(Map<String, Object> args) { if (!toUpdate.isEmpty() || !args.isEmpty()) { // Merge cached setters and live args together before updating. Map<String, Object> mergedArgs = new LinkedHashMap<String, Object>(); mergedArgs.putAll(toUpdate); mergedArgs.putAll(args); if (mergedArgs.containsKey("name") && !isNameChangeAllowed()) { throw new IllegalStateException("Cannot set 'name' on an existing entity."); } service.post(actionPath("edit"), mergedArgs); toUpdate.clear(); invalidate(); } }