za.org.coefficient.modules.project
Class Projects

java.lang.Object
  extended by za.org.coefficient.modules.BaseModule
      extended by za.org.coefficient.modules.project.Projects
All Implemented Interfaces:
CoefficientEventPublisher, ModuleLocal

public class Projects
extends BaseModule


Nested Class Summary
private static class Projects.TestEventHandler
           
 
Field Summary
private static java.lang.String ATTR_NOT_SELECTED_LIST
           
private static java.lang.String ATTR_SELECTED_LIST
           
private static java.lang.String CAT_NOT_SELECTED_LIST
           
private static java.lang.String CAT_SELECTED_LIST
           
private static java.lang.String MESSAGE_1
           
private static java.lang.String MESSAGE_11
           
private static java.lang.String MESSAGE_2
           
private static java.lang.String MESSAGE_3
           
private static java.lang.String MOD_NOT_SELECTED_LIST
           
private static java.lang.String MOD_SELECTED_LIST
           
private static java.lang.String NAME_SPACE
           
private static java.lang.String NAME_SPACE2
           
private static java.lang.String SUBJECT
           
private static java.lang.String SUBJECT_2
           
 
Constructor Summary
Projects()
           
 
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 changeToWorkflow(CoefficientContext ctx)
           
 CoefficientContext changeToWorkflowSelect(CoefficientContext ctx)
           
 CoefficientContext chooseProjectType(CoefficientContext ctx)
           
private  void cleanUpModules(java.util.List newModules, Project prj, CoefficientContext ctx)
           
 CoefficientContext confirm(CoefficientContext ctx)
           
 CoefficientContext createProject(CoefficientContext ctx)
           
 CoefficientContext deleteComponent(CoefficientContext ctx)
           
 CoefficientContext deleteProject(CoefficientContext ctx)
          THIS IS NOT SUPPORTED IN THE SYSTEM JUST YET
 CoefficientContext deleteVersion(CoefficientContext ctx)
           
 java.lang.String displayUsersData(CoefficientUser user)
          This is a base implementation that will return an empty string for a modules user related data.
 CoefficientContext editAttributeData(CoefficientContext ctx)
           
 CoefficientContext editAttributeDataSelect(CoefficientContext ctx)
           
 CoefficientContext editAttributesSelect(CoefficientContext ctx)
           
 CoefficientContext editCategoriesSelect(CoefficientContext ctx)
           
 CoefficientContext editComponent(CoefficientContext ctx)
           
 CoefficientContext editComponents(CoefficientContext ctx)
           
 CoefficientContext editModulesSelect(CoefficientContext ctx)
           
 CoefficientContext editNameDesc(CoefficientContext ctx)
           
 CoefficientContext editOptions(CoefficientContext ctx)
           
 CoefficientContext editTheme(CoefficientContext ctx)
           
 CoefficientContext editVersion(CoefficientContext ctx)
           
 CoefficientContext editVersions(CoefficientContext ctx)
           
 Project findProjectByName(java.lang.String projectName)
           
 Project findProjectByPK(java.lang.Long projectId)
           
 Project findProjectByShortName(java.lang.String projectShortName)
           
 za.co.csir.icomtek.workflow.WorkflowData findWorkflowDataByLinkId(java.lang.Long linkId)
           
private  java.util.List getAttributeNames()
           
private  java.util.List getAttributeNames(CoefficientContext ctx)
           
private  java.util.List getAttributes()
           
