mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-18 14:35:23 +02:00
[283613] [dstore] Create a Constants File for all System Properties we support
This commit is contained in:
parent
a99967b64a
commit
ec16f44703
15 changed files with 173 additions and 44 deletions
|
@ -35,6 +35,7 @@
|
|||
* David McKnight (IBM) - [294933] [dstore] RSE goes into loop
|
||||
* David McKnight (IBM) - [331922] [dstore] enable DataElement recycling
|
||||
* David McKnight (IBM) - [336257] [dstore] leading file.searator in DSTORE_LOG_DIRECTORY not handled
|
||||
* David McKnight (IBM) - [283613] [dstore] Create a Constants File for all System Properties we support
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.dstore.core.model;
|
||||
|
@ -70,6 +71,7 @@ import org.eclipse.dstore.core.util.StringCompare;
|
|||
import org.eclipse.dstore.extra.IDomainNotifier;
|
||||
import org.eclipse.dstore.internal.core.client.ClientCommandHandler;
|
||||
import org.eclipse.dstore.internal.core.model.DefaultByteConverter;
|
||||
import org.eclipse.dstore.internal.core.model.IDataStoreSystemProperties;
|
||||
import org.eclipse.dstore.internal.core.server.ServerUpdateHandler;
|
||||
import org.eclipse.dstore.internal.core.util.DataElementRemover;
|
||||
import org.eclipse.dstore.internal.core.util.XMLgenerator;
|
||||
|
@ -269,7 +271,7 @@ public final class DataStore
|
|||
if (isVirtual()) _spiritModeOn = true;
|
||||
else
|
||||
{
|
||||
String doSpirit = System.getProperty("DSTORE_SPIRIT_ON"); //$NON-NLS-1$
|
||||
String doSpirit = System.getProperty(IDataStoreSystemProperties.DSTORE_SPIRIT_ON);
|
||||
_spiritModeOn = (doSpirit != null && doSpirit.equals("true")); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
@ -3607,8 +3609,8 @@ public final class DataStore
|
|||
_userPreferencesDirectory = _userPreferencesDirectory + File.separator;
|
||||
}
|
||||
|
||||
// for bug 282599, log directory allows customization of log location relative to user dir
|
||||
String logDirectory = System.getProperty("DSTORE_LOG_DIRECTORY"); //$NON-NLS-1$
|
||||
// for bug 282599,
|
||||
String logDirectory = System.getProperty(IDataStoreSystemProperties.DSTORE_LOG_DIRECTORY);
|
||||
if (logDirectory == null){
|
||||
logDirectory = ".eclipse" + File.separator + "RSE" + File.separator; //$NON-NLS-1$//$NON-NLS-2$
|
||||
}
|
||||
|
@ -3665,7 +3667,7 @@ public final class DataStore
|
|||
// if the idle is 0 or not set then it is considered indefinite.
|
||||
// The server is considered idle for the period of which no commands are
|
||||
// received in server command handler
|
||||
String serverIdleShutdownTimeout = System.getProperty("DSTORE_IDLE_SHUTDOWN_TIMEOUT"); //$NON-NLS-1$
|
||||
String serverIdleShutdownTimeout = System.getProperty(IDataStoreSystemProperties.DSTORE_IDLE_SHUTDOWN_TIMEOUT);
|
||||
if (serverIdleShutdownTimeout != null)
|
||||
{
|
||||
_serverIdleShutdownTimeout = Integer.parseInt(serverIdleShutdownTimeout);
|
||||
|
@ -3674,7 +3676,7 @@ public final class DataStore
|
|||
}
|
||||
|
||||
|
||||
String tracingProperty = System.getProperty("DSTORE_TRACING_ON"); //$NON-NLS-1$
|
||||
String tracingProperty = System.getProperty(IDataStoreSystemProperties.DSTORE_TRACING_ON);
|
||||
if (tracingProperty != null && tracingProperty.equals("true")) //$NON-NLS-1$
|
||||
{
|
||||
_tracingOn = true;
|
||||
|
@ -3723,7 +3725,7 @@ public final class DataStore
|
|||
{
|
||||
if (!isVirtual() && _deRemover == null)
|
||||
{
|
||||
String memLogging = System.getProperty("DSTORE_MEMLOGGING_ON"); //$NON-NLS-1$
|
||||
String memLogging = System.getProperty(IDataStoreSystemProperties.DSTORE_MEMLOGGING_ON);
|
||||
_memLoggingOn = (memLogging != null && memLogging.equals("true")); //$NON-NLS-1$
|
||||
|
||||
if (_memLoggingOn)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2010 IBM Corporation and others.
|
||||
* Copyright (c) 2002, 2011 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -25,6 +25,7 @@
|
|||
* David McKnight (IBM) - [257321] [dstore] "Error binding socket" should include port of the failed socket
|
||||
* Noriaki Takatsu (IBM) - [283656] [dstore][multithread] Serviceability issue
|
||||
* Noriaki Takatsu (IBM) - [289678][api][breaking] ServerSocket creation in multiple IP addresses
|
||||
* David McKnight (IBM) - [283613] [dstore] Create a Constants File for all System Properties we support
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.dstore.core.server;
|
||||
|
@ -50,6 +51,7 @@ import org.eclipse.dstore.core.model.DataElement;
|
|||
import org.eclipse.dstore.core.model.DataStore;
|
||||
import org.eclipse.dstore.core.model.DataStoreAttributes;
|
||||
import org.eclipse.dstore.core.model.ISSLProperties;
|
||||
import org.eclipse.dstore.internal.core.model.IDataStoreSystemProperties;
|
||||
import org.eclipse.dstore.internal.core.server.ServerAttributes;
|
||||
import org.eclipse.dstore.internal.core.server.ServerCommandHandler;
|
||||
import org.eclipse.dstore.internal.core.server.ServerReturnCodes;
|
||||
|
@ -543,7 +545,7 @@ public class ConnectionEstablisher
|
|||
PrintWriter writer = new PrintWriter(bwriter);
|
||||
|
||||
String version = DataStoreAttributes.DATASTORE_VERSION;
|
||||
String preferenceVersion = System.getProperty("DSTORE_VERSION"); //$NON-NLS-1$
|
||||
String preferenceVersion = System.getProperty(IDataStoreSystemProperties.DSTORE_VERSION);
|
||||
if (preferenceVersion != null && preferenceVersion.length() > 0){
|
||||
version = preferenceVersion;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2002, 2011 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -15,6 +15,7 @@
|
|||
* David McKnight (IBM) - [193426] don't display exceptions
|
||||
* David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
|
||||
* David McKnight (IBM) - [245714] [dstore] Multiple user ID/password prompts and connect fails
|
||||
* David McKnight (IBM) - [283613] [dstore] Create a Constants File for all System Properties we support
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.dstore.core.server;
|
||||
|
@ -42,6 +43,7 @@ import javax.net.ssl.SSLSocket;
|
|||
import org.eclipse.dstore.core.model.DE;
|
||||
import org.eclipse.dstore.core.model.IDataStoreConstants;
|
||||
import org.eclipse.dstore.core.model.ISSLProperties;
|
||||
import org.eclipse.dstore.internal.core.model.IDataStoreSystemProperties;
|
||||
import org.eclipse.dstore.internal.core.server.ServerReturnCodes;
|
||||
import org.eclipse.dstore.internal.core.server.ServerSSLProperties;
|
||||
import org.eclipse.dstore.internal.core.util.ssl.DStoreSSLContext;
|
||||
|
@ -266,7 +268,7 @@ public class ServerLauncher extends Thread {
|
|||
// contains the authorization
|
||||
// script path
|
||||
//
|
||||
String authPath = System.getProperty("RSE.AUTH"); //$NON-NLS-1$
|
||||
String authPath = System.getProperty(IDataStoreSystemProperties.RSE_AUTH);
|
||||
File authFile = null;
|
||||
if (authPath != null && authPath.length() > 0)
|
||||
{
|
||||
|
@ -427,7 +429,7 @@ public class ServerLauncher extends Thread {
|
|||
* Constructor
|
||||
*/
|
||||
public ServerLauncher() {
|
||||
String pluginPath = System.getProperty("A_PLUGIN_PATH"); //$NON-NLS-1$
|
||||
String pluginPath = System.getProperty(IDataStoreSystemProperties.A_PLUGIN_PATH);
|
||||
if (pluginPath == null) {
|
||||
System.out.println("A_PLUGIN_PATH is not defined"); //$NON-NLS-1$
|
||||
System.exit(-1);
|
||||
|
@ -449,7 +451,7 @@ public class ServerLauncher extends Thread {
|
|||
* the port for the daemon socket to run on
|
||||
*/
|
||||
public ServerLauncher(String portStr) {
|
||||
String pluginPath = System.getProperty("A_PLUGIN_PATH"); //$NON-NLS-1$
|
||||
String pluginPath = System.getProperty(IDataStoreSystemProperties.A_PLUGIN_PATH);
|
||||
if (pluginPath == null) {
|
||||
System.out.println("A_PLUGIN_PATH is not defined"); //$NON-NLS-1$
|
||||
System.exit(-1);
|
||||
|
@ -472,7 +474,7 @@ public class ServerLauncher extends Thread {
|
|||
* the port range for launched servers
|
||||
*/
|
||||
public ServerLauncher(String portStr, String serverPortRange) {
|
||||
String pluginPath = System.getProperty("A_PLUGIN_PATH"); //$NON-NLS-1$
|
||||
String pluginPath = System.getProperty(IDataStoreSystemProperties.A_PLUGIN_PATH);
|
||||
if (pluginPath == null) {
|
||||
System.out.println("A_PLUGIN_PATH is not defined"); //$NON-NLS-1$
|
||||
System.exit(-1);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2002, 2010 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2002, 2011 IBM Corporation. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
|
@ -21,6 +21,7 @@
|
|||
* David McKnight (IBM) - [269908] [dstore] rsecomm.log file management
|
||||
* David McKnight (IBM) - [284787] [dstore] ability to disable RSECOMM_LOGFILE_MAX option
|
||||
* David McKnight (IBM) - [305272] [dstore][multithread] log close in ServerLogger
|
||||
* David McKnight (IBM) - [283613] [dstore] Create a Constants File for all System Properties we support
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.dstore.core.server;
|
||||
|
@ -32,6 +33,8 @@ import java.io.PrintWriter;
|
|||
import java.util.Date;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import org.eclipse.dstore.internal.core.model.IDataStoreSystemProperties;
|
||||
|
||||
/**
|
||||
* Class that facilitates logging for errors, warnings, debug messages and info
|
||||
* for DataStore servers.
|
||||
|
@ -120,7 +123,7 @@ public class ServerLogger implements IServerLogger
|
|||
String ext = ".log"; //$NON-NLS-1$
|
||||
boolean found = false;
|
||||
long logFileMax = 1000000;
|
||||
String logFileMaxStr = System.getProperty("RSECOMM_LOGFILE_MAX"); //$NON-NLS-1$
|
||||
String logFileMaxStr = System.getProperty(IDataStoreSystemProperties.RSECOMM_LOGFILE_MAX);
|
||||
if (logFileMaxStr != null && logFileMaxStr.length() > 0){
|
||||
try {
|
||||
logFileMax = Integer.parseInt(logFileMaxStr);
|
||||
|
@ -169,7 +172,7 @@ public class ServerLogger implements IServerLogger
|
|||
public void logInfo(String minerName, String message) {
|
||||
if (!initialized)
|
||||
initialize();
|
||||
String loggerLogLevel = System.getProperty("DSTORE_LOGGER_LOG_LEVEL"); //$NON-NLS-1$
|
||||
String loggerLogLevel = System.getProperty(IDataStoreSystemProperties.DSTORE_LOGGER_LOG_LEVEL);
|
||||
if (loggerLogLevel != null){
|
||||
try {
|
||||
log_level = Integer.parseInt(loggerLogLevel);
|
||||
|
@ -202,7 +205,7 @@ public class ServerLogger implements IServerLogger
|
|||
public void logWarning(String minerName, String message) {
|
||||
if (!initialized)
|
||||
initialize();
|
||||
String loggerLogLevel = System.getProperty("DSTORE_LOGGER_LOG_LEVEL"); //$NON-NLS-1$
|
||||
String loggerLogLevel = System.getProperty(IDataStoreSystemProperties.DSTORE_LOGGER_LOG_LEVEL);
|
||||
if (loggerLogLevel != null){
|
||||
try {
|
||||
log_level = Integer.parseInt(loggerLogLevel);
|
||||
|
@ -238,7 +241,7 @@ public class ServerLogger implements IServerLogger
|
|||
if (!initialized)
|
||||
initialize();
|
||||
|
||||
String loggerLogLevel = System.getProperty("DSTORE_LOGGER_LOG_LEVEL"); //$NON-NLS-1$
|
||||
String loggerLogLevel = System.getProperty(IDataStoreSystemProperties.DSTORE_LOGGER_LOG_LEVEL);
|
||||
if (loggerLogLevel != null){
|
||||
try {
|
||||
log_level = Integer.parseInt(loggerLogLevel);
|
||||
|
@ -274,7 +277,7 @@ public class ServerLogger implements IServerLogger
|
|||
if (!initialized)
|
||||
initialize();
|
||||
|
||||
String loggerLogLevel = System.getProperty("DSTORE_LOGGER_LOG_LEVEL"); //$NON-NLS-1$
|
||||
String loggerLogLevel = System.getProperty(IDataStoreSystemProperties.DSTORE_LOGGER_LOG_LEVEL);
|
||||
if (loggerLogLevel != null){
|
||||
try {
|
||||
log_level = Integer.parseInt(loggerLogLevel);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2007 IBM Corporation and others.
|
||||
* Copyright (c) 2002, 2011 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -12,7 +12,7 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* David McKnight (IBM) - [283613] [dstore] Create a Constants File for all System Properties we support
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.dstore.internal.core.client;
|
||||
|
@ -22,6 +22,7 @@ import java.net.InetAddress;
|
|||
import java.net.UnknownHostException;
|
||||
|
||||
import org.eclipse.dstore.core.model.DataStoreAttributes;
|
||||
import org.eclipse.dstore.internal.core.model.IDataStoreSystemProperties;
|
||||
|
||||
/**
|
||||
* ClientAttributes is a container of communication related
|
||||
|
@ -39,7 +40,7 @@ public class ClientAttributes extends DataStoreAttributes
|
|||
|
||||
try
|
||||
{
|
||||
String pluginPath = System.getProperty("A_PLUGIN_PATH"); //$NON-NLS-1$
|
||||
String pluginPath = System.getProperty(IDataStoreSystemProperties.A_PLUGIN_PATH);
|
||||
if ((pluginPath != null) && (pluginPath.length() > 0))
|
||||
{
|
||||
setAttribute(A_PLUGIN_PATH, pluginPath + File.separator);
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Initial Contributors:
|
||||
* The following IBM employees contributed to the Remote System Explorer
|
||||
* component that contains this file: David McKnight.
|
||||
*
|
||||
* Contributors:
|
||||
* David McKnight (IBM) - [283613] [dstore] Create a Constants File for all System Properties we support
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.dstore.internal.core.model;
|
||||
|
||||
public interface IDataStoreSystemProperties {
|
||||
|
||||
/*****************************************************************
|
||||
* Tracing
|
||||
*****************************************************************/
|
||||
// log directory allows customization of log location relative to user dir
|
||||
public static final String DSTORE_LOG_DIRECTORY="DSTORE_LOG_DIRECTORY"; //$NON-NLS-1$
|
||||
|
||||
// indicates whether dstore tracing is on or not ("true" or "false")
|
||||
public static final String DSTORE_TRACING_ON="DSTORE_TRACING_ON"; //$NON-NLS-1$
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
* Idle Shutdown
|
||||
*****************************************************************/
|
||||
// indicates how long to wait on an idle connection before disconnecting
|
||||
// a value of 0 disables this
|
||||
public static final String DSTORE_IDLE_SHUTDOWN_TIMEOUT="DSTORE_IDLE_SHUTDOWN_TIMEOUT"; //$NON-NLS-1$
|
||||
|
||||
/*****************************************************************
|
||||
* Version
|
||||
*****************************************************************/
|
||||
// indicates the dstore protocol version - rarely updated since the protocol itself is stable
|
||||
public static final String DSTORE_VERSION="DSTORE_VERSION"; //$NON-NLS-1$
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
* SSL
|
||||
*****************************************************************/
|
||||
// for custom default certificate alias used in SSL mode
|
||||
public static final String DSTORE_DEFAULT_CERTIFICATE_ALIAS="DSTORE_DEFAULT_CERTIFICATE_ALIAS"; //$NON-NLS-1$
|
||||
|
||||
/*****************************************************************
|
||||
* Spiriting
|
||||
*****************************************************************/
|
||||
// used to determine whether spirting is on ("true" or "false")
|
||||
public static final String DSTORE_SPIRIT_ON="DSTORE_SPIRIT_ON"; //$NON-NLS-1$
|
||||
|
||||
// used to determine whether memlogging is on ("true" or "false")
|
||||
public static final String DSTORE_MEMLOGGING_ON="DSTORE_MEMLOGGING_ON"; //$NON-NLS-1$
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
* Server Logger
|
||||
*****************************************************************/
|
||||
// used to determine the logger level:
|
||||
// 0 is ERROR
|
||||
// 1 is WARNING
|
||||
// 2 is INFO
|
||||
// 3 is DEBUG
|
||||
public static final String DSTORE_LOGGER_LOG_LEVEL="DSTORE_LOGGER_LOG_LEVEL"; //$NON-NLS-1$
|
||||
|
||||
// used to determine the maximum log file size. A new log file gets created when the max is exceeded
|
||||
public static final String RSECOMM_LOGFILE_MAX="RSECOMM_LOGFILE_MAX"; //$NON-NLS-1$
|
||||
|
||||
/*****************************************************************
|
||||
* RSE shell
|
||||
*****************************************************************/
|
||||
// allows for custom shell invocation
|
||||
public static final String DSTORE_SHELL_INVOCATION="DSTORE_SHELL_INVOCATION"; //$NON-NLS-1$
|
||||
|
||||
// the maximum line length in a shell before wrap
|
||||
public static final String DSTORE_SHELL_MAX_LINE="DSTORE_SHELL_MAX_LINE"; //$NON-NLS-1$
|
||||
|
||||
// special encoding to use when reading IO
|
||||
public static final String DSTORE_STDIN_ENCODING="dstore.stdin.encoding"; //$NON-NLS-1$
|
||||
|
||||
/*****************************************************************
|
||||
* Search
|
||||
*****************************************************************/
|
||||
// tells search to only search unique folders ("true" or "false")
|
||||
public static final String DSTORE_SEARCH_ONLY_UNIQUE_FOLDERS="DSTORE_SEARCH_ONLY_UNIQUE_FOLDERS"; //$NON-NLS-1$
|
||||
|
||||
// used for memory management - default is .8
|
||||
public static final String SEARCH_THRESHOLD="search.threshold"; //$NON-NLS-1$
|
||||
|
||||
/*****************************************************************
|
||||
* Daemon
|
||||
*****************************************************************/
|
||||
// used to customized authentication program (normally we use auth.pl)
|
||||
public static final String RSE_AUTH="RSE.AUTH"; //$NON-NLS-1$
|
||||
|
||||
// path to the server jars
|
||||
public static final String A_PLUGIN_PATH="A_PLUGIN_PATH"; //$NON-NLS-1$
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2007 IBM Corporation and others.
|
||||
* Copyright (c) 2002, 2011 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -12,7 +12,7 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* David McKnight (IBM) - [283613] [dstore] Create a Constants File for all System Properties we support
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.dstore.internal.core.server;
|
||||
|
@ -22,6 +22,7 @@ import java.net.InetAddress;
|
|||
import java.net.UnknownHostException;
|
||||
|
||||
import org.eclipse.dstore.core.model.DataStoreAttributes;
|
||||
import org.eclipse.dstore.internal.core.model.IDataStoreSystemProperties;
|
||||
|
||||
/**
|
||||
* This class is used to store attributes that are required
|
||||
|
@ -39,7 +40,7 @@ public class ServerAttributes extends DataStoreAttributes
|
|||
|
||||
try
|
||||
{
|
||||
String pluginPath = System.getProperty("A_PLUGIN_PATH"); //$NON-NLS-1$
|
||||
String pluginPath = System.getProperty(IDataStoreSystemProperties.A_PLUGIN_PATH);
|
||||
if (pluginPath != null) pluginPath = pluginPath.trim();
|
||||
if ((pluginPath != null) && (pluginPath.length() > 0))
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2009, 2011 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -12,6 +12,7 @@
|
|||
* Contributors:
|
||||
* David McKnight (IBM) - [261644] [dstore] remote search improvements
|
||||
* David McKnight (IBM) - [277764] [dstore][regression] IllegalAccessException thrown when connecting to a running server
|
||||
* David McKnight (IBM) - [283613] [dstore] Create a Constants File for all System Properties we support
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.dstore.internal.core.util;
|
||||
|
@ -22,6 +23,7 @@ import java.util.List;
|
|||
|
||||
import org.eclipse.dstore.core.model.DataStore;
|
||||
import org.eclipse.dstore.core.server.SystemServiceManager;
|
||||
import org.eclipse.dstore.internal.core.model.IDataStoreSystemProperties;
|
||||
|
||||
public class MemoryManager {
|
||||
private Object mbean;
|
||||
|
@ -41,7 +43,7 @@ public class MemoryManager {
|
|||
}
|
||||
|
||||
private void init(){
|
||||
String thresholdString = System.getProperty("search.threshold"); //$NON-NLS-1$
|
||||
String thresholdString = System.getProperty(IDataStoreSystemProperties.SEARCH_THRESHOLD);
|
||||
double threshold = 0.8;
|
||||
if(thresholdString != null && thresholdString.length() > 0) {
|
||||
threshold = Integer.parseInt(thresholdString) / 100.0;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2011 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -16,6 +16,7 @@
|
|||
* Noriaki Takatsu (IBM) - [259905][api] Provide a facility to use its own keystore
|
||||
* David McKnight (IBM) - [259905][api] provide public API for getting/setting key managers for SSLContext
|
||||
* David McKnight (IBM) - [264858][dstore] OpenRSE always picks the first trusted certificate
|
||||
* David McKnight (IBM) - [283613] [dstore] Create a Constants File for all System Properties we support
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.dstore.internal.core.util.ssl;
|
||||
|
@ -31,6 +32,7 @@ import javax.net.ssl.X509KeyManager;
|
|||
import org.eclipse.dstore.core.util.ssl.BaseSSLContext;
|
||||
import org.eclipse.dstore.core.util.ssl.DStoreKeyStore;
|
||||
import org.eclipse.dstore.core.util.ssl.IDataStoreTrustManager;
|
||||
import org.eclipse.dstore.internal.core.model.IDataStoreSystemProperties;
|
||||
|
||||
|
||||
public class DStoreSSLContext
|
||||
|
@ -55,7 +57,7 @@ public class DStoreSSLContext
|
|||
keyManagers = kmf.getKeyManagers();
|
||||
|
||||
// read optional system property that indicates a default certificate alias
|
||||
String defaultAlias = System.getProperty("DSTORE_DEFAULT_CERTIFICATE_ALIAS"); //$NON-NLS-1$
|
||||
String defaultAlias = System.getProperty(IDataStoreSystemProperties.DSTORE_DEFAULT_CERTIFICATE_ALIAS);
|
||||
if (defaultAlias != null){
|
||||
KeyManager[] x509KeyManagers = new X509KeyManager[10];
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
* David McKnight (IBM) - [306989] [dstore] workspace in strange condition if expanding projects during logon
|
||||
* David McKnight (IBM) - [313653] [dstore] Not Secured using SSL message appears twice per connect
|
||||
* David McKnight (IBM) - [284950] [dstore] Error binding socket on relaunch
|
||||
* David McKnight (IBM) - [283613] [dstore] Create a Constants File for all System Properties we support
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.connectorservice.dstore;
|
||||
|
@ -69,6 +70,7 @@ import org.eclipse.dstore.core.model.IDataStoreConstants;
|
|||
import org.eclipse.dstore.core.model.IDataStoreProvider;
|
||||
import org.eclipse.dstore.core.model.ISSLProperties;
|
||||
import org.eclipse.dstore.internal.core.client.ClientSSLProperties;
|
||||
import org.eclipse.dstore.internal.core.model.IDataStoreSystemProperties;
|
||||
import org.eclipse.dstore.internal.core.util.XMLparser;
|
||||
import org.eclipse.jface.dialogs.IDialogConstants;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
|
@ -441,7 +443,7 @@ public class DStoreConnectorService extends StandardConnectorService implements
|
|||
Version v = new Version(version);
|
||||
String versionString = v.toString();
|
||||
String dstorePath = getDStorePath(path, versionString);
|
||||
System.setProperty("A_PLUGIN_PATH", dstorePath); //$NON-NLS-1$
|
||||
System.setProperty(IDataStoreSystemProperties.A_PLUGIN_PATH, dstorePath);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2010 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2011 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -21,6 +21,7 @@
|
|||
* David McKnight (IBM) - [286671] Dstore shell service interprets < and > sequences - cmd descriptor to identify ability
|
||||
* David McKnight (IBM) [312415] [dstore] shell service interprets < and > sequences - handle old client/new server case
|
||||
* David McKnight (IBM) [320624] [dstore] shell < and > sequence conversion not being applied to thread
|
||||
* David McKnight (IBM) - [283613] [dstore] Create a Constants File for all System Properties we support
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.dstore.universal.miners;
|
||||
|
@ -37,6 +38,7 @@ import org.eclipse.dstore.core.model.DE;
|
|||
import org.eclipse.dstore.core.model.DataElement;
|
||||
import org.eclipse.dstore.core.model.DataStoreAttributes;
|
||||
import org.eclipse.dstore.core.model.DataStoreResources;
|
||||
import org.eclipse.dstore.internal.core.model.IDataStoreSystemProperties;
|
||||
import org.eclipse.rse.internal.dstore.universal.miners.command.CommandMinerThread;
|
||||
import org.eclipse.rse.internal.dstore.universal.miners.command.QueryPathThread;
|
||||
import org.eclipse.rse.internal.dstore.universal.miners.command.patterns.Patterns;
|
||||
|
@ -208,7 +210,7 @@ public class CommandMiner extends Miner
|
|||
if (encodingArg.getType().equals("shell.encoding")) //$NON-NLS-1$
|
||||
{
|
||||
// fix for 191599
|
||||
System.setProperty("dstore.stdin.encoding",encodingArg.getValue()); //$NON-NLS-1$
|
||||
System.setProperty(IDataStoreSystemProperties.DSTORE_STDIN_ENCODING,encodingArg.getValue());
|
||||
}
|
||||
launchCommand(subject, invocation, status);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2002, 2011 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -18,6 +18,7 @@
|
|||
* David McKnight (IBM) [224906] [dstore] changes for getting properties and doing exit due to single-process capability
|
||||
* Noriaki Takatsu (IBM) - [226237] [dstore] Move the place where the ServerLogger instance is made
|
||||
* David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
|
||||
* David McKnight (IBM) - [283613] [dstore] Create a Constants File for all System Properties we support
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.dstore.universal.miners;
|
||||
|
@ -31,6 +32,7 @@ import java.util.List;
|
|||
import org.eclipse.dstore.core.miners.Miner;
|
||||
import org.eclipse.dstore.core.model.DE;
|
||||
import org.eclipse.dstore.core.model.DataElement;
|
||||
import org.eclipse.dstore.internal.core.model.IDataStoreSystemProperties;
|
||||
|
||||
/**
|
||||
* The environment miner provides access to the environment variables
|
||||
|
@ -180,7 +182,7 @@ public class EnvironmentMiner extends Miner
|
|||
envCommand = "/QOpenSys/usr/bin/sh -c env"; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
String specialEncoding= System.getProperty("dstore.stdin.encoding"); //$NON-NLS-1$
|
||||
String specialEncoding= System.getProperty(IDataStoreSystemProperties.DSTORE_STDIN_ENCODING);
|
||||
try
|
||||
{
|
||||
Process _process = Runtime.getRuntime().exec(envCommand);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2003, 2010 IBM Corporation and others.
|
||||
* Copyright (c) 2003, 2011 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -32,6 +32,7 @@
|
|||
* David McKnight (IBM) [312415] [dstore] shell service interprets < and > sequences - handle old client/new server case
|
||||
* David McKnight (IBM) [318372] [dstore][shells] "export" shell command invalid for certain shells
|
||||
* David McKnight (IBM) [323262] [dstore] zos shell does not display [ ] brackets properly
|
||||
* David McKnight (IBM) - [283613] [dstore] Create a Constants File for all System Properties we support
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.dstore.universal.miners.command;
|
||||
|
@ -55,6 +56,7 @@ import org.eclipse.dstore.core.model.Client;
|
|||
import org.eclipse.dstore.core.model.DE;
|
||||
import org.eclipse.dstore.core.model.DataElement;
|
||||
import org.eclipse.dstore.core.model.DataStoreAttributes;
|
||||
import org.eclipse.dstore.internal.core.model.IDataStoreSystemProperties;
|
||||
import org.eclipse.rse.dstore.universal.miners.CommandMiner;
|
||||
import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
|
||||
import org.eclipse.rse.internal.dstore.universal.miners.command.patterns.ParsedOutput;
|
||||
|
@ -146,7 +148,7 @@ public class CommandMinerThread extends MinerThread
|
|||
|
||||
_subject = theElement;
|
||||
|
||||
String maxLineLengthStr = System.getProperty("DSTORE_SHELL_MAX_LINE"); //$NON-NLS-1$
|
||||
String maxLineLengthStr = System.getProperty(IDataStoreSystemProperties.DSTORE_SHELL_MAX_LINE);
|
||||
if (maxLineLengthStr != null)
|
||||
{
|
||||
try {
|
||||
|
@ -167,10 +169,10 @@ public class CommandMinerThread extends MinerThread
|
|||
|
||||
if (isZ)
|
||||
{
|
||||
String inCoding = System.getProperty("dstore.stdin.encoding"); //$NON-NLS-1$
|
||||
String inCoding = System.getProperty(IDataStoreSystemProperties.DSTORE_STDIN_ENCODING);
|
||||
if (inCoding == null || inCoding.length() == 0){
|
||||
// IBM-1047 works better on z/OS than cp037
|
||||
System.setProperty("dstore.stdin.encoding","IBM-1047"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
System.setProperty(IDataStoreSystemProperties.DSTORE_STDIN_ENCODING,"IBM-1047"); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -284,7 +286,7 @@ public class CommandMinerThread extends MinerThread
|
|||
}
|
||||
|
||||
// check for custom shell invocation
|
||||
String customShellInvocation = System.getProperty("DSTORE_SHELL_INVOCATION"); //$NON-NLS-1$
|
||||
String customShellInvocation = System.getProperty(IDataStoreSystemProperties.DSTORE_SHELL_INVOCATION);
|
||||
if (customShellInvocation != null && customShellInvocation.length() > 0){
|
||||
theShell = customShellInvocation;
|
||||
}
|
||||
|
@ -506,7 +508,7 @@ public class CommandMinerThread extends MinerThread
|
|||
_stdError = new DataInputStream(_theProcess.getErrorStream());
|
||||
|
||||
|
||||
String specialEncoding = System.getProperty("dstore.stdin.encoding"); //$NON-NLS-1$
|
||||
String specialEncoding = System.getProperty(IDataStoreSystemProperties.DSTORE_STDIN_ENCODING);
|
||||
|
||||
if (specialEncoding != null)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2011 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -19,6 +19,7 @@
|
|||
* Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
|
||||
* David McKnight (IBM) - [251729][dstore] problems querying symbolic link folder
|
||||
* Noriaki Takatsu (IBM) - [256724] thread-level security is not established
|
||||
* David McKnight (IBM) - [283613] [dstore] Create a Constants File for all System Properties we support
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
|
||||
|
@ -36,6 +37,7 @@ import org.eclipse.dstore.core.model.DE;
|
|||
import org.eclipse.dstore.core.model.DataElement;
|
||||
import org.eclipse.dstore.core.model.DataStore;
|
||||
import org.eclipse.dstore.core.server.SecuredThread;
|
||||
import org.eclipse.dstore.internal.core.model.IDataStoreSystemProperties;
|
||||
import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
|
||||
import org.eclipse.rse.services.clientserver.IServiceConstants;
|
||||
import org.eclipse.rse.services.clientserver.PathUtility;
|
||||
|
@ -134,7 +136,7 @@ public class FileClassifier extends SecuredThread
|
|||
super(subject.getDataStore());
|
||||
_lines = new ArrayList();
|
||||
// special encoding passed in when starting server
|
||||
_specialEncoding = System.getProperty("dstore.stdin.encoding"); //$NON-NLS-1$
|
||||
_specialEncoding = System.getProperty(IDataStoreSystemProperties.DSTORE_STDIN_ENCODING);
|
||||
|
||||
_subject = subject;
|
||||
_dataStore = subject.getDataStore();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2010 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2011 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -25,6 +25,7 @@
|
|||
* David McKnight (IBM) - [243495] [api] New: Allow file name search in Remote Search to not be case sensitive
|
||||
* David McKnight (IBM) - [299568] Remote search only shows result in the symbolic linked file
|
||||
* David McKnight (IBM] - [330989] [dstore] OutOfMemoryError occurs when searching for a text in a large remote file
|
||||
* David McKnight (IBM) - [283613] [dstore] Create a Constants File for all System Properties we support
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
|
||||
|
@ -41,6 +42,7 @@ import org.eclipse.dstore.core.model.DataStore;
|
|||
import org.eclipse.dstore.core.server.SecuredThread;
|
||||
import org.eclipse.dstore.core.server.SystemServiceManager;
|
||||
import org.eclipse.dstore.core.util.StringCompare;
|
||||
import org.eclipse.dstore.internal.core.model.IDataStoreSystemProperties;
|
||||
import org.eclipse.dstore.internal.core.util.MemoryManager;
|
||||
import org.eclipse.rse.dstore.universal.miners.ICancellableHandler;
|
||||
import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
|
||||
|
@ -102,7 +104,7 @@ public class UniversalSearchHandler extends SecuredThread implements ICancellabl
|
|||
_deVirtualFile = _dataStore.findObjectDescriptor(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR);
|
||||
boolean includeSubfolders = searchString.isIncludeSubfolders();
|
||||
|
||||
String searchUnique = System.getProperty("DSTORE_SEARCH_ONLY_UNIQUE_FOLDERS"); //$NON-NLS-1$
|
||||
String searchUnique = System.getProperty(IDataStoreSystemProperties.DSTORE_SEARCH_ONLY_UNIQUE_FOLDERS);
|
||||
if (searchUnique != null && searchUnique.equals("false")) //$NON-NLS-1$
|
||||
{
|
||||
_searchOnlyUniqueFolders = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue