String operationName = Operations.getName(step); PathAddress operationAddress = Operations.getPathAddress(step); if (operationName.equals(originalName) && operationAddress.equals(originalAddress)) { operation = step; break; String operationName = Operations.getName(step); PathAddress operationAddress = Operations.getPathAddress(step); if (operationName.equals(originalName) && operationAddress.equals(originalAddress)) { break;
@Override public ServiceConfigurator configure(OperationContext context, ModelNode model) throws OperationFailedException { Resource resource = context.getCurrentAddress().equals(this.address) ? context.readResourceFromRoot(this.address, false) : PlaceholderResource.INSTANCE; Set<Resource.ResourceEntry> entries = resource.getChildren(ProtocolResourceDefinition.WILDCARD_PATH.getKey()); this.protocols = new ArrayList<>(entries.size()); for (Resource.ResourceEntry entry : entries) { this.protocols.add(new ServiceSupplierDependency<>(new ProtocolServiceNameProvider(this.address, entry.getPathElement()))); } String channelName = this.address.getParent().getLastElement().getValue(); this.parentChannel = new ServiceSupplierDependency<>(JGroupsRequirement.CHANNEL.getServiceName(context, channelName)); this.parentFactory = new ServiceSupplierDependency<>(JGroupsRequirement.CHANNEL_SOURCE.getServiceName(context, channelName)); return this; } }
/** * Determine whether this object is equal to another. * * @param other the other object * @return {@code true} if they are equal, {@code false} otherwise */ @Override public boolean equals(Object other) { return other instanceof PathAddress && equals((PathAddress) other); }
@Override public boolean equals(Object obj) { return obj != null && obj instanceof AccessConstraintUtilizationImpl && pathAddress.equals(((AccessConstraintUtilizationImpl) obj).pathAddress); }
@Override public boolean equals(Object obj) { return obj != null && obj instanceof AccessConstraintUtilizationImpl && pathAddress.equals(((AccessConstraintUtilizationImpl) obj).pathAddress); }
/** * Determine whether this object is equal to another. * * @param other the other object * @return {@code true} if they are equal, {@code false} otherwise */ @Override public boolean equals(Object other) { return other instanceof PathAddress && equals((PathAddress) other); }
@Override public boolean equals(Object obj) { return obj != null && obj instanceof AccessConstraintUtilizationImpl && pathAddress.equals(((AccessConstraintUtilizationImpl) obj).pathAddress); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } TransformRule that = (TransformRule) o; if (sourceAddress != null ? !sourceAddress.equals(that.sourceAddress) : that.sourceAddress != null) { return false; } if (sourceName != null ? !sourceName.equals(that.sourceName) : that.sourceName != null) { return false; } if (targetAddress != null ? !targetAddress.equals(that.targetAddress) : that.targetAddress != null) { return false; } if (targetName != null ? !targetName.equals(that.targetName) : that.targetName != null) { return false; } return true; }
public boolean isSame(Model model) { if (this == model) { return true; } if (address != null ? !address.equals(model.address) : model.address != null) { return false; } if (attributes != null ? !attributes.equals(model.attributes) : model.attributes != null) { return false; } if (children != null ? !children.equals(model.children) : model.children != null) { return false; } return true; }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } TransformRule that = (TransformRule) o; if (sourceAddress != null ? !sourceAddress.equals(that.sourceAddress) : that.sourceAddress != null) { return false; } if (sourceName != null ? !sourceName.equals(that.sourceName) : that.sourceName != null) { return false; } if (targetAddress != null ? !targetAddress.equals(that.targetAddress) : that.targetAddress != null) { return false; } if (targetName != null ? !targetName.equals(that.targetName) : that.targetName != null) { return false; } return true; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; OperationId that = (OperationId) o; return address.equals(that.address) && !(name != null ? !name.equals(that.name) : that.name != null); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; OperationId that = (OperationId) o; return address.equals(that.address) && !(name != null ? !name.equals(that.name) : that.name != null); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; OperationId that = (OperationId) o; return address.equals(that.address) && !(name != null ? !name.equals(that.name) : that.name != null); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; AbstractManageableResource that = (AbstractManageableResource) o; if (!pathAddress.equals(that.pathAddress)) return false; return serverConfiguration.equals(that.serverConfiguration); }
private ModelNode translateOperationForProxy(final ModelNode op, PathAddress targetAddress) { final PathAddress translated = addressTranslator.translateAddress(targetAddress); if (targetAddress.equals(translated)) { return op; } final ModelNode proxyOp = op.clone(); proxyOp.get(OP_ADDR).set(translated.toModelNode()); return proxyOp; }
private ModelNode translateOperationForProxy(final ModelNode op, PathAddress targetAddress) { final PathAddress translated = addressTranslator.translateAddress(targetAddress); if (targetAddress.equals(translated)) { return op; } final ModelNode proxyOp = op.clone(); proxyOp.get(OP_ADDR).set(translated.toModelNode()); return proxyOp; }
private static boolean assertSameAddress(Action action, TargetResource target) { ModelNode operation = action.getOperation(); // operation can be null in some unit tests; to be lazy ignore those cases return operation == null || target.getResourceAddress().equals(PathAddress.pathAddress(operation.get(ModelDescriptionConstants.OP_ADDR))); }
private ImmutableManagementResourceRegistration getRootRegistration(final ImmutableManagementResourceRegistration registration) { if (!PathAddress.EMPTY_ADDRESS.equals(registration.getPathAddress())) { return getRootRegistration(registration.getParent()); } return registration; }
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 boolean validOverlay(PathAddress operationAddress) { if (operationAddress.size() >= 1 && operationAddress.size() >= overlayAddress.size()) { ServerLogger.AS_ROOT_LOGGER.debugf("Comparing address %s with %s", operationAddress.subAddress(0, overlayAddress.size()).toCLIStyleString(), overlayAddress.toCLIStyleString()); return operationAddress.subAddress(0, overlayAddress.size()).equals(overlayAddress); } return false; } }