public class XmlMapper extends GenericMapper
GenericMapper.Exporter<T>, GenericMapper.Importer<T>
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 |
DATABASE_DATE_FORMAT, DATE_CONVERTER_FOR_EXPORT, LEGACY_XML_DATE_FORMAT, logger, PLUGIN_KEY_PREFIX
Constructor and Description |
---|
XmlMapper(org.hibernate.SessionFactory sessionFactory,
BatchProcessor batchProcessor) |
Modifier and Type | Method and Description |
---|---|
protected void |
exportInternalEntity(InternalEntity entity,
org.dom4j.Element element)
Exports an internal entity to an XML element.
|
protected void |
exportSingleValuedAttributes(Attributes entity,
org.dom4j.Element element)
Exports Map<String, String> to an XML element.
|
protected InternalEntityTemplate |
getInternalEntityTemplateFromXml(org.dom4j.Element element,
CrowdBackupDateConverter dateConverter)
Constructs an InternalEntityTemplate from an XML element.
|
protected Map<String,String> |
getSingleValuedAttributesMapFromXml(org.dom4j.Element element)
Constructs an Map<String, String> of attributes from an XML element.
|
addEntities, addEntitiesViaMerge, addEntitiesViaReplicate, addEntity, addEntity, addEntityViaMerge, addEntityViaSave, clearSession, exportXml, getAttributeValue, getBoolean, getBoolean, getDateConverterForXml, getDateFromTimestamp, getDirectoryTypeFromLegacyCode, getLong, getNameFromLegacyCode, getOperationTypeFromLegacyPermissionName, getOptionalValue, getSessionFactory, getString, getValue, importXml, setCDATA, setText, setTimestamp
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
public XmlMapper(org.hibernate.SessionFactory sessionFactory, BatchProcessor batchProcessor)
protected void exportInternalEntity(InternalEntity entity, org.dom4j.Element element)
This exports: id, name, createdDate, updatedDate and active.
entity
- entity to export.element
- XML element to export to.protected void exportSingleValuedAttributes(Attributes entity, org.dom4j.Element element)
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.protected InternalEntityTemplate getInternalEntityTemplateFromXml(org.dom4j.Element element, CrowdBackupDateConverter dateConverter)
This imports: id, name, createdDate, updatedDate and active.
element
- XML element to import from.dateConverter
- the CrowdBackupDateConverter
suitable for theprotected Map<String,String> getSingleValuedAttributesMapFromXml(org.dom4j.Element element)
This imports attributes with single values.
element
- XML element to import from.Copyright © 2024 Atlassian. All rights reserved.