@Deprecated public TemporaryAttachment(final Long id, Long issueId, final File tempAttachment, final String filename, final String contentType) { this(id, issueId, tempAttachment, filename, contentType, getIssueToken(issueId)); }
@Deprecated private final static String getIssueToken(Issue issue) { if (issue == null) { return null; } return getIssueToken(issue.getId()); }
/** * Removes all temporary attachments for the given issue. The issueId may be null to indicate a * newly created issue, that doesn't have an id yet. * * @param issueId The id of the issue to remove entries for. May be null. * @deprecated since 6.3 use {@link com.atlassian.jira.web.action.issue.TemporaryAttachmentsMonitor#clearEntriesForFormToken(String)} instead. */ @Deprecated public void clearEntriesForIssue(final Long issueId) { clearEntriesForFormToken(TemporaryAttachment.getIssueToken(issueId)); }
/** * Returns all currently matching temporary attachments for a particular issue. If a null issue id is * provided, this should be interpreted as a newly created issue that doesn't have an id yet. * * @param issueId The id of the issue to get attachmetns for. May be null * @return a collection of temporary attachments for this issue sorted by creation date * @deprecated since 6.3 use {@link com.atlassian.jira.web.action.issue.TemporaryAttachmentsMonitor#getByFormToken(String)} instead. */ @Deprecated public Collection<TemporaryAttachment> getByIssueId(final Long issueId) { return getByFormToken(TemporaryAttachment.getIssueToken(issueId)); }
@Deprecated public final static String getEntityToken(Either<Issue, Project> entity) { if (entity == null) { return null; } if (entity.isLeft()) { return getIssueToken(entity.left().get()); } else if (entity.isRight()) { return getProjectToken(entity.right().get()); } else { return null; } }