org.openxava.tab.meta
Class MetaTab

java.lang.Object
  extended by 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
MetaTab()
           
 
Method Summary
 void addMetaProperty(MetaProperty metaProperty)
           
 void addMetaRowStyle(MetaRowStyle style)
           
 void addProperty(int index, java.lang.String propertyName)
          For dynamically add properties to this tab
 void addProperty(java.lang.String propertyName)
          For dynamically add properties to this tab
 void clearProperties()
          For dynamically remove all properties to this tab
 MetaTab cloneMetaTab()
           
static MetaTab createDefault(MetaComponent component)
           
static MetaTab createDefault(MetaModel metaModel)
           
 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.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 getMetaProperties()
           
 java.util.Collection getMetaPropertiesCalculated()
          Hidden ones are not included
 java.util.Collection getMetaPropertiesHidden()
           
 java.util.Collection getMetaPropertiesHiddenCalculated()
           
 java.util.Collection getMetaRowStyles()
           
 java.lang.String getModelName()
           
 java.lang.String getName()
           
 java.util.List getPropertiesNames()
           
 java.util.List<java.lang.String> getPropertiesNamesWithKeyAndHidden()
           
 java.util.List getRemainingPropertiesNames()
           
 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 movePropertyToLeft(int index)
           
 void movePropertyToRight(int index)
           
 java.util.List namesToMetaProperties(java.util.Collection names)
           
 void removeProperty(int index)
          For dynamically remove properties to this tab
 void removeProperty(java.lang.String propertyName)
          For dynamically remove properties to this tab
 void 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 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetaTab

public MetaTab()
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

createDefault

public static MetaTab createDefault(MetaModel metaModel)

getMetaProperties

public java.util.List 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 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 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 calcualte 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


removeProperty

public void removeProperty(int index)
For dynamically remove properties to this tab


movePropertyToRight

public void movePropertyToRight(int index)

movePropertyToLeft

public void movePropertyToLeft(int index)

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 getRemainingPropertiesNames()
                                           throws XavaException
Throws:
XavaException

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)