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:
AbstractPlanMapper, AbstractProjectDependencyMapper, AbstractProjectMapper, AbstractResultSummaryMapper, AceMapper, AclMapper, ArtifactDefinitionMapper, ArtifactLinkMapper, ArtifactMapper, ArtifactSubscriptionMapper, AuditLogMapper, AuthorMapper, BambooStAXMappingHelperAbstractImpl, BambooStAXMappingListHelperAbstractImpl, BandanaItemMapper, BuildDefinitionMapper, BuildMapper, BuildNotificationMapper, BuildNumberMapper, BuildRequirementMapper, BuildResultSummaryMapper, CapabilitySetMapper, ChainBuildMapper, ChainMapper, ChainResultMapper, ChainStageMapper, CommentMapper, CommitFilesMapper, CommitMapper, CommitRootMapper, ConsumedSubscriptionMapper, CustomBuildDataMapper, ElasticImageConfigurationMapper, ElasticInstanceScheduleMapper, GroupMapper, GroupMemberMapper, InstantMessagingServerMapper, JiraIssuesMapper, JiraServerMapper, JobMapper, LabellingMapper, LabelMapper, LegacyProjectDependencyMapper, LinkedJiraIssueRootMapper, LinkedJiraIssuesMapper, LocalCapabilitySetMapper, LoginInformationMapper, MailServerMapper, PipelineMapper, ProjectBuildMapper, ProjectChainMapper, ProjectDependencyMapper, ProjectMapper, RemoteCapabilitySetMapper, ServerIDMapper, SharedCapabilityMapper, TestCaseMapper, TestCaseResultErrorMapper, TestCaseResultMapper, TestClassMapper, TestClassResultMapper, UserMapper

public interface BambooStAXMappingHelper<T>

Base interface for StAX based export-import helper class


Method Summary
 void exportXml(net.sf.hibernate.Session session, org.codehaus.staxmate.out.SMOutputElement outputElement, T object)
          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)
               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
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 © 2011 Atlassian. All Rights Reserved.