Class AttachmentFileControl
java.lang.Object
com.atlassian.jira.testkit.client.RestApiClient<T>
com.atlassian.jira.testkit.client.BackdoorControl<T>
com.atlassian.jira.functest.framework.backdoor.BackdoorControl<AttachmentFileControl>
com.atlassian.jira.functest.framework.backdoor.AttachmentFileControl
Backdoor control for operations on attachments e.g. creating, deleting, enabling, etc.
- Since:
- 9.11
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.jira.testkit.client.RestApiClient
com.atlassian.jira.testkit.client.RestApiClient.BackdoorLoggingFilter, com.atlassian.jira.testkit.client.RestApiClient.JsonMediaTypeFilter, com.atlassian.jira.testkit.client.RestApiClient.RestCall -
Field Summary
Fields inherited from class com.atlassian.jira.testkit.client.BackdoorControl
API_REST_PATH, API_REST_VERSION, DEFAULT_REST_PATH, logger, rootPathFields inherited from class com.atlassian.jira.testkit.client.RestApiClient
REST_VERSION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDelete all attachment data from the instance.voidcopyAttachments(String source) Copy attachments from the local source path to the attachment path.voidcreateAttachment(String target, String body) voiddisable()Disable attachments.voidenable()Enable attachments.Check if an attachment or path exists on the instance.Gets the temporary attachment directory on the instance node.Check if attachments are stored in the shared home.Methods inherited from class com.atlassian.jira.functest.framework.backdoor.BackdoorControl
createResourceMethods inherited from class com.atlassian.jira.testkit.client.BackdoorControl
createResourceForPath, createResourceForPath, get, getRestModulePathMethods inherited from class com.atlassian.jira.testkit.client.RestApiClient
anonymous, authenticate, authoriseWithOAuth2, authoriseWithOAuth2, cleanUp, client, createResource, createResourceGadget, createResourceInternal, errorResponse, expanded, getCredentialsProvider, getEnvironmentData, loginAs, loginAs, registerResponse, resourceRoot, resourceRoot, setOf, toResponse, toResponse, toResponse, withCredentialsProvider
-
Constructor Details
-
AttachmentFileControl
-
-
Method Details
-
enable
public void enable()Enable attachments. This will also enable thumbnails and zip support.- Since:
- 10.0
-
disable
public void disable()Disable attachments. This will also disable thumbnails and zip support.- Since:
- 10.0
-
copyAttachments
Copy attachments from the local source path to the attachment path. This will work if attachments are stored in the shared home or in an S3 file store.- Parameters:
source- the absolute path to a local directory containing attachments to be copied to the instance attachment path.- Since:
- 9.11
-
cleanAttachments
public void cleanAttachments()Delete all attachment data from the instance. This will only delete the underlying files, not the database records.- Since:
- 9.11
-
createAttachment
-
exists
Check if an attachment or path exists on the instance.- Parameters:
target- a path to the attachment on the instance relative to the attachment root, e.g. "ABC/ABC-1/10010". If attachments are stored in the shared home then passing a directory path such as "ABC/ABC-1" will return true if the directory exists.- Returns:
- true if the attachment or path exists on the instance and false otherwise.
- Since:
- 9.11
-
getTemporaryAttachmentDirectory
Gets the temporary attachment directory on the instance node.- Returns:
- the temporary attachment directory on the node.
-