本文整理汇总了Java中org.opensaml.saml2.core.Condition类的典型用法代码示例。如果您正苦于以下问题:Java Condition类的具体用法?Java Condition怎么用?Java Condition使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Condition类属于org.opensaml.saml2.core包,在下文中一共展示了Condition类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testChildElementsMarshall
import org.opensaml.saml2.core.Condition; //导入依赖的package包/类
/** {@inheritDoc} */
public void testChildElementsMarshall() {
QName qname = new QName(SAMLConstants.SAML20_NS, Conditions.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20_PREFIX);
Conditions conditions = (Conditions) buildXMLObject(qname);
QName oneTimeUserQName = new QName(SAMLConstants.SAML20_NS, OneTimeUse.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20_PREFIX);
conditions.getConditions().add((Condition) buildXMLObject(oneTimeUserQName));
QName audienceRestrictionQName = new QName(SAMLConstants.SAML20_NS, AudienceRestriction.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20_PREFIX);
for (int i = 0; i < audienceRestrictionCount; i++) {
conditions.getAudienceRestrictions().add((AudienceRestriction) buildXMLObject(audienceRestrictionQName));
}
conditions.getConditions().add((Condition) buildXMLObject(oneTimeUserQName));
QName proxyRestrictionQName = new QName(SAMLConstants.SAML20_NS, ProxyRestriction.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20_PREFIX);
conditions.getConditions().add((Condition) buildXMLObject(proxyRestrictionQName));
assertEquals(expectedChildElementsDOM, conditions);
}
示例2: processChildElement
import org.opensaml.saml2.core.Condition; //导入依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentObject, XMLObject childObject) throws UnmarshallingException {
Conditions conditions = (Conditions) parentObject;
if (childObject instanceof Condition) {
conditions.getConditions().add((Condition) childObject);
} else {
super.processChildElement(parentObject, childObject);
}
}
示例3: getConditions
import org.opensaml.saml2.core.Condition; //导入依赖的package包/类
/** {@inheritDoc} */
public List<Condition> getConditions() {
return conditions;
}
示例4: ConditionsImpl
import org.opensaml.saml2.core.Condition; //导入依赖的package包/类
/**
* Constructor.
*
* @param namespaceURI the namespace the element is in
* @param elementLocalName the local name of the XML element this Object represents
* @param namespacePrefix the prefix for the given namespace
*/
protected ConditionsImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
super(namespaceURI, elementLocalName, namespacePrefix);
conditions = new IndexedXMLObjectChildrenList<Condition>(this);
}
示例5: getConditions
import org.opensaml.saml2.core.Condition; //导入依赖的package包/类
public List<Condition> getConditions() {
return null;
}