org.openxava.view.meta
Class MetaView

java.lang.Object
  extended by org.openxava.util.meta.MetaElement
      extended by 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
MetaView()
           
 
Method Summary
 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 getLabelFormatForProperty(MetaProperty p)
           
 int getLabelFormatForReference(MetaReference ref)
           
 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 section
 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 getMetaViewOnlyKeys(MetaReference r)
           
 java.util.Collection getMetaViewProperties()
           
 java.lang.String getModelName()
           
 java.util.Collection getNotAlwaysEnabledViewActionsNames()
           
 java.util.Collection getPropertiesNamesThrowOnChange()
           
 java.util.List 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)
           
 
Methods inherited from class org.openxava.util.meta.MetaElement
getDescription, getDescription, getDescription, getLabel, getLabel, getLocale, getName, has18nLabel, hasName, setDescription, setLabel, setName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetaView

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

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

getMetaReferenceView

public MetaReferenceView getMetaReferenceView(MetaReference r)
Returns:
Null if not found

getMetaReferenceViewFor

public MetaReferenceView getMetaReferenceViewFor(java.lang.String ref)

getSections

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

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 class MetaElement

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 class java.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 int getLabelFormatForProperty(MetaProperty p)

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

getLabelFormatForReference

public int getLabelFormatForReference(MetaReference ref)

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)