Package org.javlo.macro.core
Class MacroBean
- java.lang.Object
-
- org.javlo.macro.core.MacroBean
-
- All Implemented Interfaces:
IInteractiveMacro
,IMacro
- Direct Known Subclasses:
MacroGoHome
public class MacroBean extends Object implements IMacro, IInteractiveMacro
-
-
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
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 macrovoid
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.String
perform(ContentContext ctx, Map<String,Object> params)
String
prepare(ContentContext ctx)
void
setAdd(boolean add)
void
setAdmin(boolean admin)
void
setIcon(String icon)
void
setInfo(String info)
void
setInteractive(boolean interactive)
void
setModalSize(String modalSize)
void
setName(String name)
void
setPreview(boolean preview)
void
setUrl(String url)
-
-
-
Method Detail
-
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:
-
prepare
public String prepare(ContentContext ctx)
- Specified by:
prepare
in interfaceIInteractiveMacro
-
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"
-
setModalSize
public void setModalSize(String modalSize)
-
setName
public void setName(String name)
-
isAdmin
public boolean isAdmin()
Description copied from interface:IMacro
macro for admin >> return true macro for contributor >> retrun false
-
setAdmin
public void setAdmin(boolean admin)
-
isPreview
public boolean isPreview()
Description copied from interface:IMacro
is this macro can be execute in preview mode.
-
setPreview
public void setPreview(boolean preview)
-
setAdd
public void setAdd(boolean add)
-
isInterative
public boolean isInterative()
- Specified by:
isInterative
in interfaceIMacro
-
setInteractive
public void setInteractive(boolean interactive)
-
isActive
public boolean isActive()
Description copied from interface:IMacro
is macro active in current context
-
init
public void init(ContentContext ctx)
-
getInfo
public String getInfo(ContentContext ctx)
-
setInfo
public void setInfo(String info)
-
setIcon
public void setIcon(String icon)
-
setUrl
public void setUrl(String url)
-
getPriority
public int getPriority()
- Specified by:
getPriority
in interfaceIMacro
-
-