@Override public Resource requireChild(final PathElement element) { if (CONTEXT.equals(element.getKey())) { if (getChildrenNames(CONTEXT).contains(element.getValue())) { return PlaceholderResource.INSTANCE; } throw new NoSuchResourceException(element); } throw new NoSuchResourceException(element); }
@Override public Resource requireChild(final PathElement element) { if (BALANCER.equals(element.getKey())) { if (getChildrenNames(BALANCER).contains(element.getValue())) { return new ModClusterBalancerResource(element.getValue(), name); } throw new NoSuchResourceException(element); } return delegate.requireChild(element); }
@Override public Resource requireChild(final PathElement element) { if (NODE.equals(element.getKey())) { if (getChildrenNames(NODE).contains(element.getValue())) { return new ModClusterNodeResource(element.getValue(), this.name, modClusterName); } throw new NoSuchResourceException(element); } else if (LOAD_BALANCING_GROUP.equals(element.getKey())) { if (getChildrenNames(LOAD_BALANCING_GROUP).contains(element.getValue())) { return new ModClusterNodeResource(element.getValue(), this.name, modClusterName); } throw new NoSuchResourceException(element); } throw new NoSuchResourceException(element); }
@Override public Resource navigate(final PathAddress address) { if (address.size() == 1 && CONTEXT.equals(address.getElement(0).getKey())) { return requireChild(address.getElement(0)); } throw new NoSuchResourceException(address.getElement(0)); }
@Override public Resource requireChild(PathElement element) { Resource child = getChild(element); if (child == null) { throw new NoSuchResourceException(element); } return child; }
@Override public Resource requireChild(PathElement element) { Resource child = getChild(element); if (child == null) { throw new NoSuchResourceException(element); } return child; }
@Override public Resource requireChild(final PathElement element) { if (BALANCER.equals(element.getKey())) { if (getChildrenNames(BALANCER).contains(element.getValue())) { return new ModClusterBalancerResource(element.getValue(), name); } throw new NoSuchResourceException(element); } return delegate.requireChild(element); }
@Override public Resource requireChild(PathElement element) { Resource child = getChild(element); if (child != null) { return child; } throw new NoSuchResourceException(element); }
@Override public Resource requireChild(PathElement address) { final Resource resource = getChild(address); if (resource == null) { throw new NoSuchResourceException(address); } return resource; }
@Override public Resource navigate(final PathAddress address) { if (address.size() > 0 && LogFileResourceDefinition.NAME.equals(address.getElement(0).getKey())) { if (address.size() > 1) { throw new NoSuchResourceException(address.getElement(1)); } return PlaceholderResource.INSTANCE; } return delegate.navigate(address); }
@Override public Resource requireChild(PathElement address) { final Resource resource = getChild(address); if(resource == null) { throw new NoSuchResourceException(address); } return resource; }
@Override public Resource requireChild(final PathElement address) { final Resource resource = getChild(address); if(resource == null) { throw new NoSuchResourceException(address); } return resource; }
@Override public final NoSuchResourceException managementResourceNotFound(final PathAddress pathAddress) { final NoSuchResourceException result = new NoSuchResourceException(String.format(getLoggingLocale(), managementResourceNotFound$str(), pathAddress)); final StackTraceElement[] st = result.getStackTrace(); result.setStackTrace(Arrays.copyOfRange(st, 1, st.length)); return result; } private static final String childResourceNotFound = "WFLYCTL0217: Child resource '%s' not found";
@Override public Resource requireChild(PathElement element) { final Resource resource = getChild(element); if(resource == null) { throw new NoSuchResourceException(element); } return resource; }
@Override public Resource requireChild(PathElement element) { Resource child = getChild(element); if (child == null) { throw new NoSuchResourceException(element); } return child; }
private static RuntimeException translateFailureDescription(ModelNode failureDescription) { String failureDesc = failureDescription.asString(); if (failureDesc.startsWith("WFLYCTL0216")) { return new org.jboss.as.controller.registry.Resource.NoSuchResourceException(failureDesc); } else if (failureDesc.startsWith("WFLYCTL0313")) { return new UnauthorizedException(failureDesc); } return null; }
@Override public Resource navigate(final PathAddress address) { final String element = address.getElement(0).getKey(); if (address.size() > 0 && (NODE.equals(element) || LOAD_BALANCING_GROUP.equals(element))) { final Resource subResource = requireChild(address.getElement(0)); if(address.size() == 1) { return subResource; } else { return subResource.navigate(address.subAddress(1)); } } throw new NoSuchResourceException(address.getElement(0)); }
@Override public Resource navigate(final PathAddress address) { if (address.size() == 1 && CONTEXT.equals(address.getElement(0).getKey())) { return requireChild(address.getElement(0)); } throw new NoSuchResourceException(address.getElement(0)); }
@Override public Resource requireChild(final PathElement element) { if (BatchJobExecutionResourceDefinition.EXECUTION.equals(element.getKey())) { if (hasJobExecution(element.getValue())) { return PlaceholderResource.INSTANCE; } throw new NoSuchResourceException(element); } return delegate.requireChild(element); }
@Override public Resource navigate(final PathAddress address) { if (address.size() > 0 && BatchJobExecutionResourceDefinition.EXECUTION.equals(address.getElement(0).getKey())) { if (address.size() > 1) { throw new NoSuchResourceException(address.getElement(1)); } return PlaceholderResource.INSTANCE; } return delegate.navigate(address); }