Refine search
@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 (CONTEXT.equals(element.getKey())) { if (getChildrenNames(CONTEXT).contains(element.getValue())) { return PlaceholderResource.INSTANCE; } throw new NoSuchResourceException(element); } throw new NoSuchResourceException(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); }
@Override public Resource navigate(PathAddress address) { if (address.size() > 0 && CORE_ADDRESS.equals(address.getElement(0).getKey())) { if (address.size() > 1) { throw new NoSuchResourceException(address.getElement(1)); } return new CoreAddressResource(address.getElement(0).getValue(), getManagementService()); } else if (address.size() > 0 && RUNTIME_QUEUE.equals(address.getElement(0).getKey())) { if (address.size() > 1) { throw new NoSuchResourceException(address.getElement(1)); } return PlaceholderResource.INSTANCE; } else { return delegate.navigate(address); } }
@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) { if (ModelConstants.BUNDLE.equals(element.getKey())) { if (hasBundle(element)) { return OSGiBundleResource.INSTANCE; } throw new NoSuchResourceException(element); } else { return delegate.requireChild(element); } }
@Override protected void executeSingleTargetChild(PathAddress base, PathElement currentElement, PathAddress newRemaining, OperationContext context, boolean ignoreMissing) { final PathAddress next = base.append(currentElement); // Either require the child or a remote target final Resource resource = context.readResource(base, false); final ImmutableManagementResourceRegistration nr = context.getResourceRegistration().getSubModel(next); if (resource.hasChild(currentElement) || (nr != null && nr.isRemote())) { safeExecute(next, newRemaining, context, nr, ignoreMissing); } //if we are on the wrong host no need to do anything else if(!resource.hasChild(currentElement)) { throw new Resource.NoSuchResourceException(currentElement); } }
@Override public Resource navigate(PathAddress address) { int size = address.size(); if (size == 0) { return this; } PathElement pe = address.getElement(0); Resource child = getChild(pe); if (child != null) { return size == 1 ? child : child.navigate(address.subAddress(1)); } else { throw new NoSuchResourceException(pe); } }
@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";
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 requireChild(PathElement element) { Resource child = getChild(element); if (child == null) { throw new NoSuchResourceException(element); } return child; }
@Override public Resource requireChild(PathElement element) { final Resource resource = getChild(element); if(resource == null) { throw new NoSuchResourceException(element); } 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 logFileNotFound(final String name, final String directoryProperty) { final NoSuchResourceException result = new NoSuchResourceException(String.format(getLoggingLocale(), logFileNotFound$str(), name, directoryProperty)); final StackTraceElement[] st = result.getStackTrace(); result.setStackTrace(Arrays.copyOfRange(st, 1, st.length)); return result; } private static final String readNotAllowed = "WFLYLOG0081: File '%s' is not allowed to be read.";
@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 address) { final Resource resource = getChild(address); if(resource == null) { throw new NoSuchResourceException(address); } return resource; }
@Override public Resource requireChild(PathElement address) { final Resource resource = getChild(address); if (resource == null) { throw new NoSuchResourceException(address); } return resource; }
@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 requireChild(PathElement address) { final Resource resource = getChild(address); if(resource == null) { throw new NoSuchResourceException(address); } return resource; }