/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
*
* 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
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/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 Copyrighted [year] [name of copyright owner]"
*
* $Id: SMSMigration70.java,v 1.5 2008/07/11 01:46:20 arviranga Exp $
*
*/
/*
* Portions Copyrighted [2011] [ForgeRock AS]
*/
public class SMSMigration70 {
}
try {
if (ServiceManager.isRealmEnabled()) {
"\n\n\nSMSMigration70::main() : Realms enabled. " +
"\n\nService Management Migration to "
+ "7.0 cannot be done. ");
throw (new Exception(
"\n\n\nSMSMigration70::main() : Realms enabled. " +
"\n\nService Management Migration to " +
"7.0 cannot be done."));
}
// Add AMSDK plugin to root realm before migration of sub-realms
// This is similar to SMSEntry.baseDN.
// Add these organization attributes from root org to root realm.
+ entryDN;
// Migrate sub-orgs to realms
// After migration of config data, Set the realmEnabled/realmMode
// flag to true in the Global Schema of the identity repository
// service.
}
// After migration of config data, Set the realmEnabled/realmMode
// flag to true
}
+ ServiceManager.isRealmEnabled());
} catch (Exception e) {
e.printStackTrace();
}
}
try {
if (orgNamingAttr == null) {
}
// Add AMSDK plugin before migrating the config data
// Create corresponding realms and migrate the config data
// Migrate the delegation policies before migrating config data
}
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* Adds IdRepo AMSDK plugin to the given organization name
*/
throws SMSException, SSOException {
.orgNameToDN(orgName)));
}
/**
* Migrate delegation policies to have correct policy name, resource name
* and subjects
*/
try {
// remove the privilege
int index = -1;
{
// change the resource name
if (index != -1) {
+ ","
+ resource
.length() + 1);
}
}
// change the subject name
if (index != -1) {
+ ","
+ subject
.length() + 1);
}
}
}
// Normalized orgname to realm name
if (index != -1) {
+ ","
}
// Add the modified privileges
}
+ privileges);
} catch (DelegationException de) {
}
}
/**
* Adds these two organization attributes to realm.
* "sunOrganizationStatus=inetDomainStatus"
*
* From AM point of view, all these 3 attributes in AMSDK Organization serve
* the purpose of identifying the realm give the alias names.
*
* "sunOrganizationAliases=sunOrganizationAlias"
* "sunOrganizationAliases=sunPreferredDomain"
* "sunOrganizationAliases=associatedDomain"
*/
try {
}
} catch (Exception e) {
e.printStackTrace();
}
return map;
}
try {
if (sdn > 0) {
if (!(orgNamingAttr.equalsIgnoreCase(
SMSEntry.ORGANIZATION_RDN))) {
}
orgDN);
+ realmDN);
// After creation of the realm, Set the DNMapper.migration
// flag to true to avoid removal of 'ou=services' from the
// newly formed realm DN.
+ serviceName);
// Migrate service config data
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
try {
+ ServiceManager.isRealmEnabled());
token);
null);
} catch (Exception e) {
e.printStackTrace();
}
}
try {
}
// create sub-config node
}
.getPriority(), subConfigMap);
}
} catch (Exception e) {
e.printStackTrace();
}
}
try {
}
}
+ newServiceConfig.getDN();
}
// oldSubConfig = subEntryConfig;
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}