Package com.illumon.iris.console.utils
Class LivePivotWidget
java.lang.Object
com.illumon.util.referencecounting.ReferenceCounted
com.illumon.iris.db.util.liveness.ReferenceCountedLivenessNode
com.illumon.iris.db.util.liveness.LivenessArtifact
com.illumon.iris.console.utils.LivePivotWidget
- All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable,Deflatable<LivePivotWidget>,CloseableWidget,ContextAwareLiveWidget<LivePivotWidget>,LiveWidget<LivePivotWidget>,LiveWidgetAclFilterable<LivePivotWidget>,LivenessManager,LivenessNode,LivenessReferent,Serializable
public class LivePivotWidget
extends LivenessArtifact
implements ContextAwareLiveWidget<LivePivotWidget>, Serializable, CloseableWidget, LiveWidgetAclFilterable<LivePivotWidget>
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumstatic classDeprecated.This class has been replaced by PivotOptions and will be removed in a future release.static enum -
Constructor Summary
ConstructorsConstructorDescriptionLivePivotWidget(Table tableToPivot, String[] rows, String columnTitleColumn, String[] valueColumns, String[] filterColumns, String[] requiredFilterColumns, LivePivotWidget.Aggregation aggregation, PivotOptions options, Function<Object, Object> colorFormat, Function<Object, Object> columnNameTransform) This constructor is used to create the widget.LivePivotWidget(Table tableToPivot, String[] rows, String columnTitleColumn, String[] valueColumns, String[] filterColumns, String[] requiredFilterColumns, LivePivotWidget.Aggregation aggregation, PivotOptions options, Function<Object, Object> colorFormat, Function<Object, Object> columnNameTransform, Comparable<?>[] userRowOrder, Comparable<?>[] userColumnOrder) This constructor is used to create the widget.LivePivotWidget(Table tableToPivot, String[] rows, String columnTitleColumn, String[] valueColumns, String[] filterColumns, String[] requiredFilterColumns, LivePivotWidget.Aggregation aggregation, PivotOptions options, Function<Object, Object> colorFormat, Map<String, Function<Object, Object>> colorFormats, Function<Object, Object> columnNameTransform) This constructor is used to create the widget.LivePivotWidget(Table tableToPivot, String[] rows, String columnTitleColumn, String[] valueColumns, String[] filterColumns, String[] requiredFilterColumns, LivePivotWidget.Aggregation aggregation, PivotOptions options, Function<Object, Object> colorFormat, Map<String, Function<Object, Object>> colorFormats, Function<Object, Object> columnNameTransform, Comparable<?>[] userRowColumnOrder, Comparable<?>[] userColumnOrder) This constructor is used to create the widget.LivePivotWidget(Table tableToPivot, String[] rows, String columnTitleColumn, String valueColumn, LivePivotWidget.Aggregation aggregation, PivotOptions options) This constructor is used to create the widget. -
Method Summary
Modifier and TypeMethodDescriptionapplyAcls(UserContext userContext, RemoteQueryProcessor remoteQueryProcessor, String name) This method should apply ACLs to all tables in the widget.deflate(ExportedObjectClient client) Convert this object into an Inflatable suitable for serialization.getComponent(AsyncPanel dataPanel, String viewId, Object view, String title, Object irisWidgetSupportObject, com.fishlib.io.logger.Logger log) Gets the UI component.getName()Gets the name of the Live Widget.gets the processor connection.intGets the session ID for console widgets.static LiveWidget<LivePivotWidget>getWidget(Table tableToPivot, String[] rows, String columnTitleColumn, String unitColumn, LivePivotWidget.Aggregation aggregation, PivotOptions options) voidonClose()voidSets the name of the Live Widget.voidsetProcessorConnection(QueryProcessorConnection processorConnection) Sets the processor connection.voidsetSessionId(int sessionId) Sets the session ID for console widgets.skipAcls()This method is called in the case that ACLs should be skipped.Methods inherited from class com.illumon.iris.db.util.liveness.LivenessArtifact
manageWithCurrentScope, unmanage, unmanageMethods inherited from class com.illumon.iris.db.util.liveness.ReferenceCountedLivenessNode
destroy, dropReference, getWeakReference, initializeTransientFieldsForLiveness, onReferenceCountAtZero, tryManage, tryRetainReferenceMethods inherited from class com.illumon.util.referencecounting.ReferenceCounted
append, decrementReferenceCount, incrementReferenceCount, resetReferenceCount, toString, tryDecrementReferenceCount, tryIncrementReferenceCountMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.illumon.iris.db.util.liveness.LivenessManager
manageMethods inherited from interface com.illumon.iris.db.util.liveness.LivenessReferent
getReferentDescription, retainReferenceMethods inherited from interface com.illumon.iris.db.tables.utils.LiveWidget
getComponent, updateTelemetryInfo
-
Constructor Details
-
LivePivotWidget
public LivePivotWidget(Table tableToPivot, String[] rows, String columnTitleColumn, String valueColumn, LivePivotWidget.Aggregation aggregation, @NotNull PivotOptions options) This constructor is used to create the widget.- Parameters:
tableToPivot- the table to pivotrows- the key columns for the rowscolumnTitleColumn- the column used as a title for each columnvalueColumn- the column containing the value of interestaggregation- how to aggregate the dataoptions- a struct of booleans that control how the widget presents the data
-
LivePivotWidget
public LivePivotWidget(Table tableToPivot, String[] rows, String columnTitleColumn, String[] valueColumns, String[] filterColumns, String[] requiredFilterColumns, LivePivotWidget.Aggregation aggregation, @NotNull PivotOptions options, Function<Object, Object> colorFormat, Function<Object, Object> columnNameTransform) This constructor is used to create the widget.- Parameters:
tableToPivot- the table to pivotrows- the key columns for the rowscolumnTitleColumn- the column used as a title for each columnvalueColumns- the columns containing the values of interestaggregation- how to aggregate the dataoptions- a struct that control how the widget presents the datacolorFormat- an optional function for creating heatmap colorscolumnNameTransform- an optional function for transforming column names
-
LivePivotWidget
public LivePivotWidget(Table tableToPivot, String[] rows, String columnTitleColumn, String[] valueColumns, String[] filterColumns, String[] requiredFilterColumns, LivePivotWidget.Aggregation aggregation, @NotNull PivotOptions options, Function<Object, Object> colorFormat, Function<Object, Object> columnNameTransform, Comparable<?>[] userRowOrder, Comparable<?>[] userColumnOrder) This constructor is used to create the widget.- Parameters:
tableToPivot- the table to pivotrows- the key columns for the rowscolumnTitleColumn- the column used as a title for each columnvalueColumns- the columns containing the values of interestaggregation- how to aggregate the dataoptions- a struct that control how the widget presents the datacolorFormat- an optional function for creating heatmap colorscolumnNameTransform- an optional function for transforming column namesuserRowOrder- A custom order for row-columns
-
LivePivotWidget
public LivePivotWidget(Table tableToPivot, String[] rows, String columnTitleColumn, String[] valueColumns, String[] filterColumns, String[] requiredFilterColumns, LivePivotWidget.Aggregation aggregation, @NotNull PivotOptions options, Function<Object, Object> colorFormat, Map<String, Function<Object, Object>> colorFormats, Function<Object, Object> columnNameTransform) This constructor is used to create the widget.- Parameters:
tableToPivot- the table to pivotrows- the key columns for the rowscolumnTitleColumn- the column used as a title for each columnvalueColumns- the columns containing the values of interestaggregation- how to aggregate the dataoptions- a struct that control how the widget presents the datacolorFormat- an optional function for creating heatmap colorscolorFormats- an optional map of columns to functions for creating heatmap colorscolumnNameTransform- an optional function for transforming column names
-
LivePivotWidget
public LivePivotWidget(Table tableToPivot, String[] rows, String columnTitleColumn, String[] valueColumns, String[] filterColumns, String[] requiredFilterColumns, LivePivotWidget.Aggregation aggregation, @NotNull PivotOptions options, Function<Object, Object> colorFormat, Map<String, Function<Object, Object>> colorFormats, Function<Object, Object> columnNameTransform, Comparable<?>[] userRowColumnOrder, Comparable<?>[] userColumnOrder) This constructor is used to create the widget.- Parameters:
tableToPivot- the table to pivotrows- the key columns for the rowscolumnTitleColumn- the column used as a title for each columnvalueColumns- the columns containing the values of interestaggregation- how to aggregate the dataoptions- a struct that control how the widget presents the datacolorFormat- an optional function for creating heatmap colorscolorFormats- an optional map of columns to functions for creating heatmap colorscolumnNameTransform- an optional function for transforming column namesuserRowColumnOrder- a user specified row column ordering
-
-
Method Details
-
onClose
public void onClose()- Specified by:
onClosein interfaceCloseableWidget
-
getColorFormat
-
getColorFormats
-
getColumnNameTransform
-
applyAcls
public LivePivotWidget applyAcls(UserContext userContext, RemoteQueryProcessor remoteQueryProcessor, String name) Description copied from interface:LiveWidgetAclFilterableThis method should apply ACLs to all tables in the widget. For each table in the widget, this method should call:
t = RemoteDatabase.applyAcls(t, userContext, remoteQueryProcessor, name);- Specified by:
applyAclsin interfaceLiveWidgetAclFilterable<LivePivotWidget>- Parameters:
userContext- the user contextremoteQueryProcessor- the remote queryname- the name of the widget
-
skipAcls
Description copied from interface:LiveWidgetAclFilterableThis method is called in the case that ACLs should be skipped.- Specified by:
skipAclsin interfaceLiveWidgetAclFilterable<LivePivotWidget>
-
setName
Description copied from interface:ContextAwareLiveWidgetSets the name of the Live Widget.- Specified by:
setNamein interfaceContextAwareLiveWidget<LivePivotWidget>- Parameters:
name- the name of the Live Widget
-
getName
Description copied from interface:ContextAwareLiveWidgetGets the name of the Live Widget.- Specified by:
getNamein interfaceContextAwareLiveWidget<LivePivotWidget>- Returns:
- the name of the Live Widget
-
setProcessorConnection
Description copied from interface:ContextAwareLiveWidgetSets the processor connection.- Specified by:
setProcessorConnectionin interfaceContextAwareLiveWidget<LivePivotWidget>- Parameters:
processorConnection- the processor connection
-
getProcessorConnection
Description copied from interface:ContextAwareLiveWidgetgets the processor connection.- Specified by:
getProcessorConnectionin interfaceContextAwareLiveWidget<LivePivotWidget>- Returns:
- the processor connection
-
setSessionId
public void setSessionId(int sessionId) Description copied from interface:ContextAwareLiveWidgetSets the session ID for console widgets.- Specified by:
setSessionIdin interfaceContextAwareLiveWidget<LivePivotWidget>- Parameters:
sessionId- the session ID
-
getSessionId
public int getSessionId()Description copied from interface:ContextAwareLiveWidgetGets the session ID for console widgets.- Specified by:
getSessionIdin interfaceContextAwareLiveWidget<LivePivotWidget>- Returns:
- the session ID
-
deflate
Description copied from interface:DeflatableConvert this object into an Inflatable suitable for serialization.- Specified by:
deflatein interfaceDeflatable<LivePivotWidget>- Parameters:
client- the ExportedObjectClient we are deflating for.- Returns:
- an Inflatable for serializing to the client
-
getWidget
public static LiveWidget<LivePivotWidget> getWidget(Table tableToPivot, String[] rows, String columnTitleColumn, String unitColumn, LivePivotWidget.Aggregation aggregation, PivotOptions options) -
getComponent
public JComponent getComponent(AsyncPanel dataPanel, String viewId, Object view, String title, Object irisWidgetSupportObject, com.fishlib.io.logger.Logger log) Description copied from interface:LiveWidgetGets the UI component.- Specified by:
getComponentin interfaceLiveWidget<LivePivotWidget>- Parameters:
dataPanel- data panelviewId- view idview- viewtitle- titleirisWidgetSupportObject- widget support objectlog- log- Returns:
- UI component
-