本文整理了Java中org.jboss.as.controller.operations.common.Util.getParentAddressByKey()
方法的一些代码示例,展示了Util.getParentAddressByKey()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.getParentAddressByKey()
方法的具体详情如下:
包路径:org.jboss.as.controller.operations.common.Util
类名称:Util
方法名:getParentAddressByKey
暂无
代码示例来源:origin: wildfly/wildfly
public static ServiceName getSecurityDomainServiceName(PathAddress pathAddress) {
PathAddress domain = Util.getParentAddressByKey(pathAddress, Constants.SECURITY_DOMAIN);
if (domain == null)
throw SecurityLogger.ROOT_LOGGER.addressDidNotContainSecurityDomain();
return SecurityDomainService.SERVICE_NAME.append(domain.getLastElement().getValue());
}
代码示例来源:origin: org.jboss.as/jboss-as-controller
protected PathAddress getParentAddress(PathAddress address) {
return Util.getParentAddressByKey(address, parentKeyName);
}
代码示例来源:origin: org.wildfly.core/wildfly-controller
protected PathAddress getParentAddress(PathAddress address) {
return Util.getParentAddressByKey(address, parentKeyName);
}
代码示例来源:origin: org.wildfly/wildfly-controller
protected PathAddress getParentAddress(PathAddress address) {
return Util.getParentAddressByKey(address, parentKeyName);
}
代码示例来源:origin: org.wildfly.core/wildfly-controller
protected PathAddress getParentAddress(PathAddress address) {
return Util.getParentAddressByKey(address, parentKeyName);
}
代码示例来源:origin: org.jboss.as/jboss-as-controller
protected PathAddress getParentAddress(PathAddress address) {
return Util.getParentAddressByKey(address, parentKeyName);
}
代码示例来源:origin: org.wildfly/wildfly-controller
protected PathAddress getParentAddress(PathAddress address) {
return Util.getParentAddressByKey(address, parentKeyName);
}
代码示例来源:origin: wildfly/wildfly-core
protected PathAddress getParentAddress(PathAddress address) {
return Util.getParentAddressByKey(address, parentKeyName);
}
代码示例来源:origin: wildfly/wildfly-core
protected PathAddress getParentAddress(PathAddress address) {
return Util.getParentAddressByKey(address, parentKeyName);
}
代码示例来源:origin: org.infinispan.server/infinispan-server-security
public static ServiceName getSecurityDomainServiceName(PathAddress pathAddress) {
PathAddress domain = Util.getParentAddressByKey(pathAddress, Constants.SECURITY_DOMAIN);
if (domain == null)
throw SecurityMessages.MESSAGES.addressDidNotContainSecurityDomain();
return SecurityDomainService.SERVICE_NAME.append(domain.getLastElement().getValue());
}
代码示例来源:origin: org.jboss.eap/wildfly-security
public static ServiceName getSecurityDomainServiceName(PathAddress pathAddress) {
PathAddress domain = Util.getParentAddressByKey(pathAddress, Constants.SECURITY_DOMAIN);
if (domain == null)
throw SecurityLogger.ROOT_LOGGER.addressDidNotContainSecurityDomain();
return SecurityDomainService.SERVICE_NAME.append(domain.getLastElement().getValue());
}
代码示例来源:origin: org.jboss.as/jboss-as-security
public static ServiceName getSecurityDomainServiceName(PathAddress pathAddress) {
PathAddress domain = Util.getParentAddressByKey(pathAddress, Constants.SECURITY_DOMAIN);
if (domain == null)
throw SecurityMessages.MESSAGES.addressDidNotContainSecurityDomain();
return SecurityDomainService.SERVICE_NAME.append(domain.getLastElement().getValue());
}
代码示例来源:origin: org.wildfly/wildfly-picketlink
private void checkIfLastIdentityStore(OperationContext context) throws OperationFailedException {
PathAddress parentAddress = Util.getParentAddressByKey(context.getCurrentAddress(), ModelElement.IDENTITY_CONFIGURATION.getName());
if (context.readResourceFromRoot(parentAddress, false).getChildTypes().size() == 1) {
throw ROOT_LOGGER.idmNoIdentityStoreProvided(parentAddress.getLastElement().getValue());
}
}
}
代码示例来源:origin: org.jboss.eap/wildfly-picketlink
private void checkIfLastIdentityStore(OperationContext context) throws OperationFailedException {
PathAddress parentAddress = Util.getParentAddressByKey(context.getCurrentAddress(), ModelElement.IDENTITY_CONFIGURATION.getName());
if (context.readResourceFromRoot(parentAddress, false).getChildTypes().size() == 1) {
throw ROOT_LOGGER.idmNoIdentityStoreProvided(parentAddress.getLastElement().getValue());
}
}
}
代码示例来源:origin: org.jboss.eap/wildfly-picketlink
protected void validateOccurrence(OperationContext context, ModelNode operation) throws OperationFailedException {
PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR));
PathAddress parentAddress = Util.getParentAddressByKey(address, this.parentElement.getName());
Set<String> elements = context.readResourceFromRoot(parentAddress, false).getChildrenNames(this.element.getName());
if (elements.size() > this.maxOccurs) {
throw ROOT_LOGGER.invalidChildTypeOccurrence(parentAddress.getLastElement().toString(), this.maxOccurs, this.element
.getName());
}
}
}
代码示例来源:origin: org.wildfly/wildfly-picketlink
protected void validateOccurrence(OperationContext context, ModelNode operation) throws OperationFailedException {
PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR));
PathAddress parentAddress = Util.getParentAddressByKey(address, this.parentElement.getName());
Set<String> elements = context.readResourceFromRoot(parentAddress, false).getChildrenNames(this.element.getName());
if (elements.size() > this.maxOccurs) {
throw ROOT_LOGGER.invalidChildTypeOccurrence(parentAddress.getLastElement().toString(), this.maxOccurs, this.element
.getName());
}
}
}
内容来源于网络,如有侵权,请联系作者删除!