How presentation will benefit audience: Adult learners are more interested in a subject if they know how or why it is important to them.Presenter’s level of expertise in the subject: Briefly state your credentials in this area, or explain why participants should listen to you.
Example objectivesAt the end of this lesson, you will be able to:Save files to the team Web server.Move files to different locations on the team Web server.Share files on the team Web server.
Custom audit rules in Jdeveloper extension
SILBURY IT SOLUTION GMBH
Custom Audit Rules in Jdeveloper 12c
• Audit in JDeveloper
• Extension in Jdeveloper 12c
• Set up extension environment
• Creation Extension project
• Create Audit Rule
• Suppress Warning
• Run Extension
• Test Extension
• Audit is a planned and documented activity performed by qualified personnel to determine by
investigation, examination, or evaluation of objective evidence, the adequacy and compliance with
established procedures, or applicable documents, and the effectiveness of implementation
• Analysis of code with set of metrics and guidelines .
• Auditing in Jdeveloper- Auditing is the static analysis of code for adherence to rules and metrics that
define programming standards. Auditing finds defects that make code difficult to improve and
maintain. The JDeveloper auditing tools help you find and fix such defects. Code can be audited even
when it is not compilable or executable.
What is Audit
• JDeveloper has a built in Audit framework with lots of rules that
you can turn on or off.
• Also can create new custom audit rules .
• Based on Visitor design pattern.
• Able to create new Audit rules.
• Rules can be configurable
• Generate warning or error compile time.
• Help in improving code quality.
• Auditing finds defects that make code difficult to improve and
• JDeveloper auditing feature to analyze Java code for
conformance to programming standards.
Audit Framework in jdeveloper
• A visitor over the Audit object models which verifies rules and/or computes metrics.
• Analyzer subclass implements visitor methods which are invoked by the Audit
framework as it traverses the Audit object models i.e. enter & exit
• Visitor methods (enter & exit) report violations and measurements using the
reporting methods of a context object passed to them.
• getRules & getMetrics provide rules& metric of analyzer to framework .
• Analyzers (classes) are registered with the AuditManager at startup by IDE
• Audit framework traverses the constructs of the object models corresponding to the nodes being
audited and at each construct invokes the applicable enter and exit methods of each registered
• enter and exit methods accept two parameters, a context and a construct.
• Visitor method called each workspace, source class, document, element, attribute, method.
• Violations and measurements, suppression are reported by the visitor methods using the report
• Setting attributes for child & parent construct.
• public void enter(AuditContext context, Workspace workspace)
This methods contains the workspace (application) validation code. In our case we do not use it.
• public void enter(AuditContext context, Project project)
This methods contains the project validation code. In our case we do not use it.
• public void enter(AuditContext context, Document document)
This method contains the code to analyze and validate documents.
• public void enter(AuditContext context, Element element)
This method contains the code to analyze and validate individual element.
with Audit Manager
on start up by IDE
Each analyzer create
instance and fetch
rules using getRules
invokes methods of
Enter & exit method
invoked as per match
information in visitor
methods and report
Audit framework flow
• Indicate to suppress this warning in workspace for all elements.
• Suppressed warning in jdeveloper by annotation.
• Make Extension.jpr
• Deploy to Target Platform
• Run Extension
• New Jdevloper instance open
• Tools -> Preferences -> Audit -> Profiles and find rule
• Test rule.
Run & Test Audit Rule Extension
• Create bundle.xml in project
• Create an extension package which consists of a JAR that is packaged in
an extension bundle archive
• Change extension JAR files into a .zip file for distribution