Package step.resources
Interface ResourceManager
- All Known Implementing Classes:
LocalResourceManagerImpl
,RemoteResourceManager
,ResourceManagerImpl
public interface ResourceManager
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateResource
(String resourceType, boolean isDirectory, InputStream resourceStream, String resourceFileName, boolean checkForDuplicates, step.core.objectenricher.ObjectEnricher objectEnricher) createResource
(String resourceType, boolean isDirectory, InputStream resourceStream, String resourceFileName, boolean checkForDuplicates, step.core.objectenricher.ObjectEnricher objectEnricher, String trackingAttribute) createResource
(String resourceType, InputStream resourceStream, String resourceFileName, boolean checkForDuplicates, step.core.objectenricher.ObjectEnricher objectEnricher) createResourceContainer
(String resourceType, String resourceFileName) void
deleteResource
(String resourceId) Delete the resource and all its revisionsfindManyByCriteria
(Map<String, String> criteria) getResource
(String resourceId) getResourceContent
(String resourceId) Get the content of an existingResource
getResourceFile
(String resourceId) getResourceRevision
(String resourceRevisionId) getResourceRevisionContent
(String resourceRevisionId) boolean
resourceExists
(String resourceId) Test if a given resource id existssaveResource
(Resource resource) Saved the resource object onlysaveResourceContent
(String resourceId, InputStream resourceStream, String resourceFileName) Save the content provided as stream to an existing resource.saveResourceRevision
(ResourceRevision resourceRevision)
-
Field Details
-
RESOURCE_TYPE_PDF_TEST_SCENARIO_FILE
- See Also:
-
RESOURCE_TYPE_SECRET
- See Also:
-
RESOURCE_TYPE_DATASOURCE
- See Also:
-
RESOURCE_TYPE_FUNCTIONS
- See Also:
-
RESOURCE_TYPE_STAGING_CONTEXT_FILES
- See Also:
-
RESOURCE_TYPE_ATTACHMENT
- See Also:
-
RESOURCE_TYPE_TEMP
- See Also:
-
-
Method Details
-
createResource
Resource createResource(String resourceType, InputStream resourceStream, String resourceFileName, boolean checkForDuplicates, step.core.objectenricher.ObjectEnricher objectEnricher) throws IOException, SimilarResourceExistingException, InvalidResourceFormatException - Parameters:
resourceType
- the type of the resourceresourceStream
- the stream of the resource to be savedresourceFileName
- the name of the resource (filename)checkForDuplicates
- is duplicate should be checkedobjectEnricher
- theObjectEnricher
of the context- Returns:
- the created
Resource
- Throws:
IOException
- an IOException occurs during the callSimilarResourceExistingException
- a similar resource existInvalidResourceFormatException
-
createResource
Resource createResource(String resourceType, boolean isDirectory, InputStream resourceStream, String resourceFileName, boolean checkForDuplicates, step.core.objectenricher.ObjectEnricher objectEnricher) throws IOException, SimilarResourceExistingException, InvalidResourceFormatException -
createResourceContainer
ResourceRevisionContainer createResourceContainer(String resourceType, String resourceFileName) throws IOException - Throws:
IOException
-
resourceExists
Test if a given resource id exists- Parameters:
resourceId
- the id of the resource to test- Returns:
- true if the resource exists
-
getResourceContent
Get the content of an existingResource
- Parameters:
resourceId
- the id of theResource
to be deleted- Returns:
- the content of the resource as stream
- Throws:
IOException
- an IOException occurs during the call
-
getResourceFile
-
getResource
-
getResourceRevisionContent
ResourceRevisionContentImpl getResourceRevisionContent(String resourceRevisionId) throws IOException - Throws:
IOException
-
getResourceRevision
-
getResourcesRootPath
String getResourcesRootPath() -
createResource
Resource createResource(String resourceType, boolean isDirectory, InputStream resourceStream, String resourceFileName, boolean checkForDuplicates, step.core.objectenricher.ObjectEnricher objectEnricher, String trackingAttribute) throws IOException, SimilarResourceExistingException, InvalidResourceFormatException -
saveResourceContent
Resource saveResourceContent(String resourceId, InputStream resourceStream, String resourceFileName) throws IOException, InvalidResourceFormatException Save the content provided as stream to an existing resource. This creates a newResourceRevision
for theResource
and saves the content provided as stream under this revision.- Parameters:
resourceId
- the id of the resource to be updatedresourceStream
- the stream of the resource to be savedresourceFileName
- the name of the resource (filename)- Returns:
- the updated
Resource
- Throws:
IOException
- an IOException occurs during the callInvalidResourceFormatException
-
saveResource
Saved the resource object only- Parameters:
resource
- the resource to be saved- Returns:
- the updated
Resource
- Throws:
IOException
- an IOException occurs during the call
-
saveResourceRevision
- Throws:
IOException
-
deleteResource
Delete the resource and all its revisions- Parameters:
resourceId
- the id of theResource
to be deleted
-
findManyByCriteria
-