Class FieldConfig


  • public class FieldConfig
    extends java.lang.Object
    The webapp configuration for one field of a class.
    Author:
    Kim Rutherford, Daniela Butano
    • Constructor Summary

      Constructors 
      Constructor Description
      FieldConfig()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object otherObject)
      Type getClassConfig()  
      java.lang.String getDisplayer()
      Get the displayer for that field
      java.lang.String getDisplayName()
      Get the label to display in the webapp for this field.
      boolean getDoNotTruncate()
      Return the value of the doNotTruncate flag.
      boolean getEscapeXml()
      Return the value of the escapeXml flag.
      java.lang.String getFieldExporter()
      Return the class name of the FieldExporter to use when this field is viewed.
      java.lang.String getFieldExpr()
      Return the JSTL expression for the object.
      java.lang.String getFormattedName()  
      static java.lang.String getFormattedName​(java.lang.String name)  
      boolean getHide()
      Return the value of the hide flag.
      boolean getIsDottedPath()  
      java.lang.String getLabel()
      The human readable label for this field.
      boolean getOuterInSummary()  
      java.lang.String getSectionTitle()
      Get the section title (if sectionOnRight == true).
      boolean getShowInInlineCollection()
      Return the value of the showInInlineCollection flag
      java.lang.Boolean getShowInListAnalysisPreviewTable()  
      boolean getShowInQB()  
      boolean getShowInResults()
      Return the value of the showInResults flag
      boolean getShowInSummary()
      Return the value of the showInSummary flag
      int hashCode()
      boolean isOpenByDefault()
      Get whether this field should be uncollapsed if sectionOnRight is true.
      boolean isSectionOnRight()
      Whether this field should be rendered in its own section on the right side of the page.
      void setClassConfig​(Type ccf)  
      void setDisplayer​(java.lang.String displayer)
      Set the displayer
      void setDoNotTruncate​(boolean doNotTruncate)
      If set to true, don't truncate long fields or put in a [View all...] link in the object details page.
      void setEscapeXml​(boolean escapeXml)
      If set to true, don't escape the field value on object details page.
      void setFieldExporter​(java.lang.String fieldExporter)
      Set the class name of the FieldExporter to use when this field is viewed.
      void setFieldExpr​(java.lang.String fieldExpr)
      Set the JSTL expression for this field which will be evaluated in the request context when the JSP is viewed.
      void setHide​(boolean hide)
      If set to true, do not display field on report page.
      void setLabel​(java.lang.String label)
      Set the label for this field-configuration.
      void setOpenByDefault​(boolean openByDefault)
      Set whether this field should be uncollapsed if sectionOnRight is true.
      void setOuterInSummary​(boolean outerInSummary)  
      void setSectionOnRight​(boolean sectionOnRight)
      Set whether this field should be rendered in its own section on the right side of the page.
      void setSectionTitle​(java.lang.String sectionTitle)
      Set the section title (if sectionOnRight == true).
      void setShowInInlineCollection​(boolean showInInlineCollection)
      Set the showInInlineCollection flag.
      void setShowInListAnalysisPreviewTable​(java.lang.Boolean showInListAnalysisPreviewTable)
      Specify if we want to show this field for an object in list analysis page table preview
      void setShowInQB​(boolean showInQB)
      Shall we show this field in a QueryBuilder? Ref #355
      void setShowInResults​(boolean showInResults)
      Set the showInResults flag.
      void setShowInSummary​(boolean showInSummary)
      Set the showInSummary flag.
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FieldConfig

        public FieldConfig()
    • Method Detail

      • setShowInListAnalysisPreviewTable

        public void setShowInListAnalysisPreviewTable​(java.lang.Boolean showInListAnalysisPreviewTable)
        Specify if we want to show this field for an object in list analysis page table preview
        Parameters:
        showInListAnalysisPreviewTable - whether to show this in the list analysis preview.
      • getShowInListAnalysisPreviewTable

        public java.lang.Boolean getShowInListAnalysisPreviewTable()
        Returns:
        whether we should show this in the list analyis preview.
      • getDisplayName

        public java.lang.String getDisplayName()
        Get the label to display in the webapp for this field. If there is no label, returns the name of the field instead.
        Returns:
        A human readable label.
      • getFormattedName

        public java.lang.String getFormattedName()
        Returns:
        The formatted name of this field.
      • getFormattedName

        public static java.lang.String getFormattedName​(java.lang.String name)
        Parameters:
        name - the name of the field to format.
        Returns:
        the formatted name of a particular field
      • setClassConfig

        public void setClassConfig​(Type ccf)
        Parameters:
        ccf - The config object
      • getClassConfig

        public Type getClassConfig()
        Returns:
        The class config object for the class this field belongs to.
      • getLabel

        public java.lang.String getLabel()
        The human readable label for this field. For example "DB id" instead of "primaryIdentifier".
        Returns:
        A human readable label.
      • setLabel

        public void setLabel​(java.lang.String label)
        Set the label for this field-configuration.
        Parameters:
        label - A human readable label.
      • setFieldExpr

        public void setFieldExpr​(java.lang.String fieldExpr)
        Set the JSTL expression for this field which will be evaluated in the request context when the JSP is viewed.
        Parameters:
        fieldExpr - the expression
      • getFieldExpr

        public java.lang.String getFieldExpr()
        Return the JSTL expression for the object.
        Returns:
        the expression
      • setShowInQB

        public void setShowInQB​(boolean showInQB)
        Shall we show this field in a QueryBuilder? Ref #355
        Parameters:
        showInQB - whether to show this in the query builder.
      • getShowInQB

        public boolean getShowInQB()
        Returns:
        if we should show this field in a QueryBuilder
      • getIsDottedPath

        public boolean getIsDottedPath()
        Returns:
        Whether this field represents a composite path.
      • setDoNotTruncate

        public void setDoNotTruncate​(boolean doNotTruncate)
        If set to true, don't truncate long fields or put in a [View all...] link in the object details page.
        Parameters:
        doNotTruncate - do not truncate if true
      • getDoNotTruncate

        public boolean getDoNotTruncate()
        Return the value of the doNotTruncate flag.
        Returns:
        the value of the flag
      • setEscapeXml

        public void setEscapeXml​(boolean escapeXml)
        If set to true, don't escape the field value on object details page.
        Parameters:
        escapeXml - do not escape if true
      • getEscapeXml

        public boolean getEscapeXml()
        Return the value of the escapeXml flag.
        Returns:
        the value of the flag
      • setHide

        public void setHide​(boolean hide)
        If set to true, do not display field on report page.
        Parameters:
        hide - do not display if true
      • getHide

        public boolean getHide()
        Return the value of the hide flag.
        Returns:
        the value of the flag
      • setShowInSummary

        public void setShowInSummary​(boolean showInSummary)
        Set the showInSummary flag. If true, show this field in the summary section of the object details page.
        Parameters:
        showInSummary - the new value of the flag
      • getShowInSummary

        public boolean getShowInSummary()
        Return the value of the showInSummary flag
        Returns:
        the value of the flag
      • getOuterInSummary

        public boolean getOuterInSummary()
        Returns:
        whether the summary contains any outer joins.
      • setOuterInSummary

        public void setOuterInSummary​(boolean outerInSummary)
        Parameters:
        outerInSummary - whether the summary contains any outer joins.
      • setShowInInlineCollection

        public void setShowInInlineCollection​(boolean showInInlineCollection)
        Set the showInInlineCollection flag. If true, show this field in inline collections on the object details page.
        Parameters:
        showInInlineCollection - the new value of the flag
      • getShowInInlineCollection

        public boolean getShowInInlineCollection()
        Return the value of the showInInlineCollection flag
        Returns:
        the value of the flag
      • setShowInResults

        public void setShowInResults​(boolean showInResults)
        Set the showInResults flag. If true, show this field when the corresponding object is shown in a results table.
        Parameters:
        showInResults - the new value of the flag
      • getShowInResults

        public boolean getShowInResults()
        Return the value of the showInResults flag
        Returns:
        the value of the flag
      • setFieldExporter

        public void setFieldExporter​(java.lang.String fieldExporter)
        Set the class name of the FieldExporter to use when this field is viewed.
        Parameters:
        fieldExporter - the FieldExporter name
      • getFieldExporter

        public java.lang.String getFieldExporter()
        Return the class name of the FieldExporter to use when this field is viewed.
        Returns:
        the FieldExporter name
      • equals

        public boolean equals​(java.lang.Object otherObject)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isOpenByDefault

        public boolean isOpenByDefault()
        Get whether this field should be uncollapsed if sectionOnRight is true.
        Returns:
        true if field should be uncollapsed by default
      • setOpenByDefault

        public void setOpenByDefault​(boolean openByDefault)
        Set whether this field should be uncollapsed if sectionOnRight is true.
        Parameters:
        openByDefault - true if field should be uncollapsed by default
      • isSectionOnRight

        public boolean isSectionOnRight()
        Whether this field should be rendered in its own section on the right side of the page.
        Returns:
        true if field should be rendered in its own section
      • setSectionOnRight

        public void setSectionOnRight​(boolean sectionOnRight)
        Set whether this field should be rendered in its own section on the right side of the page.
        Parameters:
        sectionOnRight - whether or not field should be rendered in its own section
      • getSectionTitle

        public java.lang.String getSectionTitle()
        Get the section title (if sectionOnRight == true).
        Returns:
        section title
      • setSectionTitle

        public void setSectionTitle​(java.lang.String sectionTitle)
        Set the section title (if sectionOnRight == true).
        Parameters:
        sectionTitle - section title
      • getDisplayer

        public java.lang.String getDisplayer()
        Get the displayer for that field
        Returns:
        the path to the jsp displayer
      • setDisplayer

        public void setDisplayer​(java.lang.String displayer)
        Set the displayer
        Parameters:
        displayer - the path to the jsp displayer