public abstract class SerializableUWSObject
extends java.lang.Object
implements java.io.Serializable
This class defines the methods that an object of the UWS pattern must implement to be written in any format (by default, XML ; see XMLSerializer
).
The serialize(UWSSerializer, JobOwner)
method must be implemented. It is the most important method of this class
because it returns a serialized representation of this UWS object.
Constructor and Description |
---|
SerializableUWSObject() |
Modifier and Type | Method and Description |
---|---|
void |
serialize(javax.servlet.ServletOutputStream output,
UWSSerializer serializer)
Serializes the whole object in the given output stream and thanks to the given serializer.
|
void |
serialize(javax.servlet.ServletOutputStream output,
UWSSerializer serializer,
JobOwner owner)
Serializes the while object in the given output stream,
considering the given owner ID and thanks to the given serializer.
|
java.lang.String |
serialize(UWSSerializer serializer)
Serializes the whole object thanks to the given serializer.
|
abstract java.lang.String |
serialize(UWSSerializer serializer,
JobOwner owner)
Serializes the whole object considering the given owner (supposed to be the current user)
and thanks to the given serializer.
|
public java.lang.String serialize(UWSSerializer serializer) throws java.lang.Exception
serializer
- The serializer to use.java.lang.Exception
- If there is an unexpected error during the serialization.serialize(UWSSerializer, JobOwner)
public abstract java.lang.String serialize(UWSSerializer serializer, JobOwner owner) throws UWSException, java.lang.Exception
serializer
- The serializer to use.owner
- The current user.UWSException
- If the owner is not allowed to see the content of the serializable object.java.lang.Exception
- If there is any other error during the serialization.public void serialize(javax.servlet.ServletOutputStream output, UWSSerializer serializer) throws java.lang.Exception
output
- The output stream in which this object must be serialized.serializer
- The serializer to use.UWSException
- If there is an error during the serialization.java.lang.Exception
serialize(ServletOutputStream, UWSSerializer, JobOwner)
public void serialize(javax.servlet.ServletOutputStream output, UWSSerializer serializer, JobOwner owner) throws UWSException, java.io.IOException, java.lang.Exception
output
- The ouput stream in which this object must be serialized.serializer
- The serializer to use.owner
- The user who asks for the serialization.UWSException
- If the owner is not allowed to see the content of the serializable object.java.io.IOException
- If there is an error while writing in the given stream.java.lang.Exception
- If there is any other error during the serialization.serialize(UWSSerializer, JobOwner)