private void remove(final AddressTemplate template, final String name) { crud.onRemoveResource( template, name, new Callback() { @Override public void onSuccess(final AddressTemplate addressTemplate, final String name) { Console.info(Console.MESSAGES.successfullyRemoved(name)); readServiceProvider(); } @Override public void onFailure( final AddressTemplate addressTemplate, final String name, final Throwable t) { readServiceProvider(); Console.error(Console.MESSAGES.failedToRemoveResource(name), t.getMessage()); } }); }
private void modify( final AddressTemplate template, final String name, final Map<String, Object> changedValues) { crud.onSaveResource( template, name, changedValues, new Callback() { @Override public void onSuccess(final AddressTemplate addressTemplate, final String name) { Console.info(Console.MESSAGES.successfullyModifiedResource(name)); readServiceProvider(); } @Override public void onFailure( final AddressTemplate addressTemplate, final String name, final Throwable t) { Console.error(Console.MESSAGES.failedToModifyResource(name), t.getMessage()); readServiceProvider(); } }); }