User: schaefera
  Date: 02/03/19 15:12:31

  Modified:    src/main/org/jboss/survey/exception
                        InvalidValueException.java
                        ServiceUnavailableException.java
  Log:
  Some Adjustments to Survey and adding JBoss 3.0 Beta to the download
  page of www.jboss.org.
  
  Revision  Changes    Path
  1.2       +118 -120  
website-survey/src/main/org/jboss/survey/exception/InvalidValueException.java
  
  Index: InvalidValueException.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/website-survey/src/main/org/jboss/survey/exception/InvalidValueException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- InvalidValueException.java        2 Oct 2001 21:34:56 -0000       1.1
  +++ InvalidValueException.java        19 Mar 2002 23:12:31 -0000      1.2
  @@ -1,120 +1,118 @@
  -// ----------------------------------------------------------------------------
  -// File: InvalidValueException
  -// Copyright ( c ) 2001 eBuilt, Inc.  All rights reserved.
  -// Version: $Revision: 1.1 $
  -// Last Checked In: $Date: 2001/10/02 21:34:56 $
  -// Last Checked In By: $Author: user57 $
  -// ----------------------------------------------------------------------------
  -
  -package org.jboss.survey.exception;
  -
  -import java.util.Collection;
  -
  -/**
  - * An instance of this class is thrown when a Value Object
  - * contains an invalid value. It parameters can then be used
  - * with {@link java.text.MessageFormat MessageFormat} to get
  - * right message. The message this exceptions contains is not
  - * the text but the key to get the right text from it.
  - *
  - * @author Andreas Schaefer
  - * @version $Revision: 1.1 $
  - **/
  -public class InvalidValueException
  -   extends Exception
  -{
  -   
  -   // -------------------------------------------------------------------------
  -   // Static
  -   // -------------------------------------------------------------------------
  -      
  -   // -------------------------------------------------------------------------
  -   // Members 
  -   // -------------------------------------------------------------------------  
  -
  -   private Object[] mParameters = new Object[ 0 ];
  -
  -   // -------------------------------------------------------------------------
  -   // Constructor
  -   // -------------------------------------------------------------------------
  -      
  -   /**
  -    * Constructor with a message handler and a list of parameters
  -    *
  -    * @param pMessageHandler Handler to lookup the right message
  -    * @param pParameters One Parameter, array of parameters or a Collection
  -    *                    of parameters or null
  -    **/
  -   public InvalidValueException( String pMessageHandler, Object pParameters )
  -   {
  -      super( pMessageHandler );
  -      if( pParameters != null )
  -      {
  -         if( pParameters instanceof Collection )
  -         {
  -            mParameters = ( (Collection) pParameters ).toArray( new Object[ 0 ] );
  -         }
  -         else
  -         {
  -            if( pParameters instanceof Object[] )
  -            {
  -               mParameters = (Object[]) pParameters;
  -            }
  -            else
  -            {
  -               mParameters = new Object[] { pParameters };
  -            }
  -         }
  -      }
  -   }
  -
  -   // -------------------------------------------------------------------------
  -   // Methods
  -   // -------------------------------------------------------------------------  
  -
  -   /**
  -    * Returns the array of parameters coming along
  -    *
  -    * @return Array of parameters which are always defined but can be empty
  -    **/
  -   public Object[] getParameters()
  -   {
  -      return mParameters;
  -   }
  -   
  -   /**
  -    * Describes the instance and its content for debugging purpose
  -    *
  -    * @return Using the one from the super class
  -    **/
  -   public String toString()
  -   {
  -      return super.toString();
  -   }
  -
  -   /**
  -    * Determines if the given instance is the same as this instance
  -    * based on its content. This means that it has to be of the same
  -    * class ( or subclass ) and it has to have the same content
  -    *
  -    * @return Returns the equals value from the super class
  -    **/
  -   public boolean equals( Object pTest )
  -   {
  -      return super.equals( pTest );
  -   }
  -
  -   /**
  -    * Returns the hashcode of this instance
  -    *
  -    * @return Hashcode of the super class
  -    **/
  -   public int hashCode()
  -   {
  -      return super.hashCode();
  -   }
  -
  -}
  -
  -// ----------------------------------------------------------------------------
  -// EOF
  +/*
  +* JBoss, the OpenSource J2EE webOS
  +*
  +* Distributable under LGPL license.
  +* See terms of license at gnu.org.
  +*/
  +package org.jboss.survey.exception;
  +
  +import java.util.Collection;
  +
  +/**
  + * An instance of this class is thrown when a Value Object
  + * contains an invalid value. It parameters can then be used
  + * with {@link java.text.MessageFormat MessageFormat} to get
  + * right message. The message this exceptions contains is not
  + * the text but the key to get the right text from it.
  + *
  + * @author Andreas Schaefer
  + * @version $Revision: 1.2 $
  + **/
  +public class InvalidValueException
  +   extends Exception
  +{
  +   
  +   // -------------------------------------------------------------------------
  +   // Static
  +   // -------------------------------------------------------------------------
  +      
  +   // -------------------------------------------------------------------------
  +   // Members 
  +   // -------------------------------------------------------------------------  
  +
  +   private Object[] mParameters = new Object[ 0 ];
  +
  +   // -------------------------------------------------------------------------
  +   // Constructor
  +   // -------------------------------------------------------------------------
  +      
  +   /**
  +    * Constructor with a message handler and a list of parameters
  +    *
  +    * @param pMessageHandler Handler to lookup the right message
  +    * @param pParameters One Parameter, array of parameters or a Collection
  +    *                    of parameters or null
  +    **/
  +   public InvalidValueException( String pMessageHandler, Object pParameters )
  +   {
  +      super( pMessageHandler );
  +      if( pParameters != null )
  +      {
  +         if( pParameters instanceof Collection )
  +         {
  +            mParameters = ( (Collection) pParameters ).toArray( new Object[ 0 ] );
  +         }
  +         else
  +         {
  +            if( pParameters instanceof Object[] )
  +            {
  +               mParameters = (Object[]) pParameters;
  +            }
  +            else
  +            {
  +               mParameters = new Object[] { pParameters };
  +            }
  +         }
  +      }
  +   }
  +
  +   // -------------------------------------------------------------------------
  +   // Methods
  +   // -------------------------------------------------------------------------  
  +
  +   /**
  +    * Returns the array of parameters coming along
  +    *
  +    * @return Array of parameters which are always defined but can be empty
  +    **/
  +   public Object[] getParameters()
  +   {
  +      return mParameters;
  +   }
  +   
  +   /**
  +    * Describes the instance and its content for debugging purpose
  +    *
  +    * @return Using the one from the super class
  +    **/
  +   public String toString()
  +   {
  +      return super.toString();
  +   }
  +
  +   /**
  +    * Determines if the given instance is the same as this instance
  +    * based on its content. This means that it has to be of the same
  +    * class ( or subclass ) and it has to have the same content
  +    *
  +    * @return Returns the equals value from the super class
  +    **/
  +   public boolean equals( Object pTest )
  +   {
  +      return super.equals( pTest );
  +   }
  +
  +   /**
  +    * Returns the hashcode of this instance
  +    *
  +    * @return Hashcode of the super class
  +    **/
  +   public int hashCode()
  +   {
  +      return super.hashCode();
  +   }
  +
  +}
  +
  +// ----------------------------------------------------------------------------
  +// EOF
  
  
  
  1.2       +82 -84    
