/** * @return * @see org.jboss.as.controller.registry.Resource#getChildTypes() */ public Set<String> getChildTypes() { return delegate.getChildTypes(); }
@Override public Set<String> getChildTypes() { return delegate.getChildTypes(); }
@Override public Set<String> getChildTypes() { return delegate.getChildTypes(); }
@Override public Set<String> getChildTypes() { final Set<String> result = new LinkedHashSet<>(delegate.getChildTypes()); result.add(BatchJobExecutionResourceDefinition.EXECUTION); return result; }
@Override public Set<String> getChildTypes() { final Set<String> result = new LinkedHashSet<>(delegate.getChildTypes()); result.add(BALANCER); return result; }
private static boolean removeInCurrentStep(Resource resource) { for (String childType : resource.getChildTypes()) { for (Resource.ResourceEntry entry : resource.getChildren(childType)) { if (!entry.isRuntime() && resource.hasChild(entry.getPathElement())) { return false; } } } return true; }
@Override protected void describe(OrderedChildTypesAttachment orderedChildTypesAttachment, Resource resource, ModelNode addressModel, ModelNode result, ImmutableManagementResourceRegistration registration) { if (resource == null || registration.isRemote() || registration.isRuntimeOnly() || resource.isProxy() || resource.isRuntime() || registration.isAlias()) return; result.add(createAddOperation(orderedChildTypesAttachment, addressModel, resource, registration.getChildAddresses(PathAddress.EMPTY_ADDRESS))); PathAddress address = PathAddress.pathAddress(addressModel); for (String type : resource.getChildTypes()) { for (Resource.ResourceEntry entry : resource.getChildren(type)) { PathElement path = entry.getPathElement(); ImmutableManagementResourceRegistration childRegistration = Optional.ofNullable(registration.getSubModel(PathAddress.pathAddress(path))).orElse(registration.getSubModel(PathAddress.pathAddress(PathElement.pathElement(path.getKey())))); PathAddress childAddress = address.append(path); this.describe(orderedChildTypesAttachment, entry, childAddress.toModelNode(), result, childRegistration); } } }
@Override public Set<String> getChildTypes() { final Set<String> result = new LinkedHashSet<>(delegate.getChildTypes()); result.add(BALANCER); return result; }
@Override public Set<String> getChildTypes() { final Set<String> result = new LinkedHashSet<>(delegate.getChildTypes()); result.add(LogFileResourceDefinition.NAME); return result; }
@Override public Set<String> getChildTypes() { Set<String> result = new HashSet<String>(delegate.getChildTypes()); result.add(ModelConstants.BUNDLE); return result; }
@Override public Set<String> getChildTypes() { final Set<String> result = new LinkedHashSet<>(delegate.getChildTypes()); result.add(BatchJobExecutionResourceDefinition.EXECUTION); return result; }
@Override public Set<String> getChildTypes() { Set<String> result = new HashSet<String>(delegate.getChildTypes()); result.add(ModelConstants.BUNDLE); return result; }
@Override public Set<String> getChildTypes() { Set<String> result = new HashSet<String>(delegate.getChildTypes()); result.add(CORE_ADDRESS); result.add(RUNTIME_QUEUE); return result; }
@Override public Set<String> getChildTypes() { Set<String> result = new HashSet<String>(delegate.getChildTypes()); result.add(CORE_ADDRESS); result.add(RUNTIME_QUEUE); return result; }
private List<PathElement> getChildren(Resource resource) { final List<PathElement> pes = new ArrayList<PathElement>(); for (String childType : resource.getChildTypes()) { for (Resource.ResourceEntry entry : resource.getChildren(childType)) { pes.add(entry.getPathElement()); } } return pes; }
private List<PathElement> getChildren(Resource resource) { final List<PathElement> pes = new ArrayList<PathElement>(); for (String childType : resource.getChildTypes()) { for (Resource.ResourceEntry entry : resource.getChildren(childType)) { pes.add(entry.getPathElement()); } } return pes; }
protected void validateChildren(OperationContext context, ModelNode operation) throws OperationFailedException { Resource resource = context.readResource(PathAddress.EMPTY_ADDRESS); PathAddress pathAddress = PathAddress.pathAddress(operation.get(OP_ADDR)); if (resource.getChildTypes().isEmpty()) { throw ROOT_LOGGER.emptyResource(pathAddress.getLastElement().toString()); } } }
@Override public void processChildren(final Resource resource) throws OperationFailedException { final Set<String> types = resource.getChildTypes(); for (final String type : types) { for (final Resource.ResourceEntry child : resource.getChildren(type)) { processChild(child.getPathElement(), child); } } }
protected void performRemove(OperationContext context, final ModelNode operation, final ModelNode model) throws OperationFailedException { final Resource resource = context.readResource(PathAddress.EMPTY_ADDRESS); if (!requireNoChildResources() || resource.getChildTypes().isEmpty()) { context.removeResource(PathAddress.EMPTY_ADDRESS); } else { List<PathElement> children = getChildren(resource); throw ControllerMessages.MESSAGES.cannotRemoveResourceWithChildren(children); } }
private void copy(Resource src, Resource dest) { dest.getModel().set(src.getModel()); for (String type : src.getChildTypes()) { for (ResourceEntry entry : src.getChildren(type)) { Resource added = Resource.Factory.create(); dest.registerChild(PathElement.pathElement(type, entry.getName()), added); copy(entry, added); } } }