com.liferay.portal.tools.sourceformatter
Class JSPSourceProcessor
java.lang.Object
com.liferay.portal.tools.sourceformatter.BaseSourceProcessor
com.liferay.portal.tools.sourceformatter.JSPSourceProcessor
- All Implemented Interfaces:
- SourceProcessor
public class JSPSourceProcessor
- extends BaseSourceProcessor
Fields inherited from class com.liferay.portal.tools.sourceformatter.BaseSourceProcessor |
BASEDIR, fileUtil, languageKeyPattern, MAIN_RELEASE_VERSION_6_1_0, MAIN_RELEASE_VERSION_6_2_0, mainReleaseVersion, portalSource, saxReaderUtil, sessionKeyPattern, sourceFormatterHelper, taglibSessionKeyPattern |
Method Summary |
protected void |
addJSPIncludeFileNames(String fileName,
Set<String> includeFileNames)
|
protected void |
addJSPReferenceFileNames(String fileName,
Set<String> includeFileNames)
|
protected void |
addJSPUnusedImports(String fileName,
List<String> importLines,
List<String> unneededImports)
|
protected boolean |
checkTaglibVulnerability(String jspContent,
String vulnerability)
|
protected void |
checkXSS(String fileName,
String jspContent)
|
protected void |
doFormat()
|
protected String |
formatJSP(String fileName,
String content)
|
protected String |
formatTaglibQuotes(String fileName,
String content,
String quoteType)
|
protected List<String> |
getJSPDuplicateImports(String fileName,
String content,
List<String> importLines)
|
protected String |
getTaglibRegex(String quoteType)
|
protected String |
getVariableName(String line)
|
protected boolean |
hasUnusedVariable(String fileName,
String line)
|
protected boolean |
isClassOrVariableRequired(String fileName,
String name,
Set<String> includeFileNames,
Set<String> checkedFileNames)
|
protected boolean |
isJSPAttributName(String attributeName)
|
protected boolean |
isJSPDuplicateImport(String fileName,
String importLine,
boolean checkFile)
|
protected String |
sortJSPAttributes(String fileName,
String line,
int lineCount)
|
protected String |
stripJSPImports(String fileName,
String content)
|
Methods inherited from class com.liferay.portal.tools.sourceformatter.BaseSourceProcessor |
checkIfClauseParentheses, checkLanguageKeys, fixCompatClassImports, fixCopyright, fixSessionKey, format, formatImports, getCompatClassNamesMap, getCopyright, getCustomCopyright, getErrorMessages, getExclusionsProperties, getFileNames, getFileNames, getLanguageKeys, getOldCopyright, hasMissingParentheses, hasRedundantParentheses, processErrorMessage, replacePrimitiveWrapperInstantiation, stripQuotes, stripRedundantParentheses, stripTopLevelDirectories, trimContent, trimLine |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JSPSourceProcessor
public JSPSourceProcessor()
addJSPIncludeFileNames
protected void addJSPIncludeFileNames(String fileName,
Set<String> includeFileNames)
addJSPReferenceFileNames
protected void addJSPReferenceFileNames(String fileName,
Set<String> includeFileNames)
addJSPUnusedImports
protected void addJSPUnusedImports(String fileName,
List<String> importLines,
List<String> unneededImports)
checkTaglibVulnerability
protected boolean checkTaglibVulnerability(String jspContent,
String vulnerability)
checkXSS
protected void checkXSS(String fileName,
String jspContent)
doFormat
protected void doFormat()
throws Exception
- Specified by:
doFormat
in class BaseSourceProcessor
- Throws:
Exception
formatJSP
protected String formatJSP(String fileName,
String content)
throws IOException
- Throws:
IOException
formatTaglibQuotes
protected String formatTaglibQuotes(String fileName,
String content,
String quoteType)
getJSPDuplicateImports
protected List<String> getJSPDuplicateImports(String fileName,
String content,
List<String> importLines)
getTaglibRegex
protected String getTaglibRegex(String quoteType)
getVariableName
protected String getVariableName(String line)
hasUnusedVariable
protected boolean hasUnusedVariable(String fileName,
String line)
isClassOrVariableRequired
protected boolean isClassOrVariableRequired(String fileName,
String name,
Set<String> includeFileNames,
Set<String> checkedFileNames)
isJSPAttributName
protected boolean isJSPAttributName(String attributeName)
isJSPDuplicateImport
protected boolean isJSPDuplicateImport(String fileName,
String importLine,
boolean checkFile)
sortJSPAttributes
protected String sortJSPAttributes(String fileName,
String line,
int lineCount)
stripJSPImports
protected String stripJSPImports(String fileName,
String content)
throws IOException
- Throws:
IOException