public abstract class CrowdEntityXmlMapper<T,I extends T> extends BambooStAXMappingListHelperAbstractImpl<T,I>
Modifier and Type | Class and Description |
---|---|
protected static class |
CrowdEntityXmlMapper.SingleValuedAttributesMapper |
BambooStAXMappingHelper.None
Modifier and Type | Field and Description |
---|---|
static String |
GENERIC_XML_ACTIVE |
static String |
GENERIC_XML_ATTRIBUTE |
static String |
GENERIC_XML_ATTRIBUTE_NAME |
static String |
GENERIC_XML_ATTRIBUTE_VALUE |
static String |
GENERIC_XML_ATTRIBUTES |
static String |
GENERIC_XML_CREATED_DATE |
static String |
GENERIC_XML_ID |
static String |
GENERIC_XML_NAME |
static String |
GENERIC_XML_UPDATED_DATE |
protected static Method |
setActive |
protected static Method |
setId |
protected static Method |
setName |
transactionOperations
Constructor and Description |
---|
CrowdEntityXmlMapper(org.hibernate.SessionFactory sessionFactory,
org.springframework.transaction.support.TransactionOperations ops) |
Modifier and Type | Method and Description |
---|---|
protected void |
exportProperties(@NotNull org.codehaus.staxmate.out.SMOutputElement outputElement,
T entity,
@NotNull org.hibernate.Session session,
ExportDetailsBean exportDetailsBean)
Exports an internal entity to an XML element.
|
protected void |
exportSingleValuedAttributes(com.atlassian.crowd.embedded.api.Attributes entity,
org.codehaus.staxmate.out.SMOutputElement element,
ExportDetailsBean exportDetailsBean)
Exports Map<String, String> to an XML element.
|
protected void |
importProperties(I object,
@NotNull org.codehaus.staxmate.in.SMInputCursor inputCursor,
@NotNull org.hibernate.Session session)
Import properties to the object.
|
afterImportListItem, beforeImportListItem, createListRootElement, createRootElement, eventEndElementOfListItemSaveObject, exportListXml, exportListXml, flushIfNeeded, getXmlElementNodeName, getXmlRootNodeName, importListXml, importListXml, importListXmlInTransaction
createItemInstance, exportXml, exportXml, getSession, getSessionFactory, importXml, importXml, isShouldExport, saveBambooObject
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
exportXml, importXml
public static final String GENERIC_XML_ID
public static final String GENERIC_XML_NAME
public static final String GENERIC_XML_CREATED_DATE
public static final String GENERIC_XML_UPDATED_DATE
public static final String GENERIC_XML_ACTIVE
public static final String GENERIC_XML_ATTRIBUTES
public static final String GENERIC_XML_ATTRIBUTE
public static final String GENERIC_XML_ATTRIBUTE_NAME
public static final String GENERIC_XML_ATTRIBUTE_VALUE
protected static Method setId
protected static Method setName
protected static Method setActive
public CrowdEntityXmlMapper(org.hibernate.SessionFactory sessionFactory, org.springframework.transaction.support.TransactionOperations ops)
protected void exportProperties(@NotNull @NotNull org.codehaus.staxmate.out.SMOutputElement outputElement, @NotNull T entity, @NotNull @NotNull org.hibernate.Session session, ExportDetailsBean exportDetailsBean) throws Exception
This exports: id, name, createdDate, updatedDate and active.
exportProperties
in class BambooStAXMappingHelperAbstractImpl<T,I extends T>
outputElement
- XML element to export to.entity
- entity to export.session
- Hibernate session objectException
- when something went wrongprotected void importProperties(@NotNull I object, @NotNull @NotNull org.codehaus.staxmate.in.SMInputCursor inputCursor, @NotNull @NotNull org.hibernate.Session session) throws Exception
BambooStAXMappingHelperAbstractImpl
importProperties
in class BambooStAXMappingHelperAbstractImpl<T,I extends T>
object
- object being importedinputCursor
- input cursor pointing to the child node of node that was passed to importXml methodsession
- Hibernate session objectException
- when something went wrongprotected void exportSingleValuedAttributes(com.atlassian.crowd.embedded.api.Attributes entity, org.codehaus.staxmate.out.SMOutputElement element, ExportDetailsBean exportDetailsBean) throws Exception
Only use this for entities with simple attributes (Directory, Application) and not complex attributes (User, Group).
entity
- entity with single valued attributes.element
- XML element to export to.Exception
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.