org.tigris.scarab.actions.base
Class RequireLoginFirstAction

java.lang.Object
  extended byorg.apache.turbine.modules.Module
      extended byorg.apache.turbine.modules.Action
          extended byorg.apache.turbine.modules.ActionEvent
              extended byorg.apache.turbine.modules.actions.TemplateAction
                  extended byorg.apache.turbine.modules.actions.TemplateSecureAction
                      extended byorg.apache.turbine.TemplateSecureAction
                          extended byorg.tigris.scarab.actions.base.RequireLoginFirstAction
Direct Known Subclasses:
AppConfigurationSettings, Approval, ArtifactTypeEdit, AttributeGroupEdit, BaseModifyIssue, ConditionEdit, ConfigureIssueList, ConfigureReport, DefineXModuleList, GlobalArtifactTypeCreate, GlobalArtifactTypes, GlobalAttributeEdit, GlobalAttributes, GlobalEmailSettings, HandleRoleRequests, IssueTypeAttributeEdit, ManageArtifactTypes, ManagePermissions, ManageRoles, ManageUser, ModifyModule, ModuleAttributeEdit, QueryList, Redirect, ReportIssue, Search, SetHomePage, SetInfoMessage, TemplateList, UpdateSearchIndex, ViewIssue

public abstract class RequireLoginFirstAction
extends org.apache.turbine.TemplateSecureAction

This is a badly named class which is essentially equivalent to the Default.java Screen except that it has a few helper methods.

Version:
$Id: RequireLoginFirstAction.java 9280 2004-11-27 01:11:13Z jorgeuriarte $
Author:
Jon S. Stevens

Field Summary
protected static LocalizationKey DEFAULT_MSG
           
protected static LocalizationKey EMAIL_ERROR
           
protected static LocalizationKey EMAIL_ERROR2
           
protected static LocalizationKey ERROR_MESSAGE
           
protected static LocalizationKey NO_CHANGES_MADE
           
protected static LocalizationKey NO_PERMISSION_MESSAGE
           
 
Fields inherited from class org.apache.turbine.modules.ActionEvent
BUTTON, BUTTON_LENGTH, LENGTH, METHOD_NAME_LENGTH, METHOD_NAME_PREFIX
 
Constructor Summary
RequireLoginFirstAction()
           
 
Method Summary
 boolean areThereDupeSequences(java.util.List list, org.apache.turbine.tool.IntakeTool intake, java.lang.String groupName, java.lang.String fieldName, int dedupeSeq)
          Check if the objects have duplicate sequence numbers set
 void doCancel(org.apache.turbine.RunData data, org.apache.turbine.TemplateContext context)
           
 void doDone(org.apache.turbine.RunData data, org.apache.turbine.TemplateContext context)
           
 void doGonext(org.apache.turbine.RunData data, org.apache.turbine.TemplateContext context)
           
 void doGotoothertemplate(org.apache.turbine.RunData data, org.apache.turbine.TemplateContext context)
           
 void doRefresh(org.apache.turbine.RunData data, org.apache.turbine.TemplateContext context)
           
 void doRefreshresultsperpage(org.apache.turbine.RunData data, org.apache.turbine.TemplateContext context)
           
 void doReset(org.apache.turbine.RunData data, org.apache.turbine.TemplateContext context)
           
 void doSave(org.apache.turbine.RunData data, org.apache.turbine.TemplateContext context)
           
 java.lang.String getBackTemplate(org.apache.turbine.RunData data)
          Returns the backTemplate to be executed.
 java.lang.String getBackTemplate(org.apache.turbine.RunData data, java.lang.String defaultValue)
          Returns the backTemplate to be executed.
 java.lang.String getCancelTemplate(org.apache.turbine.RunData data)
          Returns the cancelTemplate to be executed.
 java.lang.String getCancelTemplate(org.apache.turbine.RunData data, java.lang.String defaultValue)
          Returns the cancelTemplate to be executed.
 java.lang.String getCurrentTemplate(org.apache.turbine.RunData data)
          Returns the current template that is being executed, otherwisse it returns null
 java.lang.String getCurrentTemplate(org.apache.turbine.RunData data, java.lang.String defaultValue)
          Returns the current template that is being executed, otherwisse it returns defaultValue.
 org.apache.turbine.tool.IntakeTool getIntakeTool(org.apache.turbine.TemplateContext context)
          Helper method to retrieve the IntakeTool from the Context
 java.lang.String getLastTemplate(org.apache.turbine.RunData data)
          Returns the last template to be cancelled back to.
protected  ScarabLocalizationTool getLocalizationTool(org.apache.turbine.TemplateContext context)
          Helper method to retrieve the ScarabLocalizationTool from the Context
 java.lang.String getNextTemplate(org.apache.turbine.RunData data)
          Returns the nextTemplate to be executed.
 java.lang.String getNextTemplate(org.apache.turbine.RunData data, java.lang.String defaultValue)
          Returns the nextTemplate to be executed.
 java.lang.String getOtherTemplate(org.apache.turbine.RunData data)
          Returns the other template that is being executed, otherwise it returns null.
protected  java.lang.String getRequiredPermission(org.apache.turbine.RunData data)
          Flag that marks the action as requiring a permission mapping in Scarab.properties.
 ScarabRequestTool getScarabRequestTool(org.apache.turbine.TemplateContext context)
          Helper method to retrieve the ScarabRequestTool from the Context
protected  boolean isAuthorized(org.apache.turbine.RunData data)
          sets the template to template.login if the user hasn't logged in yet
protected  org.apache.log4j.Logger log()
           
 
Methods inherited from class org.apache.turbine.modules.actions.TemplateSecureAction
perform
 
Methods inherited from class org.apache.turbine.modules.actions.TemplateAction
doPerform, doPerform, executeEvents
 
