com.atlassian.bamboo.migration
Interface BambooStAXMappingHelper<T>

Type Parameters:
T - a class/interface which can be exported/imported by the implementer of this interface
All Known Implementing Classes:
AbstractChainMapper, AbstractPlanMapper, AbstractProjectDependencyMapper, AbstractProjectMapper, AbstractResultSummaryMapper, AceMapper, AclMapper, AgentAssignmentMapper, ArtifactDefinitionMapper, ArtifactLinkMapper, ArtifactMapper, ArtifactSubscriptionMapper, AuditLogMapper, AuthorMapper, BambooStAXMappingHelperAbstractImpl, BambooStAXMappingListHelperAbstractImpl, BandanaItemMapper, BuildDefinitionMapper, BuildNumberMapper, BuildResultSummaryMapper, CapabilitySetMapper, ChainBranchMapper, ChainBuildMapper, ChainMapper, ChainResultMapper, ChainStageMapper, CommentMapper, CommentRootMapper, CommitFilesMapper, CommitMapper, CommitRootMapper, ConsumedSubscriptionMapper, CustomBuildDataMapper, CustomDataMapper, DeploymentProjectItemMapper, DeploymentProjectMapper, DeploymentProjectPropertiesMapper, DeploymentResultCustomDataMapper, DeploymentResultMapper, DeploymentResultPropertiesMapper, DeploymentVariableSubstitutionMapper, DeploymentVersionItemMapper, DeploymentVersionLinkedJiraIssueMapper, DeploymentVersionMapper, DeploymentVersionPropertiesMapper, DeploymentVersionStatusMapper, DeploymentVersionVcsChangesetMapper, DeploymentVersionVcsCommitMapper, ElasticImageConfigurationMapper, ElasticInstanceScheduleMapper, EnvironmentMapper, EnvironmentPropertiesMapper, EnvironmentRepositoryLinkMapper, ExternalEntityMapper, GroupMapper, GroupMemberMapper, InstantMessagingServerMapper, JiraIssuesMapper, JobMapper, LabellingMapper, LabelMapper, LegacyArtifactMapper, LegacyJiraServerMapper, LegacyRequirementMapper, LinkedJiraIssueRootMapper, LinkedJiraIssuesMapper, LocalCapabilitySetMapper, LocalGroupMapper, LocalUserMapper, LoginInformationMapper, MailServerMapper, NotificationRuleMapper, NotificationSetMapper, PipelineMapper, PlanRepositoryLinkMapper, PlanResultKeyListMapper, PlanVcsRevisionHistoryMapper, ProjectChainMapper, ProjectDependencyMapper, ProjectMapper, PropertyEntryMapper, RelevantChangesetsMapper, RemoteAgentAuthenticationMapper, RemoteCapabilitySetMapper, RepositoryChangesetMapper, RepositoryDefinitionMapper, RequirementMapper, RequirementSetMapper, ServerIDMapper, SharedCapabilityMapper, TestCaseMapper, TestCaseResultErrorMapper, TestCaseResultMapper, TestClassMapper, TestClassResultMapper, TrustedApplicationsMapper, UserMapper, VariableBaselineItemMapper, VariableContextBaselineMapper, VariableContextBaselinePropertiesMapper, VariableContextSnapshotMapper, VariableDefinitionMapper, VariableSubstitutionMapper, VcsBranchMapper, VersionNamingSchemeMapper

public interface BambooStAXMappingHelper<T>

Base interface for StAX based export-import helper class


Nested Class Summary
static class BambooStAXMappingHelper.None
           
 
Method Summary
 void exportXml(net.sf.hibernate.Session session, org.codehaus.staxmate.out.SMOutputElement outputElement, T object, ExportDetailsBean exportDetailsBean)
          Export object using StaxMate's SMOutputElement.
 java.lang.String getXmlRootNodeName()
          Returns local name of the XML parent node that will contain exported/imported object's properties
 T importXml(net.sf.hibernate.Session session, org.codehaus.staxmate.in.SMInputCursor inputCursor)
          Import object using StaxMate's SMInputCursor.
 

Method Detail

getXmlRootNodeName

@NotNull
java.lang.String getXmlRootNodeName()
Returns local name of the XML parent node that will contain exported/imported object's properties

Returns:
local name of the XML parent node

exportXml

void exportXml(@NotNull
               net.sf.hibernate.Session session,
               @NotNull
               org.codehaus.staxmate.out.SMOutputElement outputElement,
               @NotNull
               T object,
               ExportDetailsBean exportDetailsBean)
               throws java.lang.Exception
Export object using StaxMate's SMOutputElement. It is responsibility of the exporter to create parent node for the object being exported.

Parameters:
session - Hibernate session object
outputElement - an element at which exported should create a node to export data
object - object being exported
exportDetailsBean -
Throws:
java.lang.Exception - when something went wrong

importXml

T importXml(@NotNull
            net.sf.hibernate.Session session,
            @NotNull
            org.codehaus.staxmate.in.SMInputCursor inputCursor)
            throws java.lang.Exception
Import object using StaxMate's SMInputCursor.

Parameters:
session - Hibernate session object
inputCursor - a inputCursor that points to the parent node containing object properties
Returns:
an imported object
Throws:
java.lang.Exception - when something went wrong


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.