Class XMLContentExporter
java.lang.Object
org.apache.syncope.core.persistence.common.content.AbstractXMLContentExporter
org.apache.syncope.core.persistence.jpa.content.XMLContentExporter
- All Implemented Interfaces:
ContentDealer,ContentExporter
Export internal storage content as XML.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final DomainHolder<DataSource> protected final EntityManagerFactoryprotected final RealmSearchDAOFields inherited from class org.apache.syncope.core.persistence.common.content.AbstractXMLContentExporter
LOGFields inherited from interface org.apache.syncope.core.persistence.api.content.ContentDealer
ROOT_ELEMENT -
Constructor Summary
ConstructorsConstructorDescriptionXMLContentExporter(DomainHolder<DataSource> domainHolder, RealmSearchDAO realmSearchDAO, EntityManagerFactory entityManagerFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringcolumnName(Supplier<Stream<Attribute<?, ?>>> attrs, String columnName) voidexport(String domain, int threshold, OutputStream os, String... elements) protected voidexportTable(DataSource dataSource, String tableName, int threshold, org.apache.openjpa.lib.util.collections.BidiMap<String, EntityType<?>> entities, Map<String, Pair<String, String>> relationTables, TransformerHandler handler) protected static Stringprotected static booleanisTableAllowed(String tableName) relationTables(org.apache.openjpa.lib.util.collections.BidiMap<String, EntityType<?>> entities) sortByForeignKeys(Connection conn, String schema, Set<String> tableNames) Methods inherited from class org.apache.syncope.core.persistence.common.content.AbstractXMLContentExporter
end, start
-
Field Details
-
TABLE_PREFIXES_TO_BE_EXCLUDED
-
domainHolder
-
realmSearchDAO
-
entityManagerFactory
-
-
Constructor Details
-
XMLContentExporter
public XMLContentExporter(DomainHolder<DataSource> domainHolder, RealmSearchDAO realmSearchDAO, EntityManagerFactory entityManagerFactory)
-
-
Method Details
-
isTableAllowed
-
getValues
protected static String getValues(ResultSet rs, String columnName, Integer columnType) throws SQLException - Throws:
SQLException
-
columnName
-
relationTables
-
sortByForeignKeys
protected static List<String> sortByForeignKeys(Connection conn, String schema, Set<String> tableNames) throws SQLException - Throws:
SQLException
-
exportTable
protected void exportTable(DataSource dataSource, String tableName, int threshold, org.apache.openjpa.lib.util.collections.BidiMap<String, EntityType<?>> entities, Map<String, throws MetaDataAccessException, SAXExceptionPair<String, String>> relationTables, TransformerHandler handler) - Throws:
MetaDataAccessExceptionSAXException
-
export
public void export(String domain, int threshold, OutputStream os, String... elements) throws SAXException, TransformerConfigurationException
-