edu.internet2.middleware.grouper.ws.soap_v2_4.WsResultMeta Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grouper-ws Show documentation
Show all versions of grouper-ws Show documentation
Internet2 Groups Management WS Core
/*******************************************************************************
* Copyright 2012 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
/*
* @author mchyzer $Id: WsResultMeta.java,v 1.7 2008-12-04 07:51:33 mchyzer Exp $
*/
package edu.internet2.middleware.grouper.ws.soap_v2_4;
import org.apache.commons.lang.StringUtils;
import edu.internet2.middleware.grouper.ws.WsResultCode;
/**
* result metadata (if success, result code, etc) for one result
* (each ws call can have one or many result metadatas)
* @see WsResultCode for all implementations of responses
*/
public class WsResultMeta {
/** params for result */
private WsParam[] params = null;
/**
*
* code of the result for this subject
* SUCCESS: means everything ok
* SUBJECT_NOT_FOUND: cant find the subject
* SUBJECT_DUPLICATE: found multiple subjects
*
*
*/
private String resultCode;
/**
*
* reserved for future purposes
*
*
*/
private String resultCode2;
/**
* error message if there is an error
*/
private StringBuilder resultMessage = null;
/** T or F as to whether it was a successful assignment */
private String success;
/**
*
* code of the result for this subject
* SUCCESS: means everything ok
* SUBJECT_NOT_FOUND: cant find the subject
* SUBJECT_DUPLICATE: found multiple subjects
*
*
*
* @return the resultCode
*/
public String getResultCode() {
return this.resultCode;
}
/**
*
* reserved for future purpose
*
*
* @return the resultCode
*/
public String getResultCode2() {
return this.resultCode2;
}
/**
* error message if there is an error
*
* @return the errorMessage
*/
public String getResultMessage() {
return this.resultMessage == null ? null : StringUtils.trimToNull(this.resultMessage.toString());
}
/**
* T or F as to whether it was a successful assignment
*
* @return the success
*/
public String getSuccess() {
return this.success;
}
/**
* @param resultCode1 the resultCode to set
*/
public void setResultCode(String resultCode1) {
this.resultCode = resultCode1;
}
/**
* @param resultCode1 the resultCode2 to set
*/
public void setResultCode2(String resultCode1) {
this.resultCode2 = resultCode1;
}
/**
* T or F as to whether it was a successful assignment
* @param theSuccess T | F
*/
public void setSuccess(String theSuccess) {
this.success = theSuccess;
}
/**
* error message if there is an error
*
* @param errorMessage
* the errorMessage to set
*/
public void setResultMessage(String errorMessage) {
if (StringUtils.isBlank(errorMessage)) {
this.resultMessage = null;
} else {
this.resultMessage = new StringBuilder(errorMessage);
}
}
/**
* @return the params
*/
public WsParam[] getParams() {
return this.params;
}
/**
* @param params1 the params to set
*/
public void setParams(WsParam[] params1) {
this.params = params1;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy