public class

AttachmentFileValidatorHandler

extends Object
implements ImportOfBizEntityHandler
java.lang.Object
   ↳ com.atlassian.jira.imports.project.handler.AttachmentFileValidatorHandler

Class Overview

This handler inspects attachment entries and if the user is importing attachments will check to see that the attachment file exists for the corresponding database entry.

Any attachments that are not found will cause a warning to be generated and placed into the MessageSet.

Summary

Public Constructors
AttachmentFileValidatorHandler(BackupProject backupProject, ProjectImportOptions projectImportOptions, BackupSystemInformation backupSystemInformation, I18nHelper i18nHelper, AttachmentStore attachmentStore)
Public Methods
static boolean canProcessEntity(String entityName, ProjectImportOptions projectImportOptions)
void endDocument()
Provides the implementation an opportunity to perform some action when the document is finished being read.
boolean equals(Object o)
int getValidAttachmentCount()
MessageSet getValidationResults()
void handleEntity(String entityName, Map<StringString> attributes)
This is the main method to implement when using this ImportEntityHandler.
int hashCode()
void startDocument()
Provides the implementation an opportunity to perform some action when the document is starting to be read.
Protected Methods
AttachmentParser createAttachmentParser()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.imports.project.handler.ImportOfBizEntityHandler

Public Constructors

public AttachmentFileValidatorHandler (BackupProject backupProject, ProjectImportOptions projectImportOptions, BackupSystemInformation backupSystemInformation, I18nHelper i18nHelper, AttachmentStore attachmentStore)

Public Methods

public static boolean canProcessEntity (String entityName, ProjectImportOptions projectImportOptions)

public void endDocument ()

Provides the implementation an opportunity to perform some action when the document is finished being read.

public boolean equals (Object o)

public int getValidAttachmentCount ()

public MessageSet getValidationResults ()

public void handleEntity (String entityName, Map<StringString> attributes)

This is the main method to implement when using this ImportEntityHandler. This method will provide the entity name and a complete map of attribute key/value pairs. This includes any nested element tags that will have CDATA bodies.

Parameters
entityName identifies the entity (i.e. Issue)
attributes complete list of the attributes listed in the XML element including the nested elements.

public int hashCode ()

public void startDocument ()

Provides the implementation an opportunity to perform some action when the document is starting to be read.

Protected Methods

protected AttachmentParser createAttachmentParser ()