com.sapportals.wcm.service.reporting

Interface IReport


public interface IReport

Produces IReportResults on execution.

A IReport has a name, a set of possible input parameters and a set of IReportCommands which can be triggered on execution in order to find and manipulate resources.

Parameters and commands are gathered in a IReportInput instance which can be verified by the report and executed to produce a result.

Reports are instantiated by using the default constructor of an implementing class. Instantiation can happen at any time. There is no limit on the number of concurrent instances of a certain class, nor on the lifetime of such objects.

Copyright (c) SAP AG 2003-2004


Method Summary
 IReportResult execute(IReportInput input, IResourceContext context, IResultReceiver receiver)
          Execute a IReportInput immediately in the given context.
 IReportResult execute(IRIDIterator iter, IReportInput input, IResourceContext context, IResultReceiver receiver)
          Execute a IReport on a number of resources.
 List getApplicableCommands(IReportResult result)
          Retrieves the list of IReportCommands which are applicable to the given report result.
 IReportCommand getCommand(IName name)
          Return a specific report command by name which belongs to this report.
 List getCommands()
          Return the list of all commands belonging to this report.
 String getDescription(IName name, Locale locale)
          Get description of report with given locale for given parameter.
 String getDescription(Locale locale)
          Get description of report with given locale.
 String getDisplayName(IName name, Locale locale)
          Get name for display in user interface with given locale for given parameter.
 String getDisplayName(Locale locale)
          Get name for display in user interface with given locale.
 IReportInputMeta getMeta()
          Get meta information about input to this report.
 IName getName()
          Get name of report
 IScopeController getScopeController(IResourceContext context)
          Returns the controller of scope information for this report, if available.
 IReportInputError verify(IReportInput input, IResourceContext context)
          Verify that input is valid for this report.
 

Method Detail

getName

public IName getName()
Get name of report

Returns:
name of report

getDisplayName

public String getDisplayName(Locale locale)
Get name for display in user interface with given locale. The name is not guaranteed to be unique.

Parameters:
locale - to get name for
Returns:
name for locale

getDescription

public String getDescription(Locale locale)
Get description of report with given locale.

Parameters:
locale - to get description for
Returns:
description for locale

getDisplayName

public String getDisplayName(IName name,
                             Locale locale)
                      throws MissingResourceException
Get name for display in user interface with given locale for given parameter. The name is not guaranteed to be unique. The report is handling property names for its meta data, the meta data of its report commands, and the generated report results.

Parameters:
name - of property
locale - to get name for
Returns:
name for locale
Throws:
MissingResourceException

getDescription

public String getDescription(IName name,
                             Locale locale)
                      throws MissingResourceException
Get description of report with given locale for given parameter. The report is handling property names for its meta data, the meta data of its report commands, and the generated report results.

Parameters:
name - to get description for
locale - to get description for
Returns:
description for locale
Throws:
MissingResourceException

getCommand

public IReportCommand getCommand(IName name)
                          throws ResourceException
Return a specific report command by name which belongs to this report.

Parameters:
name - of command
Returns:
IReportCommand with that name or null if not found.
Throws:
ResourceException

getCommands

public List getCommands()
                 throws ResourceException
Return the list of all commands belonging to this report. The list is immutable.

Returns:
list of IReportCommands
Throws:
ResourceException

getMeta

public IReportInputMeta getMeta()
                         throws ResourceException
Get meta information about input to this report.

Returns:
meta information about input to this report
Throws:
ResourceException

verify

public IReportInputError verify(IReportInput input,
                                IResourceContext context)
                         throws ResourceException
Verify that input is valid for this report. The verification takes the context the report shall be executed in into account. There might be checks on access permissions or administrator rights necessary for the check.

Parameters:
input - to verify
context - the execution shall happen and the input needs to be valid in.
Returns:
null on success and detailed error description otherwise.
Throws:
ResourceException

execute

public IReportResult execute(IReportInput input,
                             IResourceContext context,
                             IResultReceiver receiver)
                      throws ResourceException,
                             InterruptedException
Execute a IReportInput immediately in the given context. The report will add all found result items to the receiver and use the receiver to generate the IReportResult return value.

Parameters:
input - parameters for execution
context - to work in
receiver - for managing intermediate results
Returns:
result of report
Throws:
InterruptedException - when report was terminated by outside agent
ResourceException

getApplicableCommands

public List getApplicableCommands(IReportResult result)
                           throws ResourceException
Retrieves the list of IReportCommands which are applicable to the given report result. The list maybe empty to indicate that no command may be executed on the given result.

Parameters:
result - to get applicable commands for
Returns:
list of applicable IReportCommands
Throws:
ResourceException - on internal failures

execute

public IReportResult execute(IRIDIterator iter,
                             IReportInput input,
                             IResourceContext context,
                             IResultReceiver receiver)
                      throws ResourceException,
                             InterruptedException
Execute a IReport on a number of resources. For each RID from the iterator, apply the report as if the RID was found during scope search.

Parameters:
iter - iterator over RIDs where command shall be applied
input - to apply on resources
context - to work im
receiver - for managing intermediate results
Returns:
result of report
Throws:
InterruptedException - when report was terminated by outside agent
ResourceException

getScopeController

public IScopeController getScopeController(IResourceContext context)
Returns the controller of scope information for this report, if available. If the report has no special handling/requirements on its input scope, the returned IScopeController may be null.

A report without scope controller must be prepared to accept all possible resource identifiers as input to report execution. If the report only operates on specific resources, it should provice a scope controller to narrow down the user selection to that set of resources.

Parameters:
context - of user for scope information
Returns:
IScopeController or null


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.