@Override protected ModelNode streams() throws PatchingException { final ModelNode operation = new ModelNode(); operation.get(ModelDescriptionConstants.OP_ADDR).set(address.toModelNode()); operation.get(ModelDescriptionConstants.OP).set(ModelDescriptionConstants.READ_CHILDREN_NAMES_OPERATION); operation.get(ModelDescriptionConstants.CHILD_TYPE).set(Constants.PATCH_STREAM); return executeOp(operation); }
@Override protected ModelNode info(String streamName) throws PatchingException { final ModelNode operation = new ModelNode(); operation.get(ModelDescriptionConstants.OP).set(Constants.PATCH_INFO); operation.get(ModelDescriptionConstants.OP_ADDR).set(address.toModelNode()); if(streamName != null) { operation.get(ModelDescriptionConstants.OP_ADDR).add(Constants.PATCH_STREAM, streamName); } operation.get(Constants.VERBOSE).set(true); return executeOp(operation); }
@Override protected ModelNode info(String streamName) throws PatchingException { final ModelNode operation = new ModelNode(); operation.get(ModelDescriptionConstants.OP).set(Constants.PATCH_INFO); operation.get(ModelDescriptionConstants.OP_ADDR).set(address.toModelNode()); if(streamName != null) { operation.get(ModelDescriptionConstants.OP_ADDR).add(Constants.PATCH_STREAM, streamName); } operation.get(Constants.VERBOSE).set(true); return executeOp(operation); }
@Override protected ModelNode info(String streamName, String patchId, boolean verbose) throws PatchingException { final ModelNode operation = new ModelNode(); operation.get(ModelDescriptionConstants.OP).set(Constants.PATCH_INFO); operation.get(ModelDescriptionConstants.OP_ADDR).set(address.toModelNode()); operation.get(Constants.PATCH_ID).set(patchId); if(streamName != null) { operation.get(ModelDescriptionConstants.OP_ADDR).add(Constants.PATCH_STREAM, streamName); } if(verbose) { operation.get(Constants.VERBOSE).set(true); } return executeOp(operation); }
@Override protected ModelNode history(String streamName, boolean excludeAgedOut) throws PatchingException { final ModelNode operation = new ModelNode(); operation.get(OP).set(Constants.SHOW_HISTORY); operation.get(OP_ADDR).set(address.toModelNode()); if(streamName != null) { operation.get(ModelDescriptionConstants.OP_ADDR).add(Constants.PATCH_STREAM, streamName); } if(excludeAgedOut) { operation.get(Constants.EXCLUDE_AGED_OUT).set(true); } return executeOp(operation); }
@Override protected ModelNode info(String streamName, String patchId, boolean verbose) throws PatchingException { final ModelNode operation = new ModelNode(); operation.get(ModelDescriptionConstants.OP).set(Constants.PATCH_INFO); operation.get(ModelDescriptionConstants.OP_ADDR).set(address.toModelNode()); operation.get(Constants.PATCH_ID).set(patchId); if(streamName != null) { operation.get(ModelDescriptionConstants.OP_ADDR).add(Constants.PATCH_STREAM, streamName); } if(verbose) { operation.get(Constants.VERBOSE).set(true); } 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 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 streams() throws PatchingException { final ModelNode operation = new ModelNode(); operation.get(ModelDescriptionConstants.OP_ADDR).set(address.toModelNode()); operation.get(ModelDescriptionConstants.OP).set(ModelDescriptionConstants.READ_CHILDREN_NAMES_OPERATION); operation.get(ModelDescriptionConstants.CHILD_TYPE).set(Constants.PATCH_STREAM); return executeOp(operation); }
@Override protected ModelNode history(String streamName, boolean excludeAgedOut) throws PatchingException { final ModelNode operation = new ModelNode(); operation.get(OP).set(Constants.SHOW_HISTORY); operation.get(OP_ADDR).set(address.toModelNode()); if(streamName != null) { operation.get(ModelDescriptionConstants.OP_ADDR).add(Constants.PATCH_STREAM, streamName); } if(excludeAgedOut) { operation.get(Constants.EXCLUDE_AGED_OUT).set(true); } 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 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 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()); }