Class ProgressManagerService
- java.lang.Object
-
- fr.paris.lutece.portal.service.progressmanager.ProgressManagerService
-
public final class ProgressManagerService extends Object
- Author:
- sleridon
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddReport(String strFeedToken, String strReportLine)add report lineintgetFailureNb(String strFeedToken)get the failure nbstatic ProgressManagerServicegetInstance()Returns the unique instance of the serviceMap<String,ProgressFeed>getProgressFeeds()ge progress feedsintgetProgressStatus(String strFeedToken)get the progress status in pourcentList<String>getReport(String strFeedToken)get the report listList<String>getReport(String strFeedToken, int iFromLine)get the report listintgetSuccessNb(String strFeedToken)get the success nbvoidincrementFailure(String strFeedToken, int nFailureItems)increment nb of success itemsvoidincrementSuccess(String strFeedToken, int nSuccessItems)increment nb of success itemsbooleaninitFeed(String strFeedToken, int nTotalItems)update feed total item numberbooleanisRegistred(String strFeedToken)register new progress feedStringregisterFeed(String strProgressFeedName, int nTotalItems)register new progress feed returns a generated token to identify the feed for rest webservicevoidunRegisterFeed(String strFeedToken)unregister progress feed
-
-
-
Method Detail
-
getInstance
public static ProgressManagerService getInstance()
Returns the unique instance of the service- Returns:
- The instance of the service
-
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
-
-