Package org.openxava.tab.meta
Class MetaTab
- java.lang.Object
-
- org.openxava.tab.meta.MetaTab
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class MetaTab extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable- Author:
- Javier Paniza
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MetaTab()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMetaProperty(MetaProperty metaProperty)voidaddMetaRowStyle(MetaRowStyle style)voidaddProperty(int index, java.lang.String propertyName)For dynamically add properties to this tabvoidaddProperty(java.lang.String propertyName)For dynamically add properties to this tabvoidclearProperties()For dynamically remove all properties to this tabMetaTabcloneMetaTab()static MetaTabcreateDefault(MetaComponent component)static MetaTabcreateDefault(MetaModel metaModel)voiddropMember(java.lang.String memberName)java.lang.Objectfilter(java.lang.Object[] objects)Apply the tab filter to sent objects.java.lang.StringgetBaseCondition()java.util.CollectiongetCmpFieldsColumnsInMultipleProperties()java.lang.StringgetDefaultOrder()java.lang.StringgetEditableProperties()Gets the comma-separated list of editable properties for this tab.java.lang.StringgetEditor()java.lang.StringgetEditors()java.util.ListgetHiddenPropertiesNames()Names of properties that must to exist but is not needed show they to users.java.util.CollectiongetHiddenTableColumns()java.lang.StringgetId()MetaComponentgetMetaComponent()MetaFiltergetMetaFilter()MetaModelgetMetaModel()java.util.List<MetaProperty>getMetaProperties()java.util.CollectiongetMetaPropertiesCalculated()Hidden ones are not includedjava.util.CollectiongetMetaPropertiesHidden()java.util.CollectiongetMetaPropertiesHiddenCalculated()java.util.CollectiongetMetaRowStyles()java.lang.StringgetModelName()java.lang.StringgetName()java.util.List<java.lang.String>getPropertiesNames()java.util.List<java.lang.String>getPropertiesNamesWithKeyAndHidden()java.util.List<java.lang.String>getRemainingPropertiesNames()java.util.ListgetRemainingPropertiesNamesUntilSecondLevel()java.lang.StringgetSelect()java.util.Collection<java.lang.String>getSumPropertiesNames()Sum properties names.java.util.CollectiongetTableColumns()static java.lang.StringgetTitleI18n(java.util.Locale locale, java.lang.String modelName, java.lang.String tabName)booleanhasBaseCondition()booleanhasCalculatedProperties()booleanhasDefaultOrder()booleanhasFilter()booleanhasRowStyles()booleanisExcludeAll()booleanisExcludeByKey()booleanisPropertyEditable(java.lang.String propertyName)Checks if a property is in the editable properties list.voidmoveProperty(int from, int to)java.util.List<MetaProperty>namesToMetaProperties(java.util.Collection names)voidremoveEditableMember(java.lang.String memberName)Removes a member from the editable properties list.voidremoveProperty(int index)For dynamically remove properties to this tabvoidremoveProperty(java.lang.String propertyName)For dynamically remove properties to this tabvoidrestoreDefaultProperties()voidsetBaseCondition(java.lang.String string)voidsetDefaultOrder(java.lang.String defaultOrder)voidsetDefaultPropertiesNames(java.lang.String properties)voidsetDefaultValues()voidsetEditableProperties(java.lang.String editableProperties)Sets the comma-separated list of editable properties for this tab.voidsetEditor(java.lang.String editor)voidsetEditors(java.lang.String editors)voidsetExcludeAll(boolean excludeAll)voidsetExcludeByKey(boolean excludeByKey)voidsetMetaComponent(MetaComponent component)voidsetMetaFilter(MetaFilter metaFilter)voidsetMetaModel(MetaModel metaModel)voidsetMetaRowStyles(java.util.Collection styles)voidsetModelName(java.lang.String modelName)voidsetName(java.lang.String name)voidsetPropertiesNames(java.lang.String properties)Comma separated.
-
-
-
Method Detail
-
getTitleI18n
public static java.lang.String getTitleI18n(java.util.Locale locale, java.lang.String modelName, java.lang.String tabName) throws XavaException- Throws:
XavaException
-
getMetaModel
public MetaModel getMetaModel() throws XavaException
- Throws:
XavaException
-
setMetaModel
public void setMetaModel(MetaModel metaModel)
-
createDefault
public static MetaTab createDefault(MetaComponent component) throws XavaException
- Throws:
XavaException
-
getMetaProperties
public java.util.List<MetaProperty> getMetaProperties() throws XavaException
- Returns:
- Not null, read only and of type MetaProperty.
- Throws:
XavaException
-
getMetaPropertiesHidden
public java.util.Collection getMetaPropertiesHidden() throws XavaException- Throws:
XavaException
-
namesToMetaProperties
public java.util.List<MetaProperty> namesToMetaProperties(java.util.Collection names) throws XavaException
- Throws:
XavaException
-
getMetaPropertiesCalculated
public java.util.Collection getMetaPropertiesCalculated() throws XavaExceptionHidden ones are not included- Returns:
- Not null, read only and of type MetaProperty.
- Throws:
XavaException
-
getMetaPropertiesHiddenCalculated
public java.util.Collection getMetaPropertiesHiddenCalculated() throws XavaException- Returns:
- Not null, read only and of type MetaProperty.
- Throws:
XavaException
-
hasCalculatedProperties
public boolean hasCalculatedProperties() throws XavaException- Throws:
XavaException
-
getTableColumns
public java.util.Collection getTableColumns() throws XavaException- Returns:
- Not null, read only and of type String.
- Throws:
XavaException
-
getHiddenTableColumns
public java.util.Collection getHiddenTableColumns() throws XavaException- Returns:
- Not null, read only and of type String.
- Throws:
XavaException
-
getPropertiesNames
public java.util.List<java.lang.String> getPropertiesNames() throws XavaException- Returns:
- Not null, read only of type String.
- Throws:
XavaException
-
getPropertiesNamesWithKeyAndHidden
public java.util.List<java.lang.String> getPropertiesNamesWithKeyAndHidden() throws XavaException- Throws:
XavaException
-
getHiddenPropertiesNames
public java.util.List getHiddenPropertiesNames() throws XavaExceptionNames of properties that must to exist but is not needed show they to users.Usually are properties used to calculate others.
The keys are excluded.- Returns:
- Not null, read only and of type String.
- Throws:
XavaException
-
setDefaultPropertiesNames
public void setDefaultPropertiesNames(java.lang.String properties)
-
setPropertiesNames
public void setPropertiesNames(java.lang.String properties)
Comma separated.
-
getSelect
public java.lang.String getSelect() throws XavaException- Throws:
XavaException
-
getCmpFieldsColumnsInMultipleProperties
public java.util.Collection getCmpFieldsColumnsInMultipleProperties() throws XavaException- Throws:
XavaException
-
getMetaComponent
public MetaComponent getMetaComponent()
-
setMetaComponent
public void setMetaComponent(MetaComponent component)
-
isExcludeByKey
public boolean isExcludeByKey()
-
isExcludeAll
public boolean isExcludeAll()
-
setExcludeByKey
public void setExcludeByKey(boolean excludeByKey)
-
setExcludeAll
public void setExcludeAll(boolean excludeAll)
-
getName
public java.lang.String getName()
-
setName
public void setName(java.lang.String name)
-
getMetaFilter
public MetaFilter getMetaFilter()
-
setMetaFilter
public void setMetaFilter(MetaFilter metaFilter)
-
hasFilter
public boolean hasFilter()
-
addMetaProperty
public void addMetaProperty(MetaProperty metaProperty)
-
addProperty
public void addProperty(java.lang.String propertyName)
For dynamically add properties to this tab
-
addProperty
public void addProperty(int index, java.lang.String propertyName)For dynamically add properties to this tab
-
removeProperty
public void removeProperty(java.lang.String propertyName)
For dynamically remove properties to this tab
-
dropMember
public void dropMember(java.lang.String memberName)
- Since:
- 5.6
-
removeProperty
public void removeProperty(int index)
For dynamically remove properties to this tab
-
moveProperty
public void moveProperty(int from, int to)- Since:
- 5.2
-
clearProperties
public void clearProperties()
For dynamically remove all properties to this tab
-
restoreDefaultProperties
public void restoreDefaultProperties()
-
getBaseCondition
public java.lang.String getBaseCondition()
-
setBaseCondition
public void setBaseCondition(java.lang.String string)
-
hasBaseCondition
public boolean hasBaseCondition()
-
filter
public java.lang.Object filter(java.lang.Object[] objects) throws FilterException, XavaExceptionApply the tab filter to sent objects.It's used to filter arguments.
- Throws:
FilterExceptionXavaException
-
getId
public java.lang.String getId()
-
getDefaultOrder
public java.lang.String getDefaultOrder()
-
setDefaultOrder
public void setDefaultOrder(java.lang.String defaultOrder)
-
hasDefaultOrder
public boolean hasDefaultOrder()
-
cloneMetaTab
public MetaTab cloneMetaTab()
-
getRemainingPropertiesNames
public java.util.List<java.lang.String> getRemainingPropertiesNames() throws XavaException- Throws:
XavaException
-
getRemainingPropertiesNamesUntilSecondLevel
public java.util.List getRemainingPropertiesNamesUntilSecondLevel() throws XavaException- Throws:
XavaException- Since:
- 5.2
-
addMetaRowStyle
public void addMetaRowStyle(MetaRowStyle style)
-
setMetaRowStyles
public void setMetaRowStyles(java.util.Collection styles)
-
hasRowStyles
public boolean hasRowStyles()
-
getMetaRowStyles
public java.util.Collection getMetaRowStyles()
-
getModelName
public java.lang.String getModelName()
-
setModelName
public void setModelName(java.lang.String modelName) throws XavaException- Throws:
XavaException
-
setDefaultValues
public void setDefaultValues()
-
getSumPropertiesNames
public java.util.Collection<java.lang.String> getSumPropertiesNames()
Sum properties names.It was renamed in v4.3 from getTotalPropertiesNames() to getSumPropertiesNames()
- Since:
- 4.3
-
getEditor
public java.lang.String getEditor()
-
setEditor
public void setEditor(java.lang.String editor)
-
getEditors
public java.lang.String getEditors()
-
setEditors
public void setEditors(java.lang.String editors)
-
getEditableProperties
public java.lang.String getEditableProperties()
Gets the comma-separated list of editable properties for this tab. Only plain editable properties are allowed.- Returns:
- The editable properties as a comma-separated string, or null if not defined
- Since:
- 7.6
-
setEditableProperties
public void setEditableProperties(java.lang.String editableProperties)
Sets the comma-separated list of editable properties for this tab.- Parameters:
editableProperties- The editable properties to set as a comma-separated string- Since:
- 7.6
-
removeEditableMember
public void removeEditableMember(java.lang.String memberName)
Removes a member from the editable properties list. If the member is a reference (e.g. "cliente"), all qualified properties starting with that reference (e.g. "cliente.numero", "cliente.nombre") will be removed.- Parameters:
memberName- The name of the member to remove- Since:
- 7.6
-
isPropertyEditable
public boolean isPropertyEditable(java.lang.String propertyName)
Checks if a property is in the editable properties list.- Parameters:
propertyName- The name of the property to check- Returns:
- true if the property is editable, false otherwise
-
-