0N/A/*
2362N/A * Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
0N/A * published by the Free Software Foundation.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/A/**
0N/A *
0N/A */
0N/Aimport java.io.File;
0N/A
0N/A/**
0N/A * Setup static variables to represent properties in test environment.
0N/A */
0N/Apublic class TestParams {
0N/A
0N/A /** variables that hold value property values */
0N/A public static String testSrc = null;
0N/A public static String testClasses = null;
0N/A
0N/A /** name of default security policy */
0N/A public static String defaultPolicy = null;
0N/A
0N/A /** name of default security policy for RMID */
0N/A public static String defaultRmidPolicy = null;
0N/A
0N/A /** name of default security policy for activation groups */
0N/A public static String defaultGroupPolicy = null;
0N/A
0N/A /** name of default security manager */
0N/A public static String defaultSecurityManager =
0N/A "java.rmi.RMISecurityManager";
0N/A
0N/A
0N/A /* Initalize commonly used strings */
0N/A static {
0N/A try {
0N/A testSrc = TestLibrary.
0N/A getProperty("test.src", ".");
0N/A testClasses = TestLibrary.
0N/A getProperty("test.classes", ".");
0N/A
0N/A // if policy file already set use it
0N/A defaultPolicy = TestLibrary.
0N/A getProperty("java.security.policy",
0N/A defaultPolicy);
0N/A if (defaultPolicy == null) {
0N/A defaultPolicy = testSrc + File.separatorChar +
0N/A "security.policy";
0N/A }
0N/A
0N/A // if manager prop set use it
0N/A defaultSecurityManager = TestLibrary.
0N/A getProperty("java.security.manager",
0N/A defaultSecurityManager);
0N/A
0N/A defaultRmidPolicy =
0N/A testSrc + File.separatorChar + "rmid.security.policy";
0N/A
0N/A defaultGroupPolicy = testSrc +
0N/A File.separatorChar + "group.security.policy";
0N/A
0N/A } catch (SecurityException se) {
0N/A TestLibrary.bomb("Security exception received" +
0N/A " during test initialization:",
0N/A se);
0N/A }
0N/A }
0N/A}