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


Java OMElement.getLocalName方法代码示例

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


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

示例1: build

import org.apache.axiom.om.OMElement; //导入方法依赖的package包/类
public static RoleMapping build(OMElement roleMappingOM) {
    RoleMapping roleMapping = new RoleMapping();

    Iterator<?> iter = roleMappingOM.getChildElements();

    while (iter.hasNext()) {
        OMElement element = (OMElement) (iter.next());
        String elementName = element.getLocalName();

        if ("localRole".equals(elementName)) {
            roleMapping.setLocalRole(LocalRole.build(element));
        }
        if ("remoteRole".equals(elementName)) {
            roleMapping.setRemoteRole(element.getText());
        }
    }

    return roleMapping;
}
 
开发者ID:wso2,项目名称:carbon-identity-framework,代码行数:20,代码来源:RoleMapping.java

示例2: build

import org.apache.axiom.om.OMElement; //导入方法依赖的package包/类
public static LocalRole build(OMElement localRoleOM) {
    LocalRole localRole = new LocalRole();

    Iterator<?> iter = localRoleOM.getChildElements();

    while (iter.hasNext()) {
        OMElement element = (OMElement) (iter.next());
        String elementName = element.getLocalName();

        if ("LocalRoleName".equals(elementName)) {
            localRole.setLocalRoleName(element.getText());
        } else if ("UserStoreId".equals(elementName)) {
            localRole.setUserStoreId(element.getText());
        }

    }

    return localRole;
}
 
开发者ID:wso2,项目名称:carbon-identity-framework,代码行数:20,代码来源:LocalRole.java

示例3: build

import org.apache.axiom.om.OMElement; //导入方法依赖的package包/类
public static ApplicationPermission build(OMElement applicationPermissionOM) {
    ApplicationPermission applicationPermission = new ApplicationPermission();

    Iterator<?> iter = applicationPermissionOM.getChildElements();

    while (iter.hasNext()) {
        OMElement element = (OMElement) (iter.next());
        String elementName = element.getLocalName();

        if ("value".equals(elementName)) {
            applicationPermission.setValue(element.getText());
        }
    }

    return applicationPermission;
}
 
开发者ID:wso2,项目名称:carbon-identity-framework,代码行数:17,代码来源:ApplicationPermission.java

示例4: build

import org.apache.axiom.om.OMElement; //导入方法依赖的package包/类
public static InboundProvisioningConfig build(OMElement inboundProvisioningConfigOM) {
    InboundProvisioningConfig inboundProvisioningConfig = new InboundProvisioningConfig();

    if (inboundProvisioningConfigOM == null) {
        return inboundProvisioningConfig;
    }

    Iterator<?> iter = inboundProvisioningConfigOM.getChildElements();

    while (iter.hasNext()) {
        OMElement element = (OMElement) (iter.next());
        String elementName = element.getLocalName();

        if ("ProvisioningUserStore".equals(elementName)) {
            inboundProvisioningConfig.setProvisioningUserStore(element.getText());
        } else if ("IsProvisioningEnabled".equals(elementName) && element.getText() != null) {
            inboundProvisioningConfig.setProvisioningEnabled(Boolean.parseBoolean(element.getText()));
        } else if ("IsDumbModeEnabled".equals(elementName) && element.getText() != null) {
            inboundProvisioningConfig.setDumbMode(Boolean.parseBoolean(element.getText()));
        }
    }

    return inboundProvisioningConfig;
}
 
开发者ID:wso2,项目名称:carbon-identity-framework,代码行数:25,代码来源:InboundProvisioningConfig.java

示例5: testTemplateWithValuesAndExpressions

