edu.colby.cs.JeSS.actions
Class JeSSClearingHouse

java.lang.Object
  extended byedu.colby.cs.JeSS.actions.JeSSClearingHouse

public class JeSSClearingHouse
extends java.lang.Object

This class acts as a clearing house to determine the type of the selected object and then pass it along the proper path to be processed. Each "process" method strips all previous JeSS markers off of the element and then creates a new instance of SecurityScanner to perform the scan

Author:
rspitler

Constructor Summary
JeSSClearingHouse()
           
 
Method Summary
private static int processCompilationUnit(org.eclipse.jdt.core.ICompilationUnit unit, org.eclipse.jface.preference.IPreferenceStore store)
          Process a CompilationUnit to be scanned
private static int processJavaProject(org.eclipse.jdt.core.IJavaProject project, org.eclipse.jface.preference.IPreferenceStore store)
          Process a javaProject to be scanned
static int processObject(java.lang.Object obj, org.eclipse.jface.preference.IPreferenceStore store)
          The initial screening that determines the type of the selected object
private static int processPackageFragment(org.eclipse.jdt.core.IPackageFragment fragment, org.eclipse.jface.preference.IPreferenceStore store)
          Process a PackageFragment to be scanned
private static int processPackageFragmentRoot(org.eclipse.jdt.core.IPackageFragmentRoot root, org.eclipse.jface.preference.IPreferenceStore store)
          Process a package fragment root
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JeSSClearingHouse

public JeSSClearingHouse()
Method Detail

processObject

public static int processObject(java.lang.Object obj,
                                org.eclipse.jface.preference.IPreferenceStore store)
The initial screening that determines the type of the selected object

Parameters:
obj - - the selected object to be processed
store - - the preferences that determine the extent of the scan
Returns:
warningsCount - the number of security bugs found

processCompilationUnit

private static int processCompilationUnit(org.eclipse.jdt.core.ICompilationUnit unit,
                                          org.eclipse.jface.preference.IPreferenceStore store)
Process a CompilationUnit to be scanned

Parameters:
unit - - the CompilationUnit to be scanned
store - - the preferences for the scan
Returns:
warningsCount - the number of bugs found

processPackageFragment

private static int processPackageFragment(org.eclipse.jdt.core.IPackageFragment fragment,
                                          org.eclipse.jface.preference.IPreferenceStore store)
Process a PackageFragment to be scanned

Parameters:
fragment - - the package fragment to be scanned
store - - the preferences for the scan
Returns:
warningsCount - the number of bugs found

processPackageFragmentRoot

private static int processPackageFragmentRoot(org.eclipse.jdt.core.IPackageFragmentRoot root,
                                              org.eclipse.jface.preference.IPreferenceStore store)
Process a package fragment root

Parameters:
root - - the package root to be processed
store - - the preferences for the scan
Returns:
warningscount - the number of bugs found

processJavaProject

private static int processJavaProject(org.eclipse.jdt.core.IJavaProject project,
                                      org.eclipse.jface.preference.IPreferenceStore store)
Process a javaProject to be scanned

Parameters:
project - - the project to be scanned
store - - the preferences for the scan
Returns:
warningsCount - the number of bugs found