Class ReportData

java.lang.Object
com.appiancorp.suiteapi.process.analytics2.ReportData
All Implemented Interfaces:
JSONable, JSONCacheable, Serializable

public class ReportData extends Object implements JSONCacheable, Serializable
Bean defining the type of data contained in an analytics report. Does not contain the actual data. By default, sortOrder is set to Constants.SORT_ORDER_ASCENDING, batchSize is set to DEFAULT_BATCH_SIZE, sortColumnLocalId and startIndex are set to 0, and the report is not recursive.
See Also:
  • Field Details

    • REPORT_TYPE_PM

      public static final int REPORT_TYPE_PM
      Report on Process Models.
      See Also:
    • REPORT_TYPE_PROCESS

      public static final int REPORT_TYPE_PROCESS
      Report on Processes.
      See Also:
    • REPORT_TYPE_TASK

      public static final int REPORT_TYPE_TASK
      Report on Tasks.
      See Also:
    • REPORT_TYPE_PMVERSION

      public static final int REPORT_TYPE_PMVERSION
      Report on Process Model Versions.
      See Also:
    • REPORT_TYPE_EVENTS

      @Deprecated public static final int REPORT_TYPE_EVENTS
      Deprecated.
      this has not been considered a valid report type and will be removed
      Report on Events.
      See Also:
    • REPORT_TYPE_ARCHIVED_PROCESS

      @Deprecated public static final int REPORT_TYPE_ARCHIVED_PROCESS
      Deprecated.
      this has not been considered a valid report type and will be removed
      Report on Archived Processes.
      See Also:
    • CONTEXT_TYPE_SYSTEM

      public static final int CONTEXT_TYPE_SYSTEM
      Report has no context.
      See Also:
    • CONTEXT_TYPE_PROCESS_MODEL

      public static final int CONTEXT_TYPE_PROCESS_MODEL
      Report only contains data for process models specified in the context.
      See Also:
    • CONTEXT_TYPE_PROCESS_MODEL_VERSION

      public static final int CONTEXT_TYPE_PROCESS_MODEL_VERSION
      Report only contains data for process model versions specified in the context.
      See Also:
    • CONTEXT_TYPE_NODE

      public static final int CONTEXT_TYPE_NODE
      Report only contains data for nodes specified in the context.
      See Also:
    • CONTEXT_TYPE_PROCESS

      public static final int CONTEXT_TYPE_PROCESS
      Report only contains data for processes specified in the context.
      See Also:
    • CONTEXT_TYPE_CREATED_BY

      public static final int CONTEXT_TYPE_CREATED_BY
      Report only contains data for process models created by the users specified in the context.
      See Also:
    • CONTEXT_TYPE_LAST_MOD_BY

      public static final int CONTEXT_TYPE_LAST_MOD_BY
      Report only contains data for process models last modified by the users specified in the context.
      See Also:
    • CONTEXT_TYPE_INITIATED_BY

      public static final int CONTEXT_TYPE_INITIATED_BY
      Report only contains data for processes initiated by the users specified in the context.
      See Also:
    • CONTEXT_TYPE_ATTRIBUTED_TO_USER

      public static final int CONTEXT_TYPE_ATTRIBUTED_TO_USER
      Report only contains data for tasks attributed to the users specified in the context.
      See Also:
    • CONTEXT_TYPE_ASSIGNED_GROUP

      public static final int CONTEXT_TYPE_ASSIGNED_GROUP
      Report only contains data for tasks assigned to the groups specified in the context.
      See Also:
    • CONTEXT_TYPE_TASK_OWNER

      public static final int CONTEXT_TYPE_TASK_OWNER
      Report only contains data for tasks owned by the users specified in the context.
      See Also:
    • CONTEXT_TYPE_GROUP_MEMBERS

      public static final int CONTEXT_TYPE_GROUP_MEMBERS
      Report only contains data for tasks attributed to the groups specified in the context.
      See Also:
    • DEFAULT_BATCH_SIZE

      public static final int DEFAULT_BATCH_SIZE
      Default number of results to return per page in the report.
      See Also:
  • Constructor Details

    • ReportData

      public ReportData()
  • Method Details

    • getArfDocumentId

      public Long getArfDocumentId()
    • setArfDocumentId

      public void setArfDocumentId(Long arfDocumentId_)
    • getReportName

      public String getReportName()
    • setReportName

      public void setReportName(String reportName_)
    • isValidContext

      public static boolean isValidContext(int reportType_, int contextType_)
      Verifies whether a context type is valid for the report type.
      Parameters:
      reportType_ - one of the constants REPORT_TYPE_XXX
      contextType_ - one of the constants CONTEXT_TYPE_XXX
      Returns:
      true if the context type is valid for the report type;
    • getBaseFilters

      public Filter[] getBaseFilters()
      Get the list of base filters for this report. Base filters are the default filters for the report.
      Returns:
      the array of base filters
      See Also:
    • setBaseFilters

      public void setBaseFilters(Filter[] baseFilters_)
      Set the list of base filters for this report. Base filters are the default filters for the report.
      Parameters:
      baseFilters_ - an array of base filters
      See Also:
    • filter

      public int filter(Filter filter)
      Add a filter to the list of base filters for this report.
      Parameters:
      filter -
      Returns:
      filter count before adding filter
    • filter

      public int filter(QuickFilter filter)
      Add a filter to the list of quick filters for this report.
      Parameters:
      filter -
      Returns:
      filter count before adding filter
    • getColumns

      public Column[] getColumns()
      Get the columns for this report.
      Returns:
      the columns
      See Also:
    • setColumns

      public void setColumns(Column[] columns_)
      Set the columns for this report. Note: The provided array reference is not preserved.
      Parameters:
      columns_ - the columns
      See Also:
    • getContext

      public LocalObject[] getContext()
      Get the context for this report.
      Returns:
      the context
      See Also:
    • setContext

      public void setContext(LocalObject[] context_)
      Set the context for this report.
      Parameters:
      context_ - the context
      See Also:
    • getQuickFilters

      public QuickFilter[] getQuickFilters()
      Get the list of quick filters for this report.
      Returns:
      the array or quick filters
      See Also:
    • setQuickFilters

      public void setQuickFilters(QuickFilter[] quickFilters_)
      Set the list of quick filters for this report.
      Parameters:
      quickFilters_ - the array of quick filters
      See Also:
    • getSortColumnLocalId

      public Integer getSortColumnLocalId()
      Get the localId of the column to sort by for this report.
      Returns:
      the localId of the column to sort by
      See Also:
    • setSortColumnLocalId

      public void setSortColumnLocalId(Integer sortColumnLocalId_)
      Set the localId of the column to sort by for this report.
      Parameters:
      sortColumnLocalId_ - the localId of the column to sort by
      See Also:
    • getSortOrder

      public Integer getSortOrder()
      Get whether to sort in ascending or descending order, defined by com.appiancorp.suiteapi.common.Constants.SORT_ORDER_XXX.
      Returns:
      the sort order
      See Also:
    • setSortOrder

      public void setSortOrder(Integer sortOrder_)
      Set whether to sort in ascending or descending order, defined by com.appiancorp.suiteapi.common.Constants.SORT_ORDER_XXX.
      Parameters:
      sortOrder_ - the sort order
      See Also:
    • getType

      public int getType()
      Get the report type, defined by REPORT_TYPE_XXX.
      Returns:
      the report type
      See Also:
    • setType

      public void setType(int type_)
      Set the report type, defined by REPORT_TYPE_XXX.
      Parameters:
      type_ - the report type
      See Also:
    • getContextType

      public int getContextType()
      Get the context type, defined by CONTEXT_TYPE_XXX.
      Returns:
      the context type
      See Also:
    • setContextType

      public void setContextType(int contextType_)
      Set the context type, defined by CONTEXT_TYPE_XXX.
      Parameters:
      contextType_ - the context type
      See Also:
    • getColumnByLocalId

      public Column getColumnByLocalId(Integer id)
      Get a column in this report by id.
      Parameters:
      id - the localId of the column
      Returns:
      the column
    • getColumnByStringId

      public Column getColumnByStringId(String id)
      Get a column in this report by stringId.
      Parameters:
      id - the localId of the column
      Returns:
      the column
    • getBatchSize

      public int getBatchSize()
      Get the batch size.
      Returns:
      the batch size
      See Also:
    • setBatchSize

      public void setBatchSize(int batchSize_)
      Set the batch size.
      Parameters:
      batchSize_ - the batch size
      See Also:
    • getStartIndex

      public int getStartIndex()
      Get the start index.
      Returns:
      the start index
      See Also:
    • setStartIndex

      public void setStartIndex(int startIndex_)
      Set the start index.
      Parameters:
      startIndex_ - the start index
      See Also:
    • getMetricColumns

      public Column[] getMetricColumns(Map columnTypes_)
      Gets the columns which can be used as metrics. This is any displayed column with type TypedVariable.LONG, TypedVariable.DOUBLE, or TypedVariable.DURATION
      Parameters:
      columnTypes_ - a map of column ids to column types
      Returns:
      an array of columns
    • getDateTimeColumns

      public Column[] getDateTimeColumns(Map columnTypes_)
    • getShownColumns

      public Column[] getShownColumns()
      Gets the columns that would be shown in a report (ie. those for which getShow() returns true).
      Returns:
      the columns that would be shown in a report
    • getHiddenAttributes

      public HashSet getHiddenAttributes()
      Unused but reserved.
      Specified by:
      getHiddenAttributes in interface JSONable
      Returns:
      the set of hidden attributes
    • getRecursive

      public boolean getRecursive()
      Get whether or not to return data from recursive processes. Only relevant when the context is a process.
      Returns:
      true if recursive data is returned
      See Also:
    • setRecursive

      public void setRecursive(boolean recursive_)
      Set whether or not to return data from recursive processes. Only relevant when the context is a process.
      Parameters:
      recursive_ - set to true to return recursive data
      See Also:
    • getNextAvailableColumnLocalId

      public Integer getNextAvailableColumnLocalId()
      Returns the next available column id.
      Returns:
      the next column id
    • hasGrouping

      public boolean hasGrouping()
      Indicates whether or not this ReportData contains any column marked as group by
      Returns:
      true if any column is marked as group by.
    • toString

      public String toString()
      Overrides:
      toString in class Object