本文整理了Java中org.apache.neethi.builders.xml.XMLPrimitiveAssertionBuilder
类的一些代码示例,展示了XMLPrimitiveAssertionBuilder
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLPrimitiveAssertionBuilder
类的具体详情如下:
包路径:org.apache.neethi.builders.xml.XMLPrimitiveAssertionBuilder
类名称:XMLPrimitiveAssertionBuilder
暂无
代码示例来源:origin: org.apache.cxf/cxf-rt-ws-policy
public PrimitiveAssertion(Element element) {
super(new QName(element.getNamespaceURI(), element.getLocalName()),
XMLPrimitiveAssertionBuilder.isOptional(element),
XMLPrimitiveAssertionBuilder.isIgnorable(element));
}
代码示例来源:origin: org.apache.neethi/neethi
public Assertion newPolicyContainingAssertion(Element element, Map<QName, String> atts, Policy policy) {
return new PolicyContainingPrimitiveAssertion(getQName(element),
isOptional(element), isIgnorable(element),
policy);
}
代码示例来源:origin: apache/cxf
Assertion assertion = null;
if (RM11Constants.WSRMP_NAMESPACE_URI.equals(elem.getNamespaceURI())) {
boolean optional = XMLPrimitiveAssertionBuilder.isOptional(elem);
String lname = elem.getLocalName();
if (RMConstants.RMASSERTION_NAME.equals(lname)) {
assertion = nesting.build(elem, factory);
assertion = nesting.build(elem, factory);
代码示例来源:origin: apache/cxf
/**
* @see org.apache.neethi.builders.AssertionBuilder#build(org.w3c.dom.Element,
* org.apache.neethi.AssertionBuilderFactory)
*/
public Assertion build(Element elem, AssertionBuilderFactory factory) throws IllegalArgumentException {
Assertion assertion = null;
if (RSP_NAMESPACE.equals(elem.getNamespaceURI()) && CONFORMANT_NAME.equals(elem.getLocalName())) {
boolean optional = XMLPrimitiveAssertionBuilder.isOptional(elem);
assertion = new PrimitiveAssertion(CONFORMANT_QNAME, optional);
}
return assertion;
}
}
代码示例来源:origin: org.apache.neethi/neethi
public AssertionBuilderFactoryImpl(PolicyBuilder eng, ConverterRegistry reg) {
engine = eng;
if (reg == null) {
throw new IllegalArgumentException("ConverterRegistry must not be null");
}
converters = reg;
for (AssertionBuilder<?> builder : Service.providers(AssertionBuilder.class)) {
QName[] knownElements = builder.getKnownElements();
for (int i = 0; i < knownElements.length; i++) {
registeredBuilders.put(knownElements[i], builder);
}
}
defaultBuilder = new XMLPrimitiveAssertionBuilder();
}
代码示例来源:origin: org.apache.neethi/neethi
return newPrimitiveAssertion(element, atts.isEmpty() ? null : atts);
} else if (policyCount == 1 && count == 1) {
Policy policy = factory.getPolicyEngine().getPolicy(policyEl);
return newPolicyContainingAssertion(element, atts.isEmpty() ? null : atts, policy);
代码示例来源:origin: apache/cxf
/**
* @see org.apache.neethi.builders.AssertionBuilder#build(org.w3c.dom.Element,
* org.apache.neethi.AssertionBuilderFactory)
*/
public Assertion build(Element elem, AssertionBuilderFactory factory) throws IllegalArgumentException {
Assertion assertion = null;
if (WSMC_NAMESPACE.equals(elem.getNamespaceURI()) && MCSUPPORTED_NAME.equals(elem.getLocalName())) {
boolean optional = XMLPrimitiveAssertionBuilder.isOptional(elem);
assertion = new PrimitiveAssertion(MCSUPPORTED_QNAME, optional);
}
return assertion;
}
}
代码示例来源:origin: org.apache.cxf/cxf-rt-ws-policy
protected AssertionBuilder<?> handleNoRegisteredBuilder(QName qname) {
if (ignoreUnknownAssertions) {
boolean alreadyWarned = ignored.contains(qname);
if (!alreadyWarned) {
ignored.add(qname);
Message m = new Message("NO_ASSERTIONBUILDER_EXC", BUNDLE, qname.toString());
LOG.warning(m.toString());
}
return new XMLPrimitiveAssertionBuilder();
}
Message m = new Message("NO_ASSERTIONBUILDER_EXC", BUNDLE, qname.toString());
throw new PolicyException(m);
}
代码示例来源:origin: apache/cxf
public PrimitiveAssertion(Element element) {
super(new QName(element.getNamespaceURI(), element.getLocalName()),
XMLPrimitiveAssertionBuilder.isOptional(element),
XMLPrimitiveAssertionBuilder.isIgnorable(element));
}
代码示例来源:origin: org.apache.neethi/neethi
public Assertion newPrimitiveAssertion(Element element, Map<QName, String> atts) {
return new PrimitiveAssertion(getQName(element),
isOptional(element), isIgnorable(element),
atts,
element.getTextContent());
}
public Assertion newPolicyContainingAssertion(Element element, Map<QName, String> atts, Policy policy) {
代码示例来源:origin: org.codehaus.fabric3/fabric3-binding-ws-axis2
private static void buildAssertionBuilders() {
// Get the current context class loader
ClassLoader originalCL = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(NeethiPolicyApplier.class.getClassLoader());
QName XML_ASSERTION_BUILDER = new QName("http://test.org/test", "test");
Iterator<AssertionBuilder> asseryionBuilders = ServiceRegistry.lookupProviders(AssertionBuilder.class);
while (asseryionBuilders.hasNext()) {
AssertionBuilder builder = asseryionBuilders.next();
for (QName knownElement : builder.getKnownElements()) {
PolicyEngine.registerBuilder(knownElement, builder);
}
}
PolicyEngine.registerBuilder(XML_ASSERTION_BUILDER, new XMLPrimitiveAssertionBuilder());
} finally {
// Change class loader back to what it was !!
Thread.currentThread().setContextClassLoader(originalCL);
}
}
代码示例来源:origin: org.apache.neethi/neethi
/**
* Constructs a XmlPrimitiveAssertion from an Element.
*
* @param element
* the Element from which the XmlAssertion is constructed
*/
public XmlPrimitiveAssertion(Element element) {
super(new QName(element.getNamespaceURI(), element.getLocalName()),
XMLPrimitiveAssertionBuilder.isOptional(element),
XMLPrimitiveAssertionBuilder.isIgnorable(element));
this.element = element;
}
代码示例来源:origin: apache/cxf
protected AssertionBuilder<?> handleNoRegisteredBuilder(QName qname) {
if (ignoreUnknownAssertions) {
boolean alreadyWarned = ignored.contains(qname);
if (!alreadyWarned) {
ignored.add(qname);
Message m = new Message("NO_ASSERTIONBUILDER_EXC", BUNDLE, qname.toString());
LOG.warning(m.toString());
}
return new XMLPrimitiveAssertionBuilder();
}
Message m = new Message("NO_ASSERTIONBUILDER_EXC", BUNDLE, qname.toString());
throw new PolicyException(m);
}
代码示例来源:origin: apache/cxf
public Assertion build(Element element, AssertionBuilderFactory fact) {
if (XMLPrimitiveAssertionBuilder.isOptional(element)
|| XMLPrimitiveAssertionBuilder.isIgnorable(element)) {
return super.build(element, fact);
}
QName q = new QName(element.getNamespaceURI(), element.getLocalName());
return assertions.get(q);
}
});
代码示例来源:origin: apache/cxf
public Assertion build(Element element, AssertionBuilderFactory fact) {
if (XMLPrimitiveAssertionBuilder.isOptional(element)
|| XMLPrimitiveAssertionBuilder.isIgnorable(element)) {
return super.build(element, fact);
}
QName q = new QName(element.getNamespaceURI(), element.getLocalName());
return assertions.get(q);
}
});
代码示例来源:origin: org.apache.cxf/cxf-rt-ws-security
public Assertion build(Element element, AssertionBuilderFactory fact) {
if (XMLPrimitiveAssertionBuilder.isOptional(element)
|| XMLPrimitiveAssertionBuilder.isIgnorable(element)) {
return super.build(element, fact);
}
QName q = new QName(element.getNamespaceURI(), element.getLocalName());
return assertions.get(q);
}
});
代码示例来源:origin: org.apache.cxf/cxf-rt-ws-security
public Assertion build(Element element, AssertionBuilderFactory fact) {
if (XMLPrimitiveAssertionBuilder.isOptional(element)
|| XMLPrimitiveAssertionBuilder.isIgnorable(element)) {
return super.build(element, fact);
}
QName q = new QName(element.getNamespaceURI(), element.getLocalName());
return assertions.get(q);
}
});
代码示例来源:origin: apache/cxf
public Assertion build(Element element, AssertionBuilderFactory factory) {
QName name = new QName(element.getNamespaceURI(), element.getLocalName());
JaxbAssertion<T> assertion = buildAssertion();
assertion.setName(name);
assertion.setOptional(XMLPrimitiveAssertionBuilder.isOptional(element));
assertion.setIgnorable(XMLPrimitiveAssertionBuilder.isIgnorable(element));
assertion.setData(getData(element));
return assertion;
}
代码示例来源:origin: org.apache.cxf/cxf-rt-ws-policy
public Assertion build(Element element, AssertionBuilderFactory factory) {
QName name = new QName(element.getNamespaceURI(), element.getLocalName());
JaxbAssertion<T> assertion = buildAssertion();
assertion.setName(name);
assertion.setOptional(XMLPrimitiveAssertionBuilder.isOptional(element));
assertion.setIgnorable(XMLPrimitiveAssertionBuilder.isIgnorable(element));
assertion.setData(getData(element));
return assertion;
}
代码示例来源:origin: apache/cxf
public Assertion build(Element element, AssertionBuilderFactory fact) {
if (XMLPrimitiveAssertionBuilder.isOptional(element)
|| XMLPrimitiveAssertionBuilder.isIgnorable(element)) {
return super.build(element, fact);
}
QName q = new QName(element.getNamespaceURI(), element.getLocalName());
return assertions.get(q);
}
});
内容来源于网络,如有侵权,请联系作者删除!