當前位置: 首頁>>代碼示例>>Java>>正文


Java AuthzDecisionQuery類代碼示例

本文整理匯總了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);
}
 
開發者ID:apigee,項目名稱:java-opensaml2,代碼行數:18,代碼來源:AuthzDecisionQueryTest.java

示例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);
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:11,代碼來源:AuthzDecisionQueryMarshaller.java

示例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);
    }
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:11,代碼來源:AuthzDecisionQueryUnmarshaller.java

示例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);
    }
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:14,代碼來源:AuthzDecisionQueryUnmarshaller.java

示例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);
}
 
開發者ID:apigee,項目名稱:java-opensaml2,代碼行數:9,代碼來源:AuthzDecisionQuerySchemaTest.java

示例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");
}
 
開發者ID:apigee,項目名稱:java-opensaml2,代碼行數:16,代碼來源:AuthzDecisionQuerySchemaTest.java

示例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");
    
}
 
開發者ID:apigee,項目名稱:java-opensaml2,代碼行數:11,代碼來源:AuthzDecisionQuerySchemaTest.java

示例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);
}
 
開發者ID:apigee,項目名稱:java-opensaml2,代碼行數:11,代碼來源:AuthzDecisionQueryTest.java

示例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);
}
 
開發者ID:apigee,項目名稱:java-opensaml2,代碼行數:12,代碼來源:AuthzDecisionQueryTest.java

示例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);

}
 
開發者ID:apigee,項目名稱:java-opensaml2,代碼行數:10,代碼來源:AuthzDecisionQueryTest.java

示例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);
}
 
開發者ID:apigee,項目名稱:java-opensaml2,代碼行數:9,代碼來源:AuthzDecisionQueryTest.java

示例12: validate

import org.opensaml.saml2.core.AuthzDecisionQuery; //導入依賴的package包/類
/** {@inheritDoc} */
public void validate(AuthzDecisionQuery query) throws ValidationException {
    super.validate(query);
    validateActions(query);
    validateResource(query);
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:7,代碼來源:AuthzDecisionQuerySchemaValidator.java

示例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);
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:6,代碼來源:AuthzDecisionQueryBuilder.java

示例14: AuthzDecisionQueryMarshaller

import org.opensaml.saml2.core.AuthzDecisionQuery; //導入依賴的package包/類
/**
 * Constructor.
 */
public AuthzDecisionQueryMarshaller() {
    super(SAMLConstants.SAML20P_NS, AuthzDecisionQuery.DEFAULT_ELEMENT_LOCAL_NAME);
}
 
開發者ID:apigee,項目名稱:java-opensaml2,代碼行數:7,代碼來源:AuthzDecisionQueryMarshaller.java

示例15: AuthzDecisionQueryUnmarshaller

import org.opensaml.saml2.core.AuthzDecisionQuery; //導入依賴的package包/類
/**
 * Constructor.
 */
public AuthzDecisionQueryUnmarshaller() {
    super(SAMLConstants.SAML20P_NS, AuthzDecisionQuery.DEFAULT_ELEMENT_LOCAL_NAME);
}
 
開發者ID:apigee,項目名稱:java-opensaml2,代碼行數:7,代碼來源:AuthzDecisionQueryUnmarshaller.java


注:本文中的org.opensaml.saml2.core.AuthzDecisionQuery類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。