private  java.util.List getAttributes(CoefficientContext ctx)
           
 java.lang.String getFirstChampion(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
private  java.util.ArrayList getModules()
           
 Project getProject(CoefficientContext ctx)
           
 CoefficientContext makeCurrentVersion(CoefficientContext ctx)
           
 CoefficientContext manuallyTransition(CoefficientContext ctx)
           
 CoefficientContext newProject(CoefficientContext ctx)
           
 CoefficientContext reject(CoefficientContext ctx)
           
 CoefficientContext saveAttributes(CoefficientContext ctx)
           
 CoefficientContext saveCategories(CoefficientContext ctx)
           
 CoefficientContext saveComponent(CoefficientContext ctx)
           
 CoefficientContext saveModules(CoefficientContext ctx)
           
 CoefficientContext saveNameDesc(CoefficientContext ctx)
           
 CoefficientContext saveTheme(CoefficientContext ctx)
           
 CoefficientContext saveVersion(CoefficientContext ctx)
           
private  void setupSimpleScreen(CoefficientContext ctx, java.lang.String screenName)
           
 CoefficientContext toggleVisibility(CoefficientContext ctx)
           
 CoefficientContext transition(CoefficientContext ctx)
           
 CoefficientContext viewComponent(CoefficientContext ctx)
           
 CoefficientContext viewProject(CoefficientContext ctx)
           
 CoefficientContext viewVersion(CoefficientContext ctx)
           
 
Methods inherited from class za.org.coefficient.modules.BaseModule
createRSSItem, 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

ATTR_NOT_SELECTED_LIST

private static final java.lang.String ATTR_NOT_SELECTED_LIST
See Also:
Constant Field Values

ATTR_SELECTED_LIST

private static final java.lang.String ATTR_SELECTED_LIST
See Also:
Constant Field Values

MOD_NOT_SELECTED_LIST

private static final java.lang.String MOD_NOT_SELECTED_LIST
See Also:
Constant Field Values

MOD_SELECTED_LIST

private static final java.lang.String MOD_SELECTED_LIST
See Also:
Constant Field Values

CAT_NOT_SELECTED_LIST

private static final java.lang.String CAT_NOT_SELECTED_LIST
See Also:
Constant Field Values

CAT_SELECTED_LIST

private static final java.lang.String CAT_SELECTED_LIST
See Also:
Constant Field Values

NAME_SPACE

private static final java.lang.String NAME_SPACE
See Also:
Constant Field Values

NAME_SPACE2

private static final java.lang.String NAME_SPACE2
See Also:
Constant Field Values

MESSAGE_1

private static final java.lang.String MESSAGE_1

MESSAGE_11

private static final java.lang.String MESSAGE_11

MESSAGE_2

private static final java.lang.String MESSAGE_2

MESSAGE_3

private static final java.lang.String MESSAGE_3
See Also:
Constant Field Values

SUBJECT

private static final java.lang.String SUBJECT

SUBJECT_2

private static final java.lang.String SUBJECT_2
Constructor Detail

Projects

public Projects()
Method Detail

displayUsersData

public java.lang.String displayUsersData(CoefficientUser user)
Description copied from class: BaseModule
This is a base implementation that will return an empty string for a modules user related data. This should be implmented to show what data the module contains that relates to the currently logged in user.

Overrides:
displayUsersData in class BaseModule
Returns:
String containing the html to display for the modules summary.

getFirstChampion

public java.lang.String getFirstChampion(CoefficientContext ctx)

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

getProject

public Project getProject(CoefficientContext ctx)

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

changeToWorkflow

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

changeToWorkflowSelect

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

chooseProjectType

public CoefficientContext chooseProjectType(CoefficientContext ctx)

confirm

public CoefficientContext confirm(CoefficientContext ctx)
                           throws net.sf.hibernate.HibernateException
Throws:
net.sf.hibernate.HibernateException

createProject

public CoefficientContext createProject(CoefficientContext ctx)
                                 throws net.sf.hibernate.HibernateException
Throws:
net.sf.hibernate.HibernateException

deleteProject

public CoefficientContext deleteProject(CoefficientContext ctx)
THIS IS NOT SUPPORTED IN THE SYSTEM JUST YET


deleteVersion

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

deleteComponent

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

editAttributeData

public CoefficientContext editAttributeData(CoefficientContext ctx)

editAttributeDataSelect

public CoefficientContext editAttributeDataSelect(CoefficientContext ctx)

editAttributesSelect

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

editCategoriesSelect

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

editModulesSelect

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

editNameDesc

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

editOptions

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

editComponent

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

editComponents

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

editVersion

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

editVersions

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

findProjectByPK

public Project findProjectByPK(java.lang.Long projectId)

findProjectByName

public Project findProjectByName(java.lang.String projectName)

findProjectByShortName

public Project findProjectByShortName(java.lang.String projectShortName)

makeCurrentVersion

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

editTheme

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

saveTheme

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

manuallyTransition

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

newProject

public CoefficientContext newProject(CoefficientContext ctx)

reject

public CoefficientContext reject(CoefficientContext ctx)
                          throws net.sf.hibernate.HibernateException
Throws:
net.sf.hibernate.HibernateException

saveAttributes

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

saveCategories

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

saveModules

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

saveNameDesc

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

saveComponent

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

saveVersion

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

transition

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

viewProject

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

viewComponent

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

viewVersion

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

toggleVisibility

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

findWorkflowDataByLinkId

public za.co.csir.icomtek.workflow.WorkflowData findWorkflowDataByLinkId(java.lang.Long linkId)
                                                                  throws java.lang.Exception
Throws:
java.lang.Exception

getAttributeNames

private java.util.List getAttributeNames()

getAttributeNames

private java.util.List getAttributeNames(CoefficientContext ctx)

getAttributes

private java.util.List getAttributes(CoefficientContext ctx)

getAttributes

private java.util.List getAttributes()

getModules

private java.util.ArrayList getModules()

cleanUpModules

private void cleanUpModules(java.util.List newModules,
                            Project prj,
                            CoefficientContext ctx)
                     throws java.lang.Exception
Throws:
java.lang.Exception

setupSimpleScreen

private void setupSimpleScreen(CoefficientContext ctx,
                               java.lang.String screenName)


Copyright CSIR. All Rights Reserved.