Package org.javlo.macro.interactive
Class ImportJCRPageMacro
- java.lang.Object
-
- org.javlo.macro.interactive.ImportJCRPageMacro
-
- All Implemented Interfaces:
IAction
,IInteractiveMacro
,IMacro
public class ImportJCRPageMacro extends Object implements IInteractiveMacro, IAction
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImportJCRPageMacro.Config
static class
ImportJCRPageMacro.Page
-
Field Summary
-
Fields inherited from interface org.javlo.macro.core.IMacro
DEFAULT_MAX_MODAL_SIZE, DEFAULT_PRIORITY, LARGE_MODAL_SIZE, MIDDEL_MODAL_SIZE, SMALL_MODAL_SIZE
-
-
Constructor Summary
Constructors Constructor Description ImportJCRPageMacro()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getActionGroupName()
the group name of the actionString
getIcon()
String
getInfo(ContentContext ctx)
String
getModalSize()
return the popup size. default lgString
getName()
int
getPriority()
String
getRenderer()
get the renderer for interactive macro (return null if macro is'nt interactive)String
getUrl()
force url of the macroboolean
haveRight(ContentContext ctx, String action)
static String
importFile(ContentContext ctx, InputStream in, String name, MenuElement page)
void
init(ContentContext ctx)
boolean
isActive()
is macro active in current contextboolean
isAdd()
boolean
isAdmin()
macro for admin >> return true macro for contributor >> retrun falseboolean
isInterative()
boolean
isPreview()
is this macro can be execute in preview mode.static void
main(String[] args)
String
perform(ContentContext ctx, Map<String,Object> params)
static String
performImport(RequestService rs, ContentContext ctx, GlobalContext globalContext, ModulesContext modulesContext, MessageRepository messageRepository, I18nAccess i18nAccess)
String
prepare(ContentContext ctx)
-
-
-
Method Detail
-
isAdmin
public boolean isAdmin()
Description copied from interface:IMacro
macro for admin >> return true macro for contributor >> retrun false
-
getRenderer
public String getRenderer()
Description copied from interface:IInteractiveMacro
get the renderer for interactive macro (return null if macro is'nt interactive)- Specified by:
getRenderer
in interfaceIInteractiveMacro
- Returns:
-
getActionGroupName
public String getActionGroupName()
Description copied from interface:IAction
the group name of the action- Specified by:
getActionGroupName
in interfaceIAction
- Returns:
- a group name.
-
performImport
public static String performImport(RequestService rs, ContentContext ctx, GlobalContext globalContext, ModulesContext modulesContext, MessageRepository messageRepository, I18nAccess i18nAccess) throws MalformedURLException, Exception
- Throws:
MalformedURLException
Exception
-
importFile
public static String importFile(ContentContext ctx, InputStream in, String name, MenuElement page) throws ZipException, IOException
- Throws:
ZipException
IOException
-
prepare
public String prepare(ContentContext ctx)
- Specified by:
prepare
in interfaceIInteractiveMacro
-
isPreview
public boolean isPreview()
Description copied from interface:IMacro
is this macro can be execute in preview mode.
-
isInterative
public boolean isInterative()
- Specified by:
isInterative
in interfaceIMacro
-
haveRight
public boolean haveRight(ContentContext ctx, String action)
-
getInfo
public String getInfo(ContentContext ctx)
-
isActive
public boolean isActive()
Description copied from interface:IMacro
is macro active in current context
-
init
public void init(ContentContext ctx)
-
getModalSize
public String getModalSize()
Description copied from interface:IInteractiveMacro
return the popup size. default lg- Specified by:
getModalSize
in interfaceIInteractiveMacro
- Returns:
- "lg", "md", "sm", "xs"
-
getPriority
public int getPriority()
- Specified by:
getPriority
in interfaceIMacro
-
main
public static void main(String[] args)
-
-