Package org.javlo.module.dropbox
Class DropboxAction
- java.lang.Object
-
- org.javlo.module.dropbox.DropboxAction
-
- All Implemented Interfaces:
IAction
,IModuleAction
public class DropboxAction extends Object implements IModuleAction
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DropboxAction.DropboxConfig
-
Constructor Summary
Constructors Constructor Description DropboxAction()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getActionGroupName()
the group name of the actionstatic DropboxAction.DropboxConfig
getConfig(ContentContext ctx)
Boolean
haveRight(javax.servlet.http.HttpSession session, User user)
check if a specific user can use the module.boolean
haveRight(ContentContext ctx, String action)
static String
performAskToken(javax.servlet.http.HttpSession session, javax.servlet.http.HttpServletResponse response)
static String
performBackToken(ContentContext ctx, javax.servlet.http.HttpSession session, RequestService rs, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
static String
performConfig(ContentContext ctx, RequestService rs)
actionString
performSearch(ContentContext ctx, ModulesContext modulesContext, String query)
method called when a seach in lauched from search form.static String
performToDropbox(RequestService rs, ContentContext ctx)
static String
performToLocal(RequestService rs, ContentContext ctx)
String
prepare(ContentContext ctx, ModulesContext moduleContext)
method called before module renderingstatic void
setConfig(ContentContext ctx, DropboxAction.DropboxConfig config)
-
-
-
Method Detail
-
prepare
public String prepare(ContentContext ctx, ModulesContext moduleContext) throws Exception
Description copied from interface:IModuleAction
method called before module rendering- Specified by:
prepare
in interfaceIModuleAction
- Parameters:
ctx
- the current context.moduleContext
- the context of the module. You can call getCurrentModule for recover the module.- Returns:
- eventually the error message
- Throws:
Exception
-
getConfig
public static DropboxAction.DropboxConfig getConfig(ContentContext ctx)
-
setConfig
public static void setConfig(ContentContext ctx, DropboxAction.DropboxConfig config)
-
getActionGroupName
public String getActionGroupName()
Description copied from interface:IAction
the group name of the action- Specified by:
getActionGroupName
in interfaceIAction
- Returns:
- a group name.
-
performSearch
public String performSearch(ContentContext ctx, ModulesContext modulesContext, String query) throws Exception
Description copied from interface:IModuleAction
method called when a seach in lauched from search form.- Specified by:
performSearch
in interfaceIModuleAction
query
- the text entered in the search input field.- Returns:
- eventually the error message
- 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
- 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
-
performConfig
public static String performConfig(ContentContext ctx, RequestService rs)
action
-
performAskToken
public static String performAskToken(javax.servlet.http.HttpSession session, javax.servlet.http.HttpServletResponse response) throws IOException
- Throws:
IOException
-
performBackToken
public static String performBackToken(ContentContext ctx, javax.servlet.http.HttpSession session, RequestService rs, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
- Throws:
IOException
-
performToLocal
public static String performToLocal(RequestService rs, ContentContext ctx)
-
performToDropbox
public static String performToDropbox(RequestService rs, ContentContext ctx)
-
haveRight
public boolean haveRight(ContentContext ctx, String action)
-
-