You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by mp...@apache.org on 2003/07/25 21:59:45 UTC

cvs commit: jakarta-turbine-flux/src/java/org/apache/turbine/flux/modules/screens FluxIndex.java FluxScreen.java

mpoeschl    2003/07/25 12:59:45

  Modified:    src/java/org/apache/turbine/flux/modules/actions
                        FluxLogin.java FluxAction.java FluxLogout.java
               .        project.xml
               src/java/org/apache/turbine/flux/modules/screens
                        FluxIndex.java FluxScreen.java
  Log:
  replace deprecated TurbineResources
  
  Revision  Changes    Path
  1.6       +5 -5      jakarta-turbine-flux/src/java/org/apache/turbine/flux/modules/actions/FluxLogin.java
  
  Index: FluxLogin.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-flux/src/java/org/apache/turbine/flux/modules/actions/FluxLogin.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FluxLogin.java	17 Jul 2003 18:41:06 -0000	1.5
  +++ FluxLogin.java	25 Jul 2003 19:59:45 -0000	1.6
  @@ -3,7 +3,7 @@
   /* ====================================================================
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -61,7 +61,7 @@
   import org.apache.turbine.util.RunData;
   import org.apache.turbine.util.security.AccessControlList;
   import org.apache.turbine.util.security.TurbineSecurityException;
  -import org.apache.turbine.services.resources.TurbineResources;
  +import org.apache.turbine.Turbine;
   import org.apache.turbine.services.security.TurbineSecurity;
   
   /**
  @@ -100,12 +100,12 @@
               data.setACL(acl);
               data.save();
   
  -            data.setMessage(TurbineResources.getString("login.welcome"));
  +            data.setMessage(Turbine.getConfiguration().getString("login.welcome"));
           }
           catch ( TurbineSecurityException e )
           {
  -            data.setMessage(TurbineResources.getString("login.error"));
  -            data.setScreen(TurbineResources.getString("screen.login"));
  +            data.setMessage(Turbine.getConfiguration().getString("login.error"));
  +            data.setScreen(Turbine.getConfiguration().getString("screen.login"));
           }
       }
   }
  
  
  
  1.7       +3 -3      jakarta-turbine-flux/src/java/org/apache/turbine/flux/modules/actions/FluxAction.java
  
  Index: FluxAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-flux/src/java/org/apache/turbine/flux/modules/actions/FluxAction.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- FluxAction.java	17 Jul 2003 18:41:06 -0000	1.6
  +++ FluxAction.java	25 Jul 2003 19:59:45 -0000	1.7
  @@ -3,7 +3,7 @@
   /* ====================================================================
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -58,7 +58,7 @@
   
   import org.apache.turbine.modules.actions.VelocityAction;
   
  -import org.apache.turbine.services.resources.TurbineResources;
  +import org.apache.turbine.Turbine;
   
   import org.apache.turbine.util.RunData;
   import org.apache.turbine.util.security.AccessControlList;
  @@ -103,7 +103,7 @@
            * file that is included in the the standard
            * TurbineResources.properties file.
            */
  -         String fluxAdminRole = TurbineResources.getString("flux.admin.role");
  +         String fluxAdminRole = Turbine.getConfiguration().getString("flux.admin.role");
   
           /*
            * This should be taken from a config file, this
  
  
  
  1.6       +3 -3      jakarta-turbine-flux/src/java/org/apache/turbine/flux/modules/actions/FluxLogout.java
  
  Index: FluxLogout.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-flux/src/java/org/apache/turbine/flux/modules/actions/FluxLogout.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FluxLogout.java	17 Jul 2003 18:41:06 -0000	1.5
  +++ FluxLogout.java	25 Jul 2003 19:59:45 -0000	1.6
  @@ -3,7 +3,7 @@
   /* ====================================================================
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -59,7 +59,7 @@
   import org.apache.turbine.modules.actions.VelocityAction;
   import org.apache.turbine.util.RunData;
   import org.apache.turbine.util.security.AccessControlList;
  -import org.apache.turbine.services.resources.TurbineResources;
  +import org.apache.turbine.Turbine;
   
   /**
    * Removes the user from the session and send tehm to the
  @@ -82,6 +82,6 @@
           }
   
           data.setACL(null);
  -        data.setMessage(TurbineResources.getString("logout.message"));
  +        data.setMessage(Turbine.getConfiguration().getString("logout.message"));
       }
   }
  
  
  
  1.3       +13 -4     jakarta-turbine-flux/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-flux/project.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- project.xml	17 Jul 2003 18:41:05 -0000	1.2
  +++ project.xml	25 Jul 2003 19:59:45 -0000	1.3
  @@ -2,7 +2,7 @@
   
   <project>
     <pomVersion>3</pomVersion>
  -  <name>jakarta-turbine-flux</name>
  +  <name>Turbine Flux</name>
     <id>flux</id>
     <currentVersion>2.3-dev</currentVersion>
     <organization>
  @@ -16,8 +16,8 @@
   
     <gumpRepositoryId>jakarta</gumpRepositoryId>
   
  -  <shortDescription>A servlet based framework.</shortDescription>
  -  <description>Turbine is a servlet based framework that allows experienced Java developers to quickly build secure web applications. Parts of Turbine can also be used independently of the web portion of Turbine as well. In other words, we strive to make portions of Turbine easily available for use in other applications.</description>
  +  <shortDescription>Flux is an admin tool for Turbine.</shortDescription>
  +  <description>Flux is an admin tool for Turbine.</description>
     <url>http://jakarta.apache.org/turbine/turbine-flux/</url>
     <issueTrackingUrl>http://issues.apache.org/scarab/servlet/scarab/</issueTrackingUrl>
     <siteAddress>jakarta.apache.org</siteAddress>
  @@ -26,6 +26,7 @@
   
     <repository>
       <connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:jakarta-turbine-flux</connection>
  +    <developerConnection>scm:cvs:ext:${maven.username}@cvs.apache.org:/home/cvs:jakarta-turbine-flux</developerConnection>
       <url>http://cvs.apache.org/viewcvs/jakarta-turbine-flux/</url>
     </repository>
   
  @@ -72,6 +73,14 @@
         </properties>
       </dependency>
       <dependency>
  +      <id>commons-configuration</id>
  +      <version>20030706.202021</version>
  +      <url>http://jakarta.apache.org/commons/sandbox/configuration/index.html</url>
  +      <properties>
  +        <war.bundle.jar>true</war.bundle.jar>
  +      </properties>
  +    </dependency>
  +    <dependency>
         <id>commons-lang</id>
         <version>1.0.1</version>
         <url>http://jakarta.apache.org/commons/lang.html</url>
  @@ -94,7 +103,7 @@
       </dependency>
       <dependency>
         <id>torque</id>
  -      <version>3.1-alpha2</version>
  +      <version>3.1-alpha3-dev</version>
         <url>http://db.apache.org/torque/</url>
       </dependency>
       <dependency>
  
  
  
  1.10      +4 -4      jakarta-turbine-flux/src/java/org/apache/turbine/flux/modules/screens/FluxIndex.java
  
  Index: FluxIndex.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-flux/src/java/org/apache/turbine/flux/modules/screens/FluxIndex.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- FluxIndex.java	17 Jul 2003 18:41:06 -0000	1.9
  +++ FluxIndex.java	25 Jul 2003 19:59:45 -0000	1.10
  @@ -55,7 +55,7 @@
    */
   
   import org.apache.turbine.modules.screens.VelocityScreen;
  -import org.apache.turbine.services.resources.TurbineResources;
  +import org.apache.turbine.Turbine;
   import org.apache.turbine.services.velocity.TurbineVelocity;
   import org.apache.turbine.util.RunData;
   import org.apache.turbine.util.security.AccessControlList;
  @@ -105,7 +105,7 @@
       protected boolean isAuthorized( RunData data )  throws Exception
       {
           
  -        String fluxAdminRole = TurbineResources.getString("flux.admin.role");
  +        String fluxAdminRole = Turbine.getConfiguration().getString("flux.admin.role");
           
           boolean isAuthorized = false;
           //get acl and check security
  @@ -115,9 +115,9 @@
           if (acl==null || ! acl.hasRole(fluxAdminRole))
           {
               data.getTemplateInfo().setScreenTemplate(
  -                TurbineResources.getString("template.login"));
  +            Turbine.getConfiguration().getString("template.login"));
               
  -            data.setScreen(TurbineResources.getString("screen.login"));
  +            data.setScreen(Turbine.getConfiguration().getString("screen.login"));
               isAuthorized = false;
           }
           else if(acl.hasRole(fluxAdminRole))
  
  
  
  1.9       +9 -19     jakarta-turbine-flux/src/java/org/apache/turbine/flux/modules/screens/FluxScreen.java
  
  Index: FluxScreen.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-flux/src/java/org/apache/turbine/flux/modules/screens/FluxScreen.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- FluxScreen.java	17 Jul 2003 18:41:06 -0000	1.8
  +++ FluxScreen.java	25 Jul 2003 19:59:45 -0000	1.9
  @@ -3,7 +3,7 @@
   /* ====================================================================
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -57,7 +57,7 @@
   import org.apache.velocity.context.Context;
   
   import org.apache.turbine.modules.screens.VelocityScreen;
  -import org.apache.turbine.services.resources.TurbineResources;
  +import org.apache.turbine.Turbine;
   import org.apache.turbine.services.velocity.TurbineVelocity;
   import org.apache.turbine.util.RunData;
   import org.apache.turbine.util.security.AccessControlList;
  @@ -98,7 +98,7 @@
            * Check to see if the embedded menu should be
            * displayed in the templates.
            */
  -        if (TurbineResources.getBoolean("flux.embedded.show.menu", false))
  +        if (Turbine.getConfiguration().getBoolean("flux.embedded.show.menu", false))
           {
               context.put("showEmbeddedMenu", TRUE);
           }
  @@ -107,7 +107,7 @@
            * Check to see if we will display the finders
            * on the forms used in Flux.
            */
  -        if (TurbineResources.getBoolean("flux.ui.show.finder", false))
  +        if (Turbine.getConfiguration().getBoolean("flux.ui.show.finder", false))
           {
               context.put("showFinder", TRUE);
           }
  @@ -133,14 +133,14 @@
           // Grab the Flux Admin role listed in the Flux.properties
           // file that is included in the the standard
           // TurbineResources.properties file.
  -        String fluxAdminRole = TurbineResources.getString("flux.admin.role");
  +        String fluxAdminRole = Turbine.getConfiguration().getString("flux.admin.role");
   
           AccessControlList acl = data.getACL();
   
           if (acl==null || ! acl.hasRole(fluxAdminRole))
           {
               data.setScreenTemplate(
  -                TurbineResources.getString("template.login"));
  +                    Turbine.getConfiguration().getString("template.login"));
               
               isAuthorized = false;
           }
  @@ -148,10 +148,10 @@
           {
               // Set the layout now that the user has
               // gained access.
  -            if (TurbineResources.getString("flux.mode").equalsIgnoreCase("embedded"))
  +            if (Turbine.getConfiguration().getString("flux.mode").equalsIgnoreCase("embedded"))
               {
                   data.setLayoutTemplate(
  -                    TurbineResources.getString("flux.embedded.layout"));
  +                        Turbine.getConfiguration().getString("flux.embedded.layout"));
               }
               else
               {
  @@ -159,7 +159,7 @@
                   // because if running in stand-alone we know what
                   // layout template to use.
                   data.setLayoutTemplate(
  -                    TurbineResources.getString("flux.stand.alone.layout"));
  +                        Turbine.getConfiguration().getString("flux.stand.alone.layout"));
               }
               
               isAuthorized = true;
  @@ -168,13 +168,3 @@
           return isAuthorized;
       }
   }
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  
  
  

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