コード例 #1
0
 /**
  * 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.
  */
 public void clearEntriesForIssue(final Long issueId) {
   final Collection<TemporaryAttachment> attachmentsForIssueId = getByIssueId(issueId);
   for (TemporaryAttachment temporaryAttachment : attachmentsForIssueId) {
     temporaryAttachment.getFile().delete();
     temporaryAttachments.remove(temporaryAttachment.getId());
   }
 }
コード例 #2
0
 /**
  * Adds temporary attachments to the interally maintained list of temporary attachements
  *
  * @param temporaryAttachment the attachment to add
  */
 public void add(final TemporaryAttachment temporaryAttachment) {
   temporaryAttachments.put(temporaryAttachment.getId(), temporaryAttachment);
 }