Class CrudOperations
- java.lang.Object
-
- org.jboss.hal.core.CrudOperations
-
public class CrudOperations extends Object
Contains generic CRUD methods to add, read, update and remove (singleton) resources. Some methods just execute the underlying DMR operations, other methods also interact with the user by showing (confirmation) dialogs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceCrudOperations.AddCallbackCallback used inaddmethodsstatic interfaceCrudOperations.AddSingletonCallbackCallback used inaddSingletonmethodsstatic interfaceCrudOperations.ReadCallbackstatic interfaceCrudOperations.ReadChildrenCallbackstatic interfaceCrudOperations.ReadCompositeCallback
-
Constructor Summary
Constructors Constructor Description CrudOperations(com.google.web.bindery.event.shared.EventBus eventBus, Dispatcher dispatcher, MetadataProcessor metadataProcessor, javax.inject.Provider<Progress> progress, StatementContext statementContext, Resources resources)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(String type, String name, ResourceAddress address, ModelNode payload, CrudOperations.AddCallback callback)Executes an add operation using the specified name and payload.voidadd(String id, String type, AddressTemplate template, Iterable<String> attributes, FormItemValidation<String> nameItemValidator, CrudOperations.AddCallback callback)voidadd(String id, String type, AddressTemplate template, Iterable<String> attributes, CrudOperations.AddCallback callback)Opens an add-resource-dialog for the given resource type.voidadd(String id, String type, AddressTemplate template, FormItemValidation<String> nameItemValidator, CrudOperations.AddCallback callback)voidadd(String id, String type, AddressTemplate template, CrudOperations.AddCallback callback)Opens an add-resource-dialog for the given resource type.voidadd(String type, String name, AddressTemplate template, ModelNode payload, CrudOperations.AddCallback callback)Executes an add operation using the specified name and payload.voidadd(String name, ResourceAddress address, ModelNode payload, com.google.gwt.safehtml.shared.SafeHtml successMessage, CrudOperations.AddCallback callback)Executes an add operation using the specified name and payload.voidadd(String name, AddressTemplate template, ModelNode payload, com.google.gwt.safehtml.shared.SafeHtml successMessage, CrudOperations.AddCallback callback)Executes an add operation using the specified name and payload.voidaddSingleton(String id, String type, AddressTemplate template, Iterable<String> attributes, CrudOperations.AddSingletonCallback callback)Opens an add-resource-dialog for the given singleton resource type.voidaddSingleton(String id, String type, AddressTemplate template, CrudOperations.AddSingletonCallback callback)Opens an add-resource-dialog for the given singleton resource type.voidaddSingleton(String id, String type, Metadata metadata, AddressTemplate template, CrudOperations.AddSingletonCallback callback)Opens an add-resource-dialog for the given singleton resource type.voidaddSingleton(String type, Operation operation, CrudOperations.AddSingletonCallback callback)Executes the specified add operation.voidaddSingleton(String type, ResourceAddress address, ModelNode payload, CrudOperations.AddSingletonCallback callback)Executes an add operation using the specified address and payload.voidaddSingleton(String type, AddressTemplate template, CrudOperations.AddSingletonCallback callback)Executes an add operation using the specified template.voidaddSingleton(String type, AddressTemplate template, ModelNode payload, CrudOperations.AddSingletonCallback callback)Executes an add operation using the specified template and payload.elemental2.promise.Promise<ModelNode>read(ResourceAddress address)elemental2.promise.Promise<ModelNode>read(ResourceAddress address, int depth)voidread(ResourceAddress address, int depth, CrudOperations.ReadCallback callback)Executes anModelDescriptionConstants.READ_RESOURCE_OPERATIONwith the specified depth on the specified address and passes the result to the specified callback.voidread(ResourceAddress address, CrudOperations.ReadCallback callback)Executes anModelDescriptionConstants.READ_RESOURCE_OPERATIONon the specified address and passes the result to the specified callback.elemental2.promise.Promise<ModelNode>read(AddressTemplate template)elemental2.promise.Promise<ModelNode>read(AddressTemplate template, int depth)voidread(AddressTemplate template, int depth, CrudOperations.ReadCallback callback)Executes anModelDescriptionConstants.READ_RESOURCE_OPERATIONwith the specified depth on the specified template and passes the result to the specified callback.voidread(AddressTemplate template, CrudOperations.ReadCallback callback)Executes anModelDescriptionConstants.READ_RESOURCE_OPERATIONon the specified template and passes the result to the specified callback.elemental2.promise.Promise<CompositeResult>readChildren(ResourceAddress address, Iterable<String> resources)elemental2.promise.Promise<CompositeResult>readChildren(ResourceAddress address, Iterable<String> resources, int depth)voidreadChildren(ResourceAddress address, Iterable<String> resources, int depth, CrudOperations.ReadCompositeCallback callback)Read multiple different child resources using a composite operation.voidreadChildren(ResourceAddress address, Iterable<String> resources, CrudOperations.ReadCompositeCallback callback)Read multiple different child resources using a composite operation.elemental2.promise.Promise<List<Property>>readChildren(ResourceAddress address, String resource)elemental2.promise.Promise<List<Property>>readChildren(ResourceAddress address, String resource, int depth)voidreadChildren(ResourceAddress address, String resource, int depth, CrudOperations.ReadChildrenCallback callback)Executes anModelDescriptionConstants.READ_CHILDREN_RESOURCES_OPERATIONon the specified address and passes the result asList<Property>to the specified callback.voidreadChildren(ResourceAddress address, String resource, CrudOperations.ReadChildrenCallback callback)Executes anModelDescriptionConstants.READ_CHILDREN_RESOURCES_OPERATIONon the specified address and passes the result asList<Property>to the specified callback.elemental2.promise.Promise<CompositeResult>readChildren(AddressTemplate template, Iterable<String> resources)voidreadChildren(AddressTemplate template, Iterable<String> resources, CrudOperations.ReadCompositeCallback callback)Read multiple different child resources using a composite operation.elemental2.promise.Promise<List<Property>>readChildren(AddressTemplate template, String childType)elemental2.promise.Promise<List<Property>>readChildren(AddressTemplate template, String childType, int depth)voidreadChildren(AddressTemplate template, String childType, int depth, CrudOperations.ReadChildrenCallback callback)Executes anModelDescriptionConstants.READ_CHILDREN_RESOURCES_OPERATIONon the specified template and passes the result asList<Property>to the specified callback.voidreadChildren(AddressTemplate template, String childType, CrudOperations.ReadChildrenCallback callback)Executes anModelDescriptionConstants.READ_CHILDREN_RESOURCES_OPERATIONon the specified template and passes the result asList<Property>to the specified callback.elemental2.promise.Promise<ModelNode>readRecursive(ResourceAddress address)voidreadRecursive(ResourceAddress address, CrudOperations.ReadCallback callback)Executes a recursiveModelDescriptionConstants.READ_RESOURCE_OPERATIONon the specified address and passes the result to the specified callback.elemental2.promise.Promise<ModelNode>readRecursive(AddressTemplate template)voidreadRecursive(AddressTemplate template, CrudOperations.ReadCallback callback)Executes a recursiveModelDescriptionConstants.READ_RESOURCE_OPERATIONon the specified template and passes the result to the specified callback.voidremove(String type, String name, ResourceAddress address, Callback callback)Shows a confirmation dialog and removes the resource if confirmed by the user.voidremove(String type, String name, AddressTemplate template, Callback callback)Shows a confirmation dialog and removes the resource if confirmed by the user.voidremoveSingleton(String type, ResourceAddress address, Callback callback)Shows a confirmation dialog and removes the singleton resource if confirmed by the user.voidremoveSingleton(String type, AddressTemplate template, Callback callback)Shows a confirmation dialog and removes the singleton resource if confirmed by the user.voidreset(String type, String name, ResourceAddress address, Set<String> attributes, Metadata metadata, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback callback)Undefines all non required attributes in the specified set.voidreset(String type, String name, ResourceAddress address, Set<String> attributes, Metadata metadata, Callback callback)Undefines all non required attributes in the specified set.<T> voidreset(String type, String name, ResourceAddress address, Form<T> form, Metadata metadata, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback callback)Undefines all non required attributes in the specified form.<T> voidreset(String type, String name, ResourceAddress address, Form<T> form, Metadata metadata, Callback callback)Undefines all non required attributes in the specified form.voidreset(String type, String name, AddressTemplate template, Set<String> attributes, Metadata metadata, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback callback)Undefines all non required attributes in the specified set.voidreset(String type, String name, AddressTemplate template, Set<String> attributes, Metadata metadata, Callback callback)Undefines all non required attributes in the specified set.<T> voidreset(String type, String name, AddressTemplate template, Form<T> form, Metadata metadata, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback callback)Undefines all non required attributes in the specified form.<T> voidreset(String type, String name, AddressTemplate template, Form<T> form, Metadata metadata, Callback callback)Undefines all non required attributes in the specified form.voidresetSingleton(String type, ResourceAddress address, Set<String> attributes, Metadata metadata, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback callback)Undefines all non required attributes in the specified set.voidresetSingleton(String type, ResourceAddress address, Set<String> attributes, Metadata metadata, Callback callback)Undefines all non required attributes in the specified set.<T> voidresetSingleton(String type, ResourceAddress address, Form<T> form, Metadata metadata, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback callback)Undefines all non required attributes in the specified form.<T> voidresetSingleton(String type, ResourceAddress address, Form<T> form, Metadata metadata, Callback callback)Undefines all non required attributes in the specified form.voidresetSingleton(String type, AddressTemplate template, Set<String> attributes, Metadata metadata, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback callback)Undefines all non required attributes in the specified set.voidresetSingleton(String type, AddressTemplate template, Set<String> attributes, Metadata metadata, Callback callback)Undefines all non required attributes in the specified set.<T> voidresetSingleton(String type, AddressTemplate template, Form<T> form, Metadata metadata, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback callback)Undefines all non required attributes in the specified form.<T> voidresetSingleton(String type, AddressTemplate template, Form<T> form, Metadata metadata, Callback callback)Undefines all non required attributes in the specified form.voidsave(String type, String name, Composite operations, Callback successCallback)Writes the changed values to the specified resource.voidsave(String type, String name, ResourceAddress address, Map<String,Object> changedValues, Metadata metadata, Callback successCallback)Writes the changed values to the specified resource.voidsave(String type, String name, ResourceAddress address, Map<String,Object> changedValues, Metadata metadata, Callback successCallback, Callback errorCallback)Writes the changed values to the specified resource.voidsave(String type, String name, AddressTemplate template, Map<String,Object> changedValues, Callback successCallback)Writes the changed values to the specified resource.voidsave(String name, AddressTemplate template, Map<String,Object> changedValues, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback successCallback)Writes the changed values to the specified resource.voidsave(Composite operations, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback successCallback)Writes the changed values to the specified resource.voidsave(Composite operations, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback successCallback, Callback errorCallback)Writes the changed values to the specified resource.voidsave(ResourceAddress address, Map<String,Object> changedValues, Metadata metadata, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback successCallback)Writes the changed values to the specified resource.voidsaveSingleton(String type, ResourceAddress address, Map<String,Object> changedValues, Metadata metadata, Callback successCallback)Writes the changed values to the specified singleton resource.voidsaveSingleton(String type, ResourceAddress address, Map<String,Object> changedValues, Metadata metadata, Callback successCallback, Callback errorCallback)Writes the changed values to the specified singleton resource.voidsaveSingleton(String type, AddressTemplate template, Map<String,Object> changedValues, Callback successCallback)Writes the changed values to the specified singleton resource.voidsaveSingleton(ResourceAddress address, Map<String,Object> changedValues, Metadata metadata, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback successCallback)Writes the changed values to the specified singleton resource.voidsaveSingleton(ResourceAddress address, Map<String,Object> changedValues, Metadata metadata, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback successCallback, Callback errorCallback)Writes the changed values to the specified singleton resource.voidsaveSingleton(AddressTemplate template, Map<String,Object> changedValues, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback successCallback)Writes the changed values to the specified singleton resource.
-
-
-
Constructor Detail
-
CrudOperations
@Inject public CrudOperations(com.google.web.bindery.event.shared.EventBus eventBus, Dispatcher dispatcher, MetadataProcessor metadataProcessor, @Footer javax.inject.Provider<Progress> progress, StatementContext statementContext, Resources resources)
-
-
Method Detail
-
add
public void add(String id, String type, AddressTemplate template, CrudOperations.AddCallback callback)
Opens an add-resource-dialog for the given resource type. The dialog contains fields for all required request properties. When clicking "Add", a new resource is added using the specified address template. After the resource has been added a success message is fired and the specified callback is executed.- Parameters:
id- the id used for the add resource dialogtype- the human readable resource type used in the dialog header and success messagetemplate- the address template which is resolved against the current statement context to get the resource address for the add operationcallback- the callback executed after the resource has been added
-
add
public void add(String id, String type, AddressTemplate template, @Nullable FormItemValidation<String> nameItemValidator, CrudOperations.AddCallback callback)
-
add
public void add(String id, String type, AddressTemplate template, Iterable<String> attributes, CrudOperations.AddCallback callback)
Opens an add-resource-dialog for the given resource type. The dialog contains fields for all required request properties plus the ones specified byattributes. When clicking "Add", a new resource is added using the specified address template. After the resource has been added a success message is fired and the specified callback is executed.- Parameters:
id- the id used for the add resource dialogtype- the human readable resource type used in the dialog header and success messagetemplate- the address template which is resolved against the current statement context to get the resource address for the add operationattributes- additional attributes which should be part of the add resource dialogcallback- the callback executed after the resource has been added
-
add
public void add(String id, String type, AddressTemplate template, Iterable<String> attributes, @Nullable FormItemValidation<String> nameItemValidator, CrudOperations.AddCallback callback)
-
add
public void add(String type, String name, AddressTemplate template, @Nullable ModelNode payload, CrudOperations.AddCallback callback)
Executes an add operation using the specified name and payload. After the resource has been added a success message is fired and the specified callback is executed.- Parameters:
type- the human readable resource type used in the dialog header and success messagename- the resource name which is part of the add operationtemplate- the address template which is resolved against the current statement context and the resource name to get the resource address for the add operationpayload- the optional payload of the add operation (may be null or undefined)callback- the callback executed after the resource has been added
-
add
public void add(String name, AddressTemplate template, @Nullable ModelNode payload, com.google.gwt.safehtml.shared.SafeHtml successMessage, CrudOperations.AddCallback callback)
Executes an add operation using the specified name and payload. After the resource has been added the specified success message is fired and the specified callback is executed.- Parameters:
name- the resource name which is part of the add operationtemplate- the address template which is resolved against the current statement context and the resource name to get the resource address for the add operationpayload- the optional payload of the add operation (may be null or undefined)successMessage- the success message fired after adding the resourcecallback- the callback executed after the resource has been added
-
add
public void add(String type, String name, ResourceAddress address, @Nullable ModelNode payload, CrudOperations.AddCallback callback)
Executes an add operation using the specified name and payload. After the resource has been added a success message is fired and the specified callback is executed.- Parameters:
type- the human readable resource type used in the dialog header and success messagename- the resource name which is part of the add operationaddress- the fq address for the add operationpayload- the optional payload of the add operation (may be null or undefined)callback- the callback executed after the resource has been added
-
add
public void add(String name, ResourceAddress address, @Nullable ModelNode payload, com.google.gwt.safehtml.shared.SafeHtml successMessage, CrudOperations.AddCallback callback)
Executes an add operation using the specified name and payload. After the resource has been added the specified success message is fired and the specified callback is executed.- Parameters:
name- the resource name which is part of the add operationaddress- the fq address for the add operationpayload- the optional payload of the add operation (may be null or undefined)successMessage- the success message fired after adding the resourcecallback- the callback executed after the resource has been added
-
addSingleton
public void addSingleton(String id, String type, AddressTemplate template, CrudOperations.AddSingletonCallback callback)
Opens an add-resource-dialog for the given singleton resource type. The dialog contains fields for all required request properties. When clicking "Add", a new singleton resource is added using the specified address template. After the singleton resource has been added a success message is fired and the specified callback is executed.- Parameters:
id- the id used for the add resource dialogtype- the human readable resource type used in the dialog header and success messagetemplate- the address template which is resolved against the current statement context to get the singleton resource address for the add operationcallback- the callback executed after the singleton resource has been added
-
addSingleton
public void addSingleton(String id, String type, AddressTemplate template, Iterable<String> attributes, CrudOperations.AddSingletonCallback callback)
Opens an add-resource-dialog for the given singleton resource type. The dialog contains fields for all required request properties. plus the ones specified byattributes. When clicking "Add", a new singleton resource is added using the specified address template. After the singleton resource has been added a success message is fired and the specified callback is executed.- Parameters:
id- the id used for the add resource dialogtype- the human readable resource type used in the dialog header and success messagetemplate- the address template which is resolved against the current statement context to get the singleton resource address for the add operationattributes- additional attributes which should be part of the add resource dialogcallback- the callback executed after the singleton resource has been added
-
addSingleton
public void addSingleton(String id, String type, Metadata metadata, AddressTemplate template, CrudOperations.AddSingletonCallback callback)
Opens an add-resource-dialog for the given singleton resource type. The dialog contains fields for all required request properties. plus the ones specified byattributes. When clicking "Add", a new singleton resource is added using the specified address template. After the singleton resource has been added a success message is fired and the specified callback is executed.- Parameters:
id- the id used for the add resource dialogtype- the human readable resource type used in the dialog header and success messagemetadata- the metadata that contains the resource descriptioncallback- the callback executed after the singleton resource has been added
-
addSingleton
public void addSingleton(String type, AddressTemplate template, CrudOperations.AddSingletonCallback callback)
Executes an add operation using the specified template. After the resource has been added a success message is fired and the specified callback is executed.- Parameters:
type- the human readable resource type used in the dialog header and success messagetemplate- the address template which is resolved against the current statement context to get the singleton resource address for the add operationcallback- the callback executed after the singleton resource has been added
-
addSingleton
public void addSingleton(String type, AddressTemplate template, @Nullable ModelNode payload, CrudOperations.AddSingletonCallback callback)
Executes an add operation using the specified template and payload. After the resource has been added a success message is fired and the specified callback is executed.- Parameters:
type- the human readable resource type used in the dialog header and success messagetemplate- the address template which is resolved against the current statement context to get the singleton resource address for the add operationpayload- the optional payload of the add operation (may be null or undefined)callback- the callback executed after the singleton resource has been added
-
addSingleton
public void addSingleton(String type, ResourceAddress address, @Nullable ModelNode payload, CrudOperations.AddSingletonCallback callback)
Executes an add operation using the specified address and payload. After the resource has been added a success message is fired and the specified callback is executed.- Parameters:
type- the human readable resource type used in the dialog header and success messageaddress- the fq address for the add operationpayload- the optional payload of the add operation (may be null or undefined)callback- the callback executed after the singleton resource has been added
-
addSingleton
public void addSingleton(String type, Operation operation, CrudOperations.AddSingletonCallback callback)
Executes the specified add operation. After the resource has been added a success message is fired and the specified callback is executed.- Parameters:
operation- the add operation with the address and payloadtype- the human readable resource type used in the dialog header and success messagecallback- the callback executed after the singleton resource has been added
-
read
public void read(AddressTemplate template, CrudOperations.ReadCallback callback)
Executes anModelDescriptionConstants.READ_RESOURCE_OPERATIONon the specified template and passes the result to the specified callback.- Parameters:
template- the address template which is resolved against the current statement context to get the resource address for theread-resourceoperationcallback- the callback which gets the result of theread-resourceoperation
-
read
public elemental2.promise.Promise<ModelNode> read(AddressTemplate template)
-
read
public void read(AddressTemplate template, int depth, CrudOperations.ReadCallback callback)
Executes anModelDescriptionConstants.READ_RESOURCE_OPERATIONwith the specified depth on the specified template and passes the result to the specified callback.- Parameters:
template- the address template which is resolved against the current statement context to get the resource address for theread-resourceoperationdepth- the depth used for therecursive-depthparametercallback- the callback which gets the result of theread-resourceoperation
-
read
public elemental2.promise.Promise<ModelNode> read(AddressTemplate template, int depth)
-
readRecursive
public void readRecursive(AddressTemplate template, CrudOperations.ReadCallback callback)
Executes a recursiveModelDescriptionConstants.READ_RESOURCE_OPERATIONon the specified template and passes the result to the specified callback.- Parameters:
template- the address template which is resolved against the current statement context to get the resource address for theread-resourceoperationcallback- the callback which gets the result of theread-resourceoperation
-
readRecursive
public elemental2.promise.Promise<ModelNode> readRecursive(AddressTemplate template)
-
readChildren
public void readChildren(AddressTemplate template, String childType, CrudOperations.ReadChildrenCallback callback)
Executes anModelDescriptionConstants.READ_CHILDREN_RESOURCES_OPERATIONon the specified template and passes the result asList<Property>to the specified callback.- Parameters:
template- the address template which is resolved against the current statement context to get the resource address for theread-children-resourceoperationchildType- the child resource (not human readable, but the actual child resource name!)callback- the callback which gets the result of theread-children-resourceoperation asList<Property>
-
readChildren
public elemental2.promise.Promise<List<Property>> readChildren(AddressTemplate template, String childType)
-
readChildren
public void readChildren(AddressTemplate template, String childType, int depth, CrudOperations.ReadChildrenCallback callback)
Executes anModelDescriptionConstants.READ_CHILDREN_RESOURCES_OPERATIONon the specified template and passes the result asList<Property>to the specified callback.- Parameters:
template- the address template which is resolved against the current statement context to get the resource address for theread-children-resourceoperationchildType- the child resource (not human readable, but the actual child resource name!)depth- the depth used for therecursive-depthparametercallback- the callback which gets the result of theread-children-resourceoperation asList<Property>
-
readChildren
public elemental2.promise.Promise<List<Property>> readChildren(AddressTemplate template, String childType, int depth)
-
read
public void read(ResourceAddress address, CrudOperations.ReadCallback callback)
Executes anModelDescriptionConstants.READ_RESOURCE_OPERATIONon the specified address and passes the result to the specified callback.- Parameters:
address- the fq address for theread-resourceoperationcallback- the callback which gets the result of theread-resourceoperation
-
read
public elemental2.promise.Promise<ModelNode> read(ResourceAddress address)
-
read
public void read(ResourceAddress address, int depth, CrudOperations.ReadCallback callback)
Executes anModelDescriptionConstants.READ_RESOURCE_OPERATIONwith the specified depth on the specified address and passes the result to the specified callback.- Parameters:
address- the fq address for theread-resourceoperationdepth- the depth used for therecursive-depthparametercallback- the callback which gets the result of theread-resourceoperation
-
read
public elemental2.promise.Promise<ModelNode> read(ResourceAddress address, int depth)
-
readRecursive
public void readRecursive(ResourceAddress address, CrudOperations.ReadCallback callback)
Executes a recursiveModelDescriptionConstants.READ_RESOURCE_OPERATIONon the specified address and passes the result to the specified callback.- Parameters:
address- the fq address for theread-resourceoperationcallback- the callback which gets the result of theread-resourceoperation
-
readRecursive
public elemental2.promise.Promise<ModelNode> readRecursive(ResourceAddress address)
-
readChildren
public void readChildren(ResourceAddress address, String resource, CrudOperations.ReadChildrenCallback callback)
Executes anModelDescriptionConstants.READ_CHILDREN_RESOURCES_OPERATIONon the specified address and passes the result asList<Property>to the specified callback.- Parameters:
address- the fq address for theread-children-resourceoperationresource- the child resource (not human readable, but the actual child resource name!)callback- the callback which gets the result of theread-children-resourceoperation asList<Property>
-
readChildren
public elemental2.promise.Promise<List<Property>> readChildren(ResourceAddress address, String resource)
-
readChildren
public void readChildren(ResourceAddress address, String resource, int depth, CrudOperations.ReadChildrenCallback callback)
Executes anModelDescriptionConstants.READ_CHILDREN_RESOURCES_OPERATIONon the specified address and passes the result asList<Property>to the specified callback.- Parameters:
address- the fq address for theread-children-resourceoperationresource- the child resource (not human readable, but the actual child resource name!)depth- the depth used for therecursive-depthparametercallback- the callback which gets the result of theread-children-resourceoperation asList<Property>
-
readChildren
public elemental2.promise.Promise<List<Property>> readChildren(ResourceAddress address, String resource, int depth)
-
readChildren
public void readChildren(AddressTemplate template, Iterable<String> resources, CrudOperations.ReadCompositeCallback callback)
Read multiple different child resources using a composite operation. The steps in the composite result map to the position of the resource in theresourcescollection.- Parameters:
template- the address template which is resolved against the current statement context to get the resource address for theread-children-resourceoperationresources- the child resources (not human readable, but the actual child resource name!)callback- the callback which gets the composite result
-
readChildren
public elemental2.promise.Promise<CompositeResult> readChildren(AddressTemplate template, Iterable<String> resources)
-
readChildren
public void readChildren(ResourceAddress address, Iterable<String> resources, CrudOperations.ReadCompositeCallback callback)
Read multiple different child resources using a composite operation. The steps in the composite result map to the position of the resource in theresourcescollection.- Parameters:
address- the fq address for theread-children-resourceoperationresources- the child resources (not human readable, but the actual child resource name!)callback- the callback which gets the composite result
-
readChildren
public elemental2.promise.Promise<CompositeResult> readChildren(ResourceAddress address, Iterable<String> resources)
-
readChildren
public void readChildren(ResourceAddress address, Iterable<String> resources, int depth, CrudOperations.ReadCompositeCallback callback)
Read multiple different child resources using a composite operation. The steps in the composite result map to the position of the resource in theresourcescollection.- Parameters:
address- the fq address for theread-children-resourceoperationresources- the child resources (not human readable, but the actual child resource name!)depth- the depth used for therecursive-depthparametercallback- the callback which gets the composite result
-
readChildren
public elemental2.promise.Promise<CompositeResult> readChildren(ResourceAddress address, Iterable<String> resources, int depth)
-
save
public void save(String type, String name, AddressTemplate template, Map<String,Object> changedValues, Callback successCallback)
Writes the changed values to the specified resource. After the resource has been saved a standard success message is fired and the specified callback is executed.If the change set is empty, a warning message is fired and the specified callback is executed.
- Parameters:
type- the human readable resource type used in the success messagename- the resource nametemplate- the address template which is resolved against the current statement context and the resource name to get the resource address for the operationchangedValues- the changed values / payload for the operationsuccessCallback- the callback executed after the resource has been saved
-
save
public void save(String name, AddressTemplate template, Map<String,Object> changedValues, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback successCallback)
Writes the changed values to the specified resource. After the resource has been saved the specified success message is fired and the specified callback is executed.If the change set is empty, a warning message is fired and the specified callback is executed.
- Parameters:
name- the resource nametemplate- the address template which is resolved against the current statement context and the resource name to get the resource address for the operationchangedValues- the changed values / payload for the operationsuccessMessage- the success message fired after saving the resourcesuccessCallback- the callback executed after the resource has been saved
-
save
public void save(String type, String name, ResourceAddress address, Map<String,Object> changedValues, Metadata metadata, Callback successCallback)
Writes the changed values to the specified resource. After the resource has been saved a standard success message is fired and the specified callback is executed.If the change set is empty, a warning message is fired and the specified callback is executed.
- Parameters:
type- the human readable resource type used in the success messagename- the resource nameaddress- the fq address for the operationchangedValues- the changed values / payload for the operationmetadata- the metadata of the attributes in the change setsuccessCallback- the callback executed after the resource has been saved
-
save
public void save(String type, String name, ResourceAddress address, Map<String,Object> changedValues, Metadata metadata, Callback successCallback, Callback errorCallback)
Writes the changed values to the specified resource. After the resource has been saved a standard success message is fired and the specified callback is executed.If the change set is empty, a warning message is fired and the specified callback is executed.
- Parameters:
type- the human readable resource type used in the success messagename- the resource nameaddress- the fq address for the operationchangedValues- the changed values / payload for the operationmetadata- the metadata of the attributes in the change setsuccessCallback- the callback executed after the resource has been savederrorCallback- the callback executed if the save operation fails
-
save
public void save(ResourceAddress address, Map<String,Object> changedValues, Metadata metadata, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback successCallback)
Writes the changed values to the specified resource. After the resource has been saved the specified success message is fired and the specified callback is executed.If the change set is empty, a warning message is fired and the specified callback is executed.
- Parameters:
address- the fq address for the operationchangedValues- the changed values / payload for the operationmetadata- the metadata of the attributes in the change setsuccessMessage- the success message fired after saving the resourcesuccessCallback- the callback executed after the resource has been saved
-
save
public void save(String type, String name, Composite operations, Callback successCallback)
Writes the changed values to the specified resource. After the resource has been saved a standard success message is fired and the specified callback is executed.If the composite operation is empty (i.e. there were no changes), a warning message is fired and the specified callback is executed.
- Parameters:
type- the human readable resource type used in the success messagename- the resource nameoperations- the composite operation to persist the changed valuessuccessCallback- the callback executed after the resource has been saved
-
save
public void save(Composite operations, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback successCallback)
Writes the changed values to the specified resource. After the resource has been saved the specified success message is fired and the specified successCallback is executed.If the composite operation is empty (i.e. there were no changes), a warning message is fired and the specified successCallback is executed.
- Parameters:
operations- the composite operation to persist the changed valuessuccessMessage- the success message fired after saving the resourcesuccessCallback- the callback executed after the resource has been saved
-
save
public void save(Composite operations, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback successCallback, Callback errorCallback)
Writes the changed values to the specified resource. After the resource has been saved the specified success message is fired and the specified successCallback is executed.If the composite operation is empty (i.e. there were no changes), a warning message is fired and the specified successCallback is executed.
- Parameters:
operations- the composite operation to persist the changed valuessuccessMessage- the success message fired after saving the resourcesuccessCallback- the callback executed after the resource has been savederrorCallback- the callback executed if the save operation fails
-
saveSingleton
public void saveSingleton(String type, AddressTemplate template, Map<String,Object> changedValues, Callback successCallback)
Writes the changed values to the specified singleton resource. After the resource has been saved a success message is fired and the specified callback is executed.- Parameters:
type- the human readable resource type used in the success messagetemplate- the address template which is resolved against the current statement context to get the resource address for the operationchangedValues- the changed values / payload for the operationsuccessCallback- the callback executed after the resource has been saved
-
saveSingleton
public void saveSingleton(AddressTemplate template, Map<String,Object> changedValues, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback successCallback)
Writes the changed values to the specified singleton resource. After the resource has been saved a success message is fired and the specified callback is executed.- Parameters:
template- the address template which is resolved against the current statement context to get the resource address for the operationchangedValues- the changed values / payload for the operationsuccessMessage- the success message fired after saving the resourcesuccessCallback- the callback executed after the resource has been saved
-
saveSingleton
public void saveSingleton(String type, ResourceAddress address, Map<String,Object> changedValues, Metadata metadata, Callback successCallback)
Writes the changed values to the specified singleton resource. After the resource has been saved a success message is fired and the specified callback is executed.- Parameters:
type- the human readable resource type used in the success messageaddress- the fq address for the operationchangedValues- the changed values / payload for the operationmetadata- the metadata of the attributes in the change setsuccessCallback- the callback executed after the resource has been saved
-
saveSingleton
public void saveSingleton(String type, ResourceAddress address, Map<String,Object> changedValues, Metadata metadata, Callback successCallback, Callback errorCallback)
Writes the changed values to the specified singleton resource. After the resource has been saved a success message is fired and the specified callback is executed.- Parameters:
type- the human readable resource type used in the success messageaddress- the fq address for the operationchangedValues- the changed values / payload for the operationmetadata- the metadata of the attributes in the change setsuccessCallback- the callback executed after the resource has been saved
-
saveSingleton
public void saveSingleton(ResourceAddress address, Map<String,Object> changedValues, Metadata metadata, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback successCallback, Callback errorCallback)
Writes the changed values to the specified singleton resource. After the resource has been saved a success message is fired and the specified callback is executed.- Parameters:
address- the fq address for the operationchangedValues- the changed values / payload for the operationmetadata- the metadata of the attributes in the change setsuccessMessage- the success message fired after saving the resourcesuccessCallback- the callback executed after the resource has been saved
-
saveSingleton
public void saveSingleton(ResourceAddress address, Map<String,Object> changedValues, Metadata metadata, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback successCallback)
Writes the changed values to the specified singleton resource. After the resource has been saved a success message is fired and the specified callback is executed.- Parameters:
address- the fq address for the operationchangedValues- the changed values / payload for the operationmetadata- the metadata of the attributes in the change setsuccessMessage- the success message fired after saving the resourcesuccessCallback- the callback executed after the resource has been saved
-
reset
public <T> void reset(String type, String name, AddressTemplate template, Form<T> form, Metadata metadata, Callback callback)
Undefines all non required attributes in the specified form. After the resource has been undefined a standard success message is fired and the specified callback is executed.If the form contains only required attributes, a warning message is fired and the specified callback is executed.
- Parameters:
type- the human readable resource type used in the success messagename- the resource nametemplate- the address template which is resolved against the current statement context and the resource name to get the resource address for the operationform- the form which should be resetmetadata- the metadata of the attributescallback- the callback executed after the resource has been undefined
-
reset
public <T> void reset(String type, String name, AddressTemplate template, Form<T> form, Metadata metadata, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback callback)
Undefines all non required attributes in the specified form. After the resource has been undefined the specified success message is fired and the specified callback is executed.If the form contains only required attributes, a warning message is fired and the specified callback is executed.
- Parameters:
type- the human readable resource type used in the success messagename- the resource nametemplate- the address template which is resolved against the current statement context and the resource name to get the resource address for the operationform- the form which should be resetmetadata- the metadata of the attributessuccessMessage- the success message fired after resetting the resourcecallback- the callback executed after the resource has been undefined
-
reset
public void reset(String type, String name, AddressTemplate template, Set<String> attributes, Metadata metadata, Callback callback)
Undefines all non required attributes in the specified set. After the resource has been undefined a standard success message is fired and the specified callback is executed.If the set contains only required attributes, a warning message is fired and the specified callback is executed.
- Parameters:
type- the human readable resource type used in the success messagename- the resource nametemplate- the address template which is resolved against the current statement context and the resource name to get the resource address for the operationattributes- the attributes which should be resetmetadata- the metadata of the attributescallback- the callback executed after the resource has been undefined
-
reset
public void reset(String type, String name, AddressTemplate template, Set<String> attributes, Metadata metadata, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback callback)
Undefines all non required attributes in the specified set. After the resource has been undefined the specified success message is fired and the specified callback is executed.If the set contains only required attributes, a warning message is fired and the specified callback is executed.
- Parameters:
type- the human readable resource type used in the success messagename- the resource nametemplate- the address template which is resolved against the current statement context and the resource name to get the resource address for the operationattributes- the attributes which should be resetmetadata- the metadata of the attributessuccessMessage- the success message fired after resetting the resourcecallback- the callback executed after the resource has been undefined
-
reset
public <T> void reset(String type, String name, ResourceAddress address, Form<T> form, Metadata metadata, Callback callback)
Undefines all non required attributes in the specified form. After the resource has been undefined a standard success message is fired and the specified callback is executed.If the form contains only required attributes, a warning message is fired and the specified callback is executed.
- Parameters:
type- the human readable resource type used in the success messagename- the resource nameaddress- the fq address for the operationform- the form which should be resetmetadata- the metadata of the attributescallback- the callback executed after the resource has been undefined
-
reset
public <T> void reset(String type, String name, ResourceAddress address, Form<T> form, Metadata metadata, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback callback)
Undefines all non required attributes in the specified form. After the resource has been undefined the specified success message is fired and the specified callback is executed.If the form contains only required attributes, a warning message is fired and the specified callback is executed.
- Parameters:
type- the human readable resource type used in the success messagename- the resource nameaddress- the fq address for the operationform- the from which should be resetmetadata- the metadata of the attributessuccessMessage- the success message fired after resetting the resourcecallback- the callback executed after the resource has been undefined
-
reset
public void reset(String type, String name, ResourceAddress address, Set<String> attributes, Metadata metadata, Callback callback)
Undefines all non required attributes in the specified set. After the resource has been undefined a standard success message is fired and the specified callback is executed.If the set contains only required attributes, a warning message is fired and the specified callback is executed.
- Parameters:
type- the human readable resource type used in the success messagename- the resource nameaddress- the fq address for the operationattributes- the attributes which should be resetmetadata- the metadata of the attributescallback- the callback executed after the resource has been undefined
-
reset
public void reset(String type, String name, ResourceAddress address, Set<String> attributes, Metadata metadata, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback callback)
Undefines all non required attributes in the specified set. After the resource has been undefined the specified success message is fired and the specified callback is executed.If the set contains only required attributes, a warning message is fired and the specified callback is executed.
- Parameters:
type- the human readable resource type used in the success messagename- the resource nameaddress- the fq address for the operationattributes- the attributes which should be resetmetadata- the metadata of the attributessuccessMessage- the success message fired after resetting the resourcecallback- the callback executed after the resource has been undefined
-
resetSingleton
public <T> void resetSingleton(String type, AddressTemplate template, Form<T> form, Metadata metadata, Callback callback)
Undefines all non required attributes in the specified form. After the singleton resource has been undefined a standard success message is fired and the specified callback is executed.If the set contains only required attributes, a warning message is fired and the specified callback is executed.
- Parameters:
type- the human readable resource type used in the success messagetemplate- the address template which is resolved against the current statement context and the resource name to get the resource address for the operationform- the form which should be resetmetadata- the metadata of the attributescallback- the callback executed after the resource has been undefined
-
resetSingleton
public <T> void resetSingleton(String type, AddressTemplate template, Form<T> form, Metadata metadata, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback callback)
Undefines all non required attributes in the specified form. After the singleton resource has been undefined the specified success message is fired and the specified callback is executed.If the set contains only required attributes, a warning message is fired and the specified callback is executed.
- Parameters:
type- the human readable resource type used in the success messagetemplate- the address template which is resolved against the current statement context and the resource name to get the resource address for the operationform- the form which should be resetmetadata- the metadata of the attributessuccessMessage- the success message fired after resetting the resourcecallback- the callback executed after the resource has been undefined
-
resetSingleton
public void resetSingleton(String type, AddressTemplate template, Set<String> attributes, Metadata metadata, Callback callback)
Undefines all non required attributes in the specified set. After the singleton resource has been undefined a standard success message is fired and the specified callback is executed.If the set contains only required attributes, a warning message is fired and the specified callback is executed.
- Parameters:
type- the human readable resource type used in the success messagetemplate- the address template which is resolved against the current statement context and the resource name to get the resource address for the operationattributes- the attributes which should be resetmetadata- the metadata of the attributescallback- the callback executed after the resource has been undefined
-
resetSingleton
public void resetSingleton(String type, AddressTemplate template, Set<String> attributes, Metadata metadata, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback callback)
Undefines all non required attributes in the specified set. After the singleton resource has been undefined the specified success message is fired and the specified callback is executed.If the set contains only required attributes, a warning message is fired and the specified callback is executed.
- Parameters:
type- the human readable resource type used in the success messagetemplate- the address template which is resolved against the current statement context and the resource name to get the resource address for the operationattributes- the attributes which should be resetmetadata- the metadata of the attributessuccessMessage- the success message fired after resetting the resourcecallback- the callback executed after the resource has been undefined
-
resetSingleton
public <T> void resetSingleton(String type, ResourceAddress address, Form<T> form, Metadata metadata, Callback callback)
Undefines all non required attributes in the specified form. After the singleton resource has been undefined a standard success message is fired and the specified callback is executed.If the set contains only required attributes, a warning message is fired and the specified callback is executed.
- Parameters:
type- the human readable resource type used in the success messageaddress- the fq address for the operationform- the form which should be resetmetadata- the metadata of the attributescallback- the callback executed after the resource has been undefined
-
resetSingleton
public <T> void resetSingleton(String type, ResourceAddress address, Form<T> form, Metadata metadata, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback callback)
Undefines all non required attributes in the specified form. After the singleton resource has been undefined the specified success message is fired and the specified callback is executed.If the set contains only required attributes, a warning message is fired and the specified callback is executed.
- Parameters:
type- the human readable resource type used in the success messageaddress- the fq address for the operationform- the form which should be resetmetadata- the metadata of the attributessuccessMessage- the success message fired after resetting the resourcecallback- the callback executed after the resource has been undefined
-
resetSingleton
public void resetSingleton(String type, ResourceAddress address, Set<String> attributes, Metadata metadata, Callback callback)
Undefines all non required attributes in the specified set. After the singleton resource has been undefined a standard success message is fired and the specified callback is executed.If the set contains only required attributes, a warning message is fired and the specified callback is executed.
- Parameters:
type- the human readable resource type used in the success messageaddress- the fq address for the operationattributes- the attributes which should be resetmetadata- the metadata of the attributescallback- the callback executed after the resource has been undefined
-
resetSingleton
public void resetSingleton(String type, ResourceAddress address, Set<String> attributes, Metadata metadata, com.google.gwt.safehtml.shared.SafeHtml successMessage, Callback callback)
Undefines all non required attributes in the specified set. After the singleton resource has been undefined the specified success message is fired and the specified callback is executed.If the set contains only required attributes, a warning message is fired and the specified callback is executed.
- Parameters:
type- the human readable resource type used in the success messageaddress- the fq address for the operationattributes- the attributes which should be resetmetadata- the metadata of the attributessuccessMessage- the success message fired after resetting the resourcecallback- the callback executed after the resource has been undefined
-
remove
public void remove(String type, String name, AddressTemplate template, Callback callback)
Shows a confirmation dialog and removes the resource if confirmed by the user. After the resource has been removed a success message is fired and the specified callback is executed.- Parameters:
type- the human readable resource type used in the success messagename- the resource nametemplate- the address template which is resolved against the current statement context and the resource name to get the resource address for theremoveoperationcallback- the callback executed after the resource has been removed
-
removeSingleton
public void removeSingleton(String type, AddressTemplate template, Callback callback)
Shows a confirmation dialog and removes the singleton resource if confirmed by the user. After the resource has been removed a success message is fired and the specified callback is executed.- Parameters:
type- the human readable resource type used in the success messagetemplate- the address template which is resolved against the current statement context to get the resource address for theremoveoperationcallback- the callback executed after the resource has been removed
-
remove
public void remove(String type, String name, ResourceAddress address, Callback callback)
Shows a confirmation dialog and removes the resource if confirmed by the user. After the resource has been removed a success message is fired and the specified callback is executed.- Parameters:
type- the human readable resource type used in the success messagename- the resource nameaddress- the fq address for theremoveoperationcallback- the callback executed after the resource has been removed
-
removeSingleton
public void removeSingleton(String type, ResourceAddress address, Callback callback)
Shows a confirmation dialog and removes the singleton resource if confirmed by the user. After the resource has been removed a success message is fired and the specified callback is executed.- Parameters:
type- the human readable resource type used in the success messageaddress- the fq address for theremoveoperationcallback- the callback executed after the resource has been removed
-
-