当前位置: 首页>>代码示例>>Java>>正文


Java Resource.hasChildren方法代码示例

本文整理汇总了Java中org.jboss.as.controller.registry.Resource.hasChildren方法的典型用法代码示例。如果您正苦于以下问题:Java Resource.hasChildren方法的具体用法?Java Resource.hasChildren怎么用?Java Resource.hasChildren使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jboss.as.controller.registry.Resource的用法示例。


在下文中一共展示了Resource.hasChildren方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doIterate

import org.jboss.as.controller.registry.Resource; //导入方法依赖的package包/类
private void doIterate(final Resource current, final PathAddress address) {
    boolean handleChildren = false;

    ObjectName resourceObjectName = action.onAddress(address);
    if (resourceObjectName != null &&
            (accessControlUtil == null || accessControlUtil.getResourceAccess(address, false).isAccessibleResource())) {
        handleChildren = action.onResource(resourceObjectName);
    }

    if (handleChildren) {
        for (String type : current.getChildTypes()) {
            if (current.hasChildren(type)) {
                for (ResourceEntry entry : current.getChildren(type)) {
                    final PathElement pathElement = entry.getPathElement();
                    final PathAddress childAddress = address.append(pathElement);
                    doIterate(entry, childAddress);
                }
            }
        }
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:22,代码来源:RootResourceIterator.java

示例2: listDeploymentNames

import org.jboss.as.controller.registry.Resource; //导入方法依赖的package包/类
private static Set<String> listDeploymentNames(Resource deploymentRootResource, Set<Pattern> patterns) {
    Set<String> deploymentNames = new HashSet<>();
    if (deploymentRootResource.hasChildren(DEPLOYMENT)) {
        for (Resource.ResourceEntry deploymentResource : deploymentRootResource.getChildren(DEPLOYMENT)) {
            if (isAcceptableDeployment(deploymentResource.getModel(), patterns)) {
                deploymentNames.add(deploymentResource.getName());
            } else if (deploymentResource.hasChildren(SUBDEPLOYMENT)) {
                for (Resource.ResourceEntry subdeploymentResource : deploymentResource.getChildren(SUBDEPLOYMENT)) {
                    if (isAcceptableDeployment(subdeploymentResource.getModel(), patterns)) {
                        deploymentNames.add(deploymentResource.getName());
                    }
                }
            }
        }
    }
    return deploymentNames;
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:18,代码来源:AffectedDeploymentOverlay.java

示例3: listLinks

import org.jboss.as.controller.registry.Resource; //导入方法依赖的package包/类
/**
 * Returns all the deployment runtime names associated with an overlay.
 *
 * @param context the current OperationContext.
 * @param overlayAddress the address for the averlay.
 * @return all the deployment runtime names associated with an overlay.
 */
public static Set<String> listLinks(OperationContext context, PathAddress overlayAddress) {
    Resource overlayResource = context.readResourceFromRoot(overlayAddress);
    if (overlayResource.hasChildren(DEPLOYMENT)) {
        return overlayResource.getChildrenNames(DEPLOYMENT);
    }
    return Collections.emptySet();
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:15,代码来源:AffectedDeploymentOverlay.java

示例4: listServerGroupsReferencingOverlay

import org.jboss.as.controller.registry.Resource; //导入方法依赖的package包/类
private static Set<String> listServerGroupsReferencingOverlay(Resource rootResource, String overlayName) {
    final PathElement overlayPath = PathElement.pathElement(DEPLOYMENT_OVERLAY, overlayName);
    if (rootResource.hasChildren(SERVER_GROUP)) {
        Set<String> set = new HashSet<>();
        for (String serverGroupName : rootResource.getChildrenNames(SERVER_GROUP)) {
            if (rootResource.getChild(PathElement.pathElement(SERVER_GROUP, serverGroupName)).hasChild(overlayPath)) {
                set.add(serverGroupName);
            }
        }
        return set;
    }
    return Collections.emptySet();
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:14,代码来源:AffectedDeploymentOverlay.java


注:本文中的org.jboss.as.controller.registry.Resource.hasChildren方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。