Class SecuredToolbarButton
- java.lang.Object
-
- com.googlecode.wicket.kendo.ui.datatable.button.AbstractButton
-
- com.googlecode.wicket.kendo.ui.datatable.button.ToolbarButton
-
- com.googlecode.wicket.kendo.ui.datatable.button.SecuredToolbarButton
-
- All Implemented Interfaces:
com.googlecode.wicket.jquery.core.IJsonFactory
,Serializable
,org.apache.wicket.util.io.IClusterable
public class SecuredToolbarButton extends ToolbarButton
Provides a secured command button object that can be used inDataTable
column- Author:
- Sebastien Briquet - sebfz1
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.googlecode.wicket.kendo.ui.datatable.button.AbstractButton
CANCEL, CREATE, CSS_ICON_ONLY, CSS_STATE_DISABLED, DESTROY, EDIT, SAVE
-
-
Constructor Summary
Constructors Constructor Description SecuredToolbarButton(String name, String[] roles)
Constructor for built-in commands (no property supplied)SecuredToolbarButton(String name, String[] roles, com.googlecode.wicket.jquery.core.IJQuerySecurityProvider provider)
Constructor for built-in commands (no property supplied)SecuredToolbarButton(String name, String property, String[] roles)
ConstructorSecuredToolbarButton(String name, String property, String[] roles, com.googlecode.wicket.jquery.core.IJQuerySecurityProvider provider)
ConstructorSecuredToolbarButton(String name, org.apache.wicket.model.IModel<String> text, String[] roles)
Constructor for built-in commands (no property supplied)SecuredToolbarButton(String name, org.apache.wicket.model.IModel<String> text, String[] roles, com.googlecode.wicket.jquery.core.IJQuerySecurityProvider provider)
Constructor for built-in commands (no property supplied)SecuredToolbarButton(String name, org.apache.wicket.model.IModel<String> text, String property, String[] roles)
ConstructorSecuredToolbarButton(String name, org.apache.wicket.model.IModel<String> text, String property, String[] roles, com.googlecode.wicket.jquery.core.IJQuerySecurityProvider provider)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getIconClass()
Gets the CSS class for the iconString[]
getRoles()
Gets the roles
Caution: to be overridden with care!boolean
isEnabled()
Indicates whether this button is enabledboolean
isLocked()
Indicates whether the button is locked.-
Methods inherited from class com.googlecode.wicket.kendo.ui.datatable.button.ToolbarButton
isBuiltIn, onClick, toJSONObject, toString
-
Methods inherited from class com.googlecode.wicket.kendo.ui.datatable.button.AbstractButton
equals, getCSSClass, getIcon, getName, getProperty, getTextModel, hashCode, isVisible, match
-
-
-
-
Constructor Detail
-
SecuredToolbarButton
public SecuredToolbarButton(String name, String[] roles)
Constructor for built-in commands (no property supplied)- Parameters:
name
- the button's nameroles
- list of roles allowed to enable the button
-
SecuredToolbarButton
public SecuredToolbarButton(String name, String[] roles, com.googlecode.wicket.jquery.core.IJQuerySecurityProvider provider)
Constructor for built-in commands (no property supplied)- Parameters:
name
- the button's nameroles
- list of roles allowed to enable the buttonprovider
- theIJQuerySecurityProvider
-
SecuredToolbarButton
public SecuredToolbarButton(String name, String property, String[] roles)
Constructor- Parameters:
name
- the button's nameproperty
- the property used to retrieve the row's object valueroles
- list of roles allowed to enable the button
-
SecuredToolbarButton
public SecuredToolbarButton(String name, String property, String[] roles, com.googlecode.wicket.jquery.core.IJQuerySecurityProvider provider)
Constructor- Parameters:
name
- the button's nameproperty
- the property used to retrieve the row's object valueroles
- list of roles allowed to enable the buttonprovider
- theIJQuerySecurityProvider
-
SecuredToolbarButton
public SecuredToolbarButton(String name, org.apache.wicket.model.IModel<String> text, String[] roles)
Constructor for built-in commands (no property supplied)- Parameters:
name
- the button's nametext
- the button's textroles
- list of roles allowed to enable the button
-
SecuredToolbarButton
public SecuredToolbarButton(String name, org.apache.wicket.model.IModel<String> text, String[] roles, com.googlecode.wicket.jquery.core.IJQuerySecurityProvider provider)
Constructor for built-in commands (no property supplied)- Parameters:
name
- the button's nametext
- the button's textroles
- list of roles allowed to enable the buttonprovider
- theIJQuerySecurityProvider
-
SecuredToolbarButton
public SecuredToolbarButton(String name, org.apache.wicket.model.IModel<String> text, String property, String[] roles)
Constructor- Parameters:
name
- the button's nametext
- the button's textproperty
- the property used to retrieve the row's object valueroles
- list of roles allowed to enable the button
-
SecuredToolbarButton
public SecuredToolbarButton(String name, org.apache.wicket.model.IModel<String> text, String property, String[] roles, com.googlecode.wicket.jquery.core.IJQuerySecurityProvider provider)
Constructor- Parameters:
name
- the button's nametext
- the button's textproperty
- the property used to retrieve the row's object valueroles
- list of roles allowed to enable the buttonprovider
- theIJQuerySecurityProvider
-
-
Method Detail
-
getRoles
public String[] getRoles()
Gets the roles
Caution: to be overridden with care!- Returns:
- the roles
-
isLocked
public final boolean isLocked()
Indicates whether the button is locked.- Returns:
- the result of
IJQuerySecurityProvider.hasRole(String...)
-
isEnabled
public boolean isEnabled()
Description copied from class:AbstractButton
Indicates whether this button is enabled- Overrides:
isEnabled
in classAbstractButton
- Returns:
true
by default
-
getIconClass
public String getIconClass()
Description copied from class:AbstractButton
Gets the CSS class for the icon- Overrides:
getIconClass
in classAbstractButton
- Returns:
- the CSS class for the icon
- See Also:
AbstractButton.getIcon()
-
-