Search in sources :

Example 1 with DirectoryContentUpgrader

use of org.forgerock.openam.upgrade.DirectoryContentUpgrader in project OpenAM by OpenRock.

the class BootstrapData method initSMS.

public void initSMS(boolean startDS) throws UnsupportedEncodingException, LDAPServiceException, MalformedURLException {
    String serverConfigXML = getServerConfigXML(false);
    Properties prop = getBootstrapProperties();
    SystemProperties.initializeProperties(prop, true);
    Crypt.reinitialize();
    loadServerConfigXML(serverConfigXML);
    if (startDS) {
        startEmbeddedDS(basedir + AMSetupServlet.OPENDS_DIR);
        if (AMSetupServlet.isOpenDJUpgraded()) {
            try {
                new DirectoryContentUpgrader(basedir, dsbasedn).upgrade(true);
            } catch (UpgradeException ue) {
                throw new IllegalStateException("An error occurred while upgrading directory content", ue);
            }
        }
    } else {
        EmbeddedOpenDS.initializeForClientUse();
    }
}
Also used : UpgradeException(org.forgerock.openam.upgrade.UpgradeException) SystemProperties(com.iplanet.am.util.SystemProperties) Properties(java.util.Properties) DirectoryContentUpgrader(org.forgerock.openam.upgrade.DirectoryContentUpgrader)

Example 2 with DirectoryContentUpgrader

use of org.forgerock.openam.upgrade.DirectoryContentUpgrader in project OpenAM by OpenRock.

the class UpgradeDirectoryContentStep method initialize.

@Override
public void initialize() throws UpgradeException {
    String baseDir = AMSetupServlet.getBaseDir();
    String baseDN = SMSEntry.getRootSuffix();
    upgrader = new DirectoryContentUpgrader(baseDir, baseDN);
}
Also used : DirectoryContentUpgrader(org.forgerock.openam.upgrade.DirectoryContentUpgrader)

Aggregations

DirectoryContentUpgrader (org.forgerock.openam.upgrade.DirectoryContentUpgrader)2 SystemProperties (com.iplanet.am.util.SystemProperties)1 Properties (java.util.Properties)1 UpgradeException (org.forgerock.openam.upgrade.UpgradeException)1