Package com.jalios.jcms.shortcut
Class BasicShortcutPolicyFilter
- java.lang.Object
-
- com.jalios.jcms.policy.AbstractPolicyFilter
-
- com.jalios.jcms.shortcut.BasicShortcutPolicyFilter
-
- All Implemented Interfaces:
PluginComponent
,PolicyFilter
,ShortcutPolicyFilter
,java.lang.Comparable
- Direct Known Subclasses:
WorkspaceApplicationShortcutPolicyFilter
public class BasicShortcutPolicyFilter extends AbstractPolicyFilter implements ShortcutPolicyFilter
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REVISION
-
Fields inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
order
-
-
Constructor Summary
Constructors Constructor Description BasicShortcutPolicyFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ApplicationMenuBadge
getApplicationMenuBadge(Member mbr)
Returns an ApplicationMenuBadge which will be displayed on topbar application menu itemApplicationMenuBadge
getApplicationMenuBadge(Member mbr, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpSession session)
Returns an ApplicationMenuBadge which will be displayed on topbar application menu itemAbstractShortcut
getShortcut()
Used for filtering onShortcutPolicyFilter.getApplicationMenuBadge(Member)
ShortcutInfo
getShortcutInfo(AbstractShortcut shortcut, Member loggedMember)
Returns a ShortcutInfo which is used to synchronously query the shortcut badge for topbar application menu items (When the menu is opened)java.lang.String
getShortcutInfoAsync(AbstractShortcut shortcut)
Returns an url which is used to asynchronously query the shortcut badge for topbar application menu items (When the menu is opened)boolean
init(Plugin plugin)
Initialize the component with the given plugin configurationboolean
showShortcut(AbstractShortcut shortcut, Member mbr)
Show or hide theAbstractShortcut
in the application menu-
Methods inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
compareTo, equals, getOrder, setOrder
-
-
-
-
Field Detail
-
REVISION
public static final java.lang.String REVISION
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public boolean init(Plugin plugin)
Description copied from interface:PluginComponent
Initialize the component with the given plugin configuration- Specified by:
init
in interfacePluginComponent
- Parameters:
plugin
- the calling plugin- Returns:
- true if the component has been correctly initialized.
-
getShortcutInfo
public ShortcutInfo getShortcutInfo(AbstractShortcut shortcut, Member loggedMember)
Description copied from interface:ShortcutPolicyFilter
Returns a ShortcutInfo which is used to synchronously query the shortcut badge for topbar application menu items (When the menu is opened)- Specified by:
getShortcutInfo
in interfaceShortcutPolicyFilter
- Parameters:
shortcut
- theAbstractShortcut
loggedMember
- theMember
- Returns:
- a
ShortcutInfo
for current Shortcut and givenMember
-
getShortcutInfoAsync
public java.lang.String getShortcutInfoAsync(AbstractShortcut shortcut)
Description copied from interface:ShortcutPolicyFilter
Returns an url which is used to asynchronously query the shortcut badge for topbar application menu items (When the menu is opened)- Specified by:
getShortcutInfoAsync
in interfaceShortcutPolicyFilter
- Parameters:
shortcut
- theAbstractShortcut
- Returns:
- an url
-
getApplicationMenuBadge
public ApplicationMenuBadge getApplicationMenuBadge(Member mbr)
Description copied from interface:ShortcutPolicyFilter
Returns an ApplicationMenuBadge which will be displayed on topbar application menu item- Specified by:
getApplicationMenuBadge
in interfaceShortcutPolicyFilter
- Parameters:
mbr
- theMember
- Returns:
- an
ApplicationMenuBadge
for given user
-
getShortcut
public AbstractShortcut getShortcut()
Description copied from interface:ShortcutPolicyFilter
Used for filtering onShortcutPolicyFilter.getApplicationMenuBadge(Member)
- Specified by:
getShortcut
in interfaceShortcutPolicyFilter
- Returns:
- the
AbstractShortcut
-
getApplicationMenuBadge
public ApplicationMenuBadge getApplicationMenuBadge(Member mbr, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpSession session)
Description copied from interface:ShortcutPolicyFilter
Returns an ApplicationMenuBadge which will be displayed on topbar application menu item- Specified by:
getApplicationMenuBadge
in interfaceShortcutPolicyFilter
- Parameters:
mbr
- theMember
request
- the currentHttpServletRequest
session
- the currentHttpSession
- Returns:
- an
ApplicationMenuBadge
for given user
-
showShortcut
public boolean showShortcut(AbstractShortcut shortcut, Member mbr)
Description copied from interface:ShortcutPolicyFilter
Show or hide theAbstractShortcut
in the application menu- Specified by:
showShortcut
in interfaceShortcutPolicyFilter
- Parameters:
shortcut
-AbstractShortcut
- Returns:
- true if the
AbstractShortcut
must be displayed in the application menu
-
-