org.vraptor.i18n
Class FixedMessage

java.lang.Object
  extended by org.vraptor.i18n.FixedMessage
All Implemented Interfaces:
ValidationMessage

public class FixedMessage
extends Object
implements ValidationMessage

A fixed validation message.

Since:
2.1
Author:
Guilherme Silveira, Nico Steppat

Constructor Summary
FixedMessage(String category, String message)
          Deprecated. 
FixedMessage(String path, String message, String category)
          Creates a fixed message, which is already localized.
 
Method Summary
 String getCategory()
           
 String getKey()
           
 String getPath()
          Returns this validation message path.
 boolean isAlreadyLocalized()
          Whether it has already been localized or not.
 void setPath(String path)
          Sets this message path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedMessage

@Deprecated
public FixedMessage(String category,
                               String message)
Deprecated. 

Should not be used. Use FixedMessage(String path, String message, String category) instead.

Parameters:
category -
message -

FixedMessage

public FixedMessage(String path,
                    String message,
                    String category)
Creates a fixed message, which is already localized.

Parameters:
path - - complete attribute path in object hierachy
message - - the message, already localized, no fmt key here
category - - optional category
Method Detail

getCategory

public String getCategory()
Specified by:
getCategory in interface ValidationMessage

isAlreadyLocalized

public boolean isAlreadyLocalized()
Description copied from interface: ValidationMessage
Whether it has already been localized or not.

Specified by:
isAlreadyLocalized in interface ValidationMessage
Returns:
true if already localized.

getKey

public String getKey()

getPath

public String getPath()
Description copied from interface: ValidationMessage
Returns this validation message path.

Specified by:
getPath in interface ValidationMessage
Returns:
the path

setPath

public void setPath(String path)
Description copied from interface: ValidationMessage
Sets this message path.

Specified by:
setPath in interface ValidationMessage
Parameters:
path - its path


Copyright © 2004-2008 VRaptor. All Rights Reserved.