za.org.coefficient.modules.project
Class ProjectModuleLinks

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

public class ProjectModuleLinks
extends BaseModule


Constructor Summary
ProjectModuleLinks()
           
 
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
 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.lang.Boolean hasAtLeastOneImage(java.util.HashMap modules, java.util.HashMap extensions, java.lang.String pathToResource)
           
 CoefficientContext renderModuleLinks(CoefficientContext ctx)
          This method only renders content if a project is in the current context.
 
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
 

Constructor Detail

ProjectModuleLinks

public ProjectModuleLinks()
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

renderModuleLinks

public CoefficientContext renderModuleLinks(CoefficientContext ctx)
This method only renders content if a project is in the current context. It will render links, whose appearance is dictated by the stylesheet classes. The stylesheet class will be the {name of the module}.link This module also relies on the RENDER_MODULE_LINKS_HORIZONTAL property in the ProjectConstants class. If this value is true then the module will render itself horizonally otherwise it will render vertically.


hasAtLeastOneImage

private java.lang.Boolean hasAtLeastOneImage(java.util.HashMap modules,
                                             java.util.HashMap extensions,
                                             java.lang.String pathToResource)


Copyright CSIR. All Rights Reserved.