org.hpccsystems.ws.client.wrappers.wsworkunits.WUCreateResponseWrapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wsclient Show documentation
Show all versions of wsclient Show documentation
This project allows a user to interact with ESP services in a controlled manner. The API calls available under org.hpccsystems.ws.client.platform allow for a user to target ESP's across multiple environments running a range of hpccsystems-platform versions. There is no guarantee that if a user utilizes org.hpccsystems.ws.client.gen generated stub code from wsdl, that the calls will be backwards compatible with older hpccsystems-platform versions.
package org.hpccsystems.ws.client.wrappers.wsworkunits;
import java.util.List;
import org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper;
import org.hpccsystems.ws.client.wrappers.EspExceptionWrapper;
@Deprecated
public class WUCreateResponseWrapper
{
private WorkunitWrapper workunit;
private ArrayOfEspExceptionWrapper exceptions = null;
/**
* Instantiates a new WU create response wrapper.
*
* @param resp
* the resp
*/
public WUCreateResponseWrapper(org.hpccsystems.ws.client.gen.axis2.wsworkunits.v1_58.WUCreateResponse resp)
{
if (resp == null)
return;
workunit = new WorkunitWrapper(resp.getWorkunit());
if (resp.getExceptions() != null && resp.getExceptions().getException() != null)
{
exceptions = new ArrayOfEspExceptionWrapper(resp.getExceptions());
}
}
/**
* Instantiates a new WU create response wrapper.
*
* @param resp
* the resp
*/
public WUCreateResponseWrapper(org.hpccsystems.ws.client.gen.axis2.wsworkunits.v1_62.WUCreateResponse resp)
{
if (resp == null)
return;
workunit = new WorkunitWrapper(resp.getWorkunit());
if (resp.getExceptions() != null && resp.getExceptions().getException() != null)
{
exceptions = new ArrayOfEspExceptionWrapper(resp.getExceptions());
}
}
/**
* Instantiates a new WU create response wrapper.
*
* @param resp
* the resp
*/
public WUCreateResponseWrapper(org.hpccsystems.ws.client.gen.axis2.wsworkunits.v1_69.WUCreateResponse resp)
{
if (resp == null)
return;
workunit = new WorkunitWrapper(resp.getWorkunit());
if (resp.getExceptions() != null && resp.getExceptions().getException() != null)
{
exceptions = new ArrayOfEspExceptionWrapper(resp.getExceptions());
}
}
/**
* Instantiates a new WU create response wrapper.
*
* @param resp
* the resp
*/
public WUCreateResponseWrapper(org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.WUCreateResponse resp)
{
if (resp == null)
return;
workunit = new WorkunitWrapper(resp.getWorkunit());
if (resp.getExceptions() != null && resp.getExceptions().getException() != null)
{
exceptions = new ArrayOfEspExceptionWrapper(resp.getExceptions());
}
}
/**
* Gets the workunit wrapper.
*
* @return the workunit
*/
public WorkunitWrapper getWorkunitWrapper()
{
return workunit;
}
/**
* Sets the workunit.
*
* @param workunit
* the workunit to set
*/
public void setWorkunit(WorkunitWrapper workunit)
{
this.workunit = workunit;
}
/**
* Gets the exceptions.
*
* @return the exceptions
*/
public ArrayOfEspExceptionWrapper getExceptions()
{
return exceptions;
}
/**
* Sets the exceptions.
*
* @param exceptions
* the exceptions to set
*/
public void setExceptions(ArrayOfEspExceptionWrapper exceptions)
{
this.exceptions = exceptions;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString()
{
return "WUCreateResponseWrapper [workunit=" + workunit + ", exceptions=" + exceptions + "]";
}
/**
* Gets the raw array of esp exceptions.
*
* @return the raw array of esp exceptions
*/
public org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.ArrayOfEspException getRawArrayOfEspExceptions()
{
if (this.exceptions == null || this.exceptions.getEspExceptions() == null || this.exceptions.getEspExceptions().size() == 0)
return null;
org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.ArrayOfEspException result=
new org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.ArrayOfEspException();
List espExceptions = this.exceptions.getEspExceptions();
org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.EspException[] raw = new org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.EspException[espExceptions.size()];
for (int i=0; i < espExceptions.size();i++)
{
org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.EspException esp = new org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.EspException();
esp.setAudience(espExceptions.get(i).getAudience());
esp.setMessage(espExceptions.get(i).getMessage());
esp.setSource(espExceptions.get(i).getSource());
esp.setCode(espExceptions.get(i).getCode());
raw[i]=esp;
}
result.setException(raw);
return result;
}
}