Class AbstractPlantUMLWriter<EntityType>
java.lang.Object
org.nuxeo.ecm.core.io.marshallers.puml.AbstractPlantUMLWriter<EntityType>
- All Implemented Interfaces:
Marshaller<EntityType>,Writer<EntityType>
- Direct Known Subclasses:
StreamIntrospectionPlantUMLWriter
@Supports("text/vnd.plantuml")
public abstract class AbstractPlantUMLWriter<EntityType>
extends Object
implements Writer<EntityType>
- Since:
- 2025.12
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this marshaller can handle the marshalling request.protected PlantUMLPrinterfinal voidwrite(EntityType entity, Class<?> clazz, Type genericType, javax.ws.rs.core.MediaType mediatype, OutputStream out) Writes the entity to outOutputStreamusing mediatype format.protected abstract voidwrite(EntityType entity, PlantUMLPrinter pumlPrinter)
-
Field Details
-
ctx
-
-
Constructor Details
-
AbstractPlantUMLWriter
public AbstractPlantUMLWriter()
-
-
Method Details
-
accept
Description copied from interface:MarshallerChecks if this marshaller can handle the marshalling request.Please note it's useless to check that clazz is an instance of EntityType or if generic type and entity type are compatible (unlike JAX-RS which just checks the clazz, not the generic type). It's also useless to check
Supportsis compatible with mediatype. This is already done by theMarshallerRegistryThis method implementation can use injected properties. So you can check the current
RenderingContextto accept or reject a marshalling request.- Specified by:
acceptin interfaceMarshaller<EntityType>- Parameters:
clazz- The type to marshall.genericType- The generic type to marshall.mediatype- The managed mimetype.- Returns:
- true if this converter handle the request, false otherwise.
-
write
public final void write(EntityType entity, Class<?> clazz, Type genericType, javax.ws.rs.core.MediaType mediatype, OutputStream out) throws IOException Description copied from interface:WriterWrites the entity to outOutputStreamusing mediatype format.This method implementation can use injected properties.
- Specified by:
writein interfaceWriter<EntityType>- Parameters:
entity- The entity to marshall.clazz- The requested marshalled class.genericType- The requested marshalled generic type.mediatype- The target mediatype.out- The output of this marshaller.- Throws:
IOException- If some error append while writing entity to out.
-
write
- Throws:
IOException
-
getPumlPrinter
-