com.sapportals.wcm.service.reporting

Interface IResultReceiver


public interface IResultReceiver

Collects report result items.

A IResultReceiver collects items (results and errors) found by a running report. The result receiver becomes invalid once either abort() or finish() is called. Both methods produce a IReportResult which represents the complete result of the running report.

Copyright (c) SAP AG 2003-2004


Method Summary
 IReportResult abort(String description, List propertyNames)
          Abort reporting results and retrieve IReportResult object representing all collected, incomplete results and errors.
 IReportResult abort(String description, List propertyNames, List summaryProps)
          Abort reporting results and retrieve IReportResult object representing all collected, incomplete results and errors.
 void addError(com.sapportals.wcm.util.uri.RID rid, String description, Throwable ex)
          Add an error to the collected report results.
 void addItem(IResultItem item)
          Adds an item to the collected report results.
 void checkInterrupt()
          This method will throw InterruptedException when the report was terminated by the user.
 IReportResult finish(String description, List propertyNames)
          Finish reporting results and retrieve IReportResult object representing all collected results and errors.
 IReportResult finish(String description, List propertyNames, List summaryProps)
          Finish reporting results and retrieve IReportResult object representing all collected results and errors.
 int getResultSize()
          Retrieve the number of result items, including errors, added so far.
 void investigating(com.sapportals.wcm.util.uri.RID currentScope)
          Inform the receiver which part of the resource namespace is currently investigated.
 void setShowResultItemDescriptions(boolean visible)
          Set the visibility of result item descriptions for future display to a user.
 void setShowResultItemRIDs(boolean visible)
          Set the visibility of result item RIDs for future display to a user.
 

Method Detail

getResultSize

int getResultSize()
Retrieve the number of result items, including errors, added so far.

Returns:
number of currently received result items

addItem

void addItem(IResultItem item)
             throws ResourceException,
                    InterruptedException
Adds an item to the collected report results. Exceptions should not be caught, but lead to termination of report execution.

Parameters:
item - to add to result
Throws:
InterruptedException - when report was terminated from outside (e.g. administrator)
ResourceException - when encountering errors persisting results

addError

void addError(com.sapportals.wcm.util.uri.RID rid,
              String description,
              Throwable ex)
              throws ResourceException,
                     InterruptedException
Add an error to the collected report results. Exceptions should not be caught, but lead to termination of report execution.

Parameters:
rid - where error was encountered
description - of error
ex - exception encountered or null
Throws:
InterruptedException - when report was terminated from outside (e.g. administrator)
ResourceException - when encountering errors persisting results

abort

IReportResult abort(String description,
                    List propertyNames)
                    throws ResourceException,
                           InterruptedException
Abort reporting results and retrieve IReportResult object representing all collected, incomplete results and errors. Exceptions should not be caught, but lead to termination of report execution.

Parameters:
description - of report outcome
propertyNames - list of IPropertyNames valid in result items
Returns:
report result
Throws:
InterruptedException - when report was terminated from outside (e.g. administrator)
ResourceException - when encountering errors persisting results

abort

IReportResult abort(String description,
                    List propertyNames,
                    List summaryProps)
                    throws ResourceException,
                           InterruptedException
Abort reporting results and retrieve IReportResult object representing all collected, incomplete results and errors. Supply a list of properties giving a summary of the report execution. Exceptions should not be caught, but lead to termination of report execution.

Parameters:
description - of report outcome
propertyNames - list of IPropertyNames valid in result items
summaryProps - list of IPropertys which give a summary of the report execution
Returns:
report result
Throws:
InterruptedException - when report was terminated from outside (e.g. administrator)
ResourceException - when encountering errors persisting results

finish

IReportResult finish(String description,
                     List propertyNames)
                     throws ResourceException,
                            InterruptedException
Finish reporting results and retrieve IReportResult object representing all collected results and errors. Exceptions should not be caught, but lead to termination of report execution.

Parameters:
description - of report outcome
propertyNames - list of IPropertyNames valid in result items
Returns:
report result
Throws:
InterruptedException - when report was terminated from outside (e.g. administrator)
ResourceException - when encountering errors persisting results

finish

IReportResult finish(String description,
                     List propertyNames,
                     List summaryProps)
                     throws ResourceException,
                            InterruptedException
Finish reporting results and retrieve IReportResult object representing all collected results and errors. Supply a list of properties giving a summary of the report execution. Exceptions should not be caught, but lead to termination of report execution.

Parameters:
description - of report outcome
propertyNames - list of IPropertyNames valid in result items
summaryProps - list of IPropertys which give a summary of the report execution
Returns:
report result
Throws:
InterruptedException - when report was terminated from outside (e.g. administrator)
ResourceException - when encountering errors persisting results

investigating

void investigating(com.sapportals.wcm.util.uri.RID currentScope)
                   throws InterruptedException
Inform the receiver which part of the resource namespace is currently investigated. Should be called regularly for better user experience. As side effect, this method will throw InterruptedException when the report was terminated by the user. This exception should not be caught, but lead to termination of report execution.

Throws:
InterruptedException - when report run should be aborted.

checkInterrupt

void checkInterrupt()
                    throws InterruptedException
This method will throw InterruptedException when the report was terminated by the user. This exception should not be caught, but lead to termination of report execution.

Throws:
InterruptedException - when report run should be aborted.

setShowResultItemRIDs

void setShowResultItemRIDs(boolean visible)
Set the visibility of result item RIDs for future display to a user.

Parameters:
visible - to render the RIDs visibly

setShowResultItemDescriptions

void setShowResultItemDescriptions(boolean visible)
Set the visibility of result item descriptions for future display to a user.

Parameters:
visible - to render the descriptions visibly
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2011 SAP AG Complete Copyright Notice