/*
* 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: AMException.java,v 1.7 2009/01/28 05:34:47 ww203982 Exp $
*
* Portions Copyright 2015 ForgeRock AS.
*/
/**
* The <code>AMException</code> is thrown whenever an error is is encountered
* while performing an operation on the data store.
*
* @deprecated As of Sun Java System Access Manager 7.1.
* @supported.all.api
*/
/**
* Constructs a new <code>AMException</code> with detailed message.
*
* @param msg
* The detailed message
* @param errorCode
* Matches the appropriate entry in
* <code>amProfile.properties</code>.
*/
super(msg);
this.localizedMsg = msg;
}
/**
* Convenience method (protected)
*/
.getUserLocale(token));
}
/**
* Constructs a new <code>AMException</code> with detailed message.
*
* @param msg
* The detailed message.
* @param errorCode
* Matches the appropriate entry in
* <code>amProfile.properties</code>.
* @param ue
* if the root cause is a <code>UMSException</code>.
*/
}
/**
* Constructs a new <code>AMException</code> with detailed message.
*
* @param token
* a valid single sign on token of the user performing the
* operation.
* @param errorCode
* Matches the appropriate entry in
* <code>amProfile.properties</code>.
* @param ue
* if the root cause is a <code>UMSException</code>.
*/
try {
} catch (Exception e) {
}
.getUserLocale(token));
if (ldapErrorMsg != null) {
} else {
}
}
/**
* Constructs a new <code>AMException</code> with detailed message.
*
* @param msg
* The detailed message.
* @param errorCode
* Matches the appropriate entry in
* <code>amProfile.properties</code>.
* @param args
* arguments if the error message needs specific values to be
* set.
*/
super(msg);
this.localizedMsg = msg;
}
/**
* Constructs a new <code>AMException</code> with detailed message.
*
* @param msg
* The detailed message
* @param errorCode
* Matches the appropriate entry in
* <code>amProfile.properties</code>.
* @param args
* if the error message needs specific values to be set.
* @param ue
* if the root cause is a <code>UMSException</code>.
*/
UMSException ue) {
try {
} catch (Exception e) {
// Ignore
}
if (ldapErrorMsg != null) {
} else {
localizedMsg = msg;
}
}
/**
* Returns the error code. This error code can be used with the arguments to
* construct a localized message.
*
* @return the error code which can be used to map the message to a user
* specific locale.
*/
return errorCode;
}
/**
* Returns the arguments corresponding to the error code.
*
* @return the arguments corresponding to the error code or null if no
* arguments are need to construct the message.
*/
return args;
}
/**
* Overrides the default <code>getMessage()</code> method of super class
* Exception.
*
* @return The error message string.
*/
return localizedMsg;
}
/**
* Method to obtain the LDAP error code.
*
* @return The error code, which can be used to map the message to a
* specific locale. Returns a null, if not an LDAP error.
*/
return ldapErrCode;
}
/**
* Returns the root <code>LDAPException</code> of this
* <code>AMException</code>, if any.
*
* @return The {@link LdapException} that caused this
* <code>AMException</code>. If null, it means no root
* <code>LDAPException</code> has been set.
*/
return rootCause;
}
/**
* Returns localized error message.
*
* @param locale
* locale of the error message.
* @return Localized error message.
*/
}
return result;
}
/**
* Returns ResourceBundle Name associated with this exception
*
* @return ResourceBundle Name associated with this exception.
*/
return AMSDKBundle.BUNDLE_NAME;
}
}