org.apache.axiom.om.OMElement.getFirstChildWithName()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(9.6k)|赞(0)|评价(0)|浏览(127)

本文整理了Java中org.apache.axiom.om.OMElement.getFirstChildWithName()方法的一些代码示例,展示了OMElement.getFirstChildWithName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OMElement.getFirstChildWithName()方法的具体详情如下:
包路径:org.apache.axiom.om.OMElement
类名称:OMElement
方法名:getFirstChildWithName

OMElement.getFirstChildWithName介绍

暂无

代码示例

代码示例来源:origin: org.apache.synapse/synapse-core

private OMElement getHeaderBlock(OMElement soapHeader, QName keyQName) {

    if (soapHeader != null) {
      return soapHeader.getFirstChildWithName(keyQName);
    }
    return null;
  }
}

代码示例来源:origin: org.apache.rampart/rampart-trust

private boolean processCancelResponse(OMElement response) {
  /*
  <wst:RequestSecurityTokenResponse>
    <wst:RequestedTokenCancelled/>
  </wst:RequestSecurityTokenResponse>
  */
  return response.
      getFirstChildWithName(new QName(RahasConstants.
          CancelBindingLocalNames.REQUESTED_TOKEN_CANCELED)) != null;
}

代码示例来源:origin: org.apache.axis2/axis2-kernel

public OMElement getEndpointReference() {
  OMElement epr = data.getFirstChildWithName(new QName(
      DRConstants.SERVICE_DATA.ENDPOINT_REFERENCE));
  return epr;
}

代码示例来源:origin: org.apache.axis2/axis2-kernel

public String getURL() {
  String urlValue = null;
  OMElement url = data.getFirstChildWithName(new QName(
      DRConstants.SERVICE_DATA.URL));
  if (url != null) {
    urlValue = url.getText();
  }
  return urlValue;
}

代码示例来源:origin: org.apache.synapse/synapse-core

protected String getValue(OMElement elt, QName qName) {
  OMElement e = elt.getFirstChildWithName(qName);
  if (e != null) {
    return e.getText();
  } else {
    handleException("Unable to read configuration value for : " + qName);
  }
  return null;
}

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.application.authentication.framework

/**
 * Returns the element with the provided local part
 *
 * @param localPart local part name
 * @return Corresponding OMElement
 */
public OMElement getConfigElement(String localPart) {
  return rootElement.getFirstChildWithName(
      IdentityApplicationManagementUtil.getQNameWithIdentityApplicationNS(localPart));
}

代码示例来源:origin: org.wso2.carbon.identity.framework/org.wso2.carbon.identity.application.authentication.framework

void initializeConfigs(OMElement mappingsElement) {
  if (mappingsElement == null) {
    return;
  }
  if (mappingsElement.getLocalName().equals("Server")) {
    mappingsElement = mappingsElement.getFirstChildWithName(AUTH_CTX_QNAME);
  }
  OMElement amrRefsElement = mappingsElement.getFirstChildWithName(AMR_MAPPING_QNAME);
  if (amrRefsElement != null) {
    processAmrMappings(amrRefsElement);
  }
}

代码示例来源:origin: org.wso2.carbon.identity.inbound.auth.oauth2/org.wso2.carbon.identity.oauth

private void parseMapFederatedUsersToLocalConfiguration(OMElement oauthConfigElem) {
  OMElement mapFederatedUsersToLocalConfigElem = oauthConfigElem.getFirstChildWithName(getQNameWithIdentityNS(
      ConfigElements.MAP_FED_USERS_TO_LOCAL));
  if (mapFederatedUsersToLocalConfigElem != null) {
    mapFederatedUsersToLocal = Boolean.parseBoolean(mapFederatedUsersToLocalConfigElem.getText());
  }
  if (log.isDebugEnabled()) {
    log.debug("MapFederatedUsersToLocal was set to : " + mapFederatedUsersToLocal);
  }
}

