Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.further.jaudit.* (32)com.further.jaudit.http.* (12)com.further.jaudit.test.* (5)
com.further.jaudit.xml.* (2)

Package Samples:

com.further.jaudit
com.further.jaudit.http
com.further.jaudit.test
com.further.jaudit.xml

Classes:

ConfigurationServlet: The configuration servlet is responsible for loading the configuration for the system based on the servlet init param com.further.jaudit.config . The index.jsp checks the directory bean to see if the system configuration has been loaded, and if it has not, redirects to the configuration servlet. If the configuration servlet is able to load the configuration, then it sets the appropriate parameters in the directory bean and redirects back to the index.jsp. Otherwise, the configuration servlet sends the user to the error page. This servlet must be configured as /configServlet in the system.
ValueSettingVisitor: The value setting visitor is a visitor that parses string values for a given metric type and sets the concrete values on the subclass instances that it visits. The intent of this class is to allow the user to pass in a raw string value for a metric value (say, taken from XML or a web form) to this visitor, then, without downcasting and doing a lot of instanceof operations, call: valueSettingVisitor.setStringValue(stringValue); try { sourceMetric.accept(valueSettingVisitor); } catch (IllegalArgumentException ie) { // The string value was not appropriate for the given metric type }
DirectoryBean: The directory bean is the primary bean used by the jsps to access the underlying system resources. This bean holds the current working directory (cwd) of the system for the logged in user, and is maintained open for the lifetime of the session. The bean itself provides methods to change directories, list the files and directories contained in a given directory, and to access the contents of a given source file as a string for screen rendering. The heart and soul purpose of this bean is to provide a simple facade to the rest of the system for easy access from jsps.
AuditRecord: The audit record emcompasses a complete audit of a source file. This includes all the metrics for the file, the user that performed the audit, and the date that the audit occurred. A new audit record is created every time a user performs a source audit, and the history of the audit state of the file is held as a set of audit records in the FileState for each source file. Once an audit record is entered, it is purposefully append-only, insofar as it is possible to add source metrics, but not remove them, and the user and date information cannot be altered.
ColorPreferencesBean: The color preferences bean holds the user specified foreground, background, keyword and comment color preferences. This bean can then generate the BODY tag for an HTML page, or allow access to the color values themselves. It is worthy of mention that the color values are stored in the form: XXXXXX , which is the hex RGB web format without the leading # . The bean delegates almost all of its functions to the SystemConfiguration object, presenting it in a jsp-friendly fashion.
FormGeneratorBean: The form generator bean is responsible for generating the html input forms for a given source file to audit. This is done by making an appropriate tag for each source metric to be collected, then allowing the client code to have a simple Iterator over the metric abbreviations for the applicable source metrics. For each metric, the client code can obtain the full metric name and the corresponding form tag. The rendering of the form is left to the corresponding jsp.
StatisticsBean: The statistics bean is responsible for iterating the entire source base and compiling summary statistics about the source files. These stats include: Number of files Percent of files that have been audited Percent of files that are compliant (passing audit) Minimum audit age Maximum audit age For each metric, what percent of files have each value.
SourceDirectoryHandler: The source directory handler is the default handler implementation used for parsing audit.xml records for a directory of source files. This handler accepts a SourceDirectory that is initialized with empty SourceFile objects, then reads the history of the audit records from the given XML document and inserts the audit records in the SourceFiles as appropriate.
EnumeratedTypeMetric: An enumerated type metric is used to measure a source metric that has one of many values, and whose values are typically ranked from 1 to N. These values are strings like "Good", "Better", "Best" where a satisfactory value would be at least "Better". The exact type strings for the enumerated type are user defined, along with the name and abbreviation.
SourceDirectory: The source directory represents a directory containing a set of source files. All files under this root are assumed to be candidates for audit, and are scanned to build a set of SourceFile objects for each file in the tree. The subdirectories under the SourceDirectory are available from the SourceDirectory, and are themselves SourceDirectories.
SystemConfiguration: The system configuration holds the static configuration for the audit system, including what metrics are collected and what their names are, and the base directory of the source tree that is to be audited. The configuration itself is done using XML and parsed using xerces SAX2 parser. DTD and an example configuration are in jaudit/resource/xml.
SourceMetric: A source metric is a marker interface for a generic source code metric, such as code style metrics or overall code quality. Because these metrics do not share interface methods at the high level that are specific to the metric type, this interface is used to specify display characteristics, along with metric name and abbreviation.
AuditViewerBean: This bean handles the work of viewing the audit history for a sourcefile. The source file is set on the bean and the source audit history is made available via an Iterator over the dates. For each date, the user can obtain an iterator over the metrics, the user that entered the audit record and the comment.
SourceFilenameFilter: This filter implements a source file filter for directory traversal. The intent of the filter is to allow the configuration to statically specify file extensions that are valid source files, then the system uses the SourceFilenameFilter to test the contents of the source tree against those extensions.
SourceFormatter: This is a freely available source formatter that does a simple (java/c) to html conversion, and, at the same time, adds color and syntax highlighting to the output html file. The code for this is a little long and procedural, but it does the job and is just treated as a black box in the system.
AuditFormServlet: The audit form servlet processes the results of a user entering an audit record in a web form for a given source file. After processing and entering the audit record, the source directory is persisted out to disk, and then the user is redirected back to the directory listing.
ValueGettingVisitor: The value getting visitor is the exact opposite of the value setting visitor. This class performs the complementary operation to setting the value, which is getting the value as a string. This handles the formatting issues related to the concrete subclasses of SourceMetric.
FormInputVisitor: The form input visitor produces an HTML form widget that can be used to collect a user's input for a given metric. This does not include the display goop around the form widget, just the correctly formatted tag, with the NAME set to the abbreviation of the metric.
ConfigurationException: A configuration exception is raised when the system is unable to parse the configuration, or there is a logical inconsistency in the configuration data that makes it not possible to use (such as boolean values for a fixed-range metric).
ChangeDirectoryServlet: The change directory servlet handles the backend work of changing the working directory of the application, then redirecting to the directory listing page. This servlet must be configured with the uri /changeDirectory in the webapp.
SourceFile: SouceFiles are the containers that hold the audit state of a particular source file. This consists of a set of metrics input from the user that describe the file state, along with the audit history of the source file.
SourceDirectoryWriter: A source directory writer handles writing the audit records for an entire SourceDirectory out to a valid XML document. This includes writing out all of the metrics for the audits for all of the files in the directory.
SourceMetricVisitor: A source metric visitor is an object that is used to visit concrete SourceMetric subclasses to perform concrete subclass specific operations on them while avoiding using a switch() statement using instanceof

Home | Contact Us | Privacy Policy | Terms of Service