本文整理匯總了Java中org.opensaml.saml2.core.AuthzDecisionQuery類的典型用法代碼示例。如果您正苦於以下問題:Java AuthzDecisionQuery類的具體用法?Java AuthzDecisionQuery怎麽用?Java AuthzDecisionQuery使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
AuthzDecisionQuery類屬於org.opensaml.saml2.core包,在下文中一共展示了AuthzDecisionQuery類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: testChildElementsMarshall
import org.opensaml.saml2.core.AuthzDecisionQuery; //導入依賴的package包/類
/** {@inheritDoc} */
public void testChildElementsMarshall() {
QName qname = new QName(SAMLConstants.SAML20P_NS, AuthzDecisionQuery.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20P_PREFIX);
AuthzDecisionQuery query = (AuthzDecisionQuery) buildXMLObject(qname);
super.populateChildElements(query);
QName actionQName = new QName(SAMLConstants.SAML20_NS, Action.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20_PREFIX);
for (int i=0; i<expectedNumActions; i++){
query.getActions().add((Action) buildXMLObject(actionQName));
}
QName evidenceQName = new QName(SAMLConstants.SAML20_NS, Evidence.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20_PREFIX);
query.setEvidence((Evidence) buildXMLObject(evidenceQName));
assertEquals(expectedChildElementsDOM, query);
}
示例2: marshallAttributes
import org.opensaml.saml2.core.AuthzDecisionQuery; //導入依賴的package包/類
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject samlObject, Element domElement) throws MarshallingException {
AuthzDecisionQuery query = (AuthzDecisionQuery) samlObject;
if (query.getResource() != null) {
domElement.setAttributeNS(null, AuthzDecisionQuery.RESOURCE_ATTRIB_NAME, query.getResource());
}
super.marshallAttributes(samlObject, domElement);
}
示例3: processAttribute
import org.opensaml.saml2.core.AuthzDecisionQuery; //導入依賴的package包/類
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
AuthzDecisionQuery query = (AuthzDecisionQuery) samlObject;
if (attribute.getLocalName().equals(AuthzDecisionQuery.RESOURCE_ATTRIB_NAME)) {
query.setResource(attribute.getValue());
} else {
super.processAttribute(samlObject, attribute);
}
}
示例4: processChildElement
import org.opensaml.saml2.core.AuthzDecisionQuery; //導入依賴的package包/類
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
AuthzDecisionQuery query = (AuthzDecisionQuery) parentSAMLObject;
if (childSAMLObject instanceof Action) {
query.getActions().add((Action) childSAMLObject);
} else if (childSAMLObject instanceof Evidence) {
query.setEvidence((Evidence) childSAMLObject);
} else {
super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
示例5: populateRequiredData
import org.opensaml.saml2.core.AuthzDecisionQuery; //導入依賴的package包/類
/** {@inheritDoc} */
protected void populateRequiredData() {
super.populateRequiredData();
AuthzDecisionQuery query = (AuthzDecisionQuery) target;
query.setResource("urn:string:resource");
Action action = (Action) buildXMLObject(new QName(SAMLConstants.SAML20_NS, Action.DEFAULT_ELEMENT_LOCAL_NAME));
query.getActions().add(action);
}
示例6: testResourceFailure
import org.opensaml.saml2.core.AuthzDecisionQuery; //導入依賴的package包/類
/**
* Tests invalid Resource attribute
*/
public void testResourceFailure() {
AuthzDecisionQuery query = (AuthzDecisionQuery) target;
query.setResource(null);
assertValidationFail("Resource attribute was null");
query.setResource("");
assertValidationFail("Resource attribute was empty");
query.setResource(" ");
assertValidationFail("Resource attribute was all whitespace");
}
示例7: testActionFailure
import org.opensaml.saml2.core.AuthzDecisionQuery; //導入依賴的package包/類
/**
* Tests invalid Action child elements
*/
public void testActionFailure() {
AuthzDecisionQuery query = (AuthzDecisionQuery) target;
query.getActions().clear();
assertValidationFail("Action child element list was empty");
}
示例8: testSingleElementMarshall
import org.opensaml.saml2.core.AuthzDecisionQuery; //導入依賴的package包/類
/** {@inheritDoc} */
public void testSingleElementMarshall() {
QName qname = new QName(SAMLConstants.SAML20P_NS, AuthzDecisionQuery.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20P_PREFIX);
AuthzDecisionQuery query = (AuthzDecisionQuery) buildXMLObject(qname);
super.populateRequiredAttributes(query);
query.setResource(expectedResource);
assertEquals(expectedDOM, query);
}
示例9: testSingleElementOptionalAttributesMarshall
import org.opensaml.saml2.core.AuthzDecisionQuery; //導入依賴的package包/類
/** {@inheritDoc} */
public void testSingleElementOptionalAttributesMarshall() {
QName qname = new QName(SAMLConstants.SAML20P_NS, AuthzDecisionQuery.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20P_PREFIX);
AuthzDecisionQuery query = (AuthzDecisionQuery) buildXMLObject(qname);
super.populateRequiredAttributes(query);
super.populateOptionalAttributes(query);
query.setResource(expectedResource);
assertEquals(expectedOptionalAttributesDOM, query);
}
示例10: testSingleElementUnmarshall
import org.opensaml.saml2.core.AuthzDecisionQuery; //導入依賴的package包/類
/** {@inheritDoc} */
public void testSingleElementUnmarshall() {
AuthzDecisionQuery query = (AuthzDecisionQuery) unmarshallElement(singleElementFile);
assertNotNull("AuthzDecisionQuery was null", query);
assertEquals("Unmarshalled Resource attribute was not the expected value", expectedResource, query.getResource());
super.helperTestSingleElementUnmarshall(query);
}
示例11: testChildElementsUnmarshall
import org.opensaml.saml2.core.AuthzDecisionQuery; //導入依賴的package包/類
/** {@inheritDoc} */
public void testChildElementsUnmarshall() {
AuthzDecisionQuery query = (AuthzDecisionQuery) unmarshallElement(childElementsFile);
assertEquals("Action count", expectedNumActions, query.getActions().size());
assertNotNull("Evidence was null", query.getEvidence());
super.helperTestChildElementsUnmarshall(query);
}
示例12: validate
import org.opensaml.saml2.core.AuthzDecisionQuery; //導入依賴的package包/類
/** {@inheritDoc} */
public void validate(AuthzDecisionQuery query) throws ValidationException {
super.validate(query);
validateActions(query);
validateResource(query);
}
示例13: buildObject
import org.opensaml.saml2.core.AuthzDecisionQuery; //導入依賴的package包/類
/** {@inheritDoc} */
public AuthzDecisionQuery buildObject() {
return buildObject(SAMLConstants.SAML20P_NS, AuthzDecisionQuery.DEFAULT_ELEMENT_LOCAL_NAME,
SAMLConstants.SAML20P_PREFIX);
}
示例14: AuthzDecisionQueryMarshaller
import org.opensaml.saml2.core.AuthzDecisionQuery; //導入依賴的package包/類
/**
* Constructor.
*/
public AuthzDecisionQueryMarshaller() {
super(SAMLConstants.SAML20P_NS, AuthzDecisionQuery.DEFAULT_ELEMENT_LOCAL_NAME);
}
示例15: AuthzDecisionQueryUnmarshaller
import org.opensaml.saml2.core.AuthzDecisionQuery; //導入依賴的package包/類
/**
* Constructor.
*/
public AuthzDecisionQueryUnmarshaller() {
super(SAMLConstants.SAML20P_NS, AuthzDecisionQuery.DEFAULT_ELEMENT_LOCAL_NAME);
}