本文整理汇总了Java中org.opensaml.saml2.core.Status.setStatusMessage方法的典型用法代码示例。如果您正苦于以下问题:Java Status.setStatusMessage方法的具体用法?Java Status.setStatusMessage怎么用?Java Status.setStatusMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.opensaml.saml2.core.Status
的用法示例。
在下文中一共展示了Status.setStatusMessage方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildStatus
import org.opensaml.saml2.core.Status; //导入方法依赖的package包/类
private Status buildStatus(String status, String statMsg) {
Status stat = new StatusBuilder().buildObject();
// Set the status code.
StatusCode statCode = new StatusCodeBuilder().buildObject();
statCode.setValue(status);
stat.setStatusCode(statCode);
// Set the status Message.
if (statMsg != null) {
StatusMessage statMesssage = new StatusMessageBuilder().buildObject();
statMesssage.setMessage(statMsg);
stat.setStatusMessage(statMesssage);
}
return stat;
}
示例2: buildStatus
import org.opensaml.saml2.core.Status; //导入方法依赖的package包/类
private Status buildStatus(String status, String statMsg) {
Status stat = new StatusBuilder().buildObject();
// Set the status code
StatusCode statCode = new StatusCodeBuilder().buildObject();
statCode.setValue(status);
stat.setStatusCode(statCode);
// Set the status Message
if (statMsg != null) {
StatusMessage statMesssage = new StatusMessageBuilder().buildObject();
statMesssage.setMessage(statMsg);
stat.setStatusMessage(statMesssage);
}
return stat;
}
示例3: buildStatus
import org.opensaml.saml2.core.Status; //导入方法依赖的package包/类
private Status buildStatus(String status, String statMsg) {
Status stat = new StatusBuilder().buildObject();
//Set the status code
StatusCode statCode = new StatusCodeBuilder().buildObject();
statCode.setValue(status);
stat.setStatusCode(statCode);
//Set the status Message
if (statMsg != null) {
StatusMessage statMesssage = new StatusMessageBuilder().buildObject();
statMesssage.setMessage(statMsg);
stat.setStatusMessage(statMesssage);
}
return stat;
}
示例4: buildStatus
import org.opensaml.saml2.core.Status; //导入方法依赖的package包/类
/**
* Get status
*
* @param status
* @param statMsg
* @return Status object
*/
private Status buildStatus(String status, String statMsg) {
Status stat = new StatusBuilder().buildObject();
// Set the status code
StatusCode statCode = new StatusCodeBuilder().buildObject();
statCode.setValue(status);
stat.setStatusCode(statCode);
// Set the status Message
if (statMsg != null) {
StatusMessage statMesssage = new StatusMessageBuilder().buildObject();
statMesssage.setMessage(statMsg);
stat.setStatusMessage(statMesssage);
}
return stat;
}
示例5: processChildElement
import org.opensaml.saml2.core.Status; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
throws UnmarshallingException {
Status status = (Status) parentSAMLObject;
if (childSAMLObject instanceof StatusCode) {
status.setStatusCode((StatusCode) childSAMLObject);
} else if (childSAMLObject instanceof StatusMessage) {
status.setStatusMessage((StatusMessage) childSAMLObject);
} else if (childSAMLObject instanceof StatusDetail) {
status.setStatusDetail((StatusDetail) childSAMLObject);
} else {
super.processChildElement(parentSAMLObject, childSAMLObject);
}
}
示例6: createLogoutResponse
import org.opensaml.saml2.core.Status; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private LogoutResponse createLogoutResponse(String id,
String code, String msg) {
// Consume LogoutResponse
LogoutResponse lresp = ((SAMLObjectBuilder<LogoutResponse>)
_bf.getBuilder(LogoutResponse.DEFAULT_ELEMENT_NAME)).
buildObject();
String uid = UUID.randomUUID().toString();
lresp.setID(uid);
lresp.setInResponseTo(id);
lresp.setIssueInstant(new DateTime());
lresp.setVersion(SAMLVersion.VERSION_20);
lresp.setIssuer(getIssuer());
// Set status code
Status status = ((SAMLObjectBuilder<Status>) _bf.getBuilder(
Status.DEFAULT_ELEMENT_NAME)).buildObject();
StatusCode scode = ((SAMLObjectBuilder<StatusCode>) _bf.getBuilder(
StatusCode.DEFAULT_ELEMENT_NAME)).buildObject();
scode.setValue(code);
status.setStatusCode(scode);
if (!msg.equals("")) {
StatusMessage smsg = ((SAMLObjectBuilder<StatusMessage>) _bf.getBuilder(
StatusMessage.DEFAULT_ELEMENT_NAME)).buildObject();
smsg.setMessage(msg);
status.setStatusMessage(smsg);
}
lresp.setStatus(status);
return lresp;
}
示例7: buildStatusMsg
import org.opensaml.saml2.core.Status; //导入方法依赖的package包/类
/**
* Set the StatusMessage for Status of Response
*
* @param statusMsg
* @return
*/
private Status buildStatusMsg(Status status, String statusMsg) {
if (statusMsg != null) {
StatusMessage statusMesssage = new StatusMessageBuilder().buildObject();
statusMesssage.setMessage(statusMsg);
status.setStatusMessage(statusMesssage);
}
return status;
}
示例8: buildStatus
import org.opensaml.saml2.core.Status; //导入方法依赖的package包/类
private static Status buildStatus() {
Status stat = new StatusBuilder().buildObject();
//Set the status code
StatusCode statCode = new StatusCodeBuilder().buildObject();
statCode.setValue("urn:oasis:names:tc:SAML:2.0:status:Responder");
stat.setStatusCode(statCode);
StatusMessage statMesssage = new StatusMessageBuilder().buildObject();
statMesssage.setMessage("Error when processing the Authentication Request");
stat.setStatusMessage(statMesssage);
return stat;
}
示例9: testChildElementsMarshall
import org.opensaml.saml2.core.Status; //导入方法依赖的package包/类
/** {@inheritDoc} */
public void testChildElementsMarshall() {
QName qname = new QName(SAMLConstants.SAML20P_NS, Status.DEFAULT_ELEMENT_LOCAL_NAME);
Status status = (Status) buildXMLObject(qname);
QName statusCodeQName = new QName(SAMLConstants.SAML20P_NS, StatusCode.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20P_PREFIX);
status.setStatusCode((StatusCode) buildXMLObject(statusCodeQName));
QName statusMessageQName = new QName(SAMLConstants.SAML20P_NS, StatusMessage.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20P_PREFIX);
status.setStatusMessage((StatusMessage) buildXMLObject(statusMessageQName));
assertEquals(expectedChildElementsDOM, status);
}