A couple years ago, back when Turbine was Dash there were references to
Turbine sprinkled around other classes.  I cannot remember the exact
problem, but it was determined that other classes should not reference
the servlet.   These are just constants, but isn't it better to
reference an interface?

john mcnally

[EMAIL PROTECTED] wrote:
> 
> jvanzyl     01/06/27 11:44:42
> 
>   Modified:    src/java/org/apache/turbine/modules/actions/sessionvalidator
>                         DefaultSessionValidator.java
>   Log:
>   - use Turbine not TurbineConstants, Turbine implements TurbineConstansts
>     so the values are available through Turbine. Trying to use Turbine
>     as the single point of access.
> 
>   Revision  Changes    Path
>   1.10      +9 -11     
>jakarta-turbine/src/java/org/apache/turbine/modules/actions/sessionvalidator/DefaultSessionValidator.java
> 
>   Index: DefaultSessionValidator.java
>   ===================================================================
>   RCS file: 
>/home/cvs/jakarta-turbine/src/java/org/apache/turbine/modules/actions/sessionvalidator/DefaultSessionValidator.java,v
>   retrieving revision 1.9
>   retrieving revision 1.10
>   diff -u -r1.9 -r1.10
>   --- DefaultSessionValidator.java      2001/06/19 01:41:15     1.9
>   +++ DefaultSessionValidator.java      2001/06/27 18:44:40     1.10
>   @@ -54,11 +54,7 @@
>     * <http://www.apache.org/>.
>     */
> 
>   -// Turbine Modules
>   -//import org.apache.turbine.modules.*;
>   -
>   -// Turbine Utility Classes
>   -import org.apache.turbine.TurbineConstants;
>   +import org.apache.turbine.Turbine;
>    import org.apache.turbine.util.RunData;
>    import org.apache.turbine.services.resources.TurbineResources;
> 
>   @@ -83,7 +79,7 @@
>     * Turbine servlet.
>     *
>     * @author <a href="mailto:[EMAIL PROTECTED]";>Dave Bryson</a>
>   - * @version $Id: DefaultSessionValidator.java,v 1.9 2001/06/19 01:41:15 jon Exp $
>   + * @version $Id: DefaultSessionValidator.java,v 1.10 2001/06/27 18:44:40 jvanzyl 
>Exp $
>     */
>    public class DefaultSessionValidator extends SessionValidator
>    {
>   @@ -110,11 +106,13 @@
>                // only set the message if nothing else has already set it
>                // (e.g. the LogoutUser action)
>                if (data.getMessage() == null)
>   +            {
>                    data.setMessage(TurbineResources.getString(
>   -                    TurbineConstants.LOGIN_MESSAGE));
>   +                    Turbine.LOGIN_MESSAGE));
>   +            }
>                // set the screen to be the login page
>                data.setScreen(TurbineResources.getString(
>   -                TurbineConstants.SCREEN_LOGIN));
>   +                Turbine.SCREEN_LOGIN));
>                // we're not doing any actions buddy! (except action.login which
>                // will have been performed already)
>                data.setAction(null);
>   @@ -122,9 +120,9 @@
>            else if ( ! data.hasScreen() )
>            {
>                data.setMessage(TurbineResources.getString(
>   -                TurbineConstants.LOGIN_MESSAGE_NOSCREEN));
>   +                Turbine.LOGIN_MESSAGE_NOSCREEN));
>                data.setScreen(TurbineResources.getString(
>   -                TurbineConstants.SCREEN_HOMEPAGE));
>   +                Turbine.SCREEN_HOMEPAGE));
>            }
>            else if ( data.getParameters().containsKey("_session_access_counter") )
>            {
>   @@ -136,7 +134,7 @@
>                    data.getUser().setTemp("prev_screen", data.getScreen());
>                    data.getUser().setTemp("prev_parameters", data.getParameters());
>                    data.setScreen( TurbineResources.getString(
>   -                    TurbineConstants.SCREEN_INVALID_STATE) );
>   +                    Turbine.SCREEN_INVALID_STATE) );
>                    data.setAction( "" );
>                }
>            }
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to