本文整理了Java中org.jboss.as.controller.registry.Resource.getChildTypes
方法的一些代码示例,展示了Resource.getChildTypes
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Resource.getChildTypes
方法的具体详情如下:
包路径:org.jboss.as.controller.registry.Resource
类名称:Resource
方法名:getChildTypes
[英]Get a list of registered child types for this resource.
[中]获取此资源的已注册子类型列表。
代码示例来源:origin: wildfly/wildfly
/**
* @return
* @see org.jboss.as.controller.registry.Resource#getChildTypes()
*/
public Set<String> getChildTypes() {
return delegate.getChildTypes();
}
代码示例来源:origin: wildfly/wildfly
@Override
public Set<String> getChildTypes() {
return delegate.getChildTypes();
}
代码示例来源:origin: wildfly/wildfly
@Override
public Set<String> getChildTypes() {
return delegate.getChildTypes();
}
代码示例来源:origin: wildfly/wildfly
@Override
public Set<String> getChildTypes() {
final Set<String> result = new LinkedHashSet<>(delegate.getChildTypes());
result.add(BatchJobExecutionResourceDefinition.EXECUTION);
return result;
}
代码示例来源:origin: wildfly/wildfly
@Override
public Set<String> getChildTypes() {
final Set<String> result = new LinkedHashSet<>(delegate.getChildTypes());
result.add(BALANCER);
return result;
}
代码示例来源:origin: wildfly/wildfly
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;
}
代码示例来源:origin: wildfly/wildfly
@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);
}
}
}
代码示例来源:origin: org.wildfly/wildfly-undertow
@Override
public Set<String> getChildTypes() {
final Set<String> result = new LinkedHashSet<>(delegate.getChildTypes());
result.add(BALANCER);
return result;
}
代码示例来源:origin: wildfly/wildfly-core
@Override
public Set<String> getChildTypes() {
final Set<String> result = new LinkedHashSet<>(delegate.getChildTypes());
result.add(LogFileResourceDefinition.NAME);
return result;
}
代码示例来源:origin: org.jboss.as/jboss-as-osgi-service
@Override
public Set<String> getChildTypes() {
Set<String> result = new HashSet<String>(delegate.getChildTypes());
result.add(ModelConstants.BUNDLE);
return result;
}
代码示例来源:origin: org.jboss.eap/wildfly-batch-jberet
@Override
public Set<String> getChildTypes() {
final Set<String> result = new LinkedHashSet<>(delegate.getChildTypes());
result.add(BatchJobExecutionResourceDefinition.EXECUTION);
return result;
}
代码示例来源:origin: org.wildfly/wildfly-osgi-service
@Override
public Set<String> getChildTypes() {
Set<String> result = new HashSet<String>(delegate.getChildTypes());
result.add(ModelConstants.BUNDLE);
return result;
}
代码示例来源:origin: org.wildfly/wildfly-messaging-activemq
@Override
public Set<String> getChildTypes() {
Set<String> result = new HashSet<String>(delegate.getChildTypes());
result.add(CORE_ADDRESS);
result.add(RUNTIME_QUEUE);
return result;
}
代码示例来源:origin: org.jboss.eap/wildfly-messaging-activemq
@Override
public Set<String> getChildTypes() {
Set<String> result = new HashSet<String>(delegate.getChildTypes());
result.add(CORE_ADDRESS);
result.add(RUNTIME_QUEUE);
return result;
}
代码示例来源:origin: org.jboss.as/jboss-as-controller
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;
}
代码示例来源:origin: org.wildfly/wildfly-controller
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;
}
代码示例来源:origin: org.wildfly/wildfly-picketlink
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());
}
}
}
代码示例来源:origin: org.wildfly.core/wildfly-controller
@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);
}
}
}
代码示例来源:origin: org.jboss.as/jboss-as-controller
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);
}
}
代码示例来源:origin: org.wildfly.core/wildfly-controller
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);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!