4701cb94cccc5ef52c5333593fe9dd5a2376a9d9Jaco Jooste * The contents of this file are subject to the terms of the Common Development and
4701cb94cccc5ef52c5333593fe9dd5a2376a9d9Jaco Jooste * Distribution License (the License). You may not use this file except in compliance with the
4701cb94cccc5ef52c5333593fe9dd5a2376a9d9Jaco Jooste * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
4701cb94cccc5ef52c5333593fe9dd5a2376a9d9Jaco Jooste * specific language governing permission and limitations under the License.
4701cb94cccc5ef52c5333593fe9dd5a2376a9d9Jaco Jooste * When distributing Covered Software, include this CDDL Header Notice in each file and include
4701cb94cccc5ef52c5333593fe9dd5a2376a9d9Jaco Jooste * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
4701cb94cccc5ef52c5333593fe9dd5a2376a9d9Jaco Jooste * Header, with the fields enclosed by brackets [] replaced by your own identifying
4701cb94cccc5ef52c5333593fe9dd5a2376a9d9Jaco Jooste * information: "Portions copyright [year] [name of copyright owner]".
4701cb94cccc5ef52c5333593fe9dd5a2376a9d9Jaco Jooste * Copyright 2015 ForgeRock AS.
4701cb94cccc5ef52c5333593fe9dd5a2376a9d9Jaco Joosteimport com.sun.identity.sm.AbstractUpgradeHelper;
4701cb94cccc5ef52c5333593fe9dd5a2376a9d9Jaco Joosteimport org.forgerock.openam.upgrade.UpgradeException;
4701cb94cccc5ef52c5333593fe9dd5a2376a9d9Jaco Jooste * This upgrade helper allows the modification of attributes for the Scripted Auth module.
4701cb94cccc5ef52c5333593fe9dd5a2376a9d9Jaco Jooste * @since 13.0.0
4701cb94cccc5ef52c5333593fe9dd5a2376a9d9Jaco Joostepublic class ScriptedAuthHelper extends AbstractUpgradeHelper {
4701cb94cccc5ef52c5333593fe9dd5a2376a9d9Jaco Jooste private final Set<String> attributeNames = new HashSet<>();
4701cb94cccc5ef52c5333593fe9dd5a2376a9d9Jaco Jooste * The constructor for ScriptedAuthHelper is used to register the attributes which will be upgraded.
4701cb94cccc5ef52c5333593fe9dd5a2376a9d9Jaco Jooste attributeNames.add("iplanet-am-auth-scripted-client-script");
4701cb94cccc5ef52c5333593fe9dd5a2376a9d9Jaco Jooste attributeNames.add("iplanet-am-auth-scripted-server-script");
4701cb94cccc5ef52c5333593fe9dd5a2376a9d9Jaco Jooste public AttributeSchemaImpl upgradeAttribute(AttributeSchemaImpl oldAttr, AttributeSchemaImpl newAttr)