Package org.gorpipe.querydialogs.factory
Class PerspectiveDialog
- java.lang.Object
-
- org.gorpipe.querydialogs.BasicBean
-
- org.gorpipe.querydialogs.AbstractListBean
-
- org.gorpipe.querydialogs.Dialog
-
- org.gorpipe.querydialogs.factory.PerspectiveDialog
-
- All Implemented Interfaces:
java.io.Serializable,javax.swing.ListModel
public class PerspectiveDialog extends Dialog
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPROPERTY_HTML_TEMPLATEjava.lang.StringwritePath-
Fields inherited from class org.gorpipe.querydialogs.Dialog
argumentMap, attributes, dialogDescription, errorMsgTemplate, executable, gitSHA, longRunningQueryTemplate, packageVersion, PROPERTY_BASE_CHARTCOLUMNS, PROPERTY_BASE_CHARTDF, PROPERTY_BASE_CHARTEXEC, PROPERTY_BASE_CHARTSCRIPT, PROPERTY_BASE_QUERY, PROPERTY_CHART, PROPERTY_EXECUTABLE, PROPERTY_QUERY, PROPERTY_TYPE, version
-
-
Constructor Summary
Constructors Constructor Description PerspectiveDialog(java.util.Map<java.lang.String,? extends java.lang.Object> attributes, org.gorpipe.gor.model.FileReader fileResolver, org.gorpipe.gor.model.QueryEvaluator queryEval, DialogDescription dialogDescription, PerspectiveDialogDisplayParams displayParams, DialogType type, java.lang.String query, java.lang.String chartScript, java.lang.String chartExec, java.lang.String chartColumns, ChartDataType chartDF, java.util.List<Argument> arguments, java.lang.String htmlTemplate, java.util.List<? extends java.lang.Object> initialColumns, java.util.List<Perspective> perspectives, java.util.List<ColumnGroup> columnGroups, java.util.List<org.gorpipe.gor.model.ReportCommand> reportCommands, java.lang.String errorMsgTemplate, java.lang.String writePath, java.lang.String longRunningQueryTemplate, java.lang.String version, java.lang.String packageVersion, java.lang.String gitSHA)PerspectiveDialog(PerspectiveDialog dlg)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddNewReportToViewer()booleancheckIfLongRunningQuery()Determine whether the query should be run as a long query which implies that the results of the query will not be streamed to the SM user but instead the results are saved to a directory of the user´s choice.java.util.Map<java.lang.String,Argument>getArgumentMap()Get argument map.java.util.List<ColumnGroup>getColumnGroups()java.lang.StringgetDialogCategory()Get the dialog category the dialog belongs to.java.nio.file.PathgetDialogsFilePath()java.awt.ColorgetFadeInImageColor()Get the dialog fade in image color.java.lang.StringgetHtmlTemplate()Deprecated.Should define an html template for perspectives insteadjava.awt.ColorgetImageColor()Get the dialog image color.java.util.Set<java.lang.Object>getInitialColumns()Deprecated.Should define initial columns for perspectives insteadjava.util.List<Perspective>getPerspectives()java.util.List<Perspective>getPerspectivesCopies()Get copies of perspectives.java.util.List<org.gorpipe.gor.model.ReportCommand>getReportCommands()Get the report command list.voidsaveArgumentValues(java.nio.file.Path selFilePath)voidsetArgumentValues(java.nio.file.Path path)Read argument values from file and set.voidsetArgumentValues(java.util.Map<java.lang.String,ArgumentContent> argName2Content)Set values for arguments.voidsetDialogsFilePath(java.nio.file.Path dialogsFilePath)voidsetHtmlTemplate(java.lang.String htmlTemplate)Deprecated.Should define an html template for perspectives insteadvoidsetReportViewer(ReportViewer container)booleanstoringAllowed()booleanverify()Verify dialog by getting the error message.-
Methods inherited from class org.gorpipe.querydialogs.Dialog
advancedArgumentsVisible, calcInterpolatedQuery, copyArguments, determineLongRunningQuery, getArgument, getAttribute, getBaseChartColumns, getBaseChartDF, getBaseChartExec, getBaseChartScript, getBaseQuery, getChart, getDescription, getElementAt, getErrorMessage, getFileResolver, getGitSha, getHelpLink, getInterpolatedChart, getInterpolatedQuery, getListDescription, getName, getPackageVersion, getQuery, getQueryEval, getShortName, getSize, getType, getVersion, hasArgument, interpolateChart, interpolateQuery, isExecutable, loadQuery, setAdvancedArgumentsVisible, setArgument, setBaseChartColumns, setBaseChartDF, setBaseChartExec, setBaseChartScript, setBaseQuery, setDeferUpdates, setType, toString
-
Methods inherited from class org.gorpipe.querydialogs.AbstractListBean
addListDataListener, fireContentsChanged, removeListDataListener
-
Methods inherited from class org.gorpipe.querydialogs.BasicBean
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Field Detail
-
PROPERTY_HTML_TEMPLATE
public static final java.lang.String PROPERTY_HTML_TEMPLATE
- See Also:
- Constant Field Values
-
writePath
public final java.lang.String writePath
-
-
Constructor Detail
-
PerspectiveDialog
public PerspectiveDialog(java.util.Map<java.lang.String,? extends java.lang.Object> attributes, org.gorpipe.gor.model.FileReader fileResolver, org.gorpipe.gor.model.QueryEvaluator queryEval, DialogDescription dialogDescription, PerspectiveDialogDisplayParams displayParams, DialogType type, java.lang.String query, java.lang.String chartScript, java.lang.String chartExec, java.lang.String chartColumns, ChartDataType chartDF, java.util.List<Argument> arguments, java.lang.String htmlTemplate, java.util.List<? extends java.lang.Object> initialColumns, java.util.List<Perspective> perspectives, java.util.List<ColumnGroup> columnGroups, java.util.List<org.gorpipe.gor.model.ReportCommand> reportCommands, java.lang.String errorMsgTemplate, java.lang.String writePath, java.lang.String longRunningQueryTemplate, java.lang.String version, java.lang.String packageVersion, java.lang.String gitSHA) throws freemarker.template.TemplateException- Throws:
freemarker.template.TemplateException
-
PerspectiveDialog
public PerspectiveDialog(PerspectiveDialog dlg) throws freemarker.template.TemplateException
- Throws:
freemarker.template.TemplateException
-
-
Method Detail
-
getHtmlTemplate
@Deprecated public java.lang.String getHtmlTemplate()
Deprecated.Should define an html template for perspectives instead
-
setHtmlTemplate
@Deprecated public void setHtmlTemplate(java.lang.String htmlTemplate)
Deprecated.Should define an html template for perspectives instead
-
getInitialColumns
@Deprecated public java.util.Set<java.lang.Object> getInitialColumns()
Deprecated.Should define initial columns for perspectives instead
-
getPerspectives
public java.util.List<Perspective> getPerspectives()
-
getColumnGroups
public java.util.List<ColumnGroup> getColumnGroups()
-
getPerspectivesCopies
public java.util.List<Perspective> getPerspectivesCopies()
Get copies of perspectives.- Returns:
- list of perspectives
-
verify
public boolean verify()
Verify dialog by getting the error message. If the error message is empty the dialog is valid and the method returnstrue. If the error message is not empty the dialog is invalid, and the error message is displayed in an error dialog and the method returnsfalse.- Returns:
trueif dialog is valid, otherwisefalse
-
checkIfLongRunningQuery
public boolean checkIfLongRunningQuery()
Determine whether the query should be run as a long query which implies that the results of the query will not be streamed to the SM user but instead the results are saved to a directory of the user´s choice.- Returns:
trueif the query is a long running query, otherwisefalse
-
setReportViewer
public void setReportViewer(ReportViewer container)
-
addNewReportToViewer
public void addNewReportToViewer()
-
getReportCommands
public java.util.List<org.gorpipe.gor.model.ReportCommand> getReportCommands()
Get the report command list.- Returns:
- the report command list
-
getDialogCategory
public java.lang.String getDialogCategory()
Get the dialog category the dialog belongs to.- Returns:
- the dialog category
-
getImageColor
public java.awt.Color getImageColor()
Get the dialog image color.- Returns:
- the dialog image color
-
getFadeInImageColor
public java.awt.Color getFadeInImageColor()
Get the dialog fade in image color.- Returns:
- the dialog fade in image color
-
getArgumentMap
public java.util.Map<java.lang.String,Argument> getArgumentMap()
Get argument map.- Returns:
- the argument map
-
setArgumentValues
public void setArgumentValues(java.util.Map<java.lang.String,ArgumentContent> argName2Content)
Set values for arguments.- Parameters:
argName2Content- argument name to value map
-
setArgumentValues
public void setArgumentValues(java.nio.file.Path path) throws java.io.IOExceptionRead argument values from file and set.- Parameters:
path- thepath of the file to read argument values from- Throws:
java.io.IOException
-
saveArgumentValues
public void saveArgumentValues(java.nio.file.Path selFilePath)
-
storingAllowed
public boolean storingAllowed()
-
getDialogsFilePath
public java.nio.file.Path getDialogsFilePath()
-
setDialogsFilePath
public void setDialogsFilePath(java.nio.file.Path dialogsFilePath)
-
-