2086N/A/*
2086N/A * CDDL HEADER START
2086N/A *
2086N/A * The contents of this file are subject to the terms of the
2086N/A * Common Development and Distribution License, Version 1.0 only
2086N/A * (the "License"). You may not use this file except in compliance
2086N/A * with the License.
2086N/A *
2086N/A * You can obtain a copy of the license at
2086N/A * trunk/opends/resource/legal-notices/OpenDS.LICENSE
2086N/A * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
2086N/A * See the License for the specific language governing permissions
2086N/A * and limitations under the License.
2086N/A *
2086N/A * When distributing Covered Code, include this CDDL HEADER in each
2086N/A * file and include the License file at
2086N/A * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
2086N/A * add the following below this CDDL HEADER, with the fields enclosed
2086N/A * by brackets "[]" replaced with your own identifying information:
2086N/A * Portions Copyright [yyyy] [name of copyright owner]
2086N/A *
2086N/A * CDDL HEADER END
2086N/A *
2086N/A *
3233N/A * Copyright 2006-2008 Sun Microsystems, Inc.
2086N/A */
2086N/A
2086N/Apackage ${PACKAGE};
2086N/A
2086N/Aimport org.opends.messages.MessageDescriptor;
2086N/Aimport static org.opends.messages.Category.*;
2086N/Aimport static org.opends.messages.Severity.*;
2086N/A
2086N/A/**
2086N/A * This file contains a number of constants that are used throughout the
2086N/A * Directory Server source. It was dynamically generated as part of the
2086N/A * Directory Server build process and should not be edited directly.
2086N/A */
2940N/A@org.opends.server.types.PublicAPI(
2940N/A stability=org.opends.server.types.StabilityLevel.PRIVATE,
2940N/A mayInstantiate=false,
2940N/A mayExtend=false,
2940N/A mayInvoke=true)
2940N/Apublic final class ${CLASS_NAME} {
2086N/A
2086N/A /** Base property for resource bundle containing messages */
3646N/A private static final String BASE = "messages/${BASE}";
2940N/A
2940N/A private static ClassLoader webstartClassLoader;
2086N/A
2940N/A // Prevent instantiation.
2940N/A private ${CLASS_NAME}() {
2940N/A // Do nothing.
2940N/A }
2127N/A
2086N/A ${MESSAGES}
2086N/A
2127N/A /**
2127N/A * Returns the Class Loader to be used to get the ResourceBundle,
2127N/A * it returns <CODE>null</CODE> if the default ClassLoader is to be
2127N/A * used.
2127N/A * @return the Class Loader to be used to get the ResourceBundle,
2127N/A * it returns <CODE>null</CODE> if the default ClassLoader is to be
2127N/A * used.
2127N/A */
5902N/A @SuppressWarnings("unused")
2127N/A private static ClassLoader getClassLoader()
2127N/A {
2127N/A ClassLoader cl;
2127N/A if (${USE_MESSAGE_JAR_IF_WEBSTART})
2127N/A {
2127N/A if (org.opends.server.util.SetupUtils.isWebStart())
2127N/A {
2127N/A if (webstartClassLoader == null)
2127N/A {
2127N/A try
2127N/A {
2940N/A Class<?> c = Class.forName("${PACKAGE}.${CLASS_NAME}");
2127N/A
2127N/A java.net.URL[] urls = new java.net.URL[] {
2127N/A c.getProtectionDomain().getCodeSource().getLocation()
2127N/A };
2127N/A webstartClassLoader = new java.net.URLClassLoader(urls);
2127N/A }
2127N/A catch (ClassNotFoundException cnfe)
2127N/A {
2127N/A // This cannot happen as we are looking for this class so it is
2127N/A // already found.
2127N/A }
2127N/A }
2127N/A cl = webstartClassLoader;
2127N/A }
2127N/A else
2127N/A {
2127N/A cl = null;
2127N/A }
2127N/A }
2127N/A else
2127N/A {
3646N/A cl = ${CLASS_NAME}.class.getClassLoader();
2127N/A }
2127N/A return cl;
2127N/A }
2086N/A}