ImportServiceConfiguration.java revision bee2440354b4bc8796e1de0b6cbd60e1f68deba0
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2007 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: ImportServiceConfiguration.java,v 1.10 2010/01/11 17:34:33 veiming Exp $
*
* Portions Copyrighted 2010-2015 ForgeRock AS.
*/
/**
* Import service configuration data.
*/
public class ImportServiceConfiguration extends AuthenticatedCommand {
/**
* Services a Commandline Request.
*
* @param rc Request Context.
* @throws CLIException if the request cannot serviced.
*/
throws CLIException {
super.handleRequest(rc);
try {
} catch (CLIException clie) {
//There is no encryptSecret file
}
// disable notification
"com.sun.am.event.connection.disable.list", "sm,aci,um");
// disable error debug messsage
) {
throw new CLIException(getResourceString(
"import-service-configuration-unknown-ds"),
}
"import-service-configuration-prompt-delete") + " ");
) {
"import-service-configuration-processing"));
}
} else {
"import-service-configuration-processing"));
}
} catch (SMSException e) {
throw new CLIException(e.getMessage(),
} catch (ErrorResultException e) {
throw new CLIException(e.getMessage(),
} catch (SSOException e) {
throw new CLIException(e.getMessage(),
} catch (IOException e) {
throw new CLIException(e.getMessage(),
} catch (LoginException e) {
throw new CLIException(
} catch (InvalidAuthContextException e) {
throw new CLIException(
}
}
throws IOException {
try {
//don't fall for tagswappable value
}
}
}
} finally {
try {
} catch (IOException e) {
//ignore
}
}
}
return encKey;
}
throws SMSException, SSOException {
}
private void deleteOuServicesDescendents(
) throws SSOException, SMSException {
s.delete();
}
{ // hardcoding hidden realm, cannot find a better option.
"o=sunamhiddenrealmdelegationservicepermissions," +
s.delete();
}
s.delete();
}
mgr.clearCache();
}
private void importData(
// set the correct password encryption key.
// without doing so, the default encryption key will be used.
encKey);
}
try {
"import-service-configuration-succeeded"));
} catch (IOException e) {
} catch (SSOException e) {
} catch (SMSException e) {
} catch (Exception e) {
} finally {
try {
} catch (IOException ie) {
//ignore if file input stream cannot be closed.
}
}
}
}
if (isVerbose()) {
}
try {
} else {
}
if (isVerbose()) {
}
return conn;
} catch (LDAPServiceException | ErrorResultException e) {
}
}
LDIFChangeRecordReader ldifReader = new LDIFChangeRecordReader(new DataInputStream(getClass().getClassLoader()
LDIFChangeRecordReader indexReader = new LDIFChangeRecordReader(new DataInputStream(getClass().getClassLoader()
}
} catch (IOException e) {
}
}
throws CLIException {
if (start == -1) {
throw new CLIException(getResourceString(
"import-service-configuration-unable-to-locate-hash-secret"),
}
if (end == -1) {
throw new CLIException(getResourceString(
"import-service-configuration-unable-to-locate-hash-secret"),
}
throw new CLIException(getResourceString(
"import-service-configuration-secret-key"),
}
}
}