Package org.xwiki.livedata
Class LiveDataPropertyDescriptor
- java.lang.Object
-
- org.xwiki.livedata.LiveDataPropertyDescriptor
-
public class LiveDataPropertyDescriptor extends Object
Describes how the user interacts with a given property.- Since:
- 12.10
- Version:
- $Id: f9ab7848116f5ae94cc89de1d30075ab4400dd52 $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LiveDataPropertyDescriptor.DisplayerDescriptor
Holds the displayer configuration.static class
LiveDataPropertyDescriptor.FilterDescriptor
Holds the filter configuration.static class
LiveDataPropertyDescriptor.OperatorDescriptor
An operator to use when filtering the live data.
-
Constructor Summary
Constructors Constructor Description LiveDataPropertyDescriptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDescription()
LiveDataPropertyDescriptor.DisplayerDescriptor
getDisplayer()
LiveDataPropertyDescriptor.FilterDescriptor
getFilter()
Map<String,Object>
getIcon()
String
getId()
String
getName()
String
getStyleName()
String
getType()
void
initialize()
Preventnull
values where it's possible.Boolean
isEditable()
Boolean
isFilterable()
Boolean
isSortable()
Boolean
isVisible()
void
setDescription(String description)
Sets the property description.void
setDisplayer(LiveDataPropertyDescriptor.DisplayerDescriptor displayer)
Sets the displayer configuration.void
setEditable(Boolean editable)
Sets whether the user can edit the values of this property or not.void
setFilter(LiveDataPropertyDescriptor.FilterDescriptor filter)
Sets the filter configuration.void
setFilterable(Boolean filterable)
Sets whether the user can filter by this property or not.void
setIcon(Map<String,Object> icon)
Sets the icon meta data.void
setId(String id)
Set the property id.void
setName(String name)
Sets the property pretty name.void
setSortable(Boolean sortable)
Sets whether this property can be used to sort the live data.void
setStyleName(String styleName)
Sets the CSS class name to add to the element used to display this property.void
setType(String type)
Sets the property type.void
setVisible(Boolean visible)
Sets whether this property should be displayed or not.
-
-
-
Method Detail
-
getId
public String getId()
- Returns:
- the property id
-
setId
public void setId(String id)
Set the property id.- Parameters:
id
- the new property id
-
getName
public String getName()
- Returns:
- the property pretty name
-
setName
public void setName(String name)
Sets the property pretty name.- Parameters:
name
- the new pretty name
-
getDescription
public String getDescription()
- Returns:
- the property description
-
setDescription
public void setDescription(String description)
Sets the property description.- Parameters:
description
- the new property description
-
getType
public String getType()
- Returns:
- the property type
-
setType
public void setType(String type)
Sets the property type.- Parameters:
type
- the new property type
-
isSortable
public Boolean isSortable()
- Returns:
- whether this property can be used to sort the live data or not; use
null
to inherit from the property type descriptor
-
setSortable
public void setSortable(Boolean sortable)
Sets whether this property can be used to sort the live data.- Parameters:
sortable
- whether this property can be used to sort the live data; passnull
to inherit from the property type descriptor
-
getStyleName
public String getStyleName()
- Returns:
- the CSS class name to add to the HTML element used to display this property
-
setStyleName
public void setStyleName(String styleName)
Sets the CSS class name to add to the element used to display this property.- Parameters:
styleName
- the new style name
-
setIcon
public void setIcon(Map<String,Object> icon)
Sets the icon meta data.- Parameters:
icon
- the new icon meta data
-
isVisible
public Boolean isVisible()
- Returns:
- whether this property should be displayed or not; the returned value can be
null
in which case the value should be inherited from the property type descriptor
-
setVisible
public void setVisible(Boolean visible)
Sets whether this property should be displayed or not. Passnull
to inherit from the property type descriptor.- Parameters:
visible
-true
to display this property,false
to hide it,null
to inherit from the property type descriptor
-
getDisplayer
public LiveDataPropertyDescriptor.DisplayerDescriptor getDisplayer()
- Returns:
- the displayer configuration
-
setDisplayer
public void setDisplayer(LiveDataPropertyDescriptor.DisplayerDescriptor displayer)
Sets the displayer configuration.- Parameters:
displayer
- the new displayer configuration
-
isFilterable
public Boolean isFilterable()
- Returns:
- whether the user can filter by this property or not; the returned value can be
null
in which case the value should be inherited from the property type descriptor
-
setFilterable
public void setFilterable(Boolean filterable)
Sets whether the user can filter by this property or not. Passnull
to inherit from the property type descriptor.- Parameters:
filterable
-true
if the user can filter by this property,false
if the user can't filter by this property,null
to inherit from the property descriptor type
-
getFilter
public LiveDataPropertyDescriptor.FilterDescriptor getFilter()
- Returns:
- the filter configuration
-
setFilter
public void setFilter(LiveDataPropertyDescriptor.FilterDescriptor filter)
Sets the filter configuration.- Parameters:
filter
- the new filter configuration
-
isEditable
public Boolean isEditable()
- Returns:
- whether the user can edit the values of this property or not; the returned value can be
null
in which case the value should be inherited from the property type descriptor
-
setEditable
public void setEditable(Boolean editable)
Sets whether the user can edit the values of this property or not. Passnull
to inherit from the property type descriptor.- Parameters:
editable
-true
if the user can edit the values of this property,false
if the user shouldn't be able to edit the property values,null
to inherit from the property descriptor type
-
initialize
public void initialize()
Preventnull
values where it's possible.
-
-