UpgradeLDAPAuthModulesStep.java revision a482d94cc9392203bc183f592f9accd23d6ded01
/*
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2015 ForgeRock AS.
*/
/**
* This upgrade step upgrades LDAP and AD auth module instances.
* <p/>
* If module instances have value <code>true</code> set for property <code>iplanet-am-auth-ldap-ssl-enabled</code>,
* the property <code>openam-auth-ldap-connection-mode</code> with value <code>LDAPS</code> will be set.
* <p/>
* If module instances have value <code>false</code> set for property <code>iplanet-am-auth-ldap-ssl-enabled</code>,
* the property <code>openam-auth-ldap-connection-mode</code> with value <code>LDAP</code> will be set.
* <p/>
* If needed property <code>iplanet-am-auth-ldap-ssl-enabled</code> will be removed.
*/
public class UpgradeLDAPAuthModulesStep extends AbstractUpgradeStep {
private final Map<String, Map<String, Boolean>> instances = new HashMap<String, Map<String, Boolean>>();
super(adminTokenAction, factory);
}
public void initialize() throws UpgradeException {
try {
if (moduleInstances != null) {
if (DEBUG.messageEnabled()) {
+ authInstanceName);
}
if (sslEnabledProp != null) {
if (DEBUG.messageEnabled()) {
}
if (instanceMap == null) {
}
}
}
}
}
}
}
DEBUG.error("Unable to identify the configuration for the old ldap/ad auth module instance " + authInstanceName
throw new UpgradeException("An error occurred while trying to identify the configuration for the old " +
}
}
public boolean isApplicable() {
}
public void perform() throws UpgradeException {
try {
throw new UpgradeException("Unable to upgrade ldap/ad auth module instance configurations "
}
}
}
if (DEBUG.messageEnabled()) {
}
}
if (DEBUG.messageEnabled()) {
DEBUG.message("Upgrading attribute " + CONNECTION_MODE_PROPERTY + " for ldap/ad auth module instance <"
+ "> in realm: " + realm);
}
}
}
}
return value ? SetupConstants.LDAP_CONNECTION_MODE_LDAPS : SetupConstants.LDAP_CONNECTION_MODE_LDAP;
}
int count = 0;
}
return new StringBuilder(BUNDLE.getString("upgrade.auth.instances.ldap")).append(" (").append(count)
}
sb.append(BUNDLE.getString("upgrade.realm")).append(SEPARATOR).append(entry.getKey()).append(delimiter);
}
}
}
}