Package org.openxava.view.meta
Class MetaView
- java.lang.Object
-
- org.openxava.util.meta.MetaElement
-
- org.openxava.view.meta.MetaView
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class MetaView extends MetaElement implements java.lang.Cloneable
- Author:
- Javier Paniza
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MetaView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMetaGroup(java.lang.String name, java.lang.String label, java.lang.String members, boolean alignedByColumns)voidaddMetaViewCollection(MetaCollectionView metaCollectionView)voidaddMetaViewProperty(MetaProperty metaProperty)voidaddMetaViewProperty(MetaPropertyView metaPropertyView)voidaddMetaViewReference(MetaReferenceView metaReferenceView)MetaViewaddSection(java.lang.String name, java.lang.String label, java.lang.String members, boolean alignedByColumns)voidclearSections()protected java.lang.Objectclone()booleancontainsViewProperty(java.lang.String name)MetaDescriptionsListcreateMetaDescriptionList(MetaReference r)IOnChangePropertyActioncreateOnChangeAction(java.lang.String qualifiedPropertyName)IOnChangePropertyActioncreateOnChangeSearchAction(java.lang.String refName)java.util.CollectiongetActionsNamesForProperty(MetaProperty p, boolean editable)java.util.CollectiongetActionsNamesForReference(MetaReference ref, boolean editable)intgetDisplaySizeForProperty(MetaProperty p)java.lang.StringgetEditorFor(MetaMember m)java.lang.StringgetExtendsView()java.lang.StringgetId()Unique id of element, normally used to search the label in the resources files.protected java.lang.StringgetLabel(java.util.Locale locale, java.lang.String id)Implementation of label obtaining.intgetLabelFormatFor(MetaMember m)If not label format specified for the member returns the defaultLabelFormat from XavaPreferences.java.lang.IntegergetLabelFormatForProperty(MetaProperty p)If not label format specified for the property returns null.java.lang.IntegergetLabelFormatForReference(MetaReference ref)If not label format specified for the reference returns null.java.lang.StringgetLabelStyleForProperty(MetaProperty p)java.lang.StringgetLabelStyleForReference(MetaReference ref)java.lang.StringgetMediatorClassName()java.util.CollectiongetMembersNames()MetaCollectionViewgetMetaCollectionView(java.lang.String collectionName)MetaDescriptionsListgetMetaDescriptionList(MetaReference r)java.util.CollectiongetMetaDescriptionsLists()java.util.CollectiongetMetaMembers()MetaModelgetMetaModel()MetaPropertygetMetaProperty(java.lang.String name)Including if property is inside a sectionMetaPropertyViewgetMetaPropertyViewFor(java.lang.String qualifiedPropertyName)MetaReferenceViewgetMetaReferenceView(MetaReference r)MetaReferenceViewgetMetaReferenceViewFor(java.lang.String ref)MetaSearchActiongetMetaSearchAction()To search the objects of type that is represents by this view.MetaViewgetMetaView(MetaReference r)MetaViewgetMetaView(MetaReference r, MetaModel metaModelReferenced)MetaViewgetMetaViewOnlyKeys(MetaReference r)java.util.CollectiongetMetaViewProperties()java.lang.StringgetModelName()java.util.CollectiongetNotAlwaysEnabledViewActionsNames()java.util.CollectiongetPropertiesNamesThrowOnChange()java.util.List<MetaView>getSections()java.util.CollectiongetViewPropertiesNames()booleanhasMetaSearchAction()booleanhasOnChangeAction(java.lang.String qualifiedPropertyName)booleanhasSections()booleanisAlignedByColumns()booleanisAllMembers()booleanisEmpty()If does not have members to visualize.booleanisFrame()voidsetAlignedByColumns(boolean alignedByColumns)voidsetAllMembers(boolean newAllMembers)voidsetExtendsView(java.lang.String extendsView)voidsetFrame(boolean frame)voidsetMediatorClassName(java.lang.String mediatorClassName)voidsetMembersNames(java.lang.String membersNames)voidsetMembersNamesNotResetSections(java.lang.String membersNames)voidsetMetaModel(MetaModel metaModel)voidsetMetaSearchAction(MetaSearchAction metaSearchAction)voidsetModelName(java.lang.String modelName)voidsetName(java.lang.String newName)IfnewNameis null or empty is replaced byemptySection.-
Methods inherited from class org.openxava.util.meta.MetaElement
getDescription, getDescription, getDescription, getDescription, getLabel, getLabel, getLabel, getLocale, getName, getPlaceholder, getPlaceholder, getPlaceholder, has18nLabel, hasName, setDescription, setLabel, setPlaceholder
-
-
-
-
Method Detail
-
addMetaViewProperty
public void addMetaViewProperty(MetaProperty metaProperty) throws XavaException
- Throws:
XavaException
-
addMetaViewReference
public void addMetaViewReference(MetaReferenceView metaReferenceView) throws XavaException
- Throws:
XavaException
-
addMetaViewProperty
public void addMetaViewProperty(MetaPropertyView metaPropertyView) throws XavaException
- Throws:
XavaException
-
addMetaViewCollection
public void addMetaViewCollection(MetaCollectionView metaCollectionView) throws XavaException
- Throws:
XavaException
-
getMetaProperty
public MetaProperty getMetaProperty(java.lang.String name) throws XavaException
Including if property is inside a section- Throws:
XavaException
-
getMetaMembers
public java.util.Collection getMetaMembers() throws XavaException- Returns:
- Not null, of type MetaMember and read only
- Throws:
XavaException
-
getMetaModel
public MetaModel getMetaModel() throws XavaException
- Returns:
- Not null
- Throws:
XavaException
-
setMetaModel
public void setMetaModel(MetaModel metaModel) throws XavaException
- Throws:
XavaException
-
getModelName
public java.lang.String getModelName() throws XavaException- Throws:
XavaException
-
setModelName
public void setModelName(java.lang.String modelName) throws XavaException- Throws:
XavaException
-
setName
public void setName(java.lang.String newName)
IfnewNameis null or empty is replaced byemptySection.If
newNamecontains blanks (\n, \r, \t, \f) or whitespace are suppressed.- Overrides:
setNamein classMetaElement- Since:
- 5.2.1
-
isAllMembers
public boolean isAllMembers()
-
isEmpty
public boolean isEmpty() throws XavaExceptionIf does not have members to visualize.- Throws:
XavaException
-
getMembersNames
public java.util.Collection getMembersNames() throws XavaException- Returns:
- Not nul, of type String and read only.
- Throws:
XavaException
-
setMembersNames
public void setMembersNames(java.lang.String membersNames) throws XavaException- Parameters:
membersNames- Names separated by commas or spaces.- Throws:
XavaException
-
setMembersNamesNotResetSections
public void setMembersNamesNotResetSections(java.lang.String membersNames) throws XavaException- Parameters:
membersNames- Names separated by commas or spaces.- Throws:
XavaException
-
setAllMembers
public void setAllMembers(boolean newAllMembers)
-
hasOnChangeAction
public boolean hasOnChangeAction(java.lang.String qualifiedPropertyName)
-
createOnChangeAction
public IOnChangePropertyAction createOnChangeAction(java.lang.String qualifiedPropertyName) throws XavaException
- Throws:
XavaException
-
createOnChangeSearchAction
public IOnChangePropertyAction createOnChangeSearchAction(java.lang.String refName) throws XavaException
- Throws:
XavaException
-
hasMetaSearchAction
public boolean hasMetaSearchAction()
-
getMetaSearchAction
public MetaSearchAction getMetaSearchAction()
To search the objects of type that is represents by this view. Not for the references
-
setMetaSearchAction
public void setMetaSearchAction(MetaSearchAction metaSearchAction)
-
getMetaDescriptionList
public MetaDescriptionsList getMetaDescriptionList(MetaReference r) throws XavaException
- Returns:
- Null if not found
- Throws:
XavaException
-
createMetaDescriptionList
public MetaDescriptionsList createMetaDescriptionList(MetaReference r) throws XavaException
- Throws:
XavaException
-
getMetaDescriptionsLists
public java.util.Collection getMetaDescriptionsLists()
- Returns:
- of type MetaDescriptionsList
-
getMetaViewOnlyKeys
public MetaView getMetaViewOnlyKeys(MetaReference r) throws XavaException
- Throws:
XavaException
-
getMetaView
public MetaView getMetaView(MetaReference r) throws XavaException
- Throws:
XavaException
-
getMetaView
public MetaView getMetaView(MetaReference r, MetaModel metaModelReferenced) throws XavaException
- Throws:
XavaException- Since:
- 5.3.1
-
getMetaReferenceView
public MetaReferenceView getMetaReferenceView(MetaReference r)
- Returns:
- Null if not found
-
getMetaPropertyViewFor
public MetaPropertyView getMetaPropertyViewFor(java.lang.String qualifiedPropertyName)
-
getMetaReferenceViewFor
public MetaReferenceView getMetaReferenceViewFor(java.lang.String ref)
-
getSections
public java.util.List<MetaView> getSections() throws XavaException
- Throws:
XavaException
-
addSection
public MetaView addSection(java.lang.String name, java.lang.String label, java.lang.String members, boolean alignedByColumns) throws XavaException
- Returns:
- The added section
- Throws:
XavaException
-
addMetaGroup
public void addMetaGroup(java.lang.String name, java.lang.String label, java.lang.String members, boolean alignedByColumns) throws XavaException- Throws:
XavaException
-
hasSections
public boolean hasSections()
-
clearSections
public void clearSections()
-
getMediatorClassName
public java.lang.String getMediatorClassName() throws XavaException- Throws:
XavaException
-
setMediatorClassName
public void setMediatorClassName(java.lang.String mediatorClassName)
-
getMetaCollectionView
public MetaCollectionView getMetaCollectionView(java.lang.String collectionName)
- Returns:
- Null if not found
-
isFrame
public boolean isFrame()
-
setFrame
public void setFrame(boolean frame)
-
getId
public java.lang.String getId()
Description copied from class:MetaElementUnique id of element, normally used to search the label in the resources files.- Specified by:
getIdin classMetaElement
-
getLabel
protected java.lang.String getLabel(java.util.Locale locale, java.lang.String id)Description copied from class:MetaElementImplementation of label obtaining.- Overrides:
getLabelin classMetaElement
-
getPropertiesNamesThrowOnChange
public java.util.Collection getPropertiesNamesThrowOnChange()
-
getViewPropertiesNames
public java.util.Collection getViewPropertiesNames()
-
getMetaViewProperties
public java.util.Collection getMetaViewProperties()
-
clone
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
getActionsNamesForProperty
public java.util.Collection getActionsNamesForProperty(MetaProperty p, boolean editable)
-
getActionsNamesForReference
public java.util.Collection getActionsNamesForReference(MetaReference ref, boolean editable)
-
getLabelFormatForProperty
public java.lang.Integer getLabelFormatForProperty(MetaProperty p)
If not label format specified for the property returns null.
-
getLabelFormatForReference
public java.lang.Integer getLabelFormatForReference(MetaReference ref)
If not label format specified for the reference returns null.
-
getLabelFormatFor
public int getLabelFormatFor(MetaMember m)
If not label format specified for the member returns the defaultLabelFormat from XavaPreferences.- Since:
- 5.7
-
getDisplaySizeForProperty
public int getDisplaySizeForProperty(MetaProperty p) throws XavaException
- Throws:
XavaException
-
getEditorFor
public java.lang.String getEditorFor(MetaMember m)
- Returns:
- Empty string if no editor is defined for this property
-
isAlignedByColumns
public boolean isAlignedByColumns()
-
setAlignedByColumns
public void setAlignedByColumns(boolean alignedByColumns)
-
containsViewProperty
public boolean containsViewProperty(java.lang.String name)
-
getNotAlwaysEnabledViewActionsNames
public java.util.Collection getNotAlwaysEnabledViewActionsNames()
-
getExtendsView
public java.lang.String getExtendsView()
-
setExtendsView
public void setExtendsView(java.lang.String extendsView)
-
getLabelStyleForProperty
public java.lang.String getLabelStyleForProperty(MetaProperty p)
-
getLabelStyleForReference
public java.lang.String getLabelStyleForReference(MetaReference ref)
-
-