Interface Serializer

All Known Implementing Classes:
JsonSerializer, JsonSerializerJsonLite, JsonSerializerJsonP, JsonSerializerJsonSimple, PdfSerializer

public interface Serializer
Subclasses of Serializer class provide methods to serialize PerunAPI's datatypes (as JSON, for example). Implementing any of the write* methods except write(PerunException), write(PerunRuntimeException) is optional.
Since:
0.1
Author:
Jan Klos <ddd@mail.muni.cz>
  • Method Details

    • getContentType

      String getContentType()
      Returns:
      Content-type of this serializer's output format and its encoding.
    • write

      void write(Object object) throws IOException
      Throws:
      IOException
    • writePerunException

      void writePerunException(PerunException pex) throws IOException
      Serializes PerunException.
      Parameters:
      pex - PerunException to serialize
      Throws:
      IOException - If an IO error occurs
    • writePerunRuntimeException

      void writePerunRuntimeException(PerunRuntimeException prex) throws IOException
      Serializes PerunRuntimeException.
      Parameters:
      prex - PerunRuntimeException to serialize
      Throws:
      IOException - If an IO error occurs