本文整理汇总了Java中org.opensaml.saml1.core.StatusCode.setValue方法的典型用法代码示例。如果您正苦于以下问题:Java StatusCode.setValue方法的具体用法?Java StatusCode.setValue怎么用?Java StatusCode.setValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.opensaml.saml1.core.StatusCode
的用法示例。
在下文中一共展示了StatusCode.setValue方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: newStatus
import org.opensaml.saml1.core.StatusCode; //导入方法依赖的package包/类
protected final Status newStatus(final QName codeValue, final String statusMessage) {
final Status status = newSamlObject(Status.class);
final StatusCode code = newSamlObject(StatusCode.class);
code.setValue(codeValue);
status.setStatusCode(code);
if (statusMessage != null) {
final StatusMessage message = newSamlObject(StatusMessage.class);
message.setMessage(statusMessage);
status.setStatusMessage(message);
}
return status;
}
示例2: processAttribute
import org.opensaml.saml1.core.StatusCode; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
StatusCode statusCode = (StatusCode) samlObject;
if (attribute.getName().equals(StatusCode.VALUE_ATTRIB_NAME)) {
statusCode.setValue(XMLHelper.getAttributeValueAsQName(attribute));
} else {
super.processAttribute(samlObject, attribute);
}
}
示例3: populateRequiredData
import org.opensaml.saml1.core.StatusCode; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void populateRequiredData() {
super.populateRequiredData();
StatusCode statusCode = (StatusCode) target;
statusCode.setValue(StatusCode.SUCCESS);
}
示例4: testSingleElementMarshall
import org.opensaml.saml1.core.StatusCode; //导入方法依赖的package包/类
/** {@inheritDoc} */
public void testSingleElementMarshall() {
Status status = (Status) buildXMLObject(qname);
StatusCode statusCode = (StatusCode) buildXMLObject(StatusCode.DEFAULT_ELEMENT_NAME);
statusCode.setValue(StatusCode.SUCCESS);
status.setStatusCode(statusCode);
assertEquals(expectedDOM, status);
}
示例5: testChildElementsMarshall
import org.opensaml.saml1.core.StatusCode; //导入方法依赖的package包/类
/** {@inheritDoc} */
public void testChildElementsMarshall() {
Status status = (Status) buildXMLObject(qname);
StatusCode statusCode = (StatusCode) buildXMLObject(StatusCode.DEFAULT_ELEMENT_NAME);
statusCode.setValue(StatusCode.SUCCESS);
status.setStatusCode(statusCode);
StatusMessage statusMessage = (StatusMessage) buildXMLObject(StatusMessage.DEFAULT_ELEMENT_NAME);
status.setStatusMessage(statusMessage);
assertEquals(expectedChildElementsDOM, status);
}
示例6: testMissingValue
import org.opensaml.saml1.core.StatusCode; //导入方法依赖的package包/类
public void testMissingValue(){
StatusCode statusCode = (StatusCode) target;
statusCode.setValue(null);
assertValidationFail("No Value attribute, should raise a Validation Exception");
}
示例7: testBadQName1
import org.opensaml.saml1.core.StatusCode; //导入方法依赖的package包/类
public void testBadQName1(){
StatusCode statusCode = (StatusCode) target;
QName qname = new QName(SAMLConstants.SAML1_NS, "Success", SAMLConstants.SAML1_PREFIX);
statusCode.setValue(qname);
assertValidationFail("Value in SAML1 assertion namespace, should raise a Validation Exception");
}
示例8: testBadQName2
import org.opensaml.saml1.core.StatusCode; //导入方法依赖的package包/类
public void testBadQName2(){
StatusCode statusCode = (StatusCode) target;
QName qname = new QName(SAMLConstants.SAML10P_NS, "ssSuccess", SAMLConstants.SAML1P_PREFIX);
statusCode.setValue(qname);
assertValidationFail("unrecognized LocalName in SAML1 protocol namespace, should raise a Validation Exception");
}
示例9: testSingleElementMarshall
import org.opensaml.saml1.core.StatusCode; //导入方法依赖的package包/类
/** {@inheritDoc} */
public void testSingleElementMarshall() {
StatusCode code = (StatusCode) buildXMLObject(qname);
code.setValue(StatusCode.SUCCESS);
assertEquals(expectedDOM, code);
}
示例10: testChildElementsMarshall
import org.opensaml.saml1.core.StatusCode; //导入方法依赖的package包/类
/** {@inheritDoc} */
public void testChildElementsMarshall() {
StatusCode code = (StatusCode) buildXMLObject(qname);
code.setValue(StatusCode.REQUESTER);
code.setStatusCode((StatusCode) buildXMLObject(qname));
code.getStatusCode().setValue(StatusCode.VERSION_MISMATCH);
assertEquals(expectedChildElementsDOM, code);
}