Skip to content

Commit

Permalink
Merge pull request #61 from retailnext/update-spring-log4j
Browse files Browse the repository at this point in the history
Update to javax.el
  • Loading branch information
dineshudayakumar authored Jul 12, 2023
2 parents 5c930c2 + 0a7ee5b commit e4b16df
Show file tree
Hide file tree
Showing 20 changed files with 544 additions and 373 deletions.
38 changes: 24 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,29 @@
<version>1.9.4</version>
</dependency>
<dependency>
<groupId>commons-el</groupId>
<artifactId>commons-el</artifactId>
<version>1.0</version>
<groupId>de.odysseus.juel</groupId>
<artifactId>juel-api</artifactId>
<version>2.2.7</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<groupId>de.odysseus.juel</groupId>
<artifactId>juel-impl</artifactId>
<version>2.2.7</version>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<version>2.3.3</version>
<groupId>de.odysseus.juel</groupId>
<artifactId>juel-spi</artifactId>
<version>2.2.7</version>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.0.0</version>
</dependency>
<dependency>
<groupId>jakarta.servlet.jsp</groupId>
<artifactId>jakarta.servlet.jsp-api</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand All @@ -72,12 +82,12 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.17.2</version>
<version>2.20.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.17.2</version>
<version>2.20.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
Expand All @@ -92,17 +102,17 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.3.28</version>
<version>6.0.10</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>5.3.28</version>
<version>6.0.10</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>5.3.28</version>
<version>6.0.10</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down
21 changes: 14 additions & 7 deletions sstemplates-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,16 @@
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-el</groupId>
<artifactId>commons-el</artifactId>
<scope>compile</scope>
<groupId>de.odysseus.juel</groupId>
<artifactId>juel-api</artifactId>
</dependency>
<dependency>
<groupId>de.odysseus.juel</groupId>
<artifactId>juel-impl</artifactId>
</dependency>
<dependency>
<groupId>de.odysseus.juel</groupId>
<artifactId>juel-spi</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand All @@ -46,13 +53,13 @@
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<groupId>jakarta.servlet.jsp</groupId>
<artifactId>jakarta.servlet.jsp-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,89 +3,100 @@
import java.io.*;
import java.lang.reflect.*;
import java.util.*;
import javax.servlet.jsp.el.*;

import de.odysseus.el.util.SimpleResolver;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress;
import com.carbonfive.sstemplates.hssf.*;
import com.carbonfive.sstemplates.tags.SsTemplateTag;

public interface SsTemplateContext extends VariableResolver, FunctionMapper
import javax.el.*;

public abstract class SsTemplateContext extends ELContext
{
Object setPageVariable( String key, Object value );
private final ELResolver resolver;

public SsTemplateContext() {
this.resolver = new SimpleResolver();
}

@Override
public ELResolver getELResolver() {
return this.resolver;
}

void unsetPageVariable( String key, Object oldValue );
public abstract void setPageVariable(String key, Object value);

Object getPageVariable( String key );
public abstract void unsetPageVariable( String key, Object oldValue );

Object resolveVariable( String name );
public abstract Object getPageVariable( String key );

HSSFFont createFont( String name, short fontHeight, short color, boolean bold, boolean italic,
public abstract HSSFFont createFont( String name, short fontHeight, short color, boolean bold, boolean italic,
boolean strikeout, byte underline, short typeOffset );

void incrementCellIndex();
public abstract void incrementCellIndex();

void incrementRowIndex();
public abstract void incrementRowIndex();

CellRangeAddress getRegionForCurrentLocation();
public abstract CellRangeAddress getRegionForCurrentLocation();

String addStyleData( String name, HssfStyleData data );
public abstract String addStyleData( String name, HssfStyleData data );

HSSFCellStyle getNamedStyle( String name )
public abstract HSSFCellStyle getNamedStyle( String name )
throws SsTemplateException;

HssfStyleData getNamedStyleData( String name )
public abstract HssfStyleData getNamedStyleData( String name )
throws SsTemplateException;

boolean hasCachedStyleData(String name);
public abstract boolean hasCachedStyleData(String name);

HSSFWorkbook getWorkbook();
public abstract HSSFWorkbook getWorkbook();

void setWorkbook(HSSFWorkbook workbook);
public abstract void setWorkbook(HSSFWorkbook workbook);

HSSFSheet getSheet();
public abstract HSSFSheet getSheet();

void setSheet(HSSFSheet sheet);
public abstract void setSheet(HSSFSheet sheet);

HSSFRow getRow();
public abstract HSSFRow getRow();

void setRow(HSSFRow row);
public abstract void setRow(HSSFRow row);

int getRowIndex();
public abstract int getRowIndex();

void setRowIndex(int rowIndex);
public abstract void setRowIndex(int rowIndex);

int getColumnIndex();
public abstract int getColumnIndex();

void setColumnIndex(int columnIndex);
public abstract void setColumnIndex(int columnIndex);

String getCurrentStyle();
public abstract String getCurrentStyle();

void setCurrentStyle(String currentStyle);
public abstract void setCurrentStyle(String currentStyle);

HssfCellAccumulator getNamedAccumulator(String name);
public abstract HssfCellAccumulator getNamedAccumulator(String name);

void registerMethod(String name, Method m);
public abstract void registerMethod(String name, Method m);

// no prefix support
Method resolveFunction(String prefix, String name);
public abstract Collection<SsTemplateTag> parseIncludeFile(String parsedTemplate) throws SsTemplateException;

Collection<SsTemplateTag> parseIncludeFile(String parsedTemplate) throws SsTemplateException;
public abstract File findFileInTemplateDirectory(String path);

public File findFileInTemplateDirectory(String path);
public abstract Object getCustomValue(Object key);

Object getCustomValue(Object key);
public abstract void setCustomValue(Object key, Object value);

void setCustomValue(Object key, Object value);
public abstract short getColorIndex(short[] triplet) throws SsTemplateException;

short getColorIndex(short[] triplet) throws SsTemplateException;
public abstract void setBackgroundColor(short[] triplet);

void setBackgroundColor(short[] triplet);
public abstract short[] getBackgroundColor();

short[] getBackgroundColor();
public abstract int getMaxRowIndex();
public abstract int getMaxColumnIndex();

public int getMaxRowIndex();
public int getMaxColumnIndex();
public abstract void setPageBreaks(int firstPageBreak, int nextPageBreak);
public abstract int nextPageBreak(int row);

public void setPageBreaks(int firstPageBreak, int nextPageBreak);
public int nextPageBreak(int row);
public abstract ExpressionFactory getExpressionFactory();
}
Loading

0 comments on commit e4b16df

Please sign in to comment.