com.atlassian.jira.imports.project.parser
Interface UserAssociationParser
- All Known Implementing Classes:
- UserAssociationParserImpl
public interface UserAssociationParser
Converts voter and watcher xml in a JIRA backup to an object representation.
- Since:
- v3.13
USER_ASSOCIATION_ENTITY_NAME
static final String USER_ASSOCIATION_ENTITY_NAME
- See Also:
- Constant Field Values
ASSOCIATION_TYPE_VOTE_ISSUE
static final String ASSOCIATION_TYPE_VOTE_ISSUE
- See Also:
- Constant Field Values
ASSOCIATION_TYPE_WATCH_ISSUE
static final String ASSOCIATION_TYPE_WATCH_ISSUE
- See Also:
- Constant Field Values
parseVoter
ExternalVoter parseVoter(Map attributes)
throws ParseException
- Parses the voter data from the backup XML.
- Parameters:
attributes
- is a map of key value pairs that represent the attributes of an ExternalVoter.
The parser will only create an ExternalVoter if the sinkNodeEntity attribute is provided an is 'Issue' AND
the associationType attribute is provided and is 'VoteIssue'.
The following attributes are required, otherwise a ParseException will be thrown:
- sinkNodeId (represents issue id, required)
- sourceName (represents voter, required)
- Returns:
- an ExternalVoter if the attributes contain the required fields, null otherwise
- Throws:
ParseException
- if the required fields are not found in the attributes map
parseWatcher
ExternalWatcher parseWatcher(Map attributes)
throws ParseException
- Parses the watcher data from the backup XML.
- Parameters:
attributes
- is a map of key value pairs that represent the attributes of an ExternalWatcher.
The parser will only create an ExternalWatcher if the sinkNodeEntity attribute is provided an is 'Issue' AND
the associationType attribute is provided and is 'WatchIssue'.
The following attributes are required, otherwise a ParseException will be thrown:
- sinkNodeId (represents issue id, required)
- sourceName (represents watcher, required)
- Returns:
- an ExternalWatcher if the attributes contain the required fields, null otherwise
- Throws:
ParseException
- if the required fields are not found in the attributes map
Copyright © 2002-2013 Atlassian. All Rights Reserved.