/*
* 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: CreateServiceConfig.java,v 1.14 2009/01/28 05:35:03 ww203982 Exp $
*
* Portions Copyrighted 2011-2015 ForgeRock AS.
*/
public class CreateServiceConfig {
// ----------------------------------------------------------
// Protected methods
// ----------------------------------------------------------
static void createService(
) throws SMSException, SSOException {
}
static void createService(
boolean createRealms,
) throws SMSException, SSOException {
// Make sure schema exists for the given service & version
// Construct the base DN
// Check for instance nodes
}
}
// Get Attribute Value Pairs, if any
.toString());
}
if (insEntry.isNewEntry()) {
// create the entry
}
}
} else {
// throw instance already exists exception
}
}
// Process global configuration
while (globalNodes.hasNext()) {
if (globalGroup == null) {
}
}
// Process organization configuration
}
// Construct the org name
}
}
// Check if config nodes exists
// create sub-config node
// Process OrganizationAttributeValuePairs
if (orgAttrValuePairNode != null) {
// Get the attributes
OrganizationConfigManager ocm = new
}
}
// Process Plugin configuration
// Get the PluginSchema
// Check if config nodes exists
// Check and create interfaces node
orgName);
// Check and create schema node
// Create plugin config node
}
}
static void createSubConfig(
) throws SMSException, SSOException {
// Get service id and priority
// Get the attributes
) {
decryptObj)));
}
}
}
}
}
// Create the LDAP entry
// Check for further sub-configuration
.iterator();
while (subConfigs.hasNext()) {
if (subConfigID == null) {
}
}
}
// Construct the SMSEntry for the node
}
"CreateServiceConfig.createSubConfigEntry: Entry already exists: " +
dn);
throw (new ServiceAlreadyExistsException(
}
// Add LDAP objectclasses
// Validate the attributes
}
}
}
// Save the entry, and add to cache
}
static void checkBaseNodesForOrg(
) throws SMSException, SSOException {
}
static void checkBaseNodesForOrg(
boolean createRealms
) throws SMSException, SSOException {
// Check if org exists
if (entry.isNewEntry()) {
// Organization does not exists, create if needed
if (createRealms) {
} else {
"sms-org-doesnot-exist", args));
}
}
// Check if services node exists
// Check if service node exists
// Check if verion node exists
// Check orgUnit node
// Create all based nodes for root realm
} else {
// create only organization config
}
}
// Check global config node
}
throws SMSException, SSOException {
"checkAndCreateOrgUnitNode() creating entry: " + dn);
}
if (e.isNewEntry()) {
// Add needed object classes
e.save();
}
}
throws SMSException, SSOException {
if (e.isNewEntry()) {
if (ndx >= 0) {
// Add needed object classes for the 'ou=services' node
// under the subrealms created.
} else {
// Add needed object classes
}
}
}
e.save();
}
if (e.isNewEntry()) {
if (ndx >= 0) {
// Add needed object classes for the 'ou=services' node
// under the subrealms created.
} else {
// Add needed object classes and service name.
}
}
}
e.save();
}
throws SMSException {
// Get the name
// Get the parent DN
if (subEntries != null) {
}
}
// Returns a map that contains attribute value pairs
// %%% This must be moved to XMLUtils
if (n == null) {
return (null);
}
continue;
}
}
}
return (answer);
}
// Returns a map that contains attribute value pairs
// If 'unescape' is set to false, xml escaped chars will not
// be unescaped.
if (n == null) {
return (null);
}
continue;
}
}
}
return (answer);
}
/*
* create the sub-organization.
*/
throws SMSException {
// Check if the organization already exists
try {
// Normalize DN, so it can be parsed and compared
"createOrganization() : Detected invalid characters. "+
"sms-invalid-org-name", args1));
}
}
if (!e.isNewEntry()) {
throw (new OrganizationAlreadyExistsException(
null));
}
// Reverse RDN order
}
// Need to start from baseDN, to create intermediate nodes
// Obtain the baseDN
int index = 0;
}
// Check the intermediate nodes
}
e = cEntry.getClonedSMSEntry();
if (e.isNewEntry()) {
// Create the realm
// Add needed object classes
}
}
} catch (SSOException ssoe) {
+ "create organization ", ssoe);
.getString("sms-INVALID_SSO_TOKEN"),
"sms-INVALID_SSO_TOKEN"));
}
}
}