代码示例来源:origin: org.wso2.carbon.identity.inbound.auth.oauth2/org.wso2.carbon.identity.oauth

private void parseClientIdValidationRegex(OMElement oauthConfigElem) {
  OMElement clientIdValidationRegexConfigElem = oauthConfigElem
      .getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.CLIENT_ID_VALIDATE_REGEX));
  if (clientIdValidationRegexConfigElem != null && !"".equals(clientIdValidationRegexConfigElem.getText().trim())) {
    clientIdValidationRegex = clientIdValidationRegexConfigElem.getText().trim();
  }
  if (log.isDebugEnabled()) {
    log.debug("Client id validation regex is set to: " + clientIdValidationRegex);
  }
}

代码示例来源:origin: org.wso2.carbon.identity.inbound.auth.oauth2/org.wso2.carbon.identity.oauth

private void parseImplicitErrorFragment(OMElement oauthConfigElem) {
  OMElement implicitErrorFragmentElem =
      oauthConfigElem.getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.IMPLICIT_ERROR_FRAGMENT));
  if (implicitErrorFragmentElem != null) {
    isImplicitErrorFragment =
        Boolean.parseBoolean(implicitErrorFragmentElem.getText());
  }
  if (log.isDebugEnabled()) {
    log.debug("ImplicitErrorFragment was set to : " + isImplicitErrorFragment);
  }
}

代码示例来源:origin: org.wso2.carbon.identity.inbound.auth.oauth2/org.wso2.carbon.identity.oauth

private void parseHashAlgorithm(OMElement oauthConfigElem) {
  OMElement hashingAlgorithmElement = oauthConfigElem
      .getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.HASH_ALGORITHM));
  if (hashingAlgorithmElement != null) {
    hashAlgorithm = hashingAlgorithmElement.getText();
  }
  if (log.isDebugEnabled()) {
    log.debug("Hash algorithm was set to : " + hashAlgorithm);
  }
}

代码示例来源:origin: org.wso2.carbon.identity.inbound.auth.oauth2/org.wso2.carbon.identity.oauth

private void parseUseSPTenantDomainConfig(OMElement oauthElem) {
  OMElement useSPTenantDomainValueElement = oauthElem
      .getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.OAUTH_USE_SP_TENANT_DOMAIN));
  if (useSPTenantDomainValueElement != null) {
    useSPTenantDomainValue = Boolean.parseBoolean(useSPTenantDomainValueElement.getText().trim());
  }
  if (log.isDebugEnabled()) {
    log.debug("Use SP tenant domain value is set to: " + useSPTenantDomainValue);
  }
}

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.oauth

private void parseAccessTokenPartitioningDomainsConfig(OMElement oauthConfigElem) {
  OMElement enableAccessTokenPartitioningElem =
      oauthConfigElem.getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.ACCESS_TOKEN_PARTITIONING_DOMAINS));
  if (enableAccessTokenPartitioningElem != null) {
    accessTokenPartitioningDomains = enableAccessTokenPartitioningElem.getText();
  }
  if (log.isDebugEnabled()) {
    log.debug("Enable OAuth Access Token Partitioning Domains was set to : " +
        accessTokenPartitioningDomains);
  }
}

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.oauth

private void parseTokenPersistenceProcessorConfig(OMElement oauthConfigElem) {
  OMElement persistenceprocessorConfigElem =
      oauthConfigElem.getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.TOKEN_PERSISTENCE_PROCESSOR));
  if (persistenceprocessorConfigElem != null &&
      StringUtils.isNotBlank(persistenceprocessorConfigElem.getText())) {
    tokenPersistenceProcessorClassName = persistenceprocessorConfigElem.getText().trim();
  }
  if (log.isDebugEnabled()) {
    log.debug("Token Persistence Processor was set to : " + tokenPersistenceProcessorClassName);
  }
}

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.oauth

