@Override public AliasEntry getAliasEntry() { return delegate.getAliasEntry(); } }
@Override public AliasEntry getAliasEntry() { return delegate.getAliasEntry(); } }
@Override public AliasEntry getAliasEntry() { return delegate.getAliasEntry(); }
@Override public AliasEntry getAliasEntry() { return delegate.getAliasEntry(); }
private ImmutableManagementResourceRegistration getResourceRegistrationCheckForAlias(OperationContext context, PathAddress opAddr, ReadResourceDescriptionAccessControlContext accessControlContext) { //The direct root registration is only needed if we are doing access-control=true final ImmutableManagementResourceRegistration root = context.getRootResourceRegistration(); final ImmutableManagementResourceRegistration registry = root.getSubModel(opAddr); AliasEntry aliasEntry = registry.getAliasEntry(); if (aliasEntry == null) { return registry; } //Get hold of the real registry if it was an alias return root.getSubModel(aliasEntry.convertToTargetAddress(opAddr)); }
private ImmutableManagementResourceRegistration getResourceRegistrationCheckForAlias(OperationContext context, PathAddress opAddr) { //The direct root registration is only needed if we are doing access-control=true final ImmutableManagementResourceRegistration root = context.getRootResourceRegistration(); final ImmutableManagementResourceRegistration registry = root.getSubModel(opAddr); AliasEntry aliasEntry = registry.getAliasEntry(); if (aliasEntry == null) { return registry; } //Get hold of the real registry if it was an alias PathAddress realAddress = aliasEntry.convertToTargetAddress(opAddr, AliasEntry.AliasContext.create(opAddr, context)); assert !realAddress.equals(opAddr) : "Alias was not translated"; return root.getSubModel(realAddress); }
private ImmutableManagementResourceRegistration getResourceRegistrationCheckForAlias(OperationContext context, PathAddress opAddr, ReadResourceDescriptionAccessControlContext accessControlContext) { //The direct root registration is only needed if we are doing access-control=true final ImmutableManagementResourceRegistration root = context.getRootResourceRegistration(); final ImmutableManagementResourceRegistration registry = root.getSubModel(opAddr); AliasEntry aliasEntry = registry.getAliasEntry(); if (aliasEntry == null) { return registry; } //Get hold of the real registry if it was an alias PathAddress realAddress = aliasEntry.convertToTargetAddress(opAddr, AliasEntry.AliasContext.create(opAddr, context)); assert !realAddress.equals(opAddr) : "Alias was not translated"; return root.getSubModel(realAddress); }
private ImmutableManagementResourceRegistration getResourceRegistrationCheckForAlias(OperationContext context, PathAddress opAddr, ReadResourceDescriptionAccessControlContext accessControlContext) { //The direct root registration is only needed if we are doing access-control=true final ImmutableManagementResourceRegistration root = context.getRootResourceRegistration(); final ImmutableManagementResourceRegistration registry = root.getSubModel(opAddr); AliasEntry aliasEntry = registry.getAliasEntry(); if (aliasEntry == null) { return registry; } //Get hold of the real registry if it was an alias PathAddress realAddress = aliasEntry.convertToTargetAddress(opAddr, AliasEntry.AliasContext.create(opAddr, context)); assert !realAddress.equals(opAddr) : "Alias was not translated"; return root.getSubModel(realAddress); }
private ImmutableManagementResourceRegistration getResourceRegistrationCheckForAlias(OperationContext context, PathAddress opAddr) { //The direct root registration is only needed if we are doing access-control=true final ImmutableManagementResourceRegistration root = context.getRootResourceRegistration(); final ImmutableManagementResourceRegistration registry = root.getSubModel(opAddr); AliasEntry aliasEntry = registry.getAliasEntry(); if (aliasEntry == null) { return registry; } //Get hold of the real registry if it was an alias PathAddress realAddress = aliasEntry.convertToTargetAddress(opAddr, AliasEntry.AliasContext.create(opAddr, context)); assert !realAddress.equals(opAddr) : "Alias was not translated"; return root.getSubModel(realAddress); }
final AliasEntry aliasEntry = childRegistration.getAliasEntry();
AliasEntry aliasEntry = childRegistration.getAliasEntry(); if (aliasEntry != null) { PathAddress childAddr = addr.append(path);
AliasEntry aliasEntry = childRegistration.getAliasEntry(); if (aliasEntry != null) { PathAddress childAddr = addr.append(path);
AliasEntry aliasEntry = registry.getAliasEntry(); final ImmutableManagementResourceRegistration realRegistry = aliasEntry == null ? registry : context.getRootResourceRegistration().getSubModel(aliasEntry.convertToTargetAddress(PathAddress.pathAddress(opAddr)));
final PathAddress useAddress; if (reg != null && reg.isAlias()) { useAddress = reg.getAliasEntry().convertToTargetAddress(stepAddress, AliasEntry.AliasContext.create(step, context)); } else { useAddress = stepAddress;
final PathAddress useAddress; if (reg != null && reg.isAlias()) { useAddress = reg.getAliasEntry().convertToTargetAddress(stepAddress, AliasEntry.AliasContext.create(step, context)); } else { useAddress = stepAddress;
final AliasEntry aliasEntry = childRegistration.getAliasEntry();
@Override public OperationTransformer.TransformedOperation transformOperation(final TransformationContext context, final ModelNode operation) throws OperationFailedException { final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR)); //If this is an alias, get the real address before transforming ImmutableManagementResourceRegistration reg = context.getResourceRegistration(address); final PathAddress useAddress; if (reg != null && reg.isAlias()) { useAddress = reg.getAliasEntry().convertToTargetAddress(address, AliasEntry.AliasContext.create(operation, context)); } else { useAddress = address; } final String operationName = operation.require(OP).asString(); TransformationContext opCtx = ResourceTransformationContextImpl.wrapForOperation(context, operation); final OperationTransformer transformer = target.resolveTransformer(opCtx, useAddress, operationName); if (transformer == null) { ControllerLogger.ROOT_LOGGER.tracef("operation %s does not need transformation", operation); return new OperationTransformer.TransformedOperation(operation, OperationResultTransformer.ORIGINAL_RESULT); } // Transform the path address final PathAddress transformed = transformAddress(useAddress, target); // Update the operation using the new path address operation.get(OP_ADDR).set(transformed.toModelNode()); // TODO should this happen by default? OperationTransformer.TransformedOperation res = transformer.transformOperation(opCtx, transformed, operation); context.getLogger().flushLogQueue(); return res; }
@Override public OperationTransformer.TransformedOperation transformOperation(final TransformationContext context, final ModelNode operation) throws OperationFailedException { final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR)); //If this is an alias, get the real address before transforming ImmutableManagementResourceRegistration reg = context.getResourceRegistration(address); final PathAddress useAddress; if (reg != null && reg.isAlias()) { useAddress = reg.getAliasEntry().convertToTargetAddress(address, AliasEntry.AliasContext.create(operation, context)); } else { useAddress = address; } final String operationName = operation.require(OP).asString(); TransformationContext opCtx = ResourceTransformationContextImpl.wrapForOperation(context, operation); final OperationTransformer transformer = target.resolveTransformer(opCtx, useAddress, operationName); if (transformer == null) { ControllerLogger.ROOT_LOGGER.tracef("operation %s does not need transformation", operation); return new OperationTransformer.TransformedOperation(operation, OperationResultTransformer.ORIGINAL_RESULT); } // Transform the path address final PathAddress transformed = transformAddress(useAddress, target); // Update the operation using the new path address operation.get(OP_ADDR).set(transformed.toModelNode()); // TODO should this happen by default? OperationTransformer.TransformedOperation res = transformer.transformOperation(opCtx, transformed, operation); context.getLogger().flushLogQueue(); return res; }
@Override public OperationTransformer.TransformedOperation transformOperation(final TransformationInputs transformationInputs, final ModelNode operation) throws OperationFailedException { final PathAddress original = PathAddress.pathAddress(operation.require(OP_ADDR)); //If this is an alias, get the real address before transforming ImmutableManagementResourceRegistration reg = transformationInputs.getRootRegistration().getSubModel(original); final PathAddress useAddress; if (reg != null && reg.isAlias()) { useAddress = reg.getAliasEntry().convertToTargetAddress(original, AliasEntry.AliasContext.create(operation, transformationInputs)); } else { useAddress = original; } final String operationName = operation.require(OP).asString(); // Transform the path address final PathAddress transformed = transformAddress(useAddress, target); // Update the operation using the new path address operation.get(OP_ADDR).set(transformed.toModelNode()); // TODO should this happen by default? final TransformationContext context = ResourceTransformationContextImpl.create(transformationInputs, target, transformed, original, Transformers.DEFAULT); final OperationTransformer transformer = target.resolveTransformer(context, useAddress, operationName); if (transformer == null) { ControllerLogger.ROOT_LOGGER.tracef("operation %s does not need transformation", operation); return new OperationTransformer.TransformedOperation(operation, OperationResultTransformer.ORIGINAL_RESULT); } final OperationTransformer.TransformedOperation op = transformer.transformOperation(context, transformed, operation); context.getLogger().flushLogQueue(); return op; }
@Override public OperationTransformer.TransformedOperation transformOperation(final TransformationInputs transformationInputs, final ModelNode operation) throws OperationFailedException { final PathAddress original = PathAddress.pathAddress(operation.require(OP_ADDR)); //If this is an alias, get the real address before transforming ImmutableManagementResourceRegistration reg = transformationInputs.getRootRegistration().getSubModel(original); final PathAddress useAddress; if (reg != null && reg.isAlias()) { useAddress = reg.getAliasEntry().convertToTargetAddress(original, AliasEntry.AliasContext.create(operation, transformationInputs)); } else { useAddress = original; } final String operationName = operation.require(OP).asString(); // Transform the path address final PathAddress transformed = transformAddress(useAddress, target); // Update the operation using the new path address operation.get(OP_ADDR).set(transformed.toModelNode()); // TODO should this happen by default? final TransformationContext context = ResourceTransformationContextImpl.create(transformationInputs, target, transformed, original, Transformers.DEFAULT); final OperationTransformer transformer = target.resolveTransformer(context, useAddress, operationName); if (transformer == null) { ControllerLogger.ROOT_LOGGER.tracef("operation %s does not need transformation", operation); return new OperationTransformer.TransformedOperation(operation, OperationResultTransformer.ORIGINAL_RESULT); } final OperationTransformer.TransformedOperation op = transformer.transformOperation(context, transformed, operation); context.getLogger().flushLogQueue(); return op; }