org.tigris.scarab.actions
Class ReportIssue

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
                              extended byorg.tigris.scarab.actions.ReportIssue

public class ReportIssue
extends RequireLoginFirstAction

This class is responsible for report issue forms.

Version:
$Id: ReportIssue.java 10404 2006-12-28 15:33:29Z ronvoe122 $
Author:
John D. McNally

Field Summary
 
Fields inherited from class org.tigris.scarab.actions.base.RequireLoginFirstAction
DEFAULT_MSG, EMAIL_ERROR, EMAIL_ERROR2, ERROR_MESSAGE, NO_CHANGES_MADE, NO_PERMISSION_MESSAGE
 
Fields inherited from class org.apache.turbine.modules.ActionEvent
BUTTON, BUTTON_LENGTH, LENGTH, METHOD_NAME_LENGTH, METHOD_NAME_PREFIX
 
Constructor Summary
ReportIssue()
           
 
Method Summary
 void checkForDuplicates(org.apache.turbine.RunData data, org.apache.turbine.TemplateContext context)
           
(package private) static void cleanOutStaleIssue(org.apache.turbine.RunData data, org.apache.turbine.TemplateContext context)
          for easy access by TemplateList action
 void doAddcomment(org.apache.turbine.RunData data, org.apache.turbine.TemplateContext context)
          Handles adding a comment to one or more issues.
 void doAddfile(org.apache.turbine.RunData data, org.apache.turbine.TemplateContext context)
          Add attachment file
 void doCheckforduplicates(org.apache.turbine.RunData data, org.apache.turbine.TemplateContext context)
           
 void doEnterissue(org.apache.turbine.RunData data, org.apache.turbine.TemplateContext context)
          handles entering an issue
 void doGotowizard3(org.apache.turbine.RunData data, org.apache.turbine.TemplateContext context)
          The button for this action is commented out on Wizard2, so it will not be called public void doAddvote(RunData data, TemplateContext context) throws Exception { IntakeTool intake = getIntakeTool(context); ScarabLocalizationTool l10n = getLocalizationTool(context); if (intake.isAllValid()) { ScarabRequestTool scarabR = getScarabRequestTool(context); Issue issue = scarabR.getReportingIssue(); try { issue.addVote((ScarabUser)data.getUser()); scarabR.setConfirmMessage( l10n.format("VoteForIssueAccepted", issue.getUniqueId())); // if there was only one duplicate issue and the user just // voted for it, assume user is done String nextTemplate = ((ScarabUser)data.getUser()).getHomePage(); if (!
 void doPerform(org.apache.turbine.RunData data, org.apache.turbine.TemplateContext context)
          Calls do check for duplicates by default.
 void doRemovefile(org.apache.turbine.RunData data, org.apache.turbine.TemplateContext context)
          Remove an attachment file
 void doStart(org.apache.turbine.RunData data, org.apache.turbine.TemplateContext context)
           
 void doUsetemplates(org.apache.turbine.RunData data, org.apache.turbine.TemplateContext context)
           
 
Methods inherited from class org.tigris.scarab.actions.base.RequireLoginFirstAction
areThereDupeSequences, doCancel, doDone, doGonext, doGotoothertemplate, doRefresh, doRefreshresultsperpage, doReset, doSave, getBackTemplate, getBackTemplate, getCancelTemplate, getCancelTemplate, getCurrentTemplate, getCurrentTemplate, getIntakeTool, getLastTemplate, getLocalizationTool, getNextTemplate, getNextTemplate, getOtherTemplate, getRequiredPermission, getScarabRequestTool, isAuthorized, log
 
Methods inherited from class org.apache.turbine.modules.actions.TemplateSecureAction
perform
 
Methods inherited from class org.apache.turbine.modules.actions.TemplateAction
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
 

Constructor Detail

ReportIssue

public ReportIssue()
Method Detail

doPerform

public void doPerform(org.apache.turbine.RunData data,
                      org.apache.turbine.TemplateContext context)
               throws java.lang.Exception
Calls do check for duplicates by default.

Throws:
java.lang.Exception

doCheckforduplicates

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

checkForDuplicates

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

doEnterissue

public void doEnterissue(org.apache.turbine.RunData data,
                         org.apache.turbine.TemplateContext context)
                  throws java.lang.Exception
handles entering an issue

Throws:
java.lang.Exception

doAddfile

public void doAddfile(org.apache.turbine.RunData data,
                      org.apache.turbine.TemplateContext context)
               throws java.lang.Exception
Add attachment file

Throws:
java.lang.Exception

doRemovefile

public void doRemovefile(org.apache.turbine.RunData data,
                         org.apache.turbine.TemplateContext context)
                  throws java.lang.Exception
Remove an attachment file

Throws:
java.lang.Exception

doAddcomment

public void doAddcomment(org.apache.turbine.RunData data,
                         org.apache.turbine.TemplateContext context)
                  throws java.lang.Exception
Handles adding a comment to one or more issues. This is an option which is available on Wizard2 during the dedupe process.

Throws:
java.lang.Exception

doGotowizard3

public void doGotowizard3(org.apache.turbine.RunData data,
                          org.apache.turbine.TemplateContext context)
                   throws java.lang.Exception
The button for this action is commented out on Wizard2, so it will not be called public void doAddvote(RunData data, TemplateContext context) throws Exception { IntakeTool intake = getIntakeTool(context); ScarabLocalizationTool l10n = getLocalizationTool(context); if (intake.isAllValid()) { ScarabRequestTool scarabR = getScarabRequestTool(context); Issue issue = scarabR.getReportingIssue(); try { issue.addVote((ScarabUser)data.getUser()); scarabR.setConfirmMessage( l10n.format("VoteForIssueAccepted", issue.getUniqueId())); // if there was only one duplicate issue and the user just // voted for it, assume user is done String nextTemplate = ((ScarabUser)data.getUser()).getHomePage(); if (! searchAndSetTemplate(data, context, 1, nextTemplate)) { cleanup(data, context); } } catch (ScarabException e) { scarabR.setAlertMessage( l10n.format("VoteFailedException", e.getMessage())); // User attempted to vote when they were not allowed. This // should probably not be allowed in the ui, but right now // it is and we should protect against url hacking anyway. // Repopulate the data so the dedupe page can be shown again. searchAndSetTemplate(data, context, 0, "entry,Wizard2.vm"); } } else { // Not sure this case needs to be covered, but just to be safe // repopulate the data so the dedupe page can be shown again. searchAndSetTemplate(data, context, 0, "entry,Wizard2.vm"); } }

Throws:
java.lang.Exception

doUsetemplates

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

doStart

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

cleanOutStaleIssue

static void cleanOutStaleIssue(org.apache.turbine.RunData data,
                               org.apache.turbine.TemplateContext context)
                        throws java.lang.Exception
for easy access by TemplateList action

Throws:
java.lang.Exception


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