Package org.imixs.archive.service.api
Class XMLItemCollectionWriter
- java.lang.Object
-
- org.imixs.archive.service.api.XMLItemCollectionWriter
-
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<org.imixs.workflow.xml.XMLDocument>
@Provider @Produces("text/html") public class XMLItemCollectionWriter extends Object implements javax.ws.rs.ext.MessageBodyWriter<org.imixs.workflow.xml.XMLDocument>This class translates a XMLDocument into a HTML representation.- Version:
- 1.1
- Author:
- rsoika
-
-
Constructor Summary
Constructors Constructor Description XMLItemCollectionWriter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringconvertValuesToString(List values)This method converts the Values of a vector into a string representation.longgetSize(org.imixs.workflow.xml.XMLDocument arg0, Class<?> arg1, Type arg2, Annotation[] arg3, javax.ws.rs.core.MediaType arg4)booleanisWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)static voidprintHead(BufferedWriter bw, String contentType, String encoding)This method prints the generic HTML Header for HTML output, including a default CSS definition for table layout.static voidprintXMLItemCollectionHTML(BufferedWriter bw, org.imixs.workflow.xml.XMLDocument xmlworkItem)This Method prints a single XMLItemCollection in html format.voidwriteTo(org.imixs.workflow.xml.XMLDocument xmlItemCollection, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)
-
-
-
Method Detail
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
isWriteablein interfacejavax.ws.rs.ext.MessageBodyWriter<org.imixs.workflow.xml.XMLDocument>
-
writeTo
public void writeTo(org.imixs.workflow.xml.XMLDocument xmlItemCollection, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException- Specified by:
writeToin interfacejavax.ws.rs.ext.MessageBodyWriter<org.imixs.workflow.xml.XMLDocument>- Throws:
IOExceptionjavax.ws.rs.WebApplicationException
-
getSize
public long getSize(org.imixs.workflow.xml.XMLDocument arg0, Class<?> arg1, Type arg2, Annotation[] arg3, javax.ws.rs.core.MediaType arg4)- Specified by:
getSizein interfacejavax.ws.rs.ext.MessageBodyWriter<org.imixs.workflow.xml.XMLDocument>
-
printXMLItemCollectionHTML
public static void printXMLItemCollectionHTML(BufferedWriter bw, org.imixs.workflow.xml.XMLDocument xmlworkItem) throws IOException
This Method prints a single XMLItemCollection in html format. The items are sorted by name- Parameters:
out-workItem-- Throws:
IOException
-
convertValuesToString
public static String convertValuesToString(List values)
This method converts the Values of a vector into a string representation. Multivalues will be separated with '~' characters. Date Objects will be converted into a short String representation taking the server locale- Parameters:
values-- Returns:
-
printHead
public static void printHead(BufferedWriter bw, String contentType, String encoding) throws IOException
This method prints the generic HTML Header for HTML output, including a default CSS definition for table layout. The meta tag Content-Type is generated in case a contentType and encoding is provided.- Parameters:
bw-- Throws:
IOException
-
-