org.tigris.scarab.util.build.l10nchecker
Class L10nIssue

java.lang.Object
  extended byorg.tigris.scarab.util.build.l10nchecker.L10nIssue
Direct Known Subclasses:
CantParseLineIssue, DefinedTwiceDiffIssue, DefinedTwiceIssue, DifferentAttributeCountIssue, IllegalPatternIssue, NotInReferenceIssue, NoTransAllowedIssue, NotTranslatedIssue, TranslatedTwiceDiffIssue, TranslatedTwiceIssue, TranslationMissingIssue, TranslationRequiredIssue

public abstract class L10nIssue
extends java.lang.Object

Class that represents an issue template


Field Summary
static int MESSAGE_ERROR
          ERROR message
static int MESSAGE_IGNORE
          ignore message (default)
static int MESSAGE_INFO
          INFORMATIONAL message
static int MESSAGE_WARNING
          WARNING message
 
Constructor Summary
L10nIssue()
           
 
Method Summary
 java.lang.String formatMessage()
          Utility function to perform a message translation for a specific issue
abstract  java.lang.String getMessageTemplate()
          Return the message template that is used to display the error text.
 int getMessageType()
          Return the message type for the current object.
abstract  java.lang.Object[] getParameters()
          Get the parameters for a message
 boolean isError()
          Return true in case the current issue is an error message
 boolean isInfo()
          Return true in case the current issue is an informational message
 boolean isWarning()
          Return true in case the current issue is a warning
 void setMessageType(int messageType)
          Set the severity of the current message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MESSAGE_IGNORE

public static final int MESSAGE_IGNORE
ignore message (default)

See Also:
Constant Field Values

MESSAGE_INFO

public static final int MESSAGE_INFO
INFORMATIONAL message

See Also:
Constant Field Values

MESSAGE_ERROR

public static final int MESSAGE_ERROR
ERROR message

See Also:
Constant Field Values

MESSAGE_WARNING

public static final int MESSAGE_WARNING
WARNING message

See Also:
Constant Field Values
Constructor Detail

L10nIssue

public L10nIssue()
Method Detail

formatMessage

public java.lang.String formatMessage()
Utility function to perform a message translation for a specific issue

Returns:
The formatted string. In case the string cannot be formatted (i.e. MessageFormat.format () throws an exception), null is returned.

isError

public final boolean isError()
Return true in case the current issue is an error message

Returns:
true, if the underlying issue is an issue representing an error.

isWarning

public final boolean isWarning()
Return true in case the current issue is a warning

Returns:
true, if the underlying issue is an issue representing a warning.

isInfo

public final boolean isInfo()
Return true in case the current issue is an informational message

Returns:
true, if the underlying issue is an issue representing an information.

getMessageTemplate

public abstract java.lang.String getMessageTemplate()
Return the message template that is used to display the error text.

Returns:
Returns the messageTemplate.

getParameters

public abstract java.lang.Object[] getParameters()
Get the parameters for a message

Returns:
the parameters. The parameters have to be an array representing objects.

getMessageType

public final int getMessageType()
Return the message type for the current object. The message type is retrieved from the corresponding entry in L10nIssueTemplates

Returns:
Returns the messageType.

setMessageType

public final void setMessageType(int messageType)
Set the severity of the current message

Parameters:
messageType - The messageType to set.


Copyright © 2000-2004 Tigris.org. All Rights Reserved.