|
|
|
|
org.eclipse.wst.validation
Class ReporterHelper
java.lang.Object
org.eclipse.wst.validation.ReporterHelper
-
All Implemented Interfaces:
-
IReporter
-
public class ReporterHelper
- extends java.lang.Object
- implements
IReporter
This is a temporary class to ease the transition from the previous validation framework.
This is not API.
Method Summary
|
void
|
addMessage
(
IValidator origin,
IMessage message)
Add a locale-independent validation message. |
void
|
displaySubtask
(
IValidator validator,
IMessage message)
Show a text representation of this message, formatted in the default
Locale, to the user immediately. |
java.util.List<
IMessage>
|
getMessages
()
|
boolean
|
isCancelled
()
Return true if the user canceled validation, and false otherwise. |
void
|
makeMarkers
()
|
void
|
removeAllMessages
(
IValidator origin)
Remove all validation messages entered by the identified validator. |
void
|
removeAllMessages
(
IValidator origin,
java.lang.Object object)
Remove all validation messages, entered by the identified validator,
pertaining to the Object provided. |
void
|
removeMessageSubset
(
IValidator validator,
java.lang.Object obj,
java.lang.String groupName)
To support removal of a subset of validation messages, an IValidator may
assign group names to IMessages. |
Methods inherited from class java.lang.Object
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
ReporterHelper
public ReporterHelper(IProgressMonitor monitor)
addMessage
public void addMessage(
IValidator origin,
IMessage message)
-
Description copied from interface:
IReporter
-
Add a locale-independent validation message. It will be displayed later, with all of the
other validation messages.
The IValidator passed in is needed for incremental validation (when a message needs to be
removed, one validator should not remove messages entered by another validator.) The
validator is also queried for information about its resource bundle, to enable support for
localization of messages in a client-server environment.
Both parameters must not be null.
-
-
Specified by:
-
addMessage
in interface
IReporter
-
-
Parameters:
-
origin - The validator which is the source of the message. -
message - A message to be reported.
displaySubtask
public void displaySubtask(
IValidator validator,
IMessage message)
-
Description copied from interface:
IReporter
- Show a text representation of this message, formatted in the default
Locale, to the user immediately. This message indicates which subtask is
currently being processed. The message is not stored. The subtask message
in this context is the subtask in a IProgressMontior
Both parameters must not be null.
-
-
Specified by:
-
displaySubtask
in interface
IReporter
-
-
Parameters:
-
validator - The validator issuing the subtask message. -
message - The message to be displayed to the user.
getMessages
public java.util.List<
IMessage> getMessages()
-
-
Specified by:
-
getMessages
in interface
IReporter
-
-
Returns:
- the message access interface to this reporter, or null if message access is not
supported.
isCancelled
public boolean isCancelled()
-
Description copied from interface:
IReporter
- Return true if the user canceled validation, and false otherwise. This method should be
called by IValidators periodically, because no event is fired to notify IValidators that the
user canceled validation. If a validator does not check this method, a cancellation request
is ignored.
-
-
Specified by:
-
isCancelled
in interface
IReporter
-
-
Returns:
- true if the user canceled validation, and false otherwise.
removeAllMessages
public void removeAllMessages(
IValidator origin)
-
Description copied from interface:
IReporter
- Remove all validation messages entered by the identified validator. This method is provided
for incremental validation.
The IValidator parameter must not be null.
-
-
Specified by:
-
removeAllMessages
in interface
IReporter
-
-
Parameters:
-
origin - Originator validator of the message.
removeAllMessages
public void removeAllMessages(
IValidator origin,
java.lang.Object object)
-
Description copied from interface:
IReporter
- Remove all validation messages, entered by the identified validator,
pertaining to the Object provided. This method is provided for
incremental validation.
If object is null, then this method should remove all
messages owned by the validator. (i.e., the same behaviour as the
removeAllMessages(IValidator) method.)
The IValidator parameter must not be null.
-
-
Specified by:
-
removeAllMessages
in interface
IReporter
-
-
Parameters:
-
origin - Originator validator of the message. -
object - Object to which the message belongs. Object is the target object
that was set on the IMessage when adding the message as problem
marker.
removeMessageSubset
public void removeMessageSubset(
IValidator validator,
java.lang.Object obj,
java.lang.String groupName)
-
Description copied from interface:
IReporter
- To support removal of a subset of validation messages, an IValidator may
assign group names to IMessages. An IMessage subset will be identified by
the name of its group. This method will remove only the IMessage's that
are in the group identified by groupName.
The IValidator parameter must not be null.
If object is null, then this method should remove all
messages owned by the validator. (i.e., the same behaviour as the
removeAllMessages(IValidator) method.)
If groupName is null, that's the same as no group (i.e., the same
behaviour as the removeAllMessages(IValidator, Object)
method.)
-
-
Specified by:
-
removeMessageSubset
in interface
IReporter
-
-
Parameters:
-
validator - Originator validator of the message. -
obj - Object to which the message belongs. -
groupName - Name of the group to which the message belongs.
makeMarkers
public void makeMarkers()
-
-
|
|
|