All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.yourinspiration.jexpresso.transformer.PlainTextTransformer Maven / Gradle / Ivy

Go to download

A java web framework inspired by expressjs to build java web application with minimal effort

There is a newer version: 1.4.2
Show newest version
package de.yourinspiration.jexpresso.transformer;

import de.yourinspiration.jexpresso.http.ContentType;

/**
 * Transforms the model data to plain text without any type specific
 * transformation.
 *
 * @author Marcel Härle
 */
public class PlainTextTransformer implements ResponseTransformer {

    @Override
    public String render(Object model) {
        return model != null ? model.toString() : "";
    }

    @Override
    public ContentType contentType() {
        return ContentType.TEXT_PLAIN;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy