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(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(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

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

Returns:
number of currently received result items

addItem

public 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

public void addError(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

public 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

public 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

public 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

public 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

public void investigating(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

public 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

public 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

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

Parameters:
visible - to render the descriptions visibly


Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.