public class PropertiesOperations extends Object
{
"top-level-attribute" => undefined,
"property" => {
"foo" => {"value" => "bar"},
"baz" => {"value" => "qux"}
}
}
where "property" is the properties sub resource (PSR). Each property has its onw resource with the name as
key and the "value" string node as value.
This class mirrors some of the methods from CrudOperations to save these resources together with its
properties (if modified):
| Constructor and Description |
|---|
PropertiesOperations(com.google.web.bindery.event.shared.EventBus eventBus,
Dispatcher dispatcher,
MetadataProcessor metadataProcessor,
javax.inject.Provider<Progress> progress,
StatementContext statementContext,
Resources resources) |
| Modifier and Type | Method and Description |
|---|---|
void |
saveSingletonWithProperties(String type,
ResourceAddress address,
Map<String,Object> changedValues,
Metadata metadata,
String psr,
Map<String,String> properties,
Callback callback)
Saves the changed values and its properties (if modified) to the specified resource.
|
void |
saveWithProperties(String type,
String name,
AddressTemplate template,
Map<String,Object> changedValues,
String psr,
Map<String,String> properties,
Callback callback)
Saves the changed values and its properties (if modified) to the specified resource.
|
void |
saveWithProperties(String type,
String name,
ResourceAddress address,
Composite operations,
String psr,
Map<String,String> properties,
Callback callback)
Saves the changed values and its properties (if modified) to the specified resource.
|
void |
saveWithProperties(String type,
String name,
ResourceAddress address,
Map<String,Object> changedValues,
Metadata metadata,
String psr,
Map<String,String> properties,
Callback callback)
Saves the changed values and its properties (if modified) to the specified resource.
|
@Inject
public PropertiesOperations(com.google.web.bindery.event.shared.EventBus eventBus,
Dispatcher dispatcher,
MetadataProcessor metadataProcessor,
@Footer
javax.inject.Provider<Progress> progress,
StatementContext statementContext,
Resources resources)
public void saveWithProperties(String type, String name, AddressTemplate template, Map<String,Object> changedValues, String psr, Map<String,String> properties, Callback callback)
This is the properties-extended version of CrudOperations.save(String, String, AddressTemplate, Map,
Callback):
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 operationpsr - the name of the properties sub resource (PSR) - most often this is "property"properties - the properties to savecallback - the callback executed after saving the resourcepublic void saveWithProperties(String type, String name, ResourceAddress address, Map<String,Object> changedValues, Metadata metadata, String psr, Map<String,String> properties, Callback callback)
This is the properties-extended version of CrudOperations.save(String, String, AddressTemplate, Map,
Callback):
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 for the of the attributes in the change setpsr - the name of the properties sub resource (PSR) - most often this is "property"properties - the properties to savecallback - the callback executed after saving the resourcepublic void saveWithProperties(String type, String name, ResourceAddress address, Composite operations, String psr, Map<String,String> properties, Callback callback)
This is the properties-extended version of CrudOperations.save(String, String, Composite, Callback):
type - the human readable resource type used in the success messagename - the resource nameaddress - the fq address for the operationoperations - the composite operation to persist the changed valuespsr - the name of the properties sub resource (PSR) - most often this is "property"properties - the properties to savecallback - the callback executed after saving the resourcepublic void saveSingletonWithProperties(String type, ResourceAddress address, Map<String,Object> changedValues, Metadata metadata, String psr, Map<String,String> properties, Callback callback)
This is the properties-extended version of CrudOperations.saveSingleton(String, AddressTemplate, Map,
Callback):
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 for the of the attributes in the change setpsr - the name of the properties sub resource (PSR) - most often this is "property"properties - the properties to savecallback - the callback executed after saving the resourceCopyright © 2018 JBoss, a division of Red Hat. All rights reserved.