Class ProgressManagerService

java.lang.Object
fr.paris.lutece.portal.service.progressmanager.ProgressManagerService

@ApplicationScoped public class ProgressManagerService extends Object
Author:
sleridon
  • Method Details

    • getInstance

      @Deprecated(since="8.0", forRemoval=true) public static ProgressManagerService getInstance()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use @Inject to obtain the ProgressManagerService instance. This method will be removed in future versions.
      Returns the unique instance of the ProgressManagerService service.

      This method is deprecated and is provided for backward compatibility only. For new code, use dependency injection with @Inject to obtain the ProgressManagerService instance instead.

      Returns:
      The unique instance of ProgressManagerService.
    • getProgressFeeds

      public Map<String,ProgressFeed> getProgressFeeds()
      ge progress feeds
      Returns:
      the progress feeds
    • registerFeed

      public String registerFeed(String strProgressFeedName, int nTotalItems)
      register new progress feed returns a generated token to identify the feed for rest webservice
      Parameters:
      strProgressFeedName -
      nTotalItems -
      Returns:
      the generated token
    • unRegisterFeed

      public void unRegisterFeed(String strFeedToken)
      unregister progress feed
      Parameters:
      strFeedToken -
    • isRegistred

      public boolean isRegistred(String strFeedToken)
      register new progress feed
      Parameters:
      strFeedToken -
      Returns:
    • incrementSuccess

      public void incrementSuccess(String strFeedToken, int nSuccessItems)
      increment nb of success items
      Parameters:
      strFeedToken -
      nSuccessItems -
    • incrementFailure

      public void incrementFailure(String strFeedToken, int nFailureItems)
      increment nb of success items
      Parameters:
      strFeedToken -
      nFailureItems -
    • addReport

      public void addReport(String strFeedToken, String strReportLine)
      add report line
      Parameters:
      strFeedToken -
      strReportLine -
    • getProgressStatus

      public int getProgressStatus(String strFeedToken)
      get the progress status in pourcent
      Parameters:
      strFeedToken -
      Returns:
    • getSuccessNb

      public int getSuccessNb(String strFeedToken)
      get the success nb
      Parameters:
      strFeedToken -
      Returns:
      the success nb
    • getFailureNb

      public int getFailureNb(String strFeedToken)
      get the failure nb
      Parameters:
      strFeedToken -
      Returns:
      the failure nb
    • getReport

      public List<String> getReport(String strFeedToken)
      get the report list
      Parameters:
      strFeedToken -
      Returns:
      the failure nb
    • getReport

      public List<String> getReport(String strFeedToken, int iFromLine)
      get the report list
      Parameters:
      strFeedToken -
      iFromLine -
      Returns:
      the failure nb
    • initFeed

      public boolean initFeed(String strFeedToken, int nTotalItems)
      update feed total item number
      Parameters:
      strFeedToken -
      nTotalItems -
      Returns:
      true if the feed exists