use of org.jboss.as.controller.registry.Resource.ResourceEntry in project wildfly by wildfly.
the class WSSubsystemAdd method readConfigServiceNames.
private static void readConfigServiceNames(List<ServiceName> serviceNames, Resource subsystemResource, String configType) {
for (ResourceEntry re : subsystemResource.getChildren(configType)) {
ServiceName configServiceName = Constants.CLIENT_CONFIG.equals(configType) ? PackageUtils.getClientConfigServiceName(re.getName()) : PackageUtils.getEndpointConfigServiceName(re.getName());
serviceNames.add(configServiceName);
}
}
use of org.jboss.as.controller.registry.Resource.ResourceEntry in project wildfly by wildfly.
the class RequiredChildValidationStepHandler method validateRequiredChild.
protected void validateRequiredChild(OperationContext context, ModelNode operation) throws OperationFailedException {
Resource resource = context.readResource(PathAddress.EMPTY_ADDRESS);
PathAddress pathAddress = PathAddress.pathAddress(operation.get(OP_ADDR));
Set<ResourceEntry> children = resource.getChildren(this.childElement.getName());
if (children.isEmpty()) {
throw ROOT_LOGGER.requiredChild(pathAddress.getLastElement().toString(), this.childElement.getName());
}
}
use of org.jboss.as.controller.registry.Resource.ResourceEntry in project wildfly by wildfly.
the class PackageUtils method getServiceNameDependencies.
static List<ServiceName> getServiceNameDependencies(final OperationContext context, final ServiceName baseServiceName, final PathAddress address, final String childType) {
final List<ServiceName> childrenServiceNames = new LinkedList<ServiceName>();
final Resource resource = context.readResourceFromRoot(address);
final ServiceName sn = baseServiceName.append(childType);
for (ResourceEntry re : resource.getChildren(childType)) {
childrenServiceNames.add(sn.append(re.getName()));
}
return childrenServiceNames;
}
Aggregations