za.org.coefficient.modules.vote
Class Vote

java.lang.Object
  extended by za.org.coefficient.modules.BaseModule
      extended by za.org.coefficient.modules.BaseProjectModule
          extended by za.org.coefficient.modules.vote.Vote
All Implemented Interfaces:
CoefficientEventPublisher, ModuleLocal

public class Vote
extends BaseProjectModule


Field Summary
static java.lang.String ADD
           
static java.lang.String ADDMSG
           
static java.lang.String ADMINPAGE
           
static java.lang.String BUTTON
           
static java.lang.String CHOICE
           
static java.lang.String CHOICE1
           
static java.lang.String CHOICE2
           
static java.lang.String CLOSE
           
static java.lang.String COMPLETEDMSG
           
static java.lang.String DATEUTIL
           
static java.lang.String DEFAULTUSER
           
static java.lang.String DELETE
           
static java.lang.String EDIT
           
static java.lang.String ENDDAY
           
static java.lang.String ENDMONTH
           
static java.lang.String ENDYEAR
           
static java.lang.String ERROR
           
static java.lang.String ERRORPAGE
           
static java.lang.String FINISHED
           
static java.lang.String ID
           
static java.lang.String INDEXPAGE
           
static java.lang.String LISTPAGE
           
static java.lang.String MINIMUMROLE
           
static java.lang.String MISSINGDATA
           
static java.lang.String MODULE
           
static java.lang.String MORE
           
static java.lang.String NAME
           
static java.lang.String NOPROJECT
           
static java.lang.String ON
           
static java.lang.String OP
           
static java.lang.String PERSON
           
static java.lang.String PROJECT
           
static java.lang.String QUESTION
           
static java.lang.String REOPEN
           
static java.lang.String RESET
           
static java.lang.String RESULTS
           
static java.lang.String RESULTSPAGE
           
static java.lang.String ROLES
           
static java.lang.String STARTDAY
           
static java.lang.String STARTMONTH
           
static java.lang.String STARTYEAR
           
static java.lang.String VOTE
           
static java.lang.String VOTES
           
 
Constructor Summary
Vote()
           
 
Method Summary
 java.lang.String canExecuteForRole(CoefficientContext ctx, java.lang.String methodName, Role usersHighestRole)
          This is a base implementation that will allow all methods to be invoked without regard to roles
 CoefficientContext castavote(CoefficientContext ctx)
           
 CoefficientContext deleteAllForProject(CoefficientContext ctx)
           
 java.lang.String getMainMethod()
          This method is used to determine which method should be invoked when the module is requested without an operation.
 java.lang.String getModuleDescription()
          This method is used to find the description of the module
 java.lang.String getModuleDisplayName()
          This method is used to find the display name of the module
 java.lang.String getSummaryForProject(CoefficientContext ctx)
           
private  void processVotes(CoefficientContext ctx, java.util.HashMap map)
           
 CoefficientContext showSummaryForProject(CoefficientContext ctx)
           
private  void transferChoices(CoefficientContext ctx, VoteData data)
           
 
Methods inherited from class za.org.coefficient.modules.BaseModule
createRSSItem, displayUsersData, getCoefficientContext, getModuleName, isProjectRequired, publishEvent, setCoefficientContext, showHelp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADD

public static final java.lang.String ADD
See Also:
Constant Field Values

CLOSE

public static final java.lang.String CLOSE
See Also:
Constant Field Values

DELETE

public static final java.lang.String DELETE
See Also:
Constant Field Values

REOPEN

public static final java.lang.String REOPEN
See Also:
Constant Field Values

RESET

public static final java.lang.String RESET
See Also:
Constant Field Values

EDIT

public static final java.lang.String EDIT
See Also:
Constant Field Values

ERROR

public static final java.lang.String ERROR
See Also:
Constant Field Values

MODULE

public static final java.lang.String MODULE
See Also:
Constant Field Values

PROJECT

public static final java.lang.String PROJECT
See Also:
Constant Field Values

OP

public static final java.lang.String OP
See Also:
Constant Field Values

BUTTON

public static final java.lang.String BUTTON
See Also:
Constant Field Values

DATEUTIL

public static final java.lang.String DATEUTIL
See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

PERSON

public static final java.lang.String PERSON
See Also:
Constant Field Values

QUESTION

public static final java.lang.String QUESTION
See Also:
Constant Field Values

CHOICE

public static final java.lang.String CHOICE
See Also:
Constant Field Values

CHOICE1

public static final java.lang.String CHOICE1
See Also:
Constant Field Values

CHOICE2

public static final java.lang.String CHOICE2
See Also:
Constant Field Values

STARTYEAR

public static final java.lang.String STARTYEAR
See Also:
Constant Field Values

