com.evolveum.midpoint.repo.xml
Class XmlRepositoryServiceFactory

java.lang.Object
  extended by com.evolveum.midpoint.repo.xml.XmlRepositoryServiceFactory
All Implemented Interfaces:
RuntimeConfiguration, RepositoryServiceFactory

public class XmlRepositoryServiceFactory
extends java.lang.Object
implements RepositoryServiceFactory


Constructor Summary
XmlRepositoryServiceFactory()
           
 
Method Summary
 void destroy()
           
 java.lang.String getComponentId()
          Return symbolic name of the component in configuration subsytem.
 org.apache.commons.configuration.Configuration getCurrentConfiguration()
          Returns current component configuration in commons configuration structure http://commons.apache.org/configuration/apidocs/org/apache/commons/configuration/Configuration.html
 java.lang.String getDatabaseName()
           
 int getEventPort()
           
 java.lang.String getHost()
           
 java.lang.String getInitialDataPath()
           
 java.lang.String getPassword()
           
 int getPort()
           
 RepositoryService getRepositoryService()
           
 java.lang.String getServerPath()
           
 java.lang.String getUsername()
           
 void init()
           
 boolean isDebug()
           
 boolean isDropDatabase()
           
 boolean isEmbedded()
           
 boolean isRunServer()
           
 boolean isShutdown()
           
 void setConfiguration(org.apache.commons.configuration.Configuration config)
           
 void setDatabaseName(java.lang.String databaseName)
           
 void setDebug(boolean debug)
           
 void setDropDatabase(boolean dropDatabase)
           
 void setEmbedded(boolean embedded)
           
 void setEventPort(int eventPort)
           
 void setHost(java.lang.String host)
           
 void setInitialDataPath(java.lang.String initialDataPath)
           
 void setPassword(java.lang.String password)
           
 void setPort(int port)
           
 void setRunServer(boolean runServer)
           
 void setServerPath(java.lang.String serverPath)
           
 void setShutdown(boolean shutdown)
           
 void setUsername(java.lang.String username)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlRepositoryServiceFactory

public XmlRepositoryServiceFactory()
Method Detail

init

public void init()
          throws RepositoryServiceFactoryException
Specified by:
init in interface RepositoryServiceFactory
Throws:
RepositoryServiceFactoryException

destroy

public void destroy()
Specified by:
destroy in interface RepositoryServiceFactory

getRepositoryService

public RepositoryService getRepositoryService()
                                       throws RepositoryServiceFactoryException
Specified by:
getRepositoryService in interface RepositoryServiceFactory
Throws:
RepositoryServiceFactoryException

isRunServer

public boolean isRunServer()

setRunServer

public void setRunServer(boolean runServer)

isEmbedded

public boolean isEmbedded()

setEmbedded

public void setEmbedded(boolean embedded)

getInitialDataPath

public java.lang.String getInitialDataPath()

setInitialDataPath

public void setInitialDataPath(java.lang.String initialDataPath)

getHost

public java.lang.String getHost()

setHost

public void setHost(java.lang.String host)

getPort

public int getPort()

setPort

public void setPort(int port)

getEventPort

public int getEventPort()

setEventPort

public void setEventPort(int eventPort)

getUsername

public java.lang.String getUsername()

setUsername

public void setUsername(java.lang.String username)

getPassword

public java.lang.String getPassword()

setPassword

public void setPassword(java.lang.String password)

getDatabaseName

public java.lang.String getDatabaseName()

setDatabaseName

public void setDatabaseName(java.lang.String databaseName)

isDropDatabase

public boolean isDropDatabase()

setDropDatabase

public void setDropDatabase(boolean dropDatabase)

isShutdown

public boolean isShutdown()

setShutdown

public void setShutdown(boolean shutdown)

getServerPath

public java.lang.String getServerPath()

setServerPath

public void setServerPath(java.lang.String serverPath)

isDebug

public boolean isDebug()

setDebug

public void setDebug(boolean debug)

getComponentId

public java.lang.String getComponentId()
Description copied from interface: RuntimeConfiguration
Return symbolic name of the component in configuration subsytem. Samples:
    • repository -> midpoint.repository
      provisioning -> midpoint.provisioning
      model -> midpoint.model
  • Specified by:
    getComponentId in interface RuntimeConfiguration
    Returns:
    String name of component

    getCurrentConfiguration

    public org.apache.commons.configuration.Configuration getCurrentConfiguration()
    Description copied from interface: RuntimeConfiguration
    Returns current component configuration in commons configuration structure http://commons.apache.org/configuration/apidocs/org/apache/commons/configuration/Configuration.html

    Example of structure for repository:

    Configuration config = new BaseConfiguration(); config.setProperty("host", "localhost"); config.setProperty("port" , 12345); return config;

    Note: current configuration can be obtained only on fully initialized objects. If called on not initialized objects, then it can end with undefined behavior

    Specified by:
    getCurrentConfiguration in interface RuntimeConfiguration
    Returns:
    Commons configuration

    setConfiguration

    public void setConfiguration(org.apache.commons.configuration.Configuration config)
    Specified by:
    setConfiguration in interface RepositoryServiceFactory


    Copyright © 2012 evolveum. All Rights Reserved.