Package org.jboss.hal.core
Class OperationFactory
- java.lang.Object
-
- org.jboss.hal.core.OperationFactory
-
public class OperationFactory extends Object
-
-
Constructor Summary
Constructors Constructor Description OperationFactory()OperationFactory(Function<String,String> nameFn)Creates a new instance with the specified name function.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompositefromChangeSet(ResourceAddress address, Map<String,Object> changeSet, Metadata metadata)Turns a change-set into a composite operation containing write-attribute and undefine-attribute operations.
-
-
-
Constructor Detail
-
OperationFactory
public OperationFactory()
-
OperationFactory
public OperationFactory(Function<String,String> nameFn)
Creates a new instance with the specified name function. Use this constructor if you want to create change sets for complex attributes and need to adopt theNAMEparameters of the DMR operations.- Parameters:
nameFn- function which is applied to theNAMEparameter of the operations created by this class.
-
-
Method Detail
-
fromChangeSet
public Composite fromChangeSet(ResourceAddress address, Map<String,Object> changeSet, Metadata metadata)
Turns a change-set into a composite operation containing write-attribute and undefine-attribute operations.The composite operation will contain undefine-attribute operations which reflect the alternative attributes as defined in the specified metadata.
- Parameters:
address- the fq address used for the operationschangeSet- the changed valuesmetadata- the metadata which should contain the attribute definitions of the change-set
-
-