/*******************************************************************************
 * Copyright 2019 2Fi Business Solutions Ltd.
 *
 * This code is part of the Core project.
 *
 * This code is copyrighted. Under no circumstances should any party, people,
 * or organization should redistribute any portions of this code in any form,
 * either verbatim or through electronic media, to any third parties, unless
 * under explicit written permission by 2Fi Business Solutions Ltd.
 ******************************************************************************/
package com.ffii.core.web.view;

import org.springframework.web.servlet.View;

/**
 * Abstract base class extending Spring {@link AbstractView} for {@link View} implementations.
 *
 * @see View
 * @author Patrick
 */
public abstract class AbstractView extends org.springframework.web.servlet.view.AbstractView {

	public static final String CONTENT_TYPE_JSON = "application/json";

	public static final String CONTENT_TYPE_JAVASCRIPT = "text/javascript";

	public static final String CONTENT_TYPE_TEXT_HTML = "text/html";
	public static final String CONTENT_TYPE_TEXT_PLAIN = "text/plain";
	public static final String CONTENT_TYPE_XML = "text/xml";

	public static final String CONTENT_TYPE_JPEG = "image/jpeg";
	public static final String CONTENT_TYPE_PNG = "image/png";

	public static final String CHARSET_UTF8 = "UTF-8";

	protected boolean disableCaching = true;

	/**
	 * Disables caching of the generated JSON. <br>
	 * Default is {@code true}, which will prevent the client from caching the generated JSON.
	 */
	public void setDisableCaching(boolean disableCaching) {
		this.disableCaching = disableCaching;
	}

}
