001package com.randomnoun.common.jessop; 002 003/* (c) 2016 randomnoun. All Rights Reserved. This work is licensed under a 004 * BSD Simplified License. ( http://www.randomnoun.com/bsd-simplified.html ) 005 */ 006 007/** This object contains values that are defined in the <%@ jessop ... %> declaration attributes. 008 * 009 * <p>The {@link AbstractJessopScriptBuilder} currently processes all <code><%@ ... %></code> declarations, 010 * including the <code>jessop</code> declarationType. 011 * 012 * <p>This class acts as a Plain Old Java Object (POJO) and does not perform any processing of directives. 013 * 014 * <p>Note that the target language is not stored in this class; the {@link AbstractJessopScriptBuilder} will change 015 * the {@link JessopScriptBuilder} implementation instead. 016 * 017 * @author knoxg 018 */ 019public class JessopDeclarations { 020 021 022 // things we might want to add later: 023 // contentType="text/html; charset=utf-8" 024 // pageEncoding="utf-8" 025 // suppressEol="true" <-- if a line consists just of a '%>' token, then don't generate the newline after it in the output 026 // (seeing as I'm mainly using this for code generators at the moment, and I don't like all this whitespace) 027 // NB: still want line numbers to match between jessop source and target language source. 028 029 // might want to add a postProcessor attribute to this 030 // to do things like css/js minification, or wiki markup processing, or whatever 031 // but I'm intentionally keeping this simple for now 032 // may want to use different declarationTypes for things like that 033 034 String engine; 035 String exceptionConverter; 036 String bindingsConverter; 037 String filename; 038 boolean suppressEol = false; 039 boolean compileTarget = true; 040 041 public boolean isSuppressEol() { 042 return suppressEol; 043 } 044 045 public void setSuppressEol(boolean suppressEol) { 046 this.suppressEol = suppressEol; 047 } 048 049 public String getEngine() { 050 return engine; 051 } 052 053 public void setEngine(String engine) { 054 this.engine = engine; 055 } 056 057 public String getExceptionConverter() { 058 return exceptionConverter; 059 } 060 061 public void setExceptionConverter(String exceptionConverter) { 062 this.exceptionConverter = exceptionConverter; 063 } 064 065 public String getFilename() { 066 return filename; 067 } 068 069 public void setFilename(String filename) { 070 this.filename = filename; 071 } 072 073 public boolean isCompileTarget() { 074 return compileTarget; 075 } 076 077 public void setCompileTarget(boolean compileTarget) { 078 this.compileTarget = compileTarget; 079 } 080 081 public String getBindingsConverter() { 082 return bindingsConverter; 083 } 084 085 public void setBindingsConverter(String bindingsConverter) { 086 this.bindingsConverter = bindingsConverter; 087 } 088 089 090 091}