Class XMLContentLoader
- java.lang.Object
-
- org.apache.syncope.core.persistence.jpa.content.XMLContentLoader
-
- All Implemented Interfaces:
ContentDealer
,ContentLoader
,SyncopeCoreLoader
,Ordered
public class XMLContentLoader extends Object implements ContentLoader
Initialize Database with default content if no data is present already.
-
-
Field Summary
Fields Modifier and Type Field Description protected Environment
env
protected Resource
indexesXML
protected static Logger
LOG
protected Resource
viewsXML
-
Fields inherited from interface org.apache.syncope.core.persistence.api.content.ContentDealer
ROOT_ELEMENT
-
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
-
Constructor Summary
Constructors Constructor Description XMLContentLoader(Resource viewsXML, Resource indexesXML, Environment env)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
createIndexes(String domain, DataSource dataSource)
protected void
createViews(String domain, DataSource dataSource)
int
getOrder()
void
load(String domain, DataSource datasource)
Perform init operations on the given domain.protected void
loadDefaultContent(String domain, InputStream contentXML, DataSource dataSource)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.syncope.core.persistence.api.SyncopeCoreLoader
load, unload, unload
-
-
-
-
Field Detail
-
LOG
protected static final Logger LOG
-
viewsXML
protected final Resource viewsXML
-
indexesXML
protected final Resource indexesXML
-
env
protected final Environment env
-
-
Constructor Detail
-
XMLContentLoader
public XMLContentLoader(Resource viewsXML, Resource indexesXML, Environment env)
-
-
Method Detail
-
load
public void load(String domain, DataSource datasource)
Description copied from interface:SyncopeCoreLoader
Perform init operations on the given domain.- Specified by:
load
in interfaceSyncopeCoreLoader
- Parameters:
domain
- domain to initializedatasource
- db access for the given domain
-
loadDefaultContent
protected void loadDefaultContent(String domain, InputStream contentXML, DataSource dataSource) throws IOException, ParserConfigurationException, SAXException
-
createViews
protected void createViews(String domain, DataSource dataSource) throws IOException
- Throws:
IOException
-
createIndexes
protected void createIndexes(String domain, DataSource dataSource) throws IOException
- Throws:
IOException
-
-