STARTMONTH

public static final java.lang.String STARTMONTH
See Also:
Constant Field Values

STARTDAY

public static final java.lang.String STARTDAY
See Also:
Constant Field Values

ENDYEAR

public static final java.lang.String ENDYEAR
See Also:
Constant Field Values

ENDMONTH

public static final java.lang.String ENDMONTH
See Also:
Constant Field Values

ENDDAY

public static final java.lang.String ENDDAY
See Also:
Constant Field Values

ROLES

public static final java.lang.String ROLES
See Also:
Constant Field Values

MINIMUMROLE

public static final java.lang.String MINIMUMROLE
See Also:
Constant Field Values

VOTE

public static final java.lang.String VOTE
See Also:
Constant Field Values

VOTES

public static final java.lang.String VOTES
See Also:
Constant Field Values

MORE

public static final java.lang.String MORE
See Also:
Constant Field Values

ON

public static final java.lang.String ON
See Also:
Constant Field Values

ID

public static final java.lang.String ID
See Also:
Constant Field Values

RESULTS

public static final java.lang.String RESULTS
See Also:
Constant Field Values

DEFAULTUSER

public static final java.lang.String DEFAULTUSER
See Also:
Constant Field Values

ERRORPAGE

public static final java.lang.String ERRORPAGE
See Also:
Constant Field Values

ADMINPAGE

public static final java.lang.String ADMINPAGE
See Also:
Constant Field Values

LISTPAGE

public static final java.lang.String LISTPAGE
See Also:
Constant Field Values

INDEXPAGE

public static final java.lang.String INDEXPAGE
See Also:
Constant Field Values

RESULTSPAGE

public static final java.lang.String RESULTSPAGE
See Also:
Constant Field Values

ADDMSG

public static final java.lang.String ADDMSG
See Also:
Constant Field Values

COMPLETEDMSG

public static final java.lang.String COMPLETEDMSG
See Also:
Constant Field Values

FINISHED

public static final java.lang.String FINISHED
See Also:
Constant Field Values

NOPROJECT

public static final java.lang.String NOPROJECT
See Also:
Constant Field Values

MISSINGDATA

public static final java.lang.String MISSINGDATA
See Also:
Constant Field Values
Constructor Detail

Vote

public Vote()
Method Detail

getMainMethod

public java.lang.String getMainMethod()
Description copied from interface: ModuleLocal
This method is used to determine which method should be invoked when the module is requested without an operation.

Specified by:
getMainMethod in interface ModuleLocal
Specified by:
getMainMethod in class BaseModule
Returns:
name of the method that should be invoked

getModuleDescription

public java.lang.String getModuleDescription()
Description copied from interface: ModuleLocal
This method is used to find the description of the module

Specified by:
getModuleDescription in interface ModuleLocal
Specified by:
getModuleDescription in class BaseModule
Returns:
the description of the module

getModuleDisplayName

public java.lang.String getModuleDisplayName()
Description copied from interface: ModuleLocal
This method is used to find the display name of the module

Specified by:
getModuleDisplayName in interface ModuleLocal
Specified by:
getModuleDisplayName in class BaseModule
Returns:
the display name of the module

canExecuteForRole

public java.lang.String canExecuteForRole(CoefficientContext ctx,
                                          java.lang.String methodName,
                                          Role usersHighestRole)
Description copied from class: BaseModule
This is a base implementation that will allow all methods to be invoked without regard to roles

Specified by:
canExecuteForRole in interface ModuleLocal
Overrides:
canExecuteForRole in class BaseModule
Returns:
null if we can execute the method an error message if not

castavote

public CoefficientContext castavote(CoefficientContext ctx)
                             throws java.lang.Exception
Throws:
java.lang.Exception

deleteAllForProject

public CoefficientContext deleteAllForProject(CoefficientContext ctx)
                                       throws java.lang.Exception
Specified by:
deleteAllForProject in class BaseProjectModule
Throws:
java.lang.Exception

getSummaryForProject

public java.lang.String getSummaryForProject(CoefficientContext ctx)
                                      throws net.sf.hibernate.HibernateException
Overrides:
getSummaryForProject in class BaseProjectModule
Throws:
net.sf.hibernate.HibernateException

showSummaryForProject

public CoefficientContext showSummaryForProject(CoefficientContext ctx)
                                         throws java.lang.Exception
Overrides:
showSummaryForProject in class BaseProjectModule
Throws:
java.lang.Exception

processVotes

private void processVotes(CoefficientContext ctx,
                          java.util.HashMap map)

transferChoices

private void transferChoices(CoefficientContext ctx,
                             VoteData data)


Copyright CSIR. All Rights Reserved.