Interface R2WCatalog

    • Method Detail

      • getURL

        String getURL()
        Get the value for URL. (The URL of the R2W Server) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • isUseCredential

        boolean isUseCredential()
        Get the value for UseCredential. (Use credentials for authentication)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getUsername

        String getUsername()
        Get the value for Username. (The username for the connection)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getPassword

        String getPassword()
        Get the value for Password. (The password for the connection)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getCatalogName

        String getCatalogName()
        Get the value for CatalogName. (The optional catalog name, if this is defined it is used when connecting to R2W as the catalog to connect to)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setURL

        void setURL​(String newURL)
        Set the value for URL. (The URL of the R2W Server) This value is mandatory.
        Parameters:
        newURL - the new value for URL. If this is null, then the object cannot be persisted.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setUseCredential

        void setUseCredential​(boolean newUseCredential)
        Set the value for UseCredential. (Use credentials for authentication)
        Parameters:
        newUseCredential - the new value for UseCredential.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setUsername

        void setUsername​(String newUsername)
        Set the value for Username. (The username for the connection) This value is optional.
        Parameters:
        newUsername - the new value for Username.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setPassword

        void setPassword​(String newPassword)
        Set the value for Password. (The password for the connection) This value is optional.
        Parameters:
        newPassword - the new value for Password.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setCatalogName

        void setCatalogName​(String newCatalogName)
        Set the value for CatalogName. (The optional catalog name, if this is defined it is used when connecting to R2W as the catalog to connect to) This value is optional.
        Parameters:
        newCatalogName - the new value for CatalogName.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • publish

        boolean publish​(UserJobContext context,
                        String reportName,
                        String jobFileExpression,
                        String metaData)
        Publish a File, or a list of files to Report2Web
        Parameters:
        context - The job context to perform the publish
        reportName - The name of the Report to publish to
        jobFileExpression - The job file expression for the file(s) to publish
        metaData - The meta data for the published files
        Returns:
        Returns if the file(s) were successfully published
      • createR2WPublisher

        R2WPublisher createR2WPublisher​(String reportName)
        Create a R2WPublisher to assist in publishing to Report2Web.
        Parameters:
        reportName - The name of the Report to publish to
        Returns:
        Return a R2WPublisher object to control the publishing process.
      • approve

        boolean approve​(UserJobContext context,
                        String reportName,
                        String jobFileExpression,
                        String metaData)
        Publish a File, or a list of files to Report2Web for approval
        Parameters:
        context - The job context to perform the approval under
        reportName - The name of the Report to approve
        jobFileExpression - The job file expression for the file(s) to approve
        metaData - The meta data for the approval files
        Returns:
        Returns if the file(s) were successfully submitted for approval.
      • init

        void init()
        Perform initialization tasks for the R2W Catalog.
      • prepareRequest

        R2WRequest prepareRequest​(String uri)
                           throws MalformedURLException
        Prepare an R2WRequest with default (ALL) substitutions.
        Parameters:
        uri - The URI for the request (with or without leading /), the server URL will be prepended.
        Returns:
        Returns an R2WRequest prepared for the specified server and URL
        Throws:
        MalformedURLException - The URL is malformed. See java.net.MalformedURLException and java.net.URL for more information.
      • prepareRequest

        R2WRequest prepareRequest​(String uri,
                                  R2WRequestSubstitutions substitutions)
                           throws MalformedURLException
        Prepare an R2WRequest with custom substitutions.
        Parameters:
        uri - The URI for the request (with or without leading /), the server URL will be prepended.
        substitutions - Substitutions
        Returns:
        Returns an R2WRequest prepared for the specified server and URL
        Throws:
        MalformedURLException - The URL is malformed. See java.net.MalformedURLException and java.net.URL for more information.
      • getProcessServer

        ProcessServer getProcessServer()
        Get the ProcessServer.
        Returns:
        ProcessServer
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • getQueue

        Queue getQueue()
        Get the Queue.
        Returns:
        Queue
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • setProcessServer

        void setProcessServer​(ProcessServer newProcessServer)
        Set the value for ProcessServer. This value is mandatory.
        Parameters:
        newProcessServer - is the object to set ProcessServer to. Link the R2W Catalog to its corresponding process server. If this is null, then the object cannot be persisted.
      • setQueue

        void setQueue​(Queue newQueue)
        Set the value for Queue. This value is mandatory.
        Parameters:
        newQueue - is the object to set Queue to. Link the R2W Catalog to its corresponding default queue. If this is null, then the object cannot be persisted.
      • checkCreatePrivilege

        RequiredPermission checkCreatePrivilege()
        Check whether or not the create action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkViewPrivilege

        RequiredPermission checkViewPrivilege()
        Check whether or not the view action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkPublishPrivilege

        RequiredPermission checkPublishPrivilege()
        Check whether or not the publish action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkEditPrivilege

        RequiredPermission checkEditPrivilege()
        Check whether or not the edit action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkDeletePrivilege

        RequiredPermission checkDeletePrivilege()
        Check whether or not the delete action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.