Package org.javlo.module.demo
Class Action
- java.lang.Object
-
- org.javlo.actions.AbstractModuleAction
-
- org.javlo.module.demo.Action
-
- All Implemented Interfaces:
IAction
,IModuleAction
public class Action extends AbstractModuleAction
-
-
Constructor Summary
Constructors Constructor Description Action()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getActionGroupName()
the group name of the actionBoolean
haveRight(javax.servlet.http.HttpSession session, User user)
check if a specific user can use the module.boolean
haveRight(ContentContext ctx, String action)
static void
main(String[] args)
static String
performTest(ContentContext ctx)
static String
performTestAllRoles(ContentContext ctx, RequestService rs)
String
performTestAnyRoles(ContentContext ctx, RequestService rs)
String
prepare(ContentContext ctx, ModulesContext moduleContext)
method called before module rendering-
Methods inherited from class org.javlo.actions.AbstractModuleAction
getModuleContext, isLightInterface, performChangeRenderer, performSearch, performWizard
-
-
-
-
Method Detail
-
getActionGroupName
public String getActionGroupName()
Description copied from interface:IAction
the group name of the action- Returns:
- a group name.
-
prepare
public String prepare(ContentContext ctx, ModulesContext moduleContext)
Description copied from interface:IModuleAction
method called before module rendering- Specified by:
prepare
in interfaceIModuleAction
- Overrides:
prepare
in classAbstractModuleAction
- Parameters:
ctx
- the current context.moduleContext
- the context of the module. You can call getCurrentModule for recover the module.- Returns:
- eventually the error message
-
performTest
public static final String performTest(ContentContext ctx)
-
performTestAnyRoles
public String performTestAnyRoles(ContentContext ctx, RequestService rs) throws Exception
- Throws:
Exception
-
performTestAllRoles
public static String performTestAllRoles(ContentContext ctx, RequestService rs) throws Exception
- Throws:
Exception
-
haveRight
public Boolean haveRight(javax.servlet.http.HttpSession session, User user) throws ModuleException
Description copied from interface:IModuleAction
check if a specific user can use the module.- Specified by:
haveRight
in interfaceIModuleAction
- Overrides:
haveRight
in classAbstractModuleAction
- Returns:
- true if access, false if no access and null if this method can't determine access. If access is not determined by the action javlo will take the user group in config.properties.
- Throws:
ModuleException
-
haveRight
public boolean haveRight(ContentContext ctx, String action)
- Specified by:
haveRight
in interfaceIAction
- Overrides:
haveRight
in classAbstractModuleAction
-
main
public static void main(String[] args)
-
-