import org.apache.axiom.om.OMElement; //导入方法依赖的package包/类
@Test(groups = {"wso2.esb"}, description = "Template with values and expressions")
public void testTemplateWithValuesAndExpressions() throws IOException, XMLStreamException {
    String soapResponse = getResponse();
    assertNotNull(soapResponse, "Response message is null");
    OMElement response = AXIOMUtil.stringToOM(soapResponse);
    OMElement soapBody = response.getFirstElement();
    Iterator quoteBody = soapBody.getChildElements();
    int count = 0;
    while (quoteBody.hasNext()) {
        OMElement getQuote = (OMElement) quoteBody.next();
        String test = getQuote.getLocalName();
        assertEquals(test, "getQuoteResponse", "getQuoteResponse not match");
        OMElement omElement = getQuote.getFirstElement();
        String symbolResponse = omElement.getFirstChildWithName(
                new QName("http://services.samples/xsd", "symbol")).getText();
        assertEquals(symbolResponse, "WSO2", "Request symbol not changed");

        count++;
    }
    assertEquals(count, iterations, "number of responses different from requests");
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:22,代码来源:CallTemplateWithValuesAndExpressionTestCase.java

示例6: build

import org.apache.axiom.om.OMElement; //导入方法依赖的package包/类
public static JustInTimeProvisioningConfig build(OMElement justInTimeProvisioningConfigOM) {
    JustInTimeProvisioningConfig justInTimeProvisioningConfig = new JustInTimeProvisioningConfig();

    if (justInTimeProvisioningConfigOM == null) {
        return justInTimeProvisioningConfig;
    }

    Iterator<?> iter = justInTimeProvisioningConfigOM.getChildElements();

    while (iter.hasNext()) {
        OMElement element = (OMElement) (iter.next());
        String elementName = element.getLocalName();

        if ("UserStoreClaimUri".equals(elementName)) {
            justInTimeProvisioningConfig.setUserStoreClaimUri(element.getText());
        } else if ("ProvisioningUserStore".equals(elementName)) {
            justInTimeProvisioningConfig.setProvisioningUserStore(element.getText());
        } else if ("IsProvisioningEnabled".equals(elementName)) {
            if (element.getText() != null && element.getText().trim().length() > 0) {
                justInTimeProvisioningConfig.setProvisioningEnabled(Boolean
                        .parseBoolean(element.getText()));
            }
        }
    }

    return justInTimeProvisioningConfig;
}
 
开发者ID:wso2,项目名称:carbon-identity-framework,代码行数:28,代码来源:JustInTimeProvisioningConfig.java

示例7: build

import org.apache.axiom.om.OMElement; //导入方法依赖的package包/类
public static FederatedAuthenticatorConfig build(OMElement federatedAuthenticatorConfigOM) {

        if (federatedAuthenticatorConfigOM == null) {
            return null;
        }

        FederatedAuthenticatorConfig federatedAuthenticatorConfig = new FederatedAuthenticatorConfig();

        Iterator<?> iter = federatedAuthenticatorConfigOM.getChildElements();

        while (iter.hasNext()) {
            OMElement element = (OMElement) (iter.next());
            String elementName = element.getLocalName();

            if ("Name".equals(elementName)) {
                federatedAuthenticatorConfig.setName(element.getText());
            } else if ("DisplayName".equals(elementName)) {
                federatedAuthenticatorConfig.setDisplayName(element.getText());
            } else if ("IsEnabled".equals(elementName)) {
                federatedAuthenticatorConfig.setEnabled(Boolean.parseBoolean(element.getText()));
            } else if ("Properties".equals(elementName)) {
                Iterator<?> propertiesIter = element.getChildElements();
                List<Property> propertiesArrList = new ArrayList<Property>();

                if (propertiesIter != null) {
                    while (propertiesIter.hasNext()) {
                        OMElement propertiesElement = (OMElement) (propertiesIter.next());
                        propertiesArrList.add(Property.build(propertiesElement));
                    }
                }

                if (CollectionUtils.isNotEmpty(propertiesArrList)) {
                    Property[] propertiesArr = propertiesArrList.toArray(new Property[0]);
                    federatedAuthenticatorConfig.setProperties(propertiesArr);
                }
            }
        }

        return federatedAuthenticatorConfig;
    }
 
开发者ID:wso2,项目名称:carbon-identity-framework,代码行数:41,代码来源:FederatedAuthenticatorConfig.java

示例8: build

import org.apache.axiom.om.OMElement; //导入方法依赖的package包/类
public static ClaimConfig build(OMElement claimConfigOM) {
    ClaimConfig claimConfig = new ClaimConfig();

    Iterator<?> iter = claimConfigOM.getChildElements();

    while (iter.hasNext()) {

        OMElement element = (OMElement) (iter.next());
        String elementName = element.getLocalName();

        if ("RoleClaimURI".equals(elementName)) {
            claimConfig.setRoleClaimURI(element.getText());
        } else if ("LocalClaimDialect".equals(elementName)) {
            if (element.getText() != null) {
                claimConfig.setLocalClaimDialect(Boolean.parseBoolean(element.getText()));
            }
        } else if ("UserClaimURI".equals(elementName)) {
            claimConfig.setUserClaimURI(element.getText());
        } else if ("AlwaysSendMappedLocalSubjectId".equals(elementName)) {
            if ("true".equals(element.getText())) {
                claimConfig.setAlwaysSendMappedLocalSubjectId(true);
            }
        } else if ("IdpClaims".equals(elementName)) {
            Iterator<?> idpClaimsIter = element.getChildElements();
            List<Claim> idpClaimsArrList = new ArrayList<Claim>();

            if (idpClaimsIter != null) {
                while (idpClaimsIter.hasNext()) {
                    OMElement idpClaimsElement = (OMElement) (idpClaimsIter.next());
                    Claim claim = Claim.build(idpClaimsElement);
                    if (claim != null) {
                        idpClaimsArrList.add(claim);
                    }
                }
            }

            if (CollectionUtils.isNotEmpty(idpClaimsArrList)) {
                Claim[] idpClaimsArr = idpClaimsArrList.toArray(new Claim[0]);
                claimConfig.setIdpClaims(idpClaimsArr);
            }
        } else if ("ClaimMappings".equals(elementName)) {

            Iterator<?> claimMappingsIter = element.getChildElements();
            List<ClaimMapping> claimMappingsArrList = new ArrayList<ClaimMapping>();

            if (claimMappingsIter != null) {
                while (claimMappingsIter.hasNext()) {
                    OMElement claimMappingsElement = (OMElement) (claimMappingsIter.next());
                    ClaimMapping claimMapping = ClaimMapping.build(claimMappingsElement);
                    if (claimMapping != null) {
                        claimMappingsArrList.add(claimMapping);
                    }
                }
            }

            if (CollectionUtils.isNotEmpty(claimMappingsArrList)) {
                ClaimMapping[] claimMappingsArr = claimMappingsArrList
                        .toArray(new ClaimMapping[0]);
                claimConfig.setClaimMappings(claimMappingsArr);
            }
        }
    }

    return claimConfig;
}
 
开发者ID:wso2,项目名称:carbon-identity-framework,代码行数:66,代码来源:ClaimConfig.java

示例9: build

import org.apache.axiom.om.OMElement; //导入方法依赖的package包/类
public static Property build(OMElement propertyOM) {

        if (propertyOM == null) {
            return null;
        }

        Property property = new Property();

        Iterator<?> iter = propertyOM.getChildElements();

        while (iter.hasNext()) {
            OMElement element = (OMElement) (iter.next());
            String elementName = element.getLocalName();

            if ("Name".equals(elementName)) {
                property.setName(element.getText());
            } else if ("Value".equals(elementName)) {
                property.setValue(element.getText());
            } else if ("IsConfidential".equals(elementName)) {
                if (element.getText() != null && element.getText().trim().length() > 0) {
                    property.setConfidential(Boolean.parseBoolean(element.getText()));
                }
            } else if ("defaultValue".equals(elementName)) {
                property.setDefaultValue(element.getText());
            } else if ("DisplayName".equals(elementName)) {
                property.setDisplayName(element.getText());
            } else if ("Required".equals(elementName)) {
                if (element.getText() != null && element.getText().trim().length() > 0) {
                    property.setRequired(Boolean.parseBoolean(element.getText()));
                }
            } else if ("Description".equals(elementName)) {
                property.setDescription(element.getText());
            } else if ("DisplayOrder".equals(elementName)) {
                property.setDisplayOrder(Integer.parseInt(element.getText()));
            } else if ("Type".equals(elementName)) {
                property.setType(element.getText());
            } else if ("IsAdvanced".equals(elementName)) {
                if (element.getText() != null && element.getText().trim().length() > 0) {
                    property.setAdvanced(Boolean.parseBoolean(element.getText()));
                }
            }
        }

        return property;
    }
 
开发者ID:wso2,项目名称:carbon-identity-framework,代码行数:46,代码来源:Property.java

示例10: build

import org.apache.axiom.om.OMElement; //导入方法依赖的package包/类
public static Claim build(OMElement claimOM) {

        if (claimOM == null) {
            return null;
        }

        Claim claim = new Claim();

        Iterator<?> iter = claimOM.getChildElements();

        while (iter.hasNext()) {
            OMElement element = (OMElement) (iter.next());
            String elementName = element.getLocalName();

            if ("ClaimUri".equals(elementName)) {
                claim.setClaimUri(element.getText());
            }

        }
        return claim;

    }
 
开发者ID:wso2,项目名称:carbon-identity-framework,代码行数:23,代码来源:Claim.java

示例11: build

import org.apache.axiom.om.OMElement; //导入方法依赖的package包/类
public static OutboundProvisioningConfig build(OMElement outboundProvisioningConfigOM) {
    OutboundProvisioningConfig outboundProvisioningConfig = new OutboundProvisioningConfig();

    Iterator<?> iter = outboundProvisioningConfigOM.getChildElements();

    while (iter.hasNext()) {
        OMElement element = (OMElement) (iter.next());
        String elementName = element.getLocalName();

        if ("ProvisioningIdentityProviders".equals(elementName)) {

            Iterator<?> provisioningIdentityProvidersIter = element.getChildElements();
            List<IdentityProvider> provisioningIdentityProvidersArrList = new ArrayList<IdentityProvider>();

            if (provisioningIdentityProvidersIter != null) {
                while (provisioningIdentityProvidersIter.hasNext()) {
                    OMElement provisioningIdentityProvidersElement = (OMElement) (provisioningIdentityProvidersIter
                            .next());
                    IdentityProvider idp = IdentityProvider
                            .build(provisioningIdentityProvidersElement);
                    if (idp != null) {
                        provisioningIdentityProvidersArrList.add(idp);
                    }
                }
            }

            if (CollectionUtils.isNotEmpty(provisioningIdentityProvidersArrList)) {
                IdentityProvider[] provisioningIdentityProvidersArr = provisioningIdentityProvidersArrList
                        .toArray(new IdentityProvider[0]);
                outboundProvisioningConfig
                        .setProvisioningIdentityProviders(provisioningIdentityProvidersArr);
            }
        } else if ("ProvisionByRoleList".equals(elementName)) {

            Iterator<?> provisionByRoleListIter = element.getChildElements();
            List<String> provisionByRoleListArrList = new ArrayList<String>();

            if (provisionByRoleListIter != null) {
                while (provisionByRoleListIter.hasNext()) {
                    OMElement provisionByRoleListElement = (OMElement) (provisionByRoleListIter
                            .next());
                    if (provisionByRoleListElement.getText() != null) {
                        provisionByRoleListArrList.add(provisionByRoleListElement.getText());
                    }
                }
            }

            if (CollectionUtils.isNotEmpty(provisionByRoleListArrList)) {
                String[] provisionByRoleListArr = provisionByRoleListArrList
                        .toArray(new String[0]);
                outboundProvisioningConfig.setProvisionByRoleList(provisionByRoleListArr);
            }
        }
    }

    return outboundProvisioningConfig;
}
 
开发者ID:wso2,项目名称:carbon-identity-framework,代码行数:58,代码来源:OutboundProvisioningConfig.java

示例12: build

import org.apache.axiom.om.OMElement; //导入方法依赖的package包/类
public static ProvisioningConnectorConfig build(OMElement provisioningConnectorConfigOM) throws
        IdentityApplicationManagementException{
    ProvisioningConnectorConfig provisioningConnectorConfig = new ProvisioningConnectorConfig();

    Iterator<?> iter = provisioningConnectorConfigOM.getChildElements();

    while (iter.hasNext()) {
        OMElement element = (OMElement) (iter.next());
        String elementName = element.getLocalName();

        if ("ProvisioningProperties".equals(elementName)) {
            Iterator<?> propertiesIter = element.getChildElements();
            List<Property> propertiesArrList = new ArrayList<Property>();

            if (propertiesIter != null) {
                while (propertiesIter.hasNext()) {
                    OMElement propertiesElement = (OMElement) (propertiesIter.next());
                    propertiesArrList.add(Property.build(propertiesElement));
                }
            }

            if (CollectionUtils.isNotEmpty(propertiesArrList)) {
                Property[] propertiesArr = propertiesArrList.toArray(new Property[0]);
                provisioningConnectorConfig.setProvisioningProperties(propertiesArr);
            }
        } else if ("Name".equals(elementName)) {
            provisioningConnectorConfig.setName(element.getText());
        } else if ("IsEnabled".equals(elementName)) {
            provisioningConnectorConfig.setEnabled(Boolean.parseBoolean(element.getText()));
        } else if ("IsBlocking".equals(elementName)) {
            provisioningConnectorConfig.setBlocking(Boolean.parseBoolean(element.getText()));
        } else if ("IsRulesEnabled".equals(elementName)) {
            provisioningConnectorConfig.setRulesEnabled(Boolean.parseBoolean(element.getText()));
        }
    }

    if(StringUtils.isBlank(provisioningConnectorConfig.getName())){
        throw new IdentityApplicationManagementException("No configured name found for " +
                "ProvisioningConnectorConfig");
    }
    return provisioningConnectorConfig;
}
 
开发者ID:wso2,项目名称:carbon-identity-framework,代码行数:43,代码来源:ProvisioningConnectorConfig.java


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