Methods inherited from class org.apache.turbine.modules.ActionEvent
execute, formatString
 
Methods inherited from class org.apache.turbine.modules.Module
build, doBuild, doBuildTemplate, doBuildTemplate, evaluate, 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
 

Field Detail

ERROR_MESSAGE

protected static final LocalizationKey ERROR_MESSAGE

NO_PERMISSION_MESSAGE

protected static final LocalizationKey NO_PERMISSION_MESSAGE

DEFAULT_MSG

protected static final LocalizationKey DEFAULT_MSG

EMAIL_ERROR

protected static final LocalizationKey EMAIL_ERROR

EMAIL_ERROR2

protected static final LocalizationKey EMAIL_ERROR2

NO_CHANGES_MADE

protected static final LocalizationKey NO_CHANGES_MADE
Constructor Detail

RequireLoginFirstAction

public RequireLoginFirstAction()
Method Detail

isAuthorized

protected boolean isAuthorized(org.apache.turbine.RunData data)
                        throws java.lang.Exception
sets the template to template.login if the user hasn't logged in yet

Throws:
java.lang.Exception

getIntakeTool

public org.apache.turbine.tool.IntakeTool getIntakeTool(org.apache.turbine.TemplateContext context)
Helper method to retrieve the IntakeTool from the Context


getLocalizationTool

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


getScarabRequestTool

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


getCurrentTemplate

public java.lang.String getCurrentTemplate(org.apache.turbine.RunData data)
Returns the current template that is being executed, otherwisse it returns null


getCurrentTemplate

public java.lang.String getCurrentTemplate(org.apache.turbine.RunData data,
                                           java.lang.String defaultValue)
Returns the current template that is being executed, otherwisse it returns defaultValue.


getNextTemplate

public java.lang.String getNextTemplate(org.apache.turbine.RunData data)
Returns the nextTemplate to be executed. Otherwise returns null.


getNextTemplate

public java.lang.String getNextTemplate(org.apache.turbine.RunData data,
                                        java.lang.String defaultValue)
Returns the nextTemplate to be executed. Otherwise returns defaultValue.


getLastTemplate

public java.lang.String getLastTemplate(org.apache.turbine.RunData data)
Returns the last template to be cancelled back to.


getCancelTemplate

public java.lang.String getCancelTemplate(org.apache.turbine.RunData data)
Returns the cancelTemplate to be executed. Otherwise returns null.


getCancelTemplate

public java.lang.String getCancelTemplate(org.apache.turbine.RunData data,
                                          java.lang.String defaultValue)
Returns the cancelTemplate to be executed. Otherwise returns defaultValue.


getBackTemplate

public java.lang.String getBackTemplate(org.apache.turbine.RunData data)
Returns the backTemplate to be executed. Otherwise returns null.


getBackTemplate

public java.lang.String getBackTemplate(org.apache.turbine.RunData data,
                                        java.lang.String defaultValue)
Returns the backTemplate to be executed. Otherwise returns defaultValue.


getOtherTemplate

public java.lang.String getOtherTemplate(org.apache.turbine.RunData data)
Returns the other template that is being executed, otherwise it returns null.


doSave

public void doSave(org.apache.turbine.RunData data,
                   org.apache.turbine.TemplateContext context)
            throws java.lang.Exception
Throws:
java.lang.Exception

doGonext

public void doGonext(org.apache.turbine.RunData data,
                     org.apache.turbine.TemplateContext context)
              throws java.lang.Exception
Throws:
java.lang.Exception

doGotoothertemplate

public void doGotoothertemplate(org.apache.turbine.RunData data,
                                org.apache.turbine.TemplateContext context)
                         throws java.lang.Exception
Throws:
java.lang.Exception

doRefresh

public void doRefresh(org.apache.turbine.RunData data,
                      org.apache.turbine.TemplateContext context)
               throws java.lang.Exception
Throws:
java.lang.Exception

doRefreshresultsperpage

public void doRefreshresultsperpage(org.apache.turbine.RunData data,
                                    org.apache.turbine.TemplateContext context)
                             throws java.lang.Exception
Throws:
java.lang.Exception

doReset

public void doReset(org.apache.turbine.RunData data,
                    org.apache.turbine.TemplateContext context)
             throws java.lang.Exception
Throws:
java.lang.Exception

doCancel

public void doCancel(org.apache.turbine.RunData data,
                     org.apache.turbine.TemplateContext context)
              throws java.lang.Exception
Throws:
java.lang.Exception

doDone

public void doDone(org.apache.turbine.RunData data,
                   org.apache.turbine.TemplateContext context)
            throws java.lang.Exception
Throws:
java.lang.Exception

log

protected org.apache.log4j.Logger log()

getRequiredPermission

protected java.lang.String getRequiredPermission(org.apache.turbine.RunData data)
Flag that marks the action as requiring a permission mapping in Scarab.properties. The default is true, so actions that only require login (or only require a permission given some critieria available in the arguments), should override this method.

Parameters:
data - a RunData value
Returns:
a boolean value

areThereDupeSequences

public boolean areThereDupeSequences(java.util.List list,
                                     org.apache.turbine.tool.IntakeTool intake,
                                     java.lang.String groupName,
                                     java.lang.String fieldName,
                                     int dedupeSeq)
                              throws java.lang.Exception
Check if the objects have duplicate sequence numbers set

Parameters:
list - List of 'om' objects that need to be checked for duplicate sequence.
intake - IntakeTool
groupName - Intake group name
fieldName - Intake field name
dedupeSeq - sequence number set for Duplicate Check element in the case of attribute groups
Returns:
boolean TRUE if there are duplicate sequence numbers.
Throws:
java.lang.Exception


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