Class XMLContentExporter
- java.lang.Object
-
- org.apache.syncope.core.persistence.jpa.content.XMLContentExporter
-
- All Implemented Interfaces:
ContentDealer
,ContentExporter
public class XMLContentExporter extends Object implements ContentExporter
Export internal storage content as XML.
-
-
Field Summary
Fields Modifier and Type Field Description protected DomainHolder
domainHolder
protected static Logger
LOG
protected RealmDAO
realmDAO
protected static Set<String>
TABLE_PREFIXES_TO_BE_EXCLUDED
-
Fields inherited from interface org.apache.syncope.core.persistence.api.content.ContentDealer
ROOT_ELEMENT
-
-
Constructor Summary
Constructors Constructor Description XMLContentExporter(DomainHolder domainHolder, RealmDAO realmDAO)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static String
columnName(Supplier<Stream<javax.persistence.metamodel.Attribute<?,?>>> attrs, String columnName)
void
export(String domain, int tableThreshold, OutputStream os)
protected void
exportTable(DataSource dataSource, String tableName, int threshold, org.apache.openjpa.lib.util.collections.BidiMap<String,javax.persistence.metamodel.EntityType<?>> entities, Map<String,Pair<String,String>> relationTables, TransformerHandler handler)
protected static String
getValues(ResultSet rs, String columnName, Integer columnType)
protected static boolean
isTableAllowed(String tableName)
protected static Map<String,Pair<String,String>>
relationTables(org.apache.openjpa.lib.util.collections.BidiMap<String,javax.persistence.metamodel.EntityType<?>> entities)
protected static List<String>
sortByForeignKeys(Connection conn, String schema, Set<String> tableNames)
-
-
-
Field Detail
-
LOG
protected static final Logger LOG
-
domainHolder
protected final DomainHolder domainHolder
-
realmDAO
protected final RealmDAO realmDAO
-
-
Constructor Detail
-
XMLContentExporter
public XMLContentExporter(DomainHolder domainHolder, RealmDAO realmDAO)
-
-
Method Detail
-
isTableAllowed
protected static boolean isTableAllowed(String tableName)
-
getValues
protected static String getValues(ResultSet rs, String columnName, Integer columnType) throws SQLException
- Throws:
SQLException
-
columnName
protected static String columnName(Supplier<Stream<javax.persistence.metamodel.Attribute<?,?>>> attrs, String columnName)
-
relationTables
protected static Map<String,Pair<String,String>> relationTables(org.apache.openjpa.lib.util.collections.BidiMap<String,javax.persistence.metamodel.EntityType<?>> entities)
-
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,javax.persistence.metamodel.EntityType<?>> entities, Map<String,Pair<String,String>> relationTables, TransformerHandler handler) throws SQLException, MetaDataAccessException, SAXException
-
export
public void export(String domain, int tableThreshold, OutputStream os) throws SAXException, TransformerConfigurationException
- Specified by:
export
in interfaceContentExporter
- Throws:
SAXException
TransformerConfigurationException
-
-