@Override protected ModelNode rollback(String streamName, String patchId, ContentPolicyBuilderImpl builder, boolean rollbackTo, boolean resetConfiguration) throws PatchingException { final ModelNode operation = createOperation(Constants.ROLLBACK, address.toModelNode(), builder); operation.get(Constants.PATCH_ID).set(patchId); operation.get(Constants.RESET_CONFIGURATION).set(resetConfiguration); operation.get(Constants.ROLLBACK_TO).set(rollbackTo); if(streamName != null) { operation.get(ModelDescriptionConstants.OP_ADDR).add(Constants.PATCH_STREAM, streamName); } return executeOp(operation); }
@Override protected ModelNode rollback(String streamName, String patchId, ContentPolicyBuilderImpl builder, boolean rollbackTo, boolean resetConfiguration) throws PatchingException { final ModelNode operation = createOperation(Constants.ROLLBACK, address.toModelNode(), builder); operation.get(Constants.PATCH_ID).set(patchId); operation.get(Constants.RESET_CONFIGURATION).set(resetConfiguration); operation.get(Constants.ROLLBACK_TO).set(rollbackTo); if(streamName != null) { operation.get(ModelDescriptionConstants.OP_ADDR).add(Constants.PATCH_STREAM, streamName); } return executeOp(operation); }
@Override protected ModelNode rollbackLast(String streamName, ContentPolicyBuilderImpl builder, boolean restoreConfiguration) throws PatchingException { final ModelNode operation = createOperation(Constants.ROLLBACK_LAST, address.toModelNode(), builder); operation.get(Constants.RESET_CONFIGURATION).set(restoreConfiguration); if(streamName != null) { operation.get(ModelDescriptionConstants.OP_ADDR).add(Constants.PATCH_STREAM, streamName); } return executeOp(operation); }
@Override protected ModelNode rollbackLast(String streamName, ContentPolicyBuilderImpl builder, boolean restoreConfiguration) throws PatchingException { final ModelNode operation = createOperation(Constants.ROLLBACK_LAST, address.toModelNode(), builder); operation.get(Constants.RESET_CONFIGURATION).set(restoreConfiguration); if(streamName != null) { operation.get(ModelDescriptionConstants.OP_ADDR).add(Constants.PATCH_STREAM, streamName); } return executeOp(operation); }
@Override protected ModelNode applyPatch(final File file, final ContentPolicyBuilderImpl policyBuilder) throws PatchingException { final ModelNode operation = createOperation(Constants.PATCH, address.toModelNode(), policyBuilder); operation.get(INPUT_STREAM_INDEX).set(0); final OperationBuilder operationBuilder = OperationBuilder.create(operation); operationBuilder.addFileAsAttachment(file); return executeOp(operationBuilder.build()); }
@Override protected ModelNode applyPatch(final File file, final ContentPolicyBuilderImpl policyBuilder) throws PatchingException { final ModelNode operation = createOperation(Constants.PATCH, address.toModelNode(), policyBuilder); operation.get(INPUT_STREAM_INDEX).set(0); final OperationBuilder operationBuilder = OperationBuilder.create(operation); operationBuilder.addFileAsAttachment(file); return executeOp(operationBuilder.build()); }