org.tigris.scarab.screens
Class Default

java.lang.Object
  extended byorg.apache.turbine.modules.Module
      extended byorg.apache.turbine.modules.SecureModule
          extended byorg.apache.turbine.modules.screens.TemplateSecureScreen
              extended byorg.apache.turbine.TemplateSecureScreen
                  extended byorg.tigris.scarab.screens.Default
Direct Known Subclasses:
ActivityList, ArtifactTypeEdit, AssignIssue, AttributeGroupEdit, AttributeOptionSelect, ConditionEdit, ConfigureIssueList, DataExport, GlobalArtifactTypeEdit, GlobalAttributeEdit, IssueList, IssueTypeList, ManageArtifactTypes, ModuleAttributeEdit, MoveIssue, NotificationList, Register, RSSIssueList, SaveTemplate, ScarabDefault, SelectModule, UserAttributeEdit, ViewAttachment, ViewIssue, ViewXMLExportIssues, ViewXMLExportSettings, Wizard1, XMLImportIssuesResults, XModuleList

public class Default
extends org.apache.turbine.TemplateSecureScreen

This class is responsible for building the Context up for the Default Screen as well as validating Security information for all of the Screens. Please note that the Actions also may depend on the checkAuthorized() method in order to prevent the need for duplication of code.

Version:
$Id: Default.java 9290 2004-12-03 15:57:52Z dep4b $
Author:
Jon S. Stevens

Constructor Summary
Default()
           
 
Method Summary
static boolean checkAuthorized(org.apache.turbine.RunData data)
          Public static access to the isAuthorized() method so that an Action can use this same method to do authorization.
 java.lang.String doBuild(org.apache.turbine.RunData data)
          Override the subclass and call doBuildTemplate.
protected  void doBuildTemplate(org.apache.turbine.RunData data, org.apache.turbine.TemplateContext context)
          builds up the context for display of variables on the page.
static ScarabLocalizationTool getLocalizationTool(org.apache.turbine.TemplateContext context)
          Helper method to retrieve the ScarabLocalizationTool from the Context
static ScarabRequestTool getScarabRequestTool(org.apache.turbine.TemplateContext context)
          Helper method to retrieve the ScarabRequestTool from the Context
protected  java.lang.String getTitle(ScarabRequestTool scarabR, ScarabLocalizationTool l10n)
           
protected  boolean isAuthorized(org.apache.turbine.RunData data)
          sets the template to Login.vm if the user hasn't logged in yet or if the user does not have the base permissions.
static void setTargetLogin(org.apache.turbine.RunData data)
           
static void setTargetSelectModule(org.apache.turbine.RunData data)
           
 
Methods inherited from class org.apache.turbine.modules.SecureModule
doBuildTemplate
 
Methods inherited from class org.apache.turbine.modules.Module
build, evaluate, execute, getPullService, getTemplateContext, getTemplateService, getTool, handleRequest, handleRequest, requestFinished, setTarget, setTemplate, templateExists
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Default

public Default()
Method Detail

doBuild

public java.lang.String doBuild(org.apache.turbine.RunData data)
                         throws java.lang.Exception
Override the subclass and call doBuildTemplate. This is a hack. For some reason the doBuildTemplate is not being called in a few select cases, so lets just hack things to always get called properly.

Throws:
java.lang.Exception

doBuildTemplate

protected void doBuildTemplate(org.apache.turbine.RunData data,
                               org.apache.turbine.TemplateContext context)
                        throws java.lang.Exception
builds up the context for display of variables on the page.

Throws:
java.lang.Exception

getTitle

protected java.lang.String getTitle(ScarabRequestTool scarabR,
                                    ScarabLocalizationTool l10n)
                             throws java.lang.Exception
Throws:
java.lang.Exception

isAuthorized

protected boolean isAuthorized(org.apache.turbine.RunData data)
                        throws java.lang.Exception
sets the template to Login.vm if the user hasn't logged in yet or if the user does not have the base permissions.

Throws:
java.lang.Exception

checkAuthorized

public static boolean checkAuthorized(org.apache.turbine.RunData data)
                               throws java.lang.Exception
Public static access to the isAuthorized() method so that an Action can use this same method to do authorization.

Throws:
java.lang.Exception

setTargetSelectModule

public static void setTargetSelectModule(org.apache.turbine.RunData data)

setTargetLogin

public static void setTargetLogin(org.apache.turbine.RunData data)

getScarabRequestTool

public static ScarabRequestTool getScarabRequestTool(org.apache.turbine.TemplateContext context)
Helper method to retrieve the ScarabRequestTool from the Context


getLocalizationTool

public static ScarabLocalizationTool getLocalizationTool(org.apache.turbine.TemplateContext context)
Helper method to retrieve the ScarabLocalizationTool from the Context



Copyright © 2000-2004 Tigris.org. All Rights Reserved.