本文整理了Java中org.jboss.as.controller.operations.common.Util.createRemoveOperation()
方法的一些代码示例,展示了Util.createRemoveOperation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.createRemoveOperation()
方法的具体详情如下:
包路径:org.jboss.as.controller.operations.common.Util
类名称:Util
方法名:createRemoveOperation
暂无
代码示例来源:origin: wildfly/wildfly
private void removeJacorbSubsystem(final PathAddress address, final Map<PathAddress, ModelNode> migrateOperations, boolean standalone) {
ModelNode removeLegacySubsystemOperation = Util.createRemoveOperation(address);
migrateOperations.put(address, removeLegacySubsystemOperation);
if(standalone) {
removeLegacySubsystemOperation = createRemoveOperation(JACORB_EXTENSION);
migrateOperations.put(JACORB_EXTENSION, removeLegacySubsystemOperation);
}
}
代码示例来源:origin: wildfly/wildfly
/**
* {@inheritDoc}
*/
@Override
public TransformedOperation transformOperation(TransformationContext context, PathAddress address, ModelNode operation) {
ModelNode legacyOperation = Util.createRemoveOperation(this.addressTransformer.transform(address));
return new TransformedOperation(legacyOperation, OperationResultTransformer.ORIGINAL_RESULT);
}
}
代码示例来源:origin: wildfly/wildfly
protected static ModelNode getTransportRemoveOperation(String stackName, String type) {
return Util.createRemoveOperation(getTransportAddress(stackName, type));
}
代码示例来源:origin: wildfly/wildfly
protected static ModelNode getLegacyTransportRemoveOperation(String stackName) {
return Util.createRemoveOperation(getLegacyTransportAddress(stackName));
}
代码示例来源:origin: wildfly/wildfly
protected static ModelNode getTransportPropertyRemoveOperation(String stackName, String type, String propertyName) {
return Util.createRemoveOperation(getTransportPropertyAddress(stackName, type, propertyName));
}
代码示例来源:origin: wildfly/wildfly
protected static ModelNode getProtocolRemoveOperation(String stackName, String type) {
return Util.createRemoveOperation(getProtocolAddress(stackName, type));
}
代码示例来源:origin: wildfly/wildfly
protected static ModelNode getSubsystemRemoveOperation() {
return Util.createRemoveOperation(getSubsystemAddress());
}
代码示例来源:origin: wildfly/wildfly
protected static ModelNode getProtocolStackRemoveOperation(String stackName) {
return Util.createRemoveOperation(getProtocolStackAddress(stackName));
}
代码示例来源:origin: wildfly/wildfly
protected static ModelNode getProtocolPropertyRemoveOperation(String stackName, String protocolName, String propertyName) {
return Util.createRemoveOperation(getProtocolPropertyAddress(stackName, protocolName, propertyName));
}
代码示例来源:origin: wildfly/wildfly
@Override
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
Resource existing = context.readResource(PathAddress.EMPTY_ADDRESS);
OperationStepHandler addHandler = context.getResourceRegistration().getSubModel(PathAddress.EMPTY_ADDRESS.append(newKeyName)).getOperationHandler(PathAddress.EMPTY_ADDRESS, "add");
ModelNode value = operation.get(VALUE);
if (value.isDefined()) {
List<ModelNode> modules = new ArrayList<ModelNode>(value.asList());
Collections.reverse(modules); //need to reverse it to make sure they are added in proper order
for (ModelNode module : modules) {
ModelNode addModuleOp = module.clone();
String code = addModuleOp.get(Constants.CODE).asString();
PathElement relativePath = PathElement.pathElement(newKeyName, code);
PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)).append(relativePath);
addModuleOp.get(OP_ADDR).set(address.toModelNode());
addModuleOp.get(OP).set(ADD);
context.addStep(new ModelNode(), addModuleOp, addHandler, OperationContext.Stage.MODEL, true);
}
}
//remove on the end to make sure it is executed first
for (Resource.ResourceEntry entry : existing.getChildren(newKeyName)) {
PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)).append(entry.getPathElement());
ModelNode removeModuleOp = Util.createRemoveOperation(address);
context.addStep(new ModelNode(), removeModuleOp, new SecurityDomainReloadRemoveHandler(), OperationContext.Stage.MODEL, true);
}
}
}
代码示例来源:origin: wildfly/wildfly
@Override
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
Resource existing = context.readResource(PathAddress.EMPTY_ADDRESS);
OperationStepHandler addHandler = context.getResourceRegistration().getSubModel(PathAddress.EMPTY_ADDRESS.append(newKeyName)).getOperationHandler(PathAddress.EMPTY_ADDRESS, "add");
oldAttribute.validateOperation(operation);
List<ModelNode> modules = new ArrayList<ModelNode>(operation.get(oldAttribute.getName()).asList());
Collections.reverse(modules); //need to reverse it to make sure they are added in proper order
for (ModelNode module : modules) {
ModelNode addModuleOp = module.clone();
String code = addModuleOp.get(Constants.CODE).asString();
PathElement relativePath = PathElement.pathElement(newKeyName, code);
PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)).append(relativePath);
addModuleOp.get(OP_ADDR).set(address.toModelNode());
addModuleOp.get(OP).set(ADD);
context.addStep(new ModelNode(), addModuleOp, addHandler, OperationContext.Stage.MODEL, true);
}
//remove on the end to make sure it is executed first
for (Resource.ResourceEntry entry : existing.getChildren(newKeyName)) {
PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)).append(entry.getPathElement());
ModelNode removeModuleOp = Util.createRemoveOperation(address);
context.addStep(new ModelNode(), removeModuleOp, new SecurityDomainReloadRemoveHandler(), OperationContext.Stage.MODEL, true);
}
}
}
代码示例来源:origin: wildfly/wildfly
@Override
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
operationDeprecated(context, operation);
PathAddress address = translateProxyPath(context);
String type = operation.require(CustomLoadMetricResourceDefinition.Attribute.CLASS.getName()).asString();
PathAddress metricPath = PathAddress.pathAddress(DynamicLoadProviderResourceDefinition.LEGACY_PATH, LoadMetricResourceDefinition.pathElement(type));
PathAddress metricPathAddress = address.append(metricPath);
ModelNode metricOperation = Util.createRemoveOperation(metricPathAddress);
OperationEntry removeOperationEntry = context.getResourceRegistration().getOperationEntry(PathAddress.pathAddress(metricPath), ModelDescriptionConstants.REMOVE);
context.addStep(metricOperation, removeOperationEntry.getOperationHandler(), OperationContext.Stage.MODEL, true);
}
};
代码示例来源:origin: wildfly/wildfly
@Override
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
operationDeprecated(context, operation);
PathAddress address = translateProxyPath(context);
String type = operation.require(LoadMetricResourceDefinition.Attribute.TYPE.getName()).asString();
PathAddress metricPath = PathAddress.pathAddress(DynamicLoadProviderResourceDefinition.LEGACY_PATH, LoadMetricResourceDefinition.pathElement(type));
PathAddress metricPathAddress = address.append(metricPath);
ModelNode metricOperation = Util.createRemoveOperation(metricPathAddress);
OperationEntry removeOperationEntry = context.getResourceRegistration().getOperationEntry(PathAddress.pathAddress(metricPath), ModelDescriptionConstants.REMOVE);
context.addStep(metricOperation, removeOperationEntry.getOperationHandler(), OperationContext.Stage.MODEL, true);
}
};
代码示例来源:origin: wildfly/wildfly
@Override
public void execute(OperationContext context, ModelNode operation) {
operationDeprecated(context, operation);
PathAddress address = context.getCurrentAddress();
String protocol = operation.require(AbstractProtocolResourceDefinition.DeprecatedAttribute.TYPE.getName()).asString();
PathElement protocolPath = ProtocolResourceDefinition.pathElement(protocol);
PathAddress protocolAddress = address.append(protocolPath);
ModelNode removeOperation = Util.createRemoveOperation(protocolAddress);
context.addStep(removeOperation, context.getResourceRegistration().getOperationHandler(PathAddress.pathAddress(protocolPath), ModelDescriptionConstants.REMOVE), context.getCurrentStage());
}
};
代码示例来源:origin: wildfly/wildfly
ModelNode removeOperation = Util.createRemoveOperation(legacyAddress.append(PathElement.pathElement(PROPERTY, prop.getKey())));
operations.add(removeOperation);
代码示例来源:origin: wildfly/wildfly
if (context.readResourceFromRoot(parentAddress, false).hasChild(path)) {
context.addStep(Util.createRemoveOperation(address), context.getRootResourceRegistration().getOperationHandler(address, ModelDescriptionConstants.REMOVE), OperationContext.Stage.MODEL);
context.addStep(operation, this, OperationContext.Stage.MODEL);
return;
context.addStep(Util.createRemoveOperation(singletonAddress), context.getRootResourceRegistration().getOperationHandler(singletonAddress, ModelDescriptionConstants.REMOVE), OperationContext.Stage.MODEL);
代码示例来源:origin: wildfly/wildfly
ModelNode remove = Util.createRemoveOperation(stackAddress.append(ProtocolResourceDefinition.pathElement("FD")));
ModelTestUtils.checkOutcome(services.executeOperation(remove));
add = Operations.createAddOperation(stackAddress.append(ProtocolResourceDefinition.pathElement("FD")), 3); //The original index of the FD protocol
代码示例来源:origin: org.jboss.eap/wildfly-clustering-common
/**
* {@inheritDoc}
*/
@Override
public TransformedOperation transformOperation(TransformationContext context, PathAddress address, ModelNode operation) {
ModelNode legacyOperation = Util.createRemoveOperation(this.addressTransformer.transform(address));
return new TransformedOperation(legacyOperation, OperationResultTransformer.ORIGINAL_RESULT);
}
}
代码示例来源:origin: org.jboss.migration/jboss-server-migration-wildfly10.0
@Override
public void removeResource() throws ManagementOperationException {
if (isExistentResource()) {
final PathAddress address = getResourcePathAddress();
final ModelNode op = Util.createRemoveOperation(address);
serverConfiguration.executeManagementOperation(op);
}
}
代码示例来源:origin: org.jboss.eap/wildfly-mod_cluster-extension
@Override
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
operationDeprecated(context, operation);
PathAddress address = translateProxyPath(context);
String type = operation.require(LoadMetricResourceDefinition.Attribute.TYPE.getName()).asString();
PathAddress metricPath = PathAddress.pathAddress(DynamicLoadProviderResourceDefinition.LEGACY_PATH, LoadMetricResourceDefinition.pathElement(type));
PathAddress metricPathAddress = address.append(metricPath);
ModelNode metricOperation = Util.createRemoveOperation(metricPathAddress);
OperationEntry removeOperationEntry = context.getResourceRegistration().getOperationEntry(PathAddress.pathAddress(metricPath), ModelDescriptionConstants.REMOVE);
context.addStep(metricOperation, removeOperationEntry.getOperationHandler(), OperationContext.Stage.MODEL, true);
}
};
内容来源于网络,如有侵权,请联系作者删除!