blob: d033ac1d942c46453eccd712b1fd6fb55dea2a48 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0) on Tue May 20 09:50:54 EDT 2008 -->
<TITLE>
AbstractValidator
</TITLE>
<META NAME="date" CONTENT="2008-05-20">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="AbstractValidator";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AbstractValidator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../serialized-form.html"><FONT CLASS="NavBarFont1"><B>Serialized</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../org/eclipse/wst/validation/DependentResource.html" title="class in org.eclipse.wst.validation"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/eclipse/wst/validation/AbstractValidator.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="AbstractValidator.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.eclipse.wst.validation</FONT>
<BR>
Class AbstractValidator</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.eclipse.wst.validation.AbstractValidator</B>
</PRE>
<HR>
<DL>
<DT><PRE>public abstract class <B>AbstractValidator</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
The class that all Validators that wish to use version two of the validation framework must subclass.
<p>
<b>Provisional API:</b> This class/interface is part of an interim API that is still under development and expected to
change significantly before reaching stability. It is being made available at this early stage to solicit feedback
from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
(repeatedly) as the API evolves.
</p>
<P>
<P>
<HR>
<P>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/eclipse/wst/validation/AbstractValidator.html#AbstractValidator()">AbstractValidator</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/wst/validation/AbstractValidator.html#clean(IProject, org.eclipse.wst.validation.ValidationState, IProgressMonitor)">clean</A></B>(IProject&nbsp;project,
<A HREF="../../../../org/eclipse/wst/validation/ValidationState.html" title="class in org.eclipse.wst.validation">ValidationState</A>&nbsp;state,
IProgressMonitor&nbsp;monitor)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A call back method that lets the validator know that the project is being
cleaned.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/eclipse/wst/validation/Validator.V2.html" title="class in org.eclipse.wst.validation">Validator.V2</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/wst/validation/AbstractValidator.html#getParent()">getParent</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Answer the validator that you belong to.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract &nbsp;<A HREF="../../../../org/eclipse/wst/validation/ValidationResult.html" title="class in org.eclipse.wst.validation">ValidationResult</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/wst/validation/AbstractValidator.html#validate(IResource, int, org.eclipse.wst.validation.ValidationState, IProgressMonitor)">validate</A></B>(IResource&nbsp;resource,
int&nbsp;kind,
<A HREF="../../../../org/eclipse/wst/validation/ValidationState.html" title="class in org.eclipse.wst.validation">ValidationState</A>&nbsp;state,
IProgressMonitor&nbsp;monitor)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Validate the resource.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/wst/validation/AbstractValidator.html#validationFinishing(IProject, org.eclipse.wst.validation.ValidationState, IProgressMonitor)">validationFinishing</A></B>(IProject&nbsp;project,
<A HREF="../../../../org/eclipse/wst/validation/ValidationState.html" title="class in org.eclipse.wst.validation">ValidationState</A>&nbsp;state,
IProgressMonitor&nbsp;monitor)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method will be called when validation is complete.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/wst/validation/AbstractValidator.html#validationStarting(IProject, org.eclipse.wst.validation.ValidationState, IProgressMonitor)">validationStarting</A></B>(IProject&nbsp;project,
<A HREF="../../../../org/eclipse/wst/validation/ValidationState.html" title="class in org.eclipse.wst.validation">ValidationState</A>&nbsp;state,
IProgressMonitor&nbsp;monitor)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method is called before any validation takes place.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="AbstractValidator()"><!-- --></A><H3>
AbstractValidator</H3>
<PRE>
public <B>AbstractValidator</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="validate(IResource, int, org.eclipse.wst.validation.ValidationState, IProgressMonitor)"><!-- --></A><H3>
validate</H3>
<PRE>
public abstract <A HREF="../../../../org/eclipse/wst/validation/ValidationResult.html" title="class in org.eclipse.wst.validation">ValidationResult</A> <B>validate</B>(IResource&nbsp;resource,
int&nbsp;kind,
<A HREF="../../../../org/eclipse/wst/validation/ValidationState.html" title="class in org.eclipse.wst.validation">ValidationState</A>&nbsp;state,
IProgressMonitor&nbsp;monitor)</PRE>
<DL>
<DD>Validate the resource. The validator is called from a WorkspaceJob, so
the validator itself does not need to establish it's own
IWorkspaceRunnable.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>resource</CODE> - The resource to be validated.<DD><CODE>kind</CODE> - The way the resource changed. It uses the same values as the kind
parameter in IResourceDelta.<DD><CODE>state</CODE> - A way to pass arbitrary, validator specific, data from one
invocation of a validator to the next, during the validation phase.
At the end of the validation phase, this object will be cleared,
thereby allowing any of this state information to be garbaged
collected.<DD><CODE>monitor</CODE> - A monitor that you can use to report your progress. To be a well
behaved validator you need to check the isCancelled() method at
appropriate times.
<DT><B>Returns:</B><DD>the result of the validation. This may be, but usually isn't, null.</DL>
</DD>
</DL>
<HR>
<A NAME="clean(IProject, org.eclipse.wst.validation.ValidationState, IProgressMonitor)"><!-- --></A><H3>
clean</H3>
<PRE>
public void <B>clean</B>(IProject&nbsp;project,
<A HREF="../../../../org/eclipse/wst/validation/ValidationState.html" title="class in org.eclipse.wst.validation">ValidationState</A>&nbsp;state,
IProgressMonitor&nbsp;monitor)</PRE>
<DL>
<DD>A call back method that lets the validator know that the project is being
cleaned. This method gives the validator a chance to do any special
cleanup. The default is to do nothing.
<p>
If the entire workspace is being cleaned, then the first call will have a
null project, and then there will be subsequent calls for each open
project in the workspace.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>project</CODE> - The project being cleaned. This may be null, which is an indication
that the workspace is being cleaned.<DD><CODE>state</CODE> - A way to pass arbitrary, validator specific, data from one
invocation of a validator to the next, during the validation phase.<DD><CODE>monitor</CODE> - The monitor that should be used for reporting progress if the clean
takes a long time.</DL>
</DD>
</DL>
<HR>
<A NAME="validationStarting(IProject, org.eclipse.wst.validation.ValidationState, IProgressMonitor)"><!-- --></A><H3>
validationStarting</H3>
<PRE>
public void <B>validationStarting</B>(IProject&nbsp;project,
<A HREF="../../../../org/eclipse/wst/validation/ValidationState.html" title="class in org.eclipse.wst.validation">ValidationState</A>&nbsp;state,
IProgressMonitor&nbsp;monitor)</PRE>
<DL>
<DD>This method is called before any validation takes place. It allows
validators to perform any initialization that they might need.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>project</CODE> - The project that is being validated. For the very first call in the
validation phase, this will be null. A null project is the signal
that a top level validation is starting. Subsequently, the project
will be set, as each of the individual projects are validated.<DD><CODE>state</CODE> - A way to pass arbitrary, validator specific, data from one
invocation of a validator to the next, during the validation phase.<DD><CODE>monitor</CODE> - The monitor that should be used for reporting progress if the initialization
takes a long time.</DL>
</DD>
</DL>
<HR>
<A NAME="validationFinishing(IProject, org.eclipse.wst.validation.ValidationState, IProgressMonitor)"><!-- --></A><H3>
validationFinishing</H3>
<PRE>
public void <B>validationFinishing</B>(IProject&nbsp;project,
<A HREF="../../../../org/eclipse/wst/validation/ValidationState.html" title="class in org.eclipse.wst.validation">ValidationState</A>&nbsp;state,
IProgressMonitor&nbsp;monitor)</PRE>
<DL>
<DD>This method will be called when validation is complete. It allows
validators to perform any cleanup that they might need to do.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>project</CODE> - The project that was validated. The very last call in the validation
sets this to null so that the validator knows that all the
projects have now been validated.<DD><CODE>state</CODE> - A way to pass arbitrary, validator specific, data from one
invocation of a validator to the next, during the validation phase.<DD><CODE>monitor</CODE> - The monitor that should be used for reporting progress if the cleanup
takes a long time.</DL>
</DD>
</DL>
<HR>
<A NAME="getParent()"><!-- --></A><H3>
getParent</H3>
<PRE>
public <A HREF="../../../../org/eclipse/wst/validation/Validator.V2.html" title="class in org.eclipse.wst.validation">Validator.V2</A> <B>getParent</B>()</PRE>
<DL>
<DD>Answer the validator that you belong to. The validator controls the
filters and various other settings.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AbstractValidator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../serialized-form.html"><FONT CLASS="NavBarFont1"><B>Serialized</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../org/eclipse/wst/validation/DependentResource.html" title="class in org.eclipse.wst.validation"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/eclipse/wst/validation/AbstractValidator.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="AbstractValidator.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>