Class AbstractUILinkItem
- java.lang.Object
-
- com.jalios.jcms.uicomponent.linkitems.AbstractUILinkItem
-
- All Implemented Interfaces:
UILinkItem
- Direct Known Subclasses:
PortalElementEditSkin
,PortletIndicatorEditMetric
,PortletQueryForeachActionEditPublications
,PortletQueryForeachActionEditQuery
,PortletQueryForeachActionPublish
public abstract class AbstractUILinkItem extends java.lang.Object implements UILinkItem
Default abstract implementation forUILinkItem
- Since:
- jcms-10.0.7
-
-
Field Summary
Fields Modifier and Type Field Description protected Channel
channel
protected UILinkItemsContext
ctx
static java.lang.String
HAS_DIVIDER_AFTER_PROP_SUFFIX
static java.lang.String
HAS_DIVIDER_BEFORE_PROP_SUFFIX
static java.lang.String
ICON_PROP_SUFFIX
static java.lang.String
INDEX_PROP_SUFFIX
-
Constructor Summary
Constructors Constructor Description AbstractUILinkItem(UILinkItemsContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept()
Returns true if the menu should propose this itemButton
getButton()
Returns aButton
for this actionjava.lang.String
getHtml()
Returns the action(s) html if you need to provide multiple links (You will need to produce LI > A)java.lang.String
getIcon()
Returns the icon of the menu itemint
getIndex()
Returns CSS classes to add to the link.java.lang.String
getLabel()
Return the label used in the menu.java.lang.String
getLinkAttributes()
Returns HTML attributes to add to the link.java.lang.String
getLinkCss()
Returns CSS classes to add to the link.Member
getLoggedMember()
java.lang.String
getUrl()
Returns the URL for the action linkjava.lang.String
getWrapperCss()
Returns CSS classes to add to the link wrapper (LI or other tag).boolean
hasDividerAfter()
Returns true if current link item has a divider afterboolean
hasDividerBefore()
Returns true if current link item has a divider beforeboolean
isLogged()
-
-
-
Field Detail
-
ICON_PROP_SUFFIX
public static final java.lang.String ICON_PROP_SUFFIX
- See Also:
- Constant Field Values
-
INDEX_PROP_SUFFIX
public static final java.lang.String INDEX_PROP_SUFFIX
- See Also:
- Constant Field Values
-
HAS_DIVIDER_BEFORE_PROP_SUFFIX
public static final java.lang.String HAS_DIVIDER_BEFORE_PROP_SUFFIX
- See Also:
- Constant Field Values
-
HAS_DIVIDER_AFTER_PROP_SUFFIX
public static final java.lang.String HAS_DIVIDER_AFTER_PROP_SUFFIX
- See Also:
- Constant Field Values
-
channel
protected Channel channel
-
ctx
protected UILinkItemsContext ctx
-
-
Constructor Detail
-
AbstractUILinkItem
public AbstractUILinkItem(UILinkItemsContext ctx)
-
-
Method Detail
-
accept
public boolean accept()
Description copied from interface:UILinkItem
Returns true if the menu should propose this item- Specified by:
accept
in interfaceUILinkItem
- Returns:
- true if the menu should propose this item
-
getIcon
public java.lang.String getIcon()
Description copied from interface:UILinkItem
Returns the icon of the menu item- Specified by:
getIcon
in interfaceUILinkItem
- Returns:
- the icon of the menu item
-
getUrl
public java.lang.String getUrl()
Description copied from interface:UILinkItem
Returns the URL for the action link- Specified by:
getUrl
in interfaceUILinkItem
- Returns:
- the the URL for the action link
-
getHtml
public java.lang.String getHtml()
Description copied from interface:UILinkItem
Returns the action(s) html if you need to provide multiple links (You will need to produce LI > A)- Specified by:
getHtml
in interfaceUILinkItem
- Returns:
- the actions html
-
getLinkCss
public java.lang.String getLinkCss()
Description copied from interface:UILinkItem
Returns CSS classes to add to the link.- Specified by:
getLinkCss
in interfaceUILinkItem
- Returns:
- CSS classes to add to the link.
-
getWrapperCss
public java.lang.String getWrapperCss()
Description copied from interface:UILinkItem
Returns CSS classes to add to the link wrapper (LI or other tag).- Specified by:
getWrapperCss
in interfaceUILinkItem
- Returns:
- CSS classes to add to the link wrapper (LI or other tag).
-
getLinkAttributes
public java.lang.String getLinkAttributes()
Description copied from interface:UILinkItem
Returns HTML attributes to add to the link.- Specified by:
getLinkAttributes
in interfaceUILinkItem
- Returns:
- HTML attributes to add to the link.
-
isLogged
public boolean isLogged()
- Returns:
- true if there's a logged
Member
from ctx.getJcmsContext - Since:
- jcms-10.0.7
-
getLoggedMember
public Member getLoggedMember()
- Returns:
- the logged
Member
from ctx.getJcmsContext - Since:
- jcms-10.0.7
-
getLabel
public java.lang.String getLabel()
Description copied from interface:UILinkItem
Return the label used in the menu.- Specified by:
getLabel
in interfaceUILinkItem
- Returns:
- the label used in the menu.
-
getIndex
public int getIndex()
Description copied from interface:UILinkItem
Returns CSS classes to add to the link.- Specified by:
getIndex
in interfaceUILinkItem
- Returns:
- CSS classes to add to the link.
-
hasDividerBefore
public boolean hasDividerBefore()
Description copied from interface:UILinkItem
Returns true if current link item has a divider before- Specified by:
hasDividerBefore
in interfaceUILinkItem
- Returns:
- true if current link item has a divider before
-
hasDividerAfter
public boolean hasDividerAfter()
Description copied from interface:UILinkItem
Returns true if current link item has a divider after- Specified by:
hasDividerAfter
in interfaceUILinkItem
- Returns:
- true if current link item has a divider after
-
getButton
public Button getButton()
Description copied from interface:UILinkItem
Returns aButton
for this action- Specified by:
getButton
in interfaceUILinkItem
- Returns:
- a
Button
for this action
-
-