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 void
addMetaGroup(java.lang.String name, java.lang.String label, java.lang.String members, boolean alignedByColumns)
void
addMetaViewCollection(MetaCollectionView metaCollectionView)
void
addMetaViewProperty(MetaProperty metaProperty)
void
addMetaViewProperty(MetaPropertyView metaPropertyView)
void
addMetaViewReference(MetaReferenceView metaReferenceView)
MetaView
addSection(java.lang.String name, java.lang.String label, java.lang.String members, boolean alignedByColumns)
void
clearSections()
protected java.lang.Object
clone()
boolean
containsViewProperty(java.lang.String name)
MetaDescriptionsList
createMetaDescriptionList(MetaReference r)
IOnChangePropertyAction
createOnChangeAction(java.lang.String qualifiedPropertyName)
IOnChangePropertyAction
createOnChangeSearchAction(java.lang.String refName)
java.util.Collection
getActionsNamesForProperty(MetaProperty p, boolean editable)
java.util.Collection
getActionsNamesForReference(MetaReference ref, boolean editable)
int
getDisplaySizeForProperty(MetaProperty p)
java.lang.String
getEditorFor(MetaMember m)
java.lang.String
getExtendsView()
java.lang.String
getId()
Unique id of element, normally used to search the label in the resources files.protected java.lang.String
getLabel(java.util.Locale locale, java.lang.String id)
Implementation of label obtaining.int
getLabelFormatFor(MetaMember m)
If not label format specified for the member returns the defaultLabelFormat from XavaPreferences.java.lang.Integer
getLabelFormatForProperty(MetaProperty p)
If not label format specified for the property returns null.java.lang.Integer
getLabelFormatForReference(MetaReference ref)
If not label format specified for the reference returns null.java.lang.String
getLabelStyleForProperty(MetaProperty p)
java.lang.String
getLabelStyleForReference(MetaReference ref)
java.lang.String
getMediatorClassName()
java.util.Collection
getMembersNames()
MetaCollectionView
getMetaCollectionView(java.lang.String collectionName)
MetaDescriptionsList
getMetaDescriptionList(MetaReference r)
java.util.Collection
getMetaDescriptionsLists()
java.util.Collection
getMetaMembers()
MetaModel
getMetaModel()
MetaProperty
getMetaProperty(java.lang.String name)
Including if property is inside a sectionMetaPropertyView
getMetaPropertyViewFor(java.lang.String qualifiedPropertyName)
MetaReferenceView
getMetaReferenceView(MetaReference r)
MetaReferenceView
getMetaReferenceViewFor(java.lang.String ref)
MetaSearchAction
getMetaSearchAction()
To search the objects of type that is represents by this view.MetaView
getMetaView(MetaReference r)
MetaView
getMetaView(MetaReference r, MetaModel metaModelReferenced)
MetaView
getMetaViewOnlyKeys(MetaReference r)
java.util.Collection
getMetaViewProperties()
java.lang.String
getModelName()
java.util.Collection
getNotAlwaysEnabledViewActionsNames()
java.util.Collection
getPropertiesNamesThrowOnChange()
java.util.List<MetaView>
getSections()
java.util.Collection
getViewPropertiesNames()
boolean
hasMetaSearchAction()
boolean
hasOnChangeAction(java.lang.String qualifiedPropertyName)
boolean
hasSections()
boolean
isAlignedByColumns()
boolean
isAllMembers()
boolean
isEmpty()
If does not have members to visualize.boolean
isFrame()
void
setAlignedByColumns(boolean alignedByColumns)
void
setAllMembers(boolean newAllMembers)
void
setExtendsView(java.lang.String extendsView)
void
setFrame(boolean frame)
void
setMediatorClassName(java.lang.String mediatorClassName)
void
setMembersNames(java.lang.String membersNames)
void
setMembersNamesNotResetSections(java.lang.String membersNames)
void
setMetaModel(MetaModel metaModel)
void
setMetaSearchAction(MetaSearchAction metaSearchAction)
void
setModelName(java.lang.String modelName)
void
setName(java.lang.String newName)
IfnewName
is 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)
IfnewName
is null or empty is replaced byemptySection
.If
newName
contains blanks (\n, \r, \t, \f) or whitespace are suppressed.- Overrides:
setName
in classMetaElement
- Since:
- 5.2.1
-
isAllMembers
public boolean isAllMembers()
-
isEmpty
public boolean isEmpty() throws XavaException
If 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:MetaElement
Unique id of element, normally used to search the label in the resources files.- Specified by:
getId
in classMetaElement
-
getLabel
protected java.lang.String getLabel(java.util.Locale locale, java.lang.String id)
Description copied from class:MetaElement
Implementation of label obtaining.- Overrides:
getLabel
in 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:
clone
in 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)
-
-