Package org.intermine.web.logic.config
Class FieldConfig
- java.lang.Object
-
- org.intermine.web.logic.config.FieldConfig
-
public class FieldConfig extends java.lang.ObjectThe 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 booleanequals(java.lang.Object otherObject)TypegetClassConfig()java.lang.StringgetDisplayer()Get the displayer for that fieldjava.lang.StringgetDisplayName()Get the label to display in the webapp for this field.booleangetDoNotTruncate()Return the value of the doNotTruncate flag.booleangetEscapeXml()Return the value of the escapeXml flag.java.lang.StringgetFieldExporter()Return the class name of the FieldExporter to use when this field is viewed.java.lang.StringgetFieldExpr()Return the JSTL expression for the object.java.lang.StringgetFormattedName()static java.lang.StringgetFormattedName(java.lang.String name)booleangetHide()Return the value of the hide flag.booleangetIsDottedPath()java.lang.StringgetLabel()The human readable label for this field.booleangetOuterInSummary()java.lang.StringgetSectionTitle()Get the section title (if sectionOnRight == true).booleangetShowInInlineCollection()Return the value of the showInInlineCollection flagjava.lang.BooleangetShowInListAnalysisPreviewTable()booleangetShowInQB()booleangetShowInResults()Return the value of the showInResults flagbooleangetShowInSummary()Return the value of the showInSummary flaginthashCode()booleanisOpenByDefault()Get whether this field should be uncollapsed if sectionOnRight is true.booleanisSectionOnRight()Whether this field should be rendered in its own section on the right side of the page.voidsetClassConfig(Type ccf)voidsetDisplayer(java.lang.String displayer)Set the displayervoidsetDoNotTruncate(boolean doNotTruncate)If set to true, don't truncate long fields or put in a [View all...] link in the object details page.voidsetEscapeXml(boolean escapeXml)If set to true, don't escape the field value on object details page.voidsetFieldExporter(java.lang.String fieldExporter)Set the class name of the FieldExporter to use when this field is viewed.voidsetFieldExpr(java.lang.String fieldExpr)Set the JSTL expression for this field which will be evaluated in the request context when the JSP is viewed.voidsetHide(boolean hide)If set to true, do not display field on report page.voidsetLabel(java.lang.String label)Set the label for this field-configuration.voidsetOpenByDefault(boolean openByDefault)Set whether this field should be uncollapsed if sectionOnRight is true.voidsetOuterInSummary(boolean outerInSummary)voidsetSectionOnRight(boolean sectionOnRight)Set whether this field should be rendered in its own section on the right side of the page.voidsetSectionTitle(java.lang.String sectionTitle)Set the section title (if sectionOnRight == true).voidsetShowInInlineCollection(boolean showInInlineCollection)Set the showInInlineCollection flag.voidsetShowInListAnalysisPreviewTable(java.lang.Boolean showInListAnalysisPreviewTable)Specify if we want to show this field for an object in list analysis page table previewvoidsetShowInQB(boolean showInQB)Shall we show this field in a QueryBuilder? Ref #355voidsetShowInResults(boolean showInResults)Set the showInResults flag.voidsetShowInSummary(boolean showInSummary)Set the showInSummary flag.java.lang.StringtoString()
-
-
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.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
-
-