website-survey/src/main/org/jboss/survey/exception/ServiceUnavailableException.java
  
  Index: ServiceUnavailableException.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/website-survey/src/main/org/jboss/survey/exception/ServiceUnavailableException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ServiceUnavailableException.java  2 Oct 2001 21:34:56 -0000       1.1
  +++ ServiceUnavailableException.java  19 Mar 2002 23:12:31 -0000      1.2
  @@ -1,84 +1,82 @@
  -// ----------------------------------------------------------------------------
  -// File: ServiceUnavailableException
  -// Copyright ( c ) 2001 eBuilt, Inc.  All rights reserved.
  -// Version: $Revision: 1.1 $
  -// Last Checked In: $Date: 2001/10/02 21:34:56 $
  -// Last Checked In By: $Author: user57 $
  -// ----------------------------------------------------------------------------
  -
  -package org.jboss.survey.exception;
  -
  -/**
  - * An instance of this class is thrown when a Value Object
  - * contains an invalid value.
  - *
  - * @author Andreas Schaefer
  - * @version $Revision: 1.1 $
  - **/
  -public class ServiceUnavailableException
  -   extends Exception
  -{
  -   
  -   // -------------------------------------------------------------------------
  -   // Static
  -   // -------------------------------------------------------------------------
  -      
  -   // -------------------------------------------------------------------------
  -   // Members 
  -   // -------------------------------------------------------------------------  
  -
  -   // -------------------------------------------------------------------------
  -   // Constructor
  -   // -------------------------------------------------------------------------
  -      
  -   /**
  -    * Constructor with a message of the exception
  -    *
  -    * @param pMessage Message to further explain the exception
  -    **/
  -   public ServiceUnavailableException( String pMessage )
  -   {
  -      super( pMessage );
  -   }
  -
  -
  -   // -------------------------------------------------------------------------
  -   // Methods
  -   // -------------------------------------------------------------------------  
  -
  -   /**
  -    * Describes the instance and its content for debugging purpose
  -    *
  -    * @return Using the one from the super class
  -    **/
  -   public String toString()
  -   {
  -      return super.toString();
  -   }
  -
  -   /**
  -    * Determines if the given instance is the same as this instance
  -    * based on its content. This means that it has to be of the same
  -    * class ( or subclass ) and it has to have the same content
  -    *
  -    * @return Returns the equals value from the super class
  -    **/
  -   public boolean equals( Object pTest )
  -   {
  -      return super.equals( pTest );
  -   }
  -
  -   /**
  -    * Returns the hashcode of this instance
  -    *
  -    * @return Hashcode of the super class
  -    **/
  -   public int hashCode()
  -   {
  -      return super.hashCode();
  -   }
  -
  -}
  -
  -// ----------------------------------------------------------------------------
  -// EOF
  +/*
  +* JBoss, the OpenSource J2EE webOS
  +*
  +* Distributable under LGPL license.
  +* See terms of license at gnu.org.
  +*/
  +package org.jboss.survey.exception;
  +
  +/**
  + * An instance of this class is thrown when a Value Object
  + * contains an invalid value.
  + *
  + * @author Andreas Schaefer
  + * @version $Revision: 1.2 $
  + **/
  +public class ServiceUnavailableException
  +   extends Exception
  +{
  +   
  +   // -------------------------------------------------------------------------
  +   // Static
  +   // -------------------------------------------------------------------------
  +      
  +   // -------------------------------------------------------------------------
  +   // Members 
  +   // -------------------------------------------------------------------------  
  +
  +   // -------------------------------------------------------------------------
  +   // Constructor
  +   // -------------------------------------------------------------------------
  +      
  +   /**
  +    * Constructor with a message of the exception
  +    *
  +    * @param pMessage Message to further explain the exception
  +    **/
  +   public ServiceUnavailableException( String pMessage )
  +   {
  +      super( pMessage );
  +   }
  +
  +
  +   // -------------------------------------------------------------------------
  +   // Methods
  +   // -------------------------------------------------------------------------  
  +
  +   /**
  +    * Describes the instance and its content for debugging purpose
  +    *
  +    * @return Using the one from the super class
  +    **/
  +   public String toString()
  +   {
  +      return super.toString();
  +   }
  +
  +   /**
  +    * Determines if the given instance is the same as this instance
  +    * based on its content. This means that it has to be of the same
  +    * class ( or subclass ) and it has to have the same content
  +    *
  +    * @return Returns the equals value from the super class
  +    **/
  +   public boolean equals( Object pTest )
  +   {
  +      return super.equals( pTest );
  +   }
  +
  +   /**
  +    * Returns the hashcode of this instance
  +    *
  +    * @return Hashcode of the super class
  +    **/
  +   public int hashCode()
  +   {
  +      return super.hashCode();
  +   }
  +
  +}
  +
  +// ----------------------------------------------------------------------------
  +// EOF
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to