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
|
Method Summary |
protected void |
addImportCounts(String content)
|
protected void |
addJSPIncludeFileNames(String fileName)
|
protected void |
addJSPReferenceFileNames(String fileName)
|
protected void |
addJSPUnusedImports(String fileName,
List<String> importLines,
List<String> unneededImports)
|
protected String |
buildFullPathIncludeFileName(String fileName,
String includeFileName)
|
protected boolean |
checkTaglibVulnerability(String jspContent,
String vulnerability)
|
protected void |
checkXSS(String fileName,
String jspContent)
|
protected String |
doFormat(File file,
String fileName,
String absolutePath,
String content)
|
protected void |
format()
|
protected String |
formatJSP(String fileName,
String absolutePath,
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 |
hasUnusedJSPTerm(String fileName,
String regex,
String type)
|
protected boolean |
hasUnusedTaglib(String fileName,
String line)
|
protected boolean |
hasUnusedVariable(String fileName,
String line)
|
protected boolean |
isJSPDuplicateImport(String fileName,
String importLine,
boolean checkFile)
|
protected boolean |
isJSPTermRequired(String fileName,
String regex,
String type,
Set<String> checkedForUnusedJSPTerm)
|
protected void |
moveFrequentlyUsedImportsToCommonInit(int minCount)
|
protected String |
stripJSPImports(String fileName,
String content)
|
| Methods inherited from class com.liferay.portal.tools.sourceformatter.BaseSourceProcessor |
checkEmptyCollection, checkIfClauseParentheses, checkInefficientStringMethods, checkLanguageKeys, checkStringBundler, fixCompatClassImports, fixCopyright, fixIncorrectParameterTypeForLanguageUtil, fixSessionKey, format, format, format, format, formatJavaTerms, getAbsolutePath, getCompatClassNamesMap, getContent, getCustomCopyright, getErrorMessages, getFile, getFileNames, getFileNames, getFirstSourceMismatchException, getLanguageKeys, getLanguageProperties, getMainReleaseVersion, getProperty, getPropertyList, hasMissingParentheses, hasRedundantParentheses, hasRedundantParentheses, isAttributName, isExcluded, isExcluded, isExcluded, isRunsOutsidePortal, processErrorMessage, processFormattedFile, replacePrimitiveWrapperInstantiation, sortAttributes, stripLine, stripQuotes, stripRedundantParentheses, trimContent, trimLine |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JSPSourceProcessor
public JSPSourceProcessor()
addImportCounts
protected void addImportCounts(String content)
addJSPIncludeFileNames
protected void addJSPIncludeFileNames(String fileName)
addJSPReferenceFileNames
protected void addJSPReferenceFileNames(String fileName)
addJSPUnusedImports
protected void addJSPUnusedImports(String fileName,
List<String> importLines,
List<String> unneededImports)
buildFullPathIncludeFileName
protected String buildFullPathIncludeFileName(String fileName,
String includeFileName)
checkTaglibVulnerability
protected boolean checkTaglibVulnerability(String jspContent,
String vulnerability)
checkXSS
protected void checkXSS(String fileName,
String jspContent)
doFormat
protected String doFormat(File file,
String fileName,
String absolutePath,
String content)
throws Exception
- Specified by:
doFormat in class BaseSourceProcessor
- Throws:
Exception
format
protected void format()
throws Exception
- Specified by:
format in class BaseSourceProcessor
- Throws:
Exception
formatJSP
protected String formatJSP(String fileName,
String absolutePath,
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)
hasUnusedJSPTerm
protected boolean hasUnusedJSPTerm(String fileName,
String regex,
String type)
hasUnusedTaglib
protected boolean hasUnusedTaglib(String fileName,
String line)
hasUnusedVariable
protected boolean hasUnusedVariable(String fileName,
String line)
isJSPDuplicateImport
protected boolean isJSPDuplicateImport(String fileName,
String importLine,
boolean checkFile)
isJSPTermRequired
protected boolean isJSPTermRequired(String fileName,
String regex,
String type,
Set<String> checkedForUnusedJSPTerm)
moveFrequentlyUsedImportsToCommonInit
protected void moveFrequentlyUsedImportsToCommonInit(int minCount)
throws IOException
- Throws:
IOException
stripJSPImports
protected String stripJSPImports(String fileName,
String content)
throws IOException
- Throws:
IOException