Package org.wso2.carbon.registry.admin.api.reporting

## Interface IReportingAdminService<ReportConfigurationBean>

- Type Parameters:
    `ReportConfigurationBean` - This bean contains details of a single report's configuration.

      public interface IReportingAdminService<ReportConfigurationBean>

  Provides functionality to produce (on-demand and schedule) reports for resources stored on this repository and other repositories (using URLs).

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `copySavedReport​(String name, String newName)` | Method to copy saved report
    `void` | `deleteSavedReport​(String name)` | Method to delete saved report
    `String[]` | `getAttributeNames​(String className)` | Method to retrieve the list of properties that can be passed to the report generator class
    `String[]` | `getMandatoryAttributeNames​(String className)` | Method to retrieve the list of mandatory properties that can be passed to the report generator class
    `byte[]` | `getReportBytes​(ReportConfigurationBean configuration)` | Method to obtain a stream of bytes of the generated report.
    `ReportConfigurationBean` | `getSavedReport​(String name)` | Method to retrieve a saved report
    `ReportConfigurationBean[]` | `getSavedReports()` | Method to retrieve saved report
    `void` | `saveReport​(ReportConfigurationBean configuration)` | Method to save a report
    `void` | `scheduleReport​(ReportConfigurationBean configuration)` | Method to schedule the generation of a report
    `void` | `stopScheduledReport​(String name)` | Method to stop the generation of a scheduled report

- - ### Method Detail

    - #### getReportBytes

          byte[] getReportBytes​(ReportConfigurationBean configuration)
                         throws Exception

      Method to obtain a stream of bytes of the generated report. This is returned to the client as a DataHandler.
      Parameters:
        `configuration` - the report configuration
      Returns:
        byte array of the generated report
      Throws:
        `Exception` - if the operation failed

    - #### scheduleReport

          void scheduleReport​(ReportConfigurationBean configuration)
                       throws Exception

      Method to schedule the generation of a report
      Parameters:
        `configuration` - the report configuration
      Throws:
        `Exception` - if the operation failed

    - #### stopScheduledReport

          void stopScheduledReport​(String name)
                            throws Exception

      Method to stop the generation of a scheduled report
      Parameters:
        `name` - the name of the report
      Throws:
        `Exception` - if the operation failed

    - #### saveReport

          void saveReport​(ReportConfigurationBean configuration)
                   throws org.wso2.carbon.registry.core.exceptions.RegistryException,
                          org.wso2.carbon.core.util.CryptoException

      Method to save a report
      Parameters:
        `configuration` - the report's configuration
      Throws:
        `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the failure was from the registry
        `org.wso2.carbon.core.util.CryptoException` - if the failure was when performing data encryption

    - #### getSavedReports

          ReportConfigurationBean[] getSavedReports()
                                             throws org.wso2.carbon.registry.core.exceptions.RegistryException,
                                                    org.wso2.carbon.core.util.CryptoException,
                                                    org.wso2.carbon.ntask.common.TaskException

      Method to retrieve saved report
      Throws:
        `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the failure was from the registry
        `org.wso2.carbon.core.util.CryptoException` - if the failure was when performing data encryption
        `org.wso2.carbon.ntask.common.TaskException` - if the failure was when retrieving details of the scheduled tasks.

    - #### getSavedReport

          ReportConfigurationBean getSavedReport​(String name)
                                          throws org.wso2.carbon.registry.core.exceptions.RegistryException,
                                                 org.wso2.carbon.core.util.CryptoException,
                                                 org.wso2.carbon.ntask.common.TaskException

      Method to retrieve a saved report
      Parameters:
        `name` - the name of the report
      Throws:
        `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the failure was from the registry
        `org.wso2.carbon.core.util.CryptoException` - if the failure was when performing data encryption
        `org.wso2.carbon.ntask.common.TaskException` - if the failure was when retrieving details of the scheduled tasks.

    - #### deleteSavedReport

          void deleteSavedReport​(String name)
                          throws org.wso2.carbon.registry.core.exceptions.RegistryException

      Method to delete saved report
      Parameters:
        `name` - the name of the report
      Throws:
        `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the failure was from the registry

    - #### copySavedReport

          void copySavedReport​(String name,
                               String newName)
                        throws org.wso2.carbon.registry.core.exceptions.RegistryException

      Method to copy saved report
      Parameters:
        `name` - the name of the report
        `newName` - the new name for the copy
      Throws:
        `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the failure was from the registry

    - #### getAttributeNames

          String[] getAttributeNames​(String className)
                              throws Exception

      Method to retrieve the list of properties that can be passed to the report generator class
      Parameters:
        `className` - the fully qualified name of the
      Returns:
        a list of property names
      Throws:
        `Exception` - if the operation failed

    - #### getMandatoryAttributeNames

          String[] getMandatoryAttributeNames​(String className)
                                       throws Exception

      Method to retrieve the list of mandatory properties that can be passed to the report generator class
      Parameters:
        `className` - the fully qualified name of the
      Returns:
        the subset of property names that are mandatory
      Throws:
        `Exception` - if the operation failed