private void parseImplicitErrorFragment(OMElement oauthConfigElem) {
  OMElement implicitErrorFragmentElem =
      oauthConfigElem.getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.IMPLICIT_ERROR_FRAGMENT));
  if (implicitErrorFragmentElem != null) {
    isImplicitErrorFragment =
        Boolean.parseBoolean(implicitErrorFragmentElem.getText());
  }
  if (log.isDebugEnabled()) {
    log.debug("ImplicitErrorFragment was set to : " + isImplicitErrorFragment);
  }
}

代码示例来源:origin: org.wso2.carbon.identity.framework/org.wso2.carbon.identity.application.authentication.framework

private void readAuthenticationEndpointRetryURL(OMElement documentElement) {
  OMElement authEndpointRetryURLElem = documentElement.getFirstChildWithName(IdentityApplicationManagementUtil.
      getQNameWithIdentityApplicationNS(FrameworkConstants.Config.QNAME_AUTHENTICATION_ENDPOINT_RETRY_URL));
  if (authEndpointRetryURLElem != null) {
    authenticationEndpointRetryURL = IdentityUtil.fillURLPlaceholders(authEndpointRetryURLElem.getText());
  }
}

代码示例来源:origin: org.wso2.carbon.identity.framework/org.wso2.carbon.identity.application.authentication.framework

private void readAuthenticationEndpointPromptURL(OMElement documentElement) {
  OMElement authEndpointPromptURLElem = documentElement.getFirstChildWithName(IdentityApplicationManagementUtil.
      getQNameWithIdentityApplicationNS(FrameworkConstants.Config.QNAME_AUTHENTICATION_ENDPOINT_PROMPT_URL));
  if (authEndpointPromptURLElem != null) {
    authenticationEndpointPromptURL = IdentityUtil.fillURLPlaceholders(authEndpointPromptURLElem.getText());
  }
}

代码示例来源:origin: org.wso2.carbon.identity.framework/org.wso2.carbon.identity.application.authentication.framework

private void readAuthenticationEndpointMissingClaimsURL(OMElement documentElement) {
  OMElement authEndpointMissingClaimsURLElem = documentElement.getFirstChildWithName
      (IdentityApplicationManagementUtil.getQNameWithIdentityApplicationNS(FrameworkConstants.Config
          .QNAME_AUTHENTICATION_ENDPOINT_MISSING_CLAIMS_URL));
  if (authEndpointMissingClaimsURLElem != null) {
    authenticationEndpointMissingClaimsURL = IdentityUtil.fillURLPlaceholders
        (authEndpointMissingClaimsURLElem.getText());
  }
}

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.application.authentication.framework

private void readExtensionPoints(OMElement documentElement) {
  OMElement extensionsElem = documentElement.getFirstChildWithName(IdentityApplicationManagementUtil.
      getQNameWithIdentityApplicationNS(FrameworkConstants.Config.QNAME_EXTENSIONS));
  if (extensionsElem != null) {
    for (Iterator extChildElems = extensionsElem.getChildElements(); extChildElems.hasNext(); ) {
      OMElement extensionElem = (OMElement) extChildElems.next();
      instantiateClass(extensionElem);
    }
  }
}

代码示例来源:origin: org.wso2.carbon.identity.framework/org.wso2.carbon.identity.application.authentication.framework

private void readAuthenticatorNameMappings(OMElement documentElement) {
  OMElement authenticatorNameMappingsElem = documentElement.getFirstChildWithName(IdentityApplicationManagementUtil.
      getQNameWithIdentityApplicationNS(FrameworkConstants.Config.QNAME_AUTHENTICATOR_NAME_MAPPINGS));
  if (authenticatorNameMappingsElem != null) {
    for (Iterator authenticatorNameMappingElems = authenticatorNameMappingsElem.getChildrenWithLocalName(FrameworkConstants.Config.ELEM_AUTHENTICATOR_NAME_MAPPING);
       authenticatorNameMappingElems.hasNext(); ) {
      processAuthenticatorNameMappingElement((OMElement) authenticatorNameMappingElems.next());
    }
  }
}

相关文章

微信公众号

最新文章

更多