You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jv...@apache.org on 2001/07/15 00:46:49 UTC

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

jvanzyl     01/07/14 15:46:49

  Modified:    src/java/org/apache/turbine/flux/modules/actions
                        FluxAction.java
               src/java/org/apache/turbine/flux/modules/screens
                        FluxIndex.java FluxScreen.java
  Log:
  - using Turbine.getConfiguration() instead of TurbineResources.
  
  Revision  Changes    Path
  1.3       +4 -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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FluxAction.java	2001/07/10 16:50:34	1.2
  +++ FluxAction.java	2001/07/14 22:46:46	1.3
  @@ -54,11 +54,11 @@
    * <http://www.apache.org/>.
    */
   
  +import org.apache.turbine.Turbine;
   import org.apache.turbine.RunData;
   import org.apache.turbine.TemplateAction;
   import org.apache.turbine.TemplateContext;
   import org.apache.turbine.util.security.AccessControlList;
  -import org.apache.turbine.services.resources.TurbineResources;
   
   /**
    * General Flux action.
  @@ -86,8 +86,9 @@
   
           // 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");
  +        // TRP file.
  +        String fluxAdminRole = 
  +            Turbine.getConfiguration().getString("flux.admin.role");
   
           // This should be taken from a config file, this
           // hard coding is no good for widespread use
  
  
  
  1.5       +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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FluxIndex.java	2001/07/10 16:52:10	1.4
  +++ FluxIndex.java	2001/07/14 22:46:47	1.5
  @@ -55,9 +55,9 @@
    */
   
   import org.apache.turbine.RunData;
  +import org.apache.turbine.Turbine;
   import org.apache.turbine.TemplateContext;
   import org.apache.turbine.TemplateScreen;
  -import org.apache.turbine.services.resources.TurbineResources;
   import org.apache.turbine.util.security.AccessControlList;
   
   /**
  @@ -106,7 +106,7 @@
           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
  @@ -116,9 +116,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.4       +8 -8      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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FluxScreen.java	2001/07/10 16:52:15	1.3
  +++ FluxScreen.java	2001/07/14 22:46:47	1.4
  @@ -55,9 +55,9 @@
    */
   
   import org.apache.turbine.RunData;
  +import org.apache.turbine.Turbine;
   import org.apache.turbine.TemplateContext;
   import org.apache.turbine.TemplateScreen;
  -import org.apache.turbine.services.resources.TurbineResources;
   import org.apache.turbine.util.security.AccessControlList;
   
   /**
  @@ -96,14 +96,14 @@
   
           // 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);
           }
   
           // 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);
           }
  @@ -130,14 +130,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;
           }
  @@ -145,10 +145,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
               {
  @@ -156,7 +156,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;
  
  
  

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