Interface ResourceManager

    • Field Detail

      • RESOURCE_TYPE_PDF_TEST_SCENARIO_FILE

        static final java.lang.String RESOURCE_TYPE_PDF_TEST_SCENARIO_FILE
        See Also:
        Constant Field Values
      • RESOURCE_TYPE_SECRET

        static final java.lang.String RESOURCE_TYPE_SECRET
        See Also:
        Constant Field Values
      • RESOURCE_TYPE_DATASOURCE

        static final java.lang.String RESOURCE_TYPE_DATASOURCE
        See Also:
        Constant Field Values
      • RESOURCE_TYPE_FUNCTIONS

        static final java.lang.String RESOURCE_TYPE_FUNCTIONS
        See Also:
        Constant Field Values
      • RESOURCE_TYPE_STAGING_CONTEXT_FILES

        static final java.lang.String RESOURCE_TYPE_STAGING_CONTEXT_FILES
        See Also:
        Constant Field Values
      • RESOURCE_TYPE_ATTACHMENT

        static final java.lang.String RESOURCE_TYPE_ATTACHMENT
        See Also:
        Constant Field Values
    • Method Detail

      • createResource

        step.resources.Resource createResource​(java.lang.String resourceType,
                                               java.io.InputStream resourceStream,
                                               java.lang.String resourceFileName,
                                               boolean checkForDuplicates,
                                               ObjectEnricher objectEnricher)
                                        throws java.io.IOException,
                                               SimilarResourceExistingException
        Parameters:
        resourceType - the type of the resource
        resourceStream - the stream of the resource to be saved
        resourceFileName - the name of the resource (filename)
        checkForDuplicates - is duplicate should be checked
        objectEnricher - the ObjectEnricher of the context
        Returns:
        the created Resource
        Throws:
        java.io.IOException - an IOException occurs during the call
        SimilarResourceExistingException - a similar resource exist
      • saveResourceContent

        step.resources.Resource saveResourceContent​(java.lang.String resourceId,
                                                    java.io.InputStream resourceStream,
                                                    java.lang.String resourceFileName)
                                             throws java.io.IOException
        Save the content provided as stream to an existing resource. This creates a new ResourceRevision for the Resource and saves the content provided as stream under this revision.
        Parameters:
        resourceId - the id of the resource to be updated
        resourceStream - the stream of the resource to be saved
        resourceFileName - the name of the resource (filename)
        Returns:
        the updated Resource
        Throws:
        java.io.IOException - an IOException occurs during the call
      • saveResource

        step.resources.Resource saveResource​(step.resources.Resource resource)
                                      throws java.io.IOException
        Saved the resource object only
        Parameters:
        resource - the resource to be saved
        Returns:
        the updated Resource
        Throws:
        java.io.IOException - an IOException occurs during the call
      • resourceExists

        boolean resourceExists​(java.lang.String resourceId)
        Test if a given resource id exists
        Parameters:
        resourceId - the id of the resource to test
        Returns:
        true if the resource exists
      • deleteResource

        void deleteResource​(java.lang.String resourceId)
        Delete the resource and all its revisions
        Parameters:
        resourceId - the id of the Resource to be deleted
      • getResourceContent

        ResourceRevisionContent getResourceContent​(java.lang.String resourceId)
                                            throws java.io.IOException
        Get the content of an existing Resource
        Parameters:
        resourceId - the id of the Resource to be deleted
        Returns:
        the content of the resource as stream
        Throws:
        java.io.IOException - an IOException occurs during the call
      • getResourceRevisionByResourceId

        step.resources.ResourceRevision getResourceRevisionByResourceId​(java.lang.String resourceId)
      • getResourceRevisionContent

        ResourceRevisionContentImpl getResourceRevisionContent​(java.lang.String resourceRevisionId)
                                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • createResourceContainer

        ResourceRevisionContainer createResourceContainer​(java.lang.String resourceType,
                                                          java.lang.String resourceFileName)
                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • getResource

        step.resources.Resource getResource​(java.lang.String resourceId)
      • lookupResourceByName

        step.resources.Resource lookupResourceByName​(java.lang.String resourcename)
      • getResourcesRootPath

        java.lang.String getResourcesRootPath()
      • updateResourceContent

        step.resources.Resource updateResourceContent​(step.resources.Resource resource,
                                                      java.io.InputStream resourceStream,
                                                      java.lang.String resourceFileName,
                                                      step.resources.ResourceRevision revision)
                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • saveResourceRevision

        step.resources.ResourceRevision saveResourceRevision​(step.resources.ResourceRevision resourceRevision)
                                                      throws java.io.IOException
        Throws:
        java.io.IOException