commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgra...@apache.org
Subject cvs commit: jakarta-commons/validator/src/share/org/apache/commons/validator Validator.java
Date Sat, 24 May 2003 19:40:12 GMT
dgraham     2003/05/24 12:40:12

  Modified:    validator/src/test/org/apache/commons/validator
                        ValidatorTest.java MultipleTests.java TypeTest.java
                        DoubleTest.java ByteTest.java LongTest.java
                        FloatTest.java RequiredNameTest.java
                        IntegerTest.java LocaleTest.java ShortTest.java
                        RequiredIfTest.java MultipleConfigFilesTest.java
                        EmailTest.java
               validator/src/example/org/apache/commons/validator/example
                        ValidateExample.java
               validator/src/share/org/apache/commons/validator
                        Validator.java
  Log:
  Changed Validator.addParameter() to setParameter().
  
  Revision  Changes    Path
  1.12      +7 -7      jakarta-commons/validator/src/test/org/apache/commons/validator/ValidatorTest.java
  
  Index: ValidatorTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/test/org/apache/commons/validator/ValidatorTest.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ValidatorTest.java	22 May 2003 02:29:46 -0000	1.11
  +++ ValidatorTest.java	24 May 2003 19:40:11 -0000	1.12
  @@ -147,7 +147,7 @@
         bean.setDate("2/3/1999");
         
         Validator validator = new Validator(resources, "testForm");
  -      validator.addParameter(Validator.BEAN_KEY, bean);
  +      validator.setParameter(Validator.BEAN_KEY, bean);
   
         try {
            ValidatorResults results = validator.validate();
  @@ -218,8 +218,8 @@
         bean.setLetter("A");
         
         Validator validator = new Validator(resources, "testForm");
  -      validator.addParameter(Validator.BEAN_KEY, bean);
  -      validator.addParameter("java.util.List", l);
  +      validator.setParameter(Validator.BEAN_KEY, bean);
  +      validator.setParameter("java.util.List", l);
   
         try {
            validator.validate();
  
  
  
  1.6       +8 -8      jakarta-commons/validator/src/test/org/apache/commons/validator/MultipleTests.java
  
  Index: MultipleTests.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/test/org/apache/commons/validator/MultipleTests.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MultipleTests.java	22 May 2003 03:12:18 -0000	1.5
  +++ MultipleTests.java	24 May 2003 19:40:11 -0000	1.6
  @@ -160,7 +160,7 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, name);
  +      validator.setParameter(Validator.BEAN_KEY, name);
   
         // Get results of the validation.
         ValidatorResults results = null;
  @@ -200,7 +200,7 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, name);
  +      validator.setParameter(Validator.BEAN_KEY, name);
   
         // Get results of the validation.
         ValidatorResults results = null;
  @@ -235,7 +235,7 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, name);
  +      validator.setParameter(Validator.BEAN_KEY, name);
   
         // Get results of the validation.
         ValidatorResults results = null;
  @@ -270,7 +270,7 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, name);
  +      validator.setParameter(Validator.BEAN_KEY, name);
   
         // Get results of the validation.
         ValidatorResults results = null;
  
  
  
  1.8       +5 -5      jakarta-commons/validator/src/test/org/apache/commons/validator/TypeTest.java
  
  Index: TypeTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/test/org/apache/commons/validator/TypeTest.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TypeTest.java	22 May 2003 03:12:18 -0000	1.7
  +++ TypeTest.java	24 May 2003 19:40:11 -0000	1.8
  @@ -169,7 +169,7 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource 
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, info);
  +      validator.setParameter(Validator.BEAN_KEY, info);
   
         // Get results of the validation.
         ValidatorResults results = null;
  
  
  
  1.7       +5 -5      jakarta-commons/validator/src/test/org/apache/commons/validator/DoubleTest.java
  
  Index: DoubleTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/test/org/apache/commons/validator/DoubleTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DoubleTest.java	22 May 2003 03:12:18 -0000	1.6
  +++ DoubleTest.java	24 May 2003 19:40:11 -0000	1.7
  @@ -204,7 +204,7 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource 
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, info);
  +      validator.setParameter(Validator.BEAN_KEY, info);
   
         // Get results of the validation.
         ValidatorResults results = null;
  
  
  
  1.7       +5 -5      jakarta-commons/validator/src/test/org/apache/commons/validator/ByteTest.java
  
  Index: ByteTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/test/org/apache/commons/validator/ByteTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ByteTest.java	22 May 2003 03:12:18 -0000	1.6
  +++ ByteTest.java	24 May 2003 19:40:11 -0000	1.7
  @@ -227,7 +227,7 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource 
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, info);
  +      validator.setParameter(Validator.BEAN_KEY, info);
   
         // Get results of the validation.
         ValidatorResults results = null;
  
  
  
  1.7       +5 -5      jakarta-commons/validator/src/test/org/apache/commons/validator/LongTest.java
  
  Index: LongTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/test/org/apache/commons/validator/LongTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- LongTest.java	22 May 2003 03:12:18 -0000	1.6
  +++ LongTest.java	24 May 2003 19:40:11 -0000	1.7
  @@ -226,7 +226,7 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource 
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, info);
  +      validator.setParameter(Validator.BEAN_KEY, info);
   
         // Get results of the validation.
         ValidatorResults results = null;
  
  
  
  1.7       +5 -5      jakarta-commons/validator/src/test/org/apache/commons/validator/FloatTest.java
  
  Index: FloatTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/test/org/apache/commons/validator/FloatTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- FloatTest.java	22 May 2003 03:12:18 -0000	1.6
  +++ FloatTest.java	24 May 2003 19:40:11 -0000	1.7
  @@ -204,7 +204,7 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource 
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, info);
  +      validator.setParameter(Validator.BEAN_KEY, info);
   
         // Get results of the validation.
         ValidatorResults results = null;
  
  
  
  1.9       +10 -10    jakarta-commons/validator/src/test/org/apache/commons/validator/RequiredNameTest.java
  
  Index: RequiredNameTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/test/org/apache/commons/validator/RequiredNameTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- RequiredNameTest.java	22 May 2003 03:12:18 -0000	1.8
  +++ RequiredNameTest.java	24 May 2003 19:40:11 -0000	1.9
  @@ -161,7 +161,7 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource 
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, name);
  +      validator.setParameter(Validator.BEAN_KEY, name);
   
         // Get results of the validation.
         ValidatorResults results = null;
  @@ -199,7 +199,7 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource 
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, name);
  +      validator.setParameter(Validator.BEAN_KEY, name);
   
         // Get results of the validation.
         ValidatorResults results = null;
  @@ -233,7 +233,7 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource 
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, name);
  +      validator.setParameter(Validator.BEAN_KEY, name);
   
         // Get results of the validation.
         ValidatorResults results = null;
  @@ -267,7 +267,7 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource 
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, name);
  +      validator.setParameter(Validator.BEAN_KEY, name);
   
         // Get results of the validation.
         ValidatorResults results = null;
  @@ -301,7 +301,7 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource 
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, name);
  +      validator.setParameter(Validator.BEAN_KEY, name);
   
         // Get results of the validation.
         ValidatorResults results = null;
  @@ -337,7 +337,7 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource 
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, name);
  +      validator.setParameter(Validator.BEAN_KEY, name);
   
         // Get results of the validation.
         ValidatorResults results = null;
  
  
  
  1.7       +5 -5      jakarta-commons/validator/src/test/org/apache/commons/validator/IntegerTest.java
  
  Index: IntegerTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/test/org/apache/commons/validator/IntegerTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- IntegerTest.java	22 May 2003 03:12:18 -0000	1.6
  +++ IntegerTest.java	24 May 2003 19:40:11 -0000	1.7
  @@ -226,7 +226,7 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource 
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, info);
  +      validator.setParameter(Validator.BEAN_KEY, info);
   
         // Get results of the validation.
         ValidatorResults results = null;
  
  
  
  1.5       +6 -6      jakarta-commons/validator/src/test/org/apache/commons/validator/LocaleTest.java
  
  Index: LocaleTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/test/org/apache/commons/validator/LocaleTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- LocaleTest.java	22 May 2003 03:12:18 -0000	1.4
  +++ LocaleTest.java	24 May 2003 19:40:11 -0000	1.5
  @@ -197,8 +197,8 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource 
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, name);
  -      validator.addParameter(Validator.LOCALE_KEY, loc);
  +      validator.setParameter(Validator.BEAN_KEY, name);
  +      validator.setParameter(Validator.LOCALE_KEY, loc);
         // Get results of the validation.
         ValidatorResults results = null;
         
  
  
  
  1.7       +5 -5      jakarta-commons/validator/src/test/org/apache/commons/validator/ShortTest.java
  
  Index: ShortTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/test/org/apache/commons/validator/ShortTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ShortTest.java	22 May 2003 03:12:18 -0000	1.6
  +++ ShortTest.java	24 May 2003 19:40:11 -0000	1.7
  @@ -226,7 +226,7 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource 
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, info);
  +      validator.setParameter(Validator.BEAN_KEY, info);
   
         // Get results of the validation.
         ValidatorResults results = null;
  
  
  
  1.6       +9 -9      jakarta-commons/validator/src/test/org/apache/commons/validator/RequiredIfTest.java
  
  Index: RequiredIfTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/test/org/apache/commons/validator/RequiredIfTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RequiredIfTest.java	22 May 2003 03:12:18 -0000	1.5
  +++ RequiredIfTest.java	24 May 2003 19:40:11 -0000	1.6
  @@ -161,7 +161,7 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource 
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, name);
  +      validator.setParameter(Validator.BEAN_KEY, name);
   
         // Get results of the validation.
         ValidatorResults results = null;
  @@ -200,7 +200,7 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource 
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, name);
  +      validator.setParameter(Validator.BEAN_KEY, name);
   
         // Get results of the validation.
         ValidatorResults results = null;
  @@ -235,7 +235,7 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource 
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, name);
  +      validator.setParameter(Validator.BEAN_KEY, name);
   
         // Get results of the validation.
         ValidatorResults results = null;
  @@ -270,7 +270,7 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource 
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, name);
  +      validator.setParameter(Validator.BEAN_KEY, name);
   
         // Get results of the validation.
         ValidatorResults results = null;
  @@ -305,7 +305,7 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource 
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, name);
  +      validator.setParameter(Validator.BEAN_KEY, name);
   
         // Get results of the validation.
         ValidatorResults results = null;
  
  
  
  1.4       +7 -7      jakarta-commons/validator/src/test/org/apache/commons/validator/MultipleConfigFilesTest.java
  
  Index: MultipleConfigFilesTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/test/org/apache/commons/validator/MultipleConfigFilesTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MultipleConfigFilesTest.java	22 May 2003 03:12:18 -0000	1.3
  +++ MultipleConfigFilesTest.java	24 May 2003 19:40:11 -0000	1.4
  @@ -127,7 +127,7 @@
           Validator validator = new Validator(resources, FORM_KEY);
           // add the name bean to the validator as a resource
           // for the validations to be performed on.
  -        validator.addParameter(Validator.BEAN_KEY, name);
  +        validator.setParameter(Validator.BEAN_KEY, name);
   
           // Get results of the validation.
           ValidatorResults results = null;
  @@ -168,7 +168,7 @@
           Validator validator = new Validator(resources, FORM_KEY);
           // add the name bean to the validator as a resource
           // for the validations to be performed on.
  -        validator.addParameter(Validator.BEAN_KEY, name);
  +        validator.setParameter(Validator.BEAN_KEY, name);
   
           // Get results of the validation.
           ValidatorResults results = null;
  @@ -203,7 +203,7 @@
           Validator validator = new Validator(resources, FORM_KEY);
           // add the name bean to the validator as a resource
           // for the validations to be performed on.
  -        validator.addParameter(Validator.BEAN_KEY, name);
  +        validator.setParameter(Validator.BEAN_KEY, name);
   
           // Get results of the validation.
           ValidatorResults results = null;
  @@ -238,7 +238,7 @@
           Validator validator = new Validator(resources, FORM_KEY);
           // add the name bean to the validator as a resource
           // for the validations to be performed on.
  -        validator.addParameter(Validator.BEAN_KEY, name);
  +        validator.setParameter(Validator.BEAN_KEY, name);
   
           // Get results of the validation.
           ValidatorResults results = null;
  
  
  
  1.12      +5 -5      jakarta-commons/validator/src/test/org/apache/commons/validator/EmailTest.java
  
  Index: EmailTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/test/org/apache/commons/validator/EmailTest.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- EmailTest.java	22 May 2003 03:12:18 -0000	1.11
  +++ EmailTest.java	24 May 2003 19:40:11 -0000	1.12
  @@ -259,7 +259,7 @@
         Validator validator = new Validator(resources, FORM_KEY);
         // add the name bean to the validator as a resource 
         // for the validations to be performed on.
  -      validator.addParameter(Validator.BEAN_KEY, info);
  +      validator.setParameter(Validator.BEAN_KEY, info);
   
         // Get results of the validation.
         ValidatorResults results = null;
  
  
  
  1.9       +5 -5      jakarta-commons/validator/src/example/org/apache/commons/validator/example/ValidateExample.java
  
  Index: ValidateExample.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/example/org/apache/commons/validator/example/ValidateExample.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ValidateExample.java	24 May 2003 18:54:13 -0000	1.8
  +++ ValidateExample.java	24 May 2003 19:40:12 -0000	1.9
  @@ -136,7 +136,7 @@
           Validator validator = new Validator(resources, "ValidateBean");
           
           // Tell the validator which bean to validate against.
  -        validator.addParameter(Validator.BEAN_KEY, bean);
  +        validator.setParameter(Validator.BEAN_KEY, bean);
           
           ValidatorResults results = null;
           
  
  
  
  1.22      +16 -17    jakarta-commons/validator/src/share/org/apache/commons/validator/Validator.java
  
  Index: Validator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Validator.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- Validator.java	22 May 2003 02:29:47 -0000	1.21
  +++ Validator.java	24 May 2003 19:40:12 -0000	1.22
  @@ -176,7 +176,7 @@
        * @param resources <code>ValidatorResources</code> to use during validation.
        */
       public Validator(ValidatorResources resources) {
  -        this.resources = resources;
  +        this(resources, null);
       }
   
       /**
  @@ -202,15 +202,14 @@
        * 
        * @param parameterValue The instance that will be passed into the 
        * validation method.
  -     * @deprecated Use addParameter(String, Object) instead.
  +     * @deprecated Use setParameter(String, Object) instead.
        */
       public void addResource(String parameterClassName, Object parameterValue) {
  -        this.addParameter(parameterClassName, parameterValue);
  +        this.setParameter(parameterClassName, parameterValue);
       }
       
       /**
  -     * Add a resource to be used during the processing
  -     * of validations.
  +     * Set a parameter of a pluggable validation method.
        *
        * @param parameterClassName The full class name of the parameter of the 
        * validation method that corresponds to the value/instance passed in with it.
  @@ -218,7 +217,7 @@
        * @param parameterValue The instance that will be passed into the 
        * validation method.
        */
  -    public void addParameter(String parameterClassName, Object parameterValue) {
  +    public void setParameter(String parameterClassName, Object parameterValue) {
           this.parameters.put(parameterClassName, parameterValue);
       }
   
  @@ -436,8 +435,8 @@
           try {
               // Add these two Objects to the resources since they reference
               // the current validator action and field
  -            this.parameters.put(VALIDATOR_ACTION_KEY, va);
  -            this.parameters.put(FIELD_KEY, field);
  +            this.setParameter(VALIDATOR_ACTION_KEY, va);
  +            this.setParameter(FIELD_KEY, field);
           
               Class validationClass = getClassLoader().loadClass(va.getClassname());
           
  @@ -519,7 +518,7 @@
   
           for (int i = 0; i < paramNames.size(); i++) {
               String paramClassName = (String) paramNames.get(i);
  -            paramValue[i] = this.parameters.get(paramClassName);
  +            paramValue[i] = this.getParameterValue(paramClassName);
           }
   
           return paramValue;
  @@ -569,7 +568,7 @@
           
           Object oIndexed =
               PropertyUtils.getProperty(
  -                this.parameters.get(BEAN_KEY),
  +                this.getParameterValue(BEAN_KEY),
                   field.getIndexedListProperty());
                   
           Object indexedList[] = new Object[0];
  @@ -612,7 +611,7 @@
               try {
                   oIndexed =
                       PropertyUtils.getProperty(
  -                        this.parameters.get(BEAN_KEY),
  +                        this.getParameterValue(BEAN_KEY),
                           field.getIndexedListProperty());
           
               } catch (Exception e) {
  @@ -686,13 +685,13 @@
        */
       public ValidatorResults validate() throws ValidatorException {
           ValidatorResults results = new ValidatorResults();
  -        Locale locale = (Locale) this.parameters.get(LOCALE_KEY);
  +        Locale locale = (Locale) this.getParameterValue(LOCALE_KEY);
   
           if (locale == null) {
               locale = Locale.getDefault();
           }
           
  -        this.parameters.put(VALIDATOR_KEY, this);
  +        this.setParameter(VALIDATOR_KEY, this);
   
           if (this.resources == null) {
               throw new ValidatorException("Resources not defined for Validator");
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message