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 void
addMetaProperty(MetaProperty metaProperty)
void
addMetaRowStyle(MetaRowStyle style)
void
addProperty(int index, java.lang.String propertyName)
For dynamically add properties to this tabvoid
addProperty(java.lang.String propertyName)
For dynamically add properties to this tabvoid
clearProperties()
For dynamically remove all properties to this tabMetaTab
cloneMetaTab()
static MetaTab
createDefault(MetaComponent component)
static MetaTab
createDefault(MetaModel metaModel)
void
dropMember(java.lang.String memberName)
java.lang.Object
filter(java.lang.Object[] objects)
Apply the tab filter to sent objects.java.lang.String
getBaseCondition()
java.util.Collection
getCmpFieldsColumnsInMultipleProperties()
java.lang.String
getDefaultOrder()
java.lang.String
getEditor()
java.lang.String
getEditors()
java.util.List
getHiddenPropertiesNames()
Names of properties that must to exist but is not needed show they to users.java.util.Collection
getHiddenTableColumns()
java.lang.String
getId()
MetaComponent
getMetaComponent()
MetaFilter
getMetaFilter()
MetaModel
getMetaModel()
java.util.List<MetaProperty>
getMetaProperties()
java.util.Collection
getMetaPropertiesCalculated()
Hidden ones are not includedjava.util.Collection
getMetaPropertiesHidden()
java.util.Collection
getMetaPropertiesHiddenCalculated()
java.util.Collection
getMetaRowStyles()
java.lang.String
getModelName()
java.lang.String
getName()
java.util.List<java.lang.String>
getPropertiesNames()
java.util.List<java.lang.String>
getPropertiesNamesWithKeyAndHidden()
java.util.List<java.lang.String>
getRemainingPropertiesNames()
java.util.List
getRemainingPropertiesNamesUntilSecondLevel()
java.lang.String
getSelect()
java.util.Collection<java.lang.String>
getSumPropertiesNames()
Sum properties names.java.util.Collection
getTableColumns()
static java.lang.String
getTitleI18n(java.util.Locale locale, java.lang.String modelName, java.lang.String tabName)
boolean
hasBaseCondition()
boolean
hasCalculatedProperties()
boolean
hasDefaultOrder()
boolean
hasFilter()
boolean
hasRowStyles()
boolean
isExcludeAll()
boolean
isExcludeByKey()
void
moveProperty(int from, int to)
java.util.List<MetaProperty>
namesToMetaProperties(java.util.Collection names)
void
removeProperty(int index)
For dynamically remove properties to this tabvoid
removeProperty(java.lang.String propertyName)
For dynamically remove properties to this tabvoid
restoreDefaultProperties()
void
setBaseCondition(java.lang.String string)
void
setDefaultOrder(java.lang.String defaultOrder)
void
setDefaultPropertiesNames(java.lang.String properties)
void
setDefaultValues()
void
setEditor(java.lang.String editor)
void
setEditors(java.lang.String editors)
void
setExcludeAll(boolean excludeAll)
void
setExcludeByKey(boolean excludeByKey)
void
setMetaComponent(MetaComponent component)
void
setMetaFilter(MetaFilter metaFilter)
void
setMetaModel(MetaModel metaModel)
void
setMetaRowStyles(java.util.Collection styles)
void
setModelName(java.lang.String modelName)
void
setName(java.lang.String name)
void
setPropertiesNames(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 XavaException
Hidden 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 XavaException
Names 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, XavaException
Apply the tab filter to sent objects.It's used to filter arguments.
- Throws:
FilterException
XavaException
-
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)
-
-