Class AbstractStatisticAgent

    • Constructor Detail

      • AbstractStatisticAgent

        public AbstractStatisticAgent()
    • Method Detail

      • getWorkspace

        public Workspace getWorkspace()
      • setWorkspace

        public void setWorkspace​(Workspace workspace)
      • getReportDay

        public java.util.Date getReportDay()
      • setReportDay

        public void setReportDay​(java.util.Date reportDay)
      • getDisplayJSP

        public java.lang.String getDisplayJSP()
      • setDisplayJSP

        public void setDisplayJSP​(java.lang.String displayJSP)
      • getOrder

        @Deprecated
        public int getOrder()
        Deprecated.
      • setOrder

        @Deprecated
        public void setOrder​(int order)
        Deprecated.
      • isPluginAgent

        public boolean isPluginAgent()
      • setPluginAgent

        public void setPluginAgent​(boolean isPluginAgent)
      • getName

        public java.lang.String getName​(java.lang.String userLang)
        Get Agent name
        Parameters:
        userLang - the language to compute agent name
        Returns:
        the agent name
      • getMetricObjectSet

        public static java.util.Set<AbstractReportMetric> getMetricObjectSet​(Workspace workspace,
                                                                             java.util.Date startDate,
                                                                             java.util.Date endDate,
                                                                             java.lang.String urid,
                                                                             java.lang.Class<? extends AbstractReportMetric> clazz)
      • getWorkspacesMetricObjectSet

        public static java.util.Set<AbstractReportMetric> getWorkspacesMetricObjectSet​(java.util.Date startDate,
                                                                                       java.util.Date endDate,
                                                                                       java.lang.String urid,
                                                                                       java.lang.Class<? extends AbstractReportMetric> clazz)
      • getLatestAnalyzeDate

        public java.util.Date getLatestAnalyzeDate()
      • isReportDisplayed

        public boolean isReportDisplayed​(Workspace displayedWS,
                                         java.util.Date beginDate,
                                         java.util.Date endDate)
        Indicates if this agent have a display available for the provided parameters
        Parameters:
        displayedWS - the Workspace (can be null for all workspaces)
        beginDate - the begin date of te displayed interval
        endDate - the end date of te displayed interval
        Returns:
        true if the agent will be displayed, false otherwise
      • process

        public void process​(EventData data,
                            StatisticContext context)
        process the current data Default implementation check : - if data is not null - if urid is not null in analyze configuration, canUse check if the evenData urid is the same - if workspaceId is not null in analyze configuration, canUse check if the evenData workspaceId is the same - if startDate or endDate in eventData is null it return false - if the startDate is in the same day than the agent report day
        Parameters:
        context - the StatisticContext
        data - the EventData
      • clone

        public abstract AbstractStatisticAgent clone()
                                              throws java.lang.CloneNotSupportedException
        Overrides:
        clone in class java.lang.Object
        Throws:
        java.lang.CloneNotSupportedException
      • startAnalyze

        public abstract void startAnalyze​(StatisticContext context)
      • getReportMetricClass

        public abstract java.lang.Class<? extends AbstractReportMetric> getReportMetricClass()
      • addElement

        protected void addElement​(java.lang.String elt,
                                  java.util.Map<java.lang.String,​java.lang.Integer> eltMap)