use of jsinterop.annotations.JsIgnore in project console by hal.
the class ComplexAttributeOperations method add.
/**
* Writes the payload to the complex attribute in the specified resource. After the resource has been updated, a success
* message is fired and the specified callback is executed.
*
* @param complexAttribute the name of the complex attribute
* @param type the human readable name of the complex attribute
* @param address the fq address for the operation
* @param payload the optional payload for the complex attribute (may be null or undefined)
* @param callback the callback executed after the resource has been added
*/
@JsIgnore
public void add(String complexAttribute, String type, ResourceAddress address, @Nullable ModelNode payload, Callback callback) {
Operation operation = new Operation.Builder(address, WRITE_ATTRIBUTE_OPERATION).param(NAME, complexAttribute).param(VALUE, payload == null ? new ModelNode().addEmptyObject() : payload).build();
dispatcher.execute(operation, result -> {
MessageEvent.fire(eventBus, Message.success(resources.messages().addSingleResourceSuccess(type)));
callback.execute();
});
}
use of jsinterop.annotations.JsIgnore in project console by hal.
the class ComplexAttributeOperations method reset.
/**
* Undefines all non required attributes in the specified form. After the attributes in the complex attribute have been
* undefined a standard success message is fired and the specified callback is executed.
* <p>
* If the form contains only required attributes, a warning message is fired and the specified callback is executed.
*
* @param complexAttribute the name of the complex attribute
* @param type the human readable name of the complex attribute
* @param address the fq address for the operation
* @param form the form which should be reset
* @param callback the callback executed after the resource has been saved
*/
@JsIgnore
public <T> void reset(String complexAttribute, String type, ResourceAddress address, Metadata metadata, Form<T> form, Callback callback) {
Set<String> attributes = stream(form.getBoundFormItems().spliterator(), false).map(FormItem::getName).collect(toSet());
Composite composite = operationFactory(complexAttribute).resetResource(address, attributes, metadata);
reset(type, composite, callback);
}
use of jsinterop.annotations.JsIgnore in project console by hal.
the class ComplexAttributeOperations method remove.
/**
* Undefines the complex attribute. After the attribute has been undefined a standard success message is fired and the
* specified callback is executed.
*
* @param complexAttribute the name of the complex attribute
* @param type the human readable name of the complex attribute
* @param address the fq address for the operation
* @param callback the callback executed after the complex attribute has been undefined
*/
@JsIgnore
public void remove(String complexAttribute, String type, ResourceAddress address, Callback callback) {
Operation operation = new Operation.Builder(address, UNDEFINE_ATTRIBUTE_OPERATION).param(NAME, complexAttribute).build();
SafeHtml question = resources.messages().removeSingletonConfirmationQuestion();
DialogFactory.showConfirmation(resources.messages().removeConfirmationTitle(type), question, () -> dispatcher.execute(operation, result -> {
MessageEvent.fire(eventBus, Message.success(resources.messages().removeSingletonResourceSuccess(type)));
callback.execute();
}));
}
use of jsinterop.annotations.JsIgnore in project vue-gwt by Axellience.
the class VueGWT method initWithoutVueLib.
/**
* Inject scripts necessary for Vue GWT to work Requires Vue to be defined in Window.
*/
@JsIgnore
public static void initWithoutVueLib() {
if (!isVueLibInjected()) {
throw new RuntimeException("Couldn't find Vue.js on init. Either include it Vue.js in your index.html or call VueGWT.init() instead of initWithoutVueLib.");
}
// Register custom observers for Collection and Maps
VueGWTObserverManager.get().registerVueGWTObserver(new CollectionObserver());
VueGWTObserverManager.get().registerVueGWTObserver(new MapObserver());
isReady = true;
// Call on ready callbacks
for (Runnable onReadyCbk : onReadyCallbacks) {
onReadyCbk.run();
}
onReadyCallbacks.clear();
}
use of jsinterop.annotations.JsIgnore in project deephaven-core by deephaven.
the class TableMap method refetch.
/**
* Fetches (or re-fetches) the TableMap so it can be used internally
*/
@JsIgnore
public Promise<TableMap> refetch() {
return Callbacks.promise(this, fetch).then(decl -> {
workerConnection.registerTableMap(decl.getHandle(), this);
tableMapHandle = decl.getHandle();
for (Object key : (Object[]) decl.getKeys().getData()) {
LocalKey k = LocalKey.of(key);
put(key, k);
}
unsuppressEvents();
fireEvent(EVENT_RECONNECT);
return Promise.resolve(this);
}).catch_(err -> {
final CustomEventInit init = CustomEventInit.create();
init.setDetail(err);
unsuppressEvents();
fireEvent(EVENT_RECONNECTFAILED, init);
suppressEvents();
// noinspection unchecked
return (Promise<TableMap>) (Promise) Promise.reject(err);
});
}
Aggregations