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 classImportJCRPageMacro.Configstatic classImportJCRPageMacro.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 StringgetActionGroupName()the group name of the actionStringgetIcon()StringgetInfo(ContentContext ctx)StringgetModalSize()return the popup size. default lgStringgetName()intgetPriority()StringgetRenderer()get the renderer for interactive macro (return null if macro is'nt interactive)StringgetUrl()force url of the macrobooleanhaveRight(ContentContext ctx, String action)static StringimportFile(ContentContext ctx, InputStream in, String name, MenuElement page)voidinit(ContentContext ctx)booleanisActive()is macro active in current contextbooleanisAdd()booleanisAdmin()macro for admin >> return true macro for contributor >> retrun falsebooleanisInterative()booleanisPreview()is this macro can be execute in preview mode.static voidmain(String[] args)Stringperform(ContentContext ctx, Map<String,Object> params)static StringperformImport(RequestService rs, ContentContext ctx, GlobalContext globalContext, ModulesContext modulesContext, MessageRepository messageRepository, I18nAccess i18nAccess)Stringprepare(ContentContext ctx)
-
-
-
Method Detail
-
isAdmin
public boolean isAdmin()
Description copied from interface:IMacromacro for admin >> return true macro for contributor >> retrun false
-
getRenderer
public String getRenderer()
Description copied from interface:IInteractiveMacroget the renderer for interactive macro (return null if macro is'nt interactive)- Specified by:
getRendererin interfaceIInteractiveMacro- Returns:
-
getActionGroupName
public String getActionGroupName()
Description copied from interface:IActionthe group name of the action- Specified by:
getActionGroupNamein 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:
MalformedURLExceptionException
-
importFile
public static String importFile(ContentContext ctx, InputStream in, String name, MenuElement page) throws ZipException, IOException
- Throws:
ZipExceptionIOException
-
prepare
public String prepare(ContentContext ctx)
- Specified by:
preparein interfaceIInteractiveMacro
-
isPreview
public boolean isPreview()
Description copied from interface:IMacrois this macro can be execute in preview mode.
-
isInterative
public boolean isInterative()
- Specified by:
isInterativein interfaceIMacro
-
haveRight
public boolean haveRight(ContentContext ctx, String action)
-
getInfo
public String getInfo(ContentContext ctx)
-
isActive
public boolean isActive()
Description copied from interface:IMacrois macro active in current context
-
init
public void init(ContentContext ctx)
-
getModalSize
public String getModalSize()
Description copied from interface:IInteractiveMacroreturn the popup size. default lg- Specified by:
getModalSizein interfaceIInteractiveMacro- Returns:
- "lg", "md", "sm", "xs"
-
getPriority
public int getPriority()
- Specified by:
getPriorityin interfaceIMacro
-
main
public static void main(String[] args)
-
-