You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by li...@apache.org on 2016/12/08 00:45:31 UTC
[04/38] incubator-trafodion git commit: convert trafci project into
maven project
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/de7e7d4e/core/conn/trafci/src/org/trafodion/ci/Session.java
----------------------------------------------------------------------
diff --git a/core/conn/trafci/src/org/trafodion/ci/Session.java b/core/conn/trafci/src/org/trafodion/ci/Session.java
deleted file mode 100644
index 5219679..0000000
--- a/core/conn/trafci/src/org/trafodion/ci/Session.java
+++ /dev/null
@@ -1,1908 +0,0 @@
-// @@@ START COPYRIGHT @@@
-//
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-// @@@ END COPYRIGHT @@@
-
-package org.trafodion.ci;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.Statement;
-import java.sql.ResultSet;
-import java.text.DateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.text.SimpleDateFormat;
-import java.util.Vector;
-import java.lang.reflect.Method;
-import org.trafodion.jdbc.t4.TrafT4Connection;
-
-public class Session extends RepObjInterface
-{
-
- private int caller=-1; // caller id. -1 nobody 0- USERI 1- PRUNI
- private int mode=SessionDefaults.SQL_MODE; // 0 for sql 1 for cs
- private boolean sessionType=true; // true - interactive false - non interactive
- private boolean sessionStatus=true; // true - active false- in active
- private String sessionUser=null; // session user
- private String sessionRole=null;
- private String tempSessionRole="";
- private String sessionPass=null; // session password
- private String sessionServer=null;
- private String sessionPort=null;
- private String sessionDsn=null;
- private String sessionCtlg="TRAFODION"; // session ctlg
- private String sessionSchema="TRAFODION"; // session schema
- private String sessionSQLPrompt=SessionDefaults.DEFAULT_SQL_PROMPT; // session prompt
- private String sessionCprompt="+>";
- private String sessionWMSPrompt= SessionDefaults.DEFAULT_WMS_PROMPT;
- private String sessionCSPrompt= SessionDefaults.DEFAULT_CS_PROMPT;
- private String sessionSQLTerminator=";"; // session sql terminator
- private String sessionCSTerminator=";"; // session sql terminator
- private String sessionColSep=" "; // column separator
- private int sessionIdletime=30; // session idletimeout period
- private HashMap<String,String> sessParams=null;
- private HashMap<String,Object[]> prepStmtMap=null;
- private boolean sessionTime=false; // false - if time off true - if time on
- private boolean sessionTiming=false; // false - if timing off true - if timing on
- private boolean sessionLogging=false; // is logging enabled
- private String sessNull="NULL";
- private Query qryObj=null; // current query properties
- private Connection connObj=null; // current connection obj - one per session
- private Statement stmtObj=null; // statement object to execute database queries
- private PreparedStatement pstmtObj=null; // current statement obj - one per session
- private FileReader frObj=null;
- private FileWriter fwObj=null;
- private ConsoleReader crObj=null;
- private ConsoleWriter cwObj=null;
- private boolean termOut=true; // print the output in the terminal
- private boolean isQueryInterrupted=false; // set to true when the user cancels the current operation using ctrl +C
- private boolean isDBConnExists=false; // flag to check if the database connection exists or not.
- private FileWriter logWriter=null;
- private FileReader scriptReader=null;
- private Reader readObj=null;
- private Writer writerObj=null;
- private long lastQryExecTime=0;
- private List<Vector<String>> qryHistory=null;
- private String prevSQLQuery=null; // previous SQL query
- private int prevQryStatusCode=0;
- private int listCount=0;
- private long qryStartTime=0;
- private long qryEndTime=0;
- private int sessLF=0; // Look and feel property
- private int sqlWarningsCnt=0;
- private int qsDisplayColSize = SessionDefaults.DISPLAY_COLSIZE;
- private String strDisplayFormat=SessionDefaults.DEFAULT_DISPLAY_FORMAT;
- private Object theEncryptObject=null;
- private String processName=null;
- private boolean patternsLoaded=false;
- private String ndcsVersion = null;
- private String databaseVersion = null;
- private String databaseEdition = null;
- public String serverType=null;
-
- ValidateQuery vQryObj = null;
- InterfaceQuery iQryObj = null;
- ConditionalQuery cQryObj = null;
- DatabaseQuery dbQryObj = null;
-
- SessionTimeoutTask sTimeoutTask=null;
- boolean qsOpen=false;
- private boolean sessionHistoryAll=false;
- String serviceName=null;
- String varSessionSQLPrompt=SessionDefaults.DEFAULT_SQL_PROMPT;
- boolean ampmFmt = false;
- boolean sessionStats = false;
- LFProperties lfProps = null;
- Process procObj=null;
- private HTMLObject htmlObj=null;
- private XMLObject xmlObj=null;
- private String termEvent="0";
- private int histCmdNo=0;
- private HashMap<String,String> termEventMap=null;
- private String prevTermEvent="0";
- private boolean sessionAutoPrepare=false;
- private String autoPrepStmtName="STMT_CI";
- private int lastErrorCode = 0;
- private String sutVersion = null;
- private String mxosrvrVersion = null;
- private long qryExecEndTime=0;
- private boolean writeParams = false;
- private String totalRecordCount = "0";
- private float t4verNum = 0;
- private boolean spjRs = false;
- private int exitCode = 0;
- private boolean inOutandRS=false;
- private float dbProdVersion=0;
- private boolean logCmdText = true;
- private boolean quietEnabled = false;
- private boolean logAppend = true;
- Object currentDbExecObj=null;
- String spoolFileName=null;
- private boolean isInteractiveRead=false;
- private boolean isImplicitGetStatsQry=false;
- private boolean isCmdEchoEnabled=false;
- // Changes for charset alignment
- private int isoMapping=-1;
- private boolean multiByteAlign=true;
- private HashMap<String,String> aliasParamsMap=null;
- private int fetchSize = SessionDefaults.DEFAULT_FETCH_SIZE;
- private HashMap<String,RepObjInterface> patternHashMap=null;
- private HashMap<String,String> envMap = null;
- private HashMap<String,String> regExpMap = null;
- private int maxPatternDepth = SessionDefaults.MAX_PATTERN_DEPTH;
- private boolean debugOn = false;
- private boolean logCmdEcho = true;
- private boolean sessionStartup = false;
-
- private int prevMode = SessionDefaults.SQL_MODE;
- private boolean dotModeCmd = false;
-
- private boolean histOn = true;
- private String dotMode = null;
-
- /*
- * Constants for CI's default connection timeout value and for a
- * no timeout value.
- */
- public static final int DEFAULT_CONNECTION_TIMEOUT = -999; // Defaults.
- public static final int INFINITE_CONNECTION_TIMEOUT = 0; // No timeout.
-
-
- /*
- * Static variables containing the connection timeout and reset idle timer
- * method. The _s_ndcsConnTimeout value indicates whether or not the
- * user overrode the server side connection timeout defaults.
- */
- private static int _s_ndcsConnTimeout = DEFAULT_CONNECTION_TIMEOUT;
- private static Method _s_resetIdleTimerMethod = null;
-
- private int versionInfo = 2000;
-
- public int getVersionInfo() {
- return versionInfo;
- }
-
- public void setVersionInfo(int versionInfo) {
- this.versionInfo = versionInfo;
- }
-
-static {
- String connTimeoutValue = "";
-
- try {
- /*
- * Check if there was a trafci.connectionTimeout property
- * passed to us and use its value if its valid.
- */
- connTimeoutValue = System.getProperty("trafci.connectionTimeout");
- if (null != connTimeoutValue)
- _s_ndcsConnTimeout = Integer.parseInt(connTimeoutValue);
-
- } catch(NumberFormatException nfe) {
- /*
- * Parsing failed -- log an error and use the default value.
- */
- System.err.println("Invalid value specified for " +
- "trafci.connectionTimeout [" + connTimeoutValue +
- "]. Using defaults ... ");
- _s_ndcsConnTimeout = DEFAULT_CONNECTION_TIMEOUT;
- }
-
-
- try {
- /*
- * Get the class for the TrafT4Connection class and find the
- * reset connection (server) idle timer.
- */
- Class<?> clz = Class.forName("org.trafodion.jdbc.t4.TrafT4Connection");
- _s_resetIdleTimerMethod = clz.getMethod("resetServerIdleTimer",
- new Class[] { } );
-
- } catch(Exception e) {
- _s_resetIdleTimerMethod = null;
- }
-
-
- } /* End of static initializer. */
-
-
-
- Session()
- {
-
- }
-
- Session(String sessionUser, String sessionPass, String sessionRole ,String sessionServer, String sessionPort,
- String sessionDsn,ConsoleReader crObj, ConsoleWriter cwObj)
- {
- this.sessionUser=sessionUser;
- this.sessionPass=sessionPass;
- this.sessionRole=sessionRole;
- this.sessionServer=sessionServer;
- this.sessionPort=sessionPort;
- this.sessionDsn=sessionDsn;
- this.crObj=crObj;
- this.cwObj=cwObj;
-
-
- }
-
- /*
- * Gets the Connection Timeout setting. This value can be overriden by
- * the user by specifying a property "trafci.connectionTimeout".
- *
- * @returns the currently used Connection Timeout setting.
- */
- public static int getConnectionTimeout() {
- return _s_ndcsConnTimeout;
-
- } /* End of getConnectionTimeout static method. */
-
-
-
- /*
- * Resets the connection idle timer on the server. Uses reflection to
- * invoke the method, so that we don't need to compile with a specific
- * JDBC/T4 driver version.
- */
- public void resetConnectionIdleTimer() {
- /*
- * Don't need to do any work, if we set an infinite timeout at
- * connection time.
- */
- if (INFINITE_CONNECTION_TIMEOUT == _s_ndcsConnTimeout)
- return;
-
-
- /*
- * Okay, gotta reset the connection idle timer if we have a valid
- * resetIdleTimer method handle.
- */
- if (null != _s_resetIdleTimerMethod) {
- // System.out.println("@@@TRC: invoking reset timer.");
-
- try {
- _s_resetIdleTimerMethod.invoke(connObj, new Object[] { } );
-
- // We did our job, so just return back.
- return;
-
- } catch(Exception e) {
- // System.out.println("@@@TRC: failed invoking reset timer. " +
- // "Details = " + e.getMessage() );
-
-
- // Don't want to do this again if it failed.
- _s_resetIdleTimerMethod = null;
-
- // if (Boolean.getBoolean("trafci.enableTrace") )
- // e.printStackTrace();
-
- }
-
- } /* End of IF resetIdleTimerMethod is valid. */
-
-
-
- /*
- * Okay, if we got here -- means we failed to invoke the reset
- * connection idle timer method -- run a dummy query to reset
- * the timer on the NDCS end.
- */
- try {
- // System.out.println("@@@TRC: running infostats keepalive.");
- Statement stmt = connObj.createStatement();
- ResultSet rs = stmt.executeQuery("INFOSTATS _KEEPALIVE_HANDLE_");
- rs.close();
- stmt.close();
-
- } catch(Exception exc) {
- // Ignore any errors.
- }
-
-
- } /* End of resetConnectionIdleTimer method. */
-
-
-
- public Connection getConnObj()
- {
- return connObj;
- }
-
- public void setConnObj(Connection connObj)
- {
- this.connObj = connObj;
- this.prepStmtMap=null;
-
- }
-
- public int getMode()
- {
- return mode;
- }
-
- public int getDisplayFormat()
- {
- if (this.strDisplayFormat.equalsIgnoreCase("HTML"))
- return SessionDefaults.HTML_FORMAT;
- else if (this.strDisplayFormat.equalsIgnoreCase("XML"))
- return SessionDefaults.XML_FORMAT;
- else if (this.strDisplayFormat.equalsIgnoreCase("CSV") || this.strDisplayFormat.equalsIgnoreCase("COLSEP"))
- return SessionDefaults.CSV_FORMAT;
- else
- return SessionDefaults.RAW_FORMAT;
- }
-
- public String getStrMode()
- {
- switch (this.mode)
- {
- case SessionDefaults.SQL_MODE:
- return "SQL";
- default:
- return "SQL";
- }
- }
-
- public String getEnv(String var)
- {
- var=var.toUpperCase();
-
- if(var.equals("RECCOUNT") || var.equals("ACTIVITYCOUNT"))
- {
- String tmp = this.getTotalRecordCount();
- if(tmp == null)
- return "-1";
- else
- return tmp;
- }
-
- if(var.equals("LASTERROR") || var.equals("ERRORCODE"))
- return this.getLastError() + "";
-
- if(var.equals("COLSEP"))
- return this.getSessionColSep();
-
- if(var.equals("DATASOURCE"))
- return this.getSessionDsn();
-
- if(var.equals("HISTOPT"))
- return this.isSessionHistoryAll()?"ALL":"DEFAULT [No expansion of script files]";
-
-
- if(var.equals("IDLETIMEOUT"))
- return this.getSessionIdletime()+"";
-
- if(var.equals("LIST_COUNT"))
- return this.getListCount()+"";
-
- if(var.equals("LOG_FILE"))
- {
- if(this.isSessionLogging())
- return this.getSpoolFileName();
- else
- return "OFF";
- }
-
- if(var.equals("LOOK_AND_FEEL"))
- return this.getStrSessView();
-
- if(var.equals("MARKUP"))
- return this.getStrDisplayFormat();
-
- if(var.equals("MODE"))
- return this.getStrMode();
-
- if(var.equals("PROMPT"))
- return this.getSessionPrompt();
-
- if(var.equals("ROLE"))
- return this.getSessionRole();
-
- if(var.equals("SCHEMA"))
- return this.getSessionSchema();
-
- if(var.equals("SERVER"))
- return this.getSessionServer() + this.getSessionPort();
-
- if(var.equals("SQLTERMINATOR"))
- return this.getSessionSQLTerminator();
-
- if(var.equals("TIME"))
- return this.isSessionTimeOn()?"ON":"OFF";
-
- if(var.equals("TIMING"))
- return this.isSessionTimingOn()?"ON":"OFF";
-
- if(var.equals("USER"))
- return this.getSessionUser();
-
- return null;
- }
-
- public void setNewPrompt()
- {
- // include all possible combinations of env variables here
- String[][] envNameVal = { {"%USER",this.sessionUser},
- {"%SCHEMA",this.sessionSchema},
- {"%SERVER",this.sessionServer+this.sessionPort},
- {"%MODE",this.getStrMode()},
- {"%DATASOURCE", this.sessionDsn},
- {"%ROLE", this.sessionRole}
- };
- String prompt=this.varSessionSQLPrompt;
- switch (this.mode)
- {
- case SessionDefaults.SQL_MODE:
- prompt = this.varSessionSQLPrompt;
- break;
- default:
- break;
- }
- int envCount=0;
- String replaceString;
- while (this.connObj != null && prompt.indexOf("%") != -1 && envCount < envNameVal.length)
- {
-
- // Every $ needs to be replaced with \$. Do not delete the backslashes.
- replaceString = envNameVal[envCount][1];
- replaceString = replaceString.replaceAll("\\$","\\\\\\$");
- prompt=prompt.replaceAll("(?i)"+envNameVal[envCount][0]+"(?![^_\\W])",replaceString);
- envCount++;
- }
-
- if (!prompt.trim().endsWith(">"))
- prompt += ">";
- switch (this.mode)
- {
- case SessionDefaults.SQL_MODE:
- this.sessionSQLPrompt = prompt;
- break;
- default:
- break;
- }
-
- crObj.setPrompt(prompt,this.sessionTime, ampmFmt);
- }
-
- public void setMode(int mode)
- {
- this.mode = mode;
- this.setNewPrompt();
- }
-
- public PreparedStatement getPreparedStmt()
- {
- return pstmtObj;
- }
-
- public void setPreparedStmt(PreparedStatement pstmtObj)
- {
- this.pstmtObj = pstmtObj;
- }
-
- public Query getQuery()
- {
- return qryObj;
- }
-
- public void setQuery(Query qryObj)
- {
- this.qryObj = qryObj;
- }
-
- public String getSessionCtlg()
- {
- return sessionCtlg;
- }
-
- public void setSessionCtlg(String sessionCtlg)
- {
- this.sessionCtlg = sessionCtlg;
- }
-
- public String getSessionPass()
- {
- return sessionPass;
- }
-
- public void setSessionPass(String sessionPass)
- {
- this.sessionPass = sessionPass;
- }
-
- public String getSessionPrompt()
- {
- String timeStamp = "";
- SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss ");
- String prompt="";
-
- if (this.isSessionTimeOn())
- {
- if (this.ampmFmt)
- timeStamp = DateFormat.getTimeInstance().format(new Date())+ " ";
- else
- timeStamp = sdf.format(new Date());
- }
-
- prompt = this.getPrompt();
- crObj.setPrompt(prompt, sessionTime, ampmFmt);
- return (timeStamp + prompt);
- }
-
- public String getPrompt() {
-
- String prompt="";
-
- switch (this.mode)
- {
- case SessionDefaults.SQL_MODE:
- prompt = sessionSQLPrompt;
- break;
- default:
- prompt = sessionSQLPrompt;
- }
- return prompt;
- }
-
- public void setSessionPrompt(String sessionPrompt)
- {
- switch (this.mode)
- {
- case SessionDefaults.SQL_MODE:
- this.sessionSQLPrompt = this.varSessionSQLPrompt = sessionPrompt;
- break;
- default: break;
- }
- this.setNewPrompt();
- }
-
- public String getSessionSchema()
- {
- return sessionSchema;
- }
-
- public void setSessionSchema(String sessionSchema)
- {
- this.sessionSchema = sessionSchema;
- this.setNewPrompt();
- }
-
- public boolean isSessionActive()
- {
- return sessionStatus;
- }
-
- public void setSessionStatus(boolean sessionStatus)
- {
- this.sessionStatus = sessionStatus;
- }
-
- public boolean isSessionTimeOn()
- {
- return sessionTime;
- }
-
- public void setSessionTime(boolean sessionTime)
- {
- this.sessionTime = sessionTime;
- }
-
- public boolean isSessionTimingOn()
- {
- return sessionTiming;
- }
-
- public void setSessionTiming(boolean sessionTiming)
- {
- this.sessionTiming = sessionTiming;
- }
-
- public boolean isSessionInteractive()
- {
- return sessionType;
- }
-
- public void setSessionType(boolean sessionType)
- {
- this.sessionType = sessionType;
- }
-
- public boolean getSessionType()
- {
- return this.sessionType;
- }
-
- public String getSessionUser()
- {
- return sessionUser;
- }
-
- public void setSessionUser(String sessionUser)
- {
- this.sessionUser = sessionUser;
- this.setNewPrompt();
- }
-
-
- public ConsoleReader getConsoleReader()
- {
- return crObj;
- }
-
-
- public void setConsoleReader(ConsoleReader crObj)
- {
- this.crObj = crObj;
- }
-
-
- public ConsoleWriter getConsoleWriter()
- {
- return cwObj;
- }
-
-
- public void setConsoleWriter(ConsoleWriter cwObj)
- {
- this.cwObj = cwObj;
- }
-
-
- public FileReader getFileReader()
- {
- return frObj;
- }
-
-
- public void setFileReader(FileReader frObj)
- {
- if (frObj == null)
- {
- frObj=new FileReader();
- }
- this.frObj = frObj;
- }
-
-
- public FileWriter getFileWriter()
- {
- return fwObj;
- }
-
-
- public void setFileWriter(FileWriter fwObj)
- {
- if (fwObj == null)
- {
- fwObj=new FileWriter();
- }
- this.fwObj = fwObj;
- }
-
- public String getStrDisplayFormat()
- {
- return strDisplayFormat;
- }
-
- public void setStrDisplayFormat(String strDisplayFormat)
- {
- this.strDisplayFormat = strDisplayFormat;
- }
-
- public String getSessionDsn()
- {
- return sessionDsn;
- }
-
- public void setSessionDsn(String sessionDsn)
- {
- this.sessionDsn = sessionDsn;
- this.setNewPrompt();
- }
-
- public String getSessionPort()
- {
- return sessionPort;
- }
-
- public void setSessionPort(String sessionPort)
- {
- this.sessionPort = sessionPort;
- }
-
- public String getSessionServer()
- {
- return sessionServer;
- }
-
- public void setSessionSever(String sessionServer)
- {
- this.sessionServer = sessionServer;
- this.setNewPrompt();
- }
-
- public String getSessionSQLTerminator()
- {
- if (this.mode != SessionDefaults.SQL_MODE)
- {
- return sessionCSTerminator;
- }
- else
- {
- return sessionSQLTerminator;
- }
- }
-
- public void setSessionSQLTerminator(String sessionSQLTerminator)
- {
- this.sessionSQLTerminator = sessionSQLTerminator.toUpperCase();
- }
-
- public int getSessionIdletime()
- {
- return sessionIdletime;
- }
-
- public void setSessionIdletime(int sessionIdletime)
- {
- this.sessionIdletime = sessionIdletime;
- if (this.sTimeoutTask != null)
- {
- this.sTimeoutTask.idleTime=sessionIdletime;
- }
- }
-
- public HashMap<String,Object[]> getPrepStmtMap()
- {
- return prepStmtMap;
- }
-
- public PreparedStatement getPrepStmtMap(String stmtName)
- {
- if (prepStmtMap !=null)
- {
- Object[] pStmtObj=(Object[]) prepStmtMap.get(stmtName);
- if (pStmtObj != null)
- {
- return (PreparedStatement) (pStmtObj[0]);
- }
- }
- return null;
- }
-
- public boolean getPrepTrimOut(String stmtName)
- {
- if (prepStmtMap !=null)
- {
- Object[] pStmtObj=(Object[]) prepStmtMap.get(stmtName);
-
- return (Boolean.valueOf((String)pStmtObj[1]).booleanValue());
- }
- else
- return false;
- }
-
- public void setPrepStmtMap(String stmtName,Object pStmtObj,boolean trimOut)
- {
- Object[] objectArr=new Object[2];
- if (this.prepStmtMap == null)
- {
- this.prepStmtMap=new HashMap<String,Object[]>();
- }
- objectArr[0]=pStmtObj;
- if (trimOut)
- {
- objectArr[1]="true";
- }
- else
- {
- objectArr[1]="false";
- }
- this.prepStmtMap.put(stmtName,objectArr);
-
- }
-
- public void removePrepStmtMap(String stmtName)
- {
- if (this.prepStmtMap != null)
- {
- this.prepStmtMap.remove(stmtName);
- }
- }
-
- public HashMap<String,String> getSessParams()
- {
- return sessParams;
- }
-
- public void resetPrepStmtMap(HashMap<String,Object[]> prepStmtMap)
- {
- this.prepStmtMap=null;
- }
-
- public String getSessParams(String param)
- {
- if (sessParams!=null)
- return (String) sessParams.get(param);
- else
- return null;
-
- }
-
- public void setSessParams(String param,String value)
- {
- if (this.sessParams == null)
- {
- this.sessParams=new HashMap<String,String>();
- }
- this.sessParams.put(param,value);
- }
-
- public void resetSessionParams(HashMap<String,String> sessParams)
- {
- this.sessParams=sessParams;
- }
-
- public void resetSessionParams(String param)
- {
- if (this.sessParams != null)
- {
- this.sessParams.remove(param);
- }
- }
-
- public boolean isSessionLogging()
- {
- return sessionLogging;
- }
-
- public void setSessionLogging(boolean sessionLogging)
- {
- this.sessionLogging = sessionLogging;
- }
-
- public Statement getStmtObj()
- {
- return stmtObj;
- }
-
- public void setStmtObj(Statement stmtObj)
- {
- this.stmtObj = stmtObj;
- }
-
- public String getSessNull()
- {
- return sessNull;
- }
-
- public void setSessNull(String sessNull)
- {
- this.sessNull = sessNull;
- }
-
- public String getSessionCprompt()
- {
- return sessionCprompt;
- }
-
- public void setSessionCprompt(String sessionCprompt)
- {
- this.sessionCprompt = sessionCprompt;
- }
-
- public boolean isTermOut()
- {
- return termOut;
- }
-
- public void setTermOut(boolean termOut)
- {
- this.termOut = termOut;
- }
-
- public FileWriter getLogWriter()
- {
- return logWriter;
- }
-
- public void setLogWriter(FileWriter logWriter)
- {
- this.logWriter = logWriter;
- }
-
- public FileReader getScriptReader()
- {
- return scriptReader;
- }
-
- public void setScriptReader(FileReader scriptReader)
- {
- this.scriptReader = scriptReader;
- }
-
- public int getCaller()
- {
- return caller;
- }
-
- public void setCaller(int caller)
- {
- this.caller = caller;
- }
-
- public DatabaseQuery getDbQryObj()
- {
- return dbQryObj;
- }
-
- public void setDbQryObj(DatabaseQuery dbQryObj)
- {
- this.dbQryObj = dbQryObj;
- }
-
- public InterfaceQuery getIQryObj()
- {
- return iQryObj;
- }
-
- public void setIQryObj(InterfaceQuery qryObj)
- {
- iQryObj = qryObj;
- }
-
- public ConditionalQuery getCQryObj(){
- return cQryObj;
- }
-
- public void setCQryObj(ConditionalQuery qryObj) {
- cQryObj = qryObj;
- }
-
- public ValidateQuery getVQryObj()
- {
- return vQryObj;
- }
-
- public void setVQryObj(ValidateQuery qryObj)
- {
- vQryObj = qryObj;
- }
-
- public Reader getReader()
- {
- return readObj;
- }
-
- public void setReader(Reader readObj)
- {
- this.readObj = readObj;
- }
-
- public Writer getWriter()
- {
- return writerObj;
- }
-
- public void setWriter(Writer writerObj)
- {
- this.writerObj = writerObj;
- }
-
- public long getLastQryExecTime()
- {
- return lastQryExecTime;
- }
-
- public void setLastQryExecTime(long lastQryExecTime)
- {
- this.lastQryExecTime = lastQryExecTime;
- if (this.sTimeoutTask != null)
- {
- this.sTimeoutTask.lastQueryExecTime=lastQryExecTime;
- this.sTimeoutTask.checkRequired=true;
- }
- }
-
- public SessionTimeoutTask getTimeoutTask()
- {
- return sTimeoutTask;
- }
-
- public void setTimeoutTask(SessionTimeoutTask timeoutTask)
- {
- sTimeoutTask = timeoutTask;
-
- if (null != sTimeoutTask)
- sTimeoutTask.setSessionObj(this);
-
- }
-
- public void setTimerHold()
- {
- if (this.sTimeoutTask != null)
- {
- this.sTimeoutTask.checkRequired=false;
- }
-
- }
-
- public List<Vector<String>> getQryHistory()
- {
- return qryHistory;
- }
-
- public void addQryToHistory(String qryText)
- {
- if (isDotModeCmd()) {
- qryText = "."+ this.getDotMode() + " " + qryText;
- if (this.debugOn)
- System.out.println(this.getClass().getName()+"::"+ qryText);
- }
-
- if (!histOn)
- {
- this.setHistOn(true);
- return;
- }
-
- histCmdNo++;
- if (this.qryHistory == null)
- {
- this.qryHistory =new ArrayList<Vector<String>>();
- }
- if (this.termEventMap == null)
- {
- this.termEventMap=new HashMap<String, String>();
- termEventMap.put("0",";");
- }
- if (this.qryHistory.size() >= SessionDefaults.QRY_HISTORY_MAX_LMT)
- {
- this.qryHistory.remove(0);
- }
- Vector<String> histVect = new Vector<String>();
- //mark
- //histVect.add(new Integer(histCmdNo));
- histVect.add(String.valueOf(histCmdNo));
- histVect.add(qryText);
- if (Integer.parseInt(termEvent) == histCmdNo)
- {
- histVect.add(prevTermEvent);
- }
- else
- {
- histVect.add(termEvent);
- }
- this.qryHistory.add(histVect);
-
- }
-
- public String getPrevSQLQuery()
- {
- return prevSQLQuery;
- }
-
- public void setPrevSQLQuery(String prevSQLQuery)
- {
- this.prevSQLQuery = prevSQLQuery;
- }
-
- public int getPrevQryStatusCode()
- {
- return prevQryStatusCode;
- }
-
- public void setPrevQryStatusCode(int prevQryStatusCode)
- {
- this.prevQryStatusCode = prevQryStatusCode;
- }
-
- public int getListCount()
- {
- return listCount;
- }
-
- public void setListCount(int listCount)
- {
- this.listCount = listCount;
- }
-
- public int getDisplayColSize()
- {
- return qsDisplayColSize;
- }
-
- public void setDisplayColSize(int colSize)
- {
- this.qsDisplayColSize = colSize;
- }
-
- public String getSessionColSep()
- {
- return sessionColSep;
- }
-
- public void setSessionColSep(String sessionColSep)
- {
- this.sessionColSep = sessionColSep;
- }
-
- public void setQryStartTime()
- {
- qryStartTime=System.currentTimeMillis();
- }
-
- public void setQryEndTime()
- {
- qryEndTime=System.currentTimeMillis();
- if (qryObj != null)
- qryObj.setElapsedTime(this.qryEndTime-this.qryStartTime);
- }
-
-
-
- public void resetQryStartEndTime()
- {
- qryStartTime=qryEndTime=0;
- }
-
- public int getSessView()
- {
- return sessLF;
- }
-
- public String getStrSessView()
- {
- switch (sessLF)
- {
- case SessionDefaults.CIDEFAULT_VIEW:
- return "TRAFCI";
-
- case SessionDefaults.MXCI_VIEW:
- return "MXCI";
-
- default:
- return "TRAFCI";
-
- }
- }
-
- public void setSessView(int sessLF)
- {
- this.sessLF = sessLF;
- }
-
- public int getSqlWarningsCnt()
- {
- return sqlWarningsCnt;
- }
-
- public void setSqlWarningsCnt(int sqlWarningsCnt)
- {
- this.sqlWarningsCnt = sqlWarningsCnt;
- }
-
- public boolean isQueryInterrupted()
- {
- return isQueryInterrupted;
- }
-
- public void setQueryInterrupted(boolean isQueryInterrupted)
- {
- this.isQueryInterrupted = isQueryInterrupted;
- }
-
- public boolean isDBConnExists()
- {
- return isDBConnExists;
- }
-
- public void setDBConnExists(boolean isDBConnExists)
- {
- this.isDBConnExists = isDBConnExists;
- if (!isDBConnExists)
- {
- setMxosrvrVersion(null);
- }
- }
-
- public void setCurrentStmtObj(Object currentDbExecObj)
- {
- this.currentDbExecObj=currentDbExecObj;
- }
- public Object getCurrentStmtObj()
- {
- return this.currentDbExecObj;
- }
-
- public boolean isSessionHistoryAll()
- {
- return sessionHistoryAll;
- }
-
- public void setSessionHistoryAll(boolean sessionHistoryAll)
- {
- this.sessionHistoryAll = sessionHistoryAll;
- }
-
-
- public boolean isSessionStatsEnabled()
- {
- return sessionStats;
- }
-
- public void setSessionStatsEnabled(boolean sessionStats)
- {
- this.sessionStats = sessionStats;
- }
-
- public LFProperties getLfProps()
- {
- return lfProps;
- }
-
- public void setLFProps(LFProperties lfProps)
- {
- this.lfProps = lfProps;
- }
-
- public boolean isAmPmFmt()
- {
- return ampmFmt;
- }
-
- public void setAmPmFmt(boolean ampmFmt)
- {
- this.ampmFmt = ampmFmt;
- }
-
- public Process getProcObj()
- {
- return procObj;
- }
-
- public void setProcObj(Process procObj)
- {
- this.procObj = procObj;
- }
-
- public HTMLObject getHtmlObj()
- {
- return htmlObj;
- }
-
- public void setHtmlObj(HTMLObject htmlObj)
- {
- this.htmlObj = htmlObj;
- }
-
- public XMLObject getXmlObj()
- {
- return xmlObj;
- }
-
- public void setXmlObj(XMLObject xmlObj)
- {
- this.xmlObj = xmlObj;
- }
-
- public String getTermEvent()
- {
- return termEvent;
- }
-
- public void setTermEvent(String termEvent)
- {
- prevTermEvent = this.termEvent;
- this.termEvent = termEvent;
- }
-
- public int getHistCmdNo()
- {
- return histCmdNo;
- }
-
- public void setHistCmdNo(int histCmdNo)
- {
- this.histCmdNo = histCmdNo;
- }
-
- public HashMap<String, String> getTermEventMap()
- {
- return termEventMap;
- }
-
- public void setTermEventMap(String eventNum, String sqlTerminator)
- {
- if (this.termEventMap == null)
- {
- this.termEventMap=new HashMap<String, String>();
- termEventMap.put("0",";");
- }
-
- this.termEventMap.put(eventNum,sqlTerminator);
-
- }
-
- public long getQryExecEndTime()
- {
- return qryExecEndTime;
- }
-
- public void setQryExecEndTime()
- {
- this.qryExecEndTime = (System.currentTimeMillis() - this.qryStartTime);
- }
-
- public boolean isSessionAutoPrepare()
- {
- return sessionAutoPrepare;
- }
-
- public void setSessionAutoPrepare(boolean sessionAutoPrepare)
- {
- this.sessionAutoPrepare = sessionAutoPrepare;
- }
-
- public String getAutoPrepStmtName()
- {
- return autoPrepStmtName;
- }
-
- public void setAutoPrepStmtName(String autoPrepStmtName)
- {
- this.autoPrepStmtName = autoPrepStmtName;
- }
-
- public int getLastError()
- {
- return lastErrorCode;
- }
-
- public void setLastError(int lastErrorCode)
- {
- this.lastErrorCode = lastErrorCode;
- }
-
- public String getSutVersion()
- {
- return sutVersion;
- }
-
- public void setSutVersion(String sutVersion)
- {
- this.sutVersion = sutVersion;
- }
-
- public String getMxosrvrVersion()
- {
- return mxosrvrVersion;
- }
-
- public void setMxosrvrVersion(String mxosrvrVersion)
- {
- this.mxosrvrVersion = mxosrvrVersion;
- }
-
-/* public NSCmd getNscmd()
- {
- return nscmd;
- }
-
- public void setNscmd(NSCmd nscmd)
- {
- this.nscmd = nscmd;
- }
-*/
-
- public boolean isWriteParams()
- {
- return writeParams;
- }
-
- public void setWriteParams(boolean writeParams)
- {
- this.writeParams = writeParams;
- }
-
- public String getTotalRecordCount()
- {
- return totalRecordCount;
- }
-
- public void setTotalRecordCount(String totalRecordCount)
- {
- this.totalRecordCount = totalRecordCount;
- }
-
- public void setT4verNum(float num)
- {
- t4verNum = num;
- }
- public float getT4verNum()
- {
- return t4verNum;
- }
-
- public boolean isSPJRS()
- {
- return spjRs;
- }
-
- public void setSPJRS(boolean spjRs)
- {
- this.spjRs = spjRs;
- }
-
- public void setExitCode(int code){
- this.exitCode = code;
- }
-
- public int getExitCode(){
- return this.exitCode;
- }
-
- public boolean isInOutandRS()
- {
- return inOutandRS;
- }
-
- public void setInOutandRS(boolean inOutandRS)
- {
- this.inOutandRS = inOutandRS;
- }
-
- public float getDatabaseProdVersion()
- {
- return dbProdVersion;
- }
-
- public void setDatabaseProdVersion(float dbProdVersion)
- {
- this.dbProdVersion = dbProdVersion;
- }
-
- public boolean isLogCmdText()
- {
- return logCmdText;
- }
-
- public void setLogCmdText(boolean logCmdText)
- {
- this.logCmdText = logCmdText;
- }
-
- public boolean isQuietEnabled()
- {
- return quietEnabled;
- }
-
- public void setQuietEnabled(boolean quietEnabled)
- {
- this.quietEnabled = quietEnabled;
- }
-
- public boolean isLogAppend()
- {
- return logAppend;
- }
-
- public void setLogAppend(boolean logAppend)
- {
- this.logAppend = logAppend;
- }
-
- public String getSpoolFileName()
- {
- return spoolFileName;
- }
-
- public void setSpoolFileName(String spoolFileName)
- {
- this.spoolFileName = spoolFileName;
- }
-
- protected void setSessionValues()
- {
-
- try
- {
- this.sessionRole = ((TrafT4Connection)this.connObj).getRoleName();
- if (this.debugOn)
- System.out.println("Session::" + this.sessionRole);
- if (0 == this.sessionRole.trim().length()) // If T4 returns empty string
- {
- this.sessionRole = this.getUserRoleName();
- if (this.debugOn)
- System.out.println("Session getUserRoleName::" + this.sessionRole);
- }
- }
- catch (NullPointerException npe)
- {
- this.sessionRole = this.getUserRoleName();
- if (this.debugOn)
- System.out.println("Session NPE getUserRoleName::" + this.sessionRole);
- }
- catch (Exception se)
- {
- }
- finally {
- this.setNewPrompt();
- }
- }
-
- protected String getUserRoleName()
- {
-
- //String userName = null;
- String userRole = null;
- try
- {
- Statement stmt = this.connObj.createStatement();
- ResultSet rs = stmt.executeQuery("VALUES(USER, CURRENT_ROLE)");
- while (rs!=null && rs.next())
- {
- //userName = rs.getString(1);
- userRole = rs.getString(2);
- }
- rs.close();
- stmt.close();
- } catch (Exception se)
- {
- // System.out.println("error:"+se.getMessage());
- }
- if (userRole != null)
- {
- int i = userRole.indexOf(".");
- this.sessionRole = userRole.substring(i+1); // Prints the second half of the role
- }
- else
- {
- sessionRole = "Information not available";
- }
- return sessionRole;
- }
-
-
- public boolean isInteractiveRead()
- {
- return isInteractiveRead;
- }
-
- public void setInteractiveRead(boolean isInteractiveRead)
- {
- this.isInteractiveRead = isInteractiveRead;
- }
-
- public boolean isImplicitGetStatsQry()
- {
- return isImplicitGetStatsQry;
- }
-
- public void setImplicitGetStatsQry(boolean isImplicitGetStatsQry)
- {
- this.isImplicitGetStatsQry = isImplicitGetStatsQry;
- }
-
- public boolean isCmdEchoEnabled()
- {
- return isCmdEchoEnabled;
- }
-
- public void setCmdEcho(boolean isCmdEchoEnabled)
- {
- this.isCmdEchoEnabled = isCmdEchoEnabled;
- }
-
- public int getISOMapping()
- {
- return isoMapping;
- }
-
- public void setISOMapping(int isoMapping)
- {
- this.isoMapping = isoMapping;
- }
-
- public boolean isMultiByteAlign()
- {
- return multiByteAlign;
- }
-
- public void setMultiByteAlign(boolean multiByteAlign)
- {
- this.multiByteAlign = multiByteAlign;
- }
- public String getSessionRole()
- {
- return sessionRole;
- }
-
- public void setSessionRole(String sessionRole)
- {
- this.sessionRole = sessionRole;
- this.setNewPrompt();
- }
-
- public String getTempSessionRole() {
- return tempSessionRole;
- }
-
- public void setTempSessionRole(String tempSessionRole) {
- this.tempSessionRole = tempSessionRole;
- }
- public HashMap<String, String> getAliasMap()
- {
- return aliasParamsMap;
- }
-
- public String getAlias(String param)
- {
- if (aliasParamsMap!=null)
- return (String) aliasParamsMap.get(param);
- else
- return null;
- }
-
- public void setAlias(String param,String value)
- {
- if (this.aliasParamsMap == null)
- {
- this.aliasParamsMap=new HashMap<String, String>();
- }
- this.aliasParamsMap.put(param.toUpperCase(),value);
- }
-
- public int getFetchSize() {
- return fetchSize;
- }
-
- public void setFetchSize(int fetchSize) {
- this.fetchSize = fetchSize;
- }
-
- public HashMap<String, RepObjInterface> getPatternHashMap() {
- return patternHashMap;
- }
-
- public void setPatternHashMap(HashMap<String, RepObjInterface> patternHashMap) {
- this.patternHashMap = patternHashMap;
- }
-
- public void setPattern(String patternKey, String patternVal)
- {
- if (patternHashMap == null)
- patternHashMap = new HashMap<String, RepObjInterface>();
- patternHashMap.put(patternKey.toUpperCase(), new ReplacementObj(patternKey, patternVal));
-
- }
-
-
- public String getValue (String key)
- {
- return (String)this.getEnvMap().get(key.toUpperCase());
-
- }
-
- public String getPatternValue(String key)
- {
- if (patternHashMap.containsKey(key.toUpperCase()))
- {
- RepObjInterface repObj = (RepObjInterface)(patternHashMap.get(key.toUpperCase()));
- return (repObj).getValue(key);
- }
- return null;
-
-
- }
-
- public HashMap<String, String> getEnvMap() {
- if (envMap == null)
- envMap = new HashMap<String, String>();
- return envMap;
- }
-
- public void setEnvMap(HashMap<String,String> envMap) {
- this.envMap = envMap;
- }
-
- public HashMap<String, String> getRegExpMap() {
- return regExpMap;
- }
-
-
- public void setRegExpPattern(String patternKey, String patternVal)
- {
- if (regExpMap == null)
- regExpMap = new HashMap<String, String>();
- regExpMap.put(patternKey, patternVal);
-
- }
-
- public int getMaxPatternDepth() {
- return maxPatternDepth;
- }
-
- public void setMaxPatternDepth(int maxPatternDepth) {
- this.maxPatternDepth = maxPatternDepth;
- }
-
- public boolean isDebugOn() {
- return debugOn;
- }
-
- public void setDebugOn(boolean debugOn) {
- this.debugOn = debugOn;
- }
-
- public boolean isLogCmdEcho() {
- return logCmdEcho;
- }
-
- public void setLogCmdEcho(boolean logCmdEcho) {
- this.logCmdEcho = logCmdEcho;
- }
-
- public boolean isSessionStartup() {
- return sessionStartup;
- }
-
- public void setSessionStartup(boolean sessionStartup) {
- this.sessionStartup = sessionStartup;
- setSessionLogging(sessionStartup);
- this.logCmdEcho = !sessionStartup;
- }
-
- public int getPrevMode() {
- return prevMode;
- }
-
- public void setPrevMode(int prevMode) {
- this.prevMode = prevMode;
- }
-
- public boolean isDotModeCmd() {
- return dotModeCmd;
- }
-
- public void setDotModeCmd(boolean dotModeCmd) {
- this.dotModeCmd = dotModeCmd;
- }
-
- public boolean isHistOn() {
- return histOn;
- }
-
- public void setHistOn(boolean histOn) {
- this.histOn = histOn;
- }
-
- public void setTheEncryptObject(Object theEncryptObject) {
- this.theEncryptObject = theEncryptObject;
- }
-
- public Object getTheEncryptObject() {
- return theEncryptObject;
- }
-
- public String getNeoProcessName() {
- return processName;
- }
-
- public void setNeoProcessName(String processName) {
- this.processName = processName;
- }
-
- public boolean isPatternsLoaded() {
- return patternsLoaded;
- }
-
- public void setPatternsLoaded(boolean patternsLoaded) {
- this.patternsLoaded = patternsLoaded;
- }
-
- /**
- * @return
- * true : can get Platform version
- * false: can't get Platform version
- */
- protected boolean getPlatformObjectVersions()
- {
- try
- {
- Statement stmt = this.connObj.createStatement();
- ResultSet rs = null;
- if (stmt.execute("info system"))
- rs = stmt.getResultSet();
-
- if (this.isDebugOn() ) {
- System.out.println("rs for info system = " + rs);
- }
-
- if (rs!=null && rs.next()) {
- {
- ndcsVersion = rs.getString(2);
- if (ndcsVersion != null){
- ndcsVersion = ndcsVersion.substring(ndcsVersion.indexOf("Version"));
- sutVersion = ndcsVersion.substring(ndcsVersion.indexOf("Release"),ndcsVersion.indexOf("("));
- String platformVersion = sutVersion.substring(8);
- }
- databaseVersion = rs.getString(5);
- databaseEdition = rs.getString(6);
-
- }
- if (this.debugOn) {
- System.out.println("ndcs version:: " + ndcsVersion);
- System.out.println("database version:: " + databaseVersion);
- System.out.println("database edition:: " + databaseEdition);
- }
- rs.close();
- stmt.close();
- }
- } catch (Exception se) {
- if (this.isDebugOn() ) {
- System.out.println("error:"+se.getMessage() );
- se.printStackTrace(System.out);
- }
-
- ndcsVersion = null;
- return false;
- }
- this.setNdcsVersion(ndcsVersion);
- return true;
- }
-
- public String getNdcsVersion() {
- return ndcsVersion;
- }
-
- public void setNdcsVersion(String ndcsVersion) {
- this.ndcsVersion = ndcsVersion;
- }
-
- public String getDotMode() {
- return dotMode;
- }
-
- public void setDotMode(String dotMode) {
- this.dotMode = dotMode;
- }
-
- public String getServerType() {
- return serverType;
- }
-
- public void setServerType(String serverType) {
- this.serverType = serverType;
- }
-
- public String getDatabaseVersion() {
- return databaseVersion;
- }
-
- public String getDatabaseEdition() {
- return databaseEdition;
- }
-}
-
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/de7e7d4e/core/conn/trafci/src/org/trafodion/ci/SessionDefaults.java
----------------------------------------------------------------------
diff --git a/core/conn/trafci/src/org/trafodion/ci/SessionDefaults.java b/core/conn/trafci/src/org/trafodion/ci/SessionDefaults.java
deleted file mode 100644
index 3639ce1..0000000
--- a/core/conn/trafci/src/org/trafodion/ci/SessionDefaults.java
+++ /dev/null
@@ -1,342 +0,0 @@
-// @@@ START COPYRIGHT @@@
-//
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-// @@@ END COPYRIGHT @@@
-
-package org.trafodion.ci;
-
-public interface SessionDefaults {
- final String DATABASE_EDITION = System.getenv("TRAFODION_VER_PROD");
- final String PROD_NAME = System.getenv("TRAFODION_VER_PROD")+" Command Interface ";
- final String APP_NAME = "TrafCI";
- final String DRIVER_NAME = "org.trafodion.jdbc.t4.T4Driver";
- final String PKG_NAME = "/org/trafodion/ci/";
- final String PROP_DEFAULT_NAME = PKG_NAME + "Properties/trafciDefaultLookAndFeel.properties";
- final String PROP_TRAFCILF = "trafciLF";
- final String PROP_TRACE = "trafci.enableTrace";
- final String PROP_OS = "os.name";
- final String PROP_PRINT_TIME = "trafci.printConnTime";
- final String PROP_MAX_DELAY = "trafci.maxDelayLimit";
-
- String dsnName="Default_DataSource";
- String portNumber="18650";
- String lineSeperator=System.getProperty("line.separator");
-
-
- String DEFAULT_SQL_PROMPT = "SQL>";
- String DEFAULT_WMS_PROMPT = "WMS>";
- String DEFAULT_CS_PROMPT = "CS>";
- String SQL = "SQL";
- String WMS = "WMS";
- String CS = "CS";
-
- String DEFAULT_DISPLAY_FORMAT="RAW";
-
- final int trafciMajorVersion=1;
- final int trafciMinorVersion=0;
-
- final int QRY_HISTORY_MAX_LMT=100;
- final String DEFAULT_DATA_SOURCE="Default_DataSource";
-
- final int abruptExit=-9999;
- final int DEFAULT_EXIT_CODE = 0;
-
- final int SQL_ERR_CONN_MAX_LIMIT=-29154;
- final int NDCS_ERR_DSN_NOT_AVAILABLE = -29164;
- final int UNKNOWN_DATA_SOURCE=29182;
- final int MIN_COL_DISPLAY_SIZE = 4;
- final int DISPLAY_COLSIZE = 160;
- final int WMS_PROCESS_DOES_NOT_EXIST=-29162;
- final int SQL_ERR_INVALID_AUTH=-29153;
- final int MAX_DELAY_LIMIT=3600; //in seconds
- final int DEFAULT_FETCH_SIZE=0;
- final int MAX_PATTERN_DEPTH=1;
- final int PATTERN_DEPTH_LIMIT = 10;
- final int SQL_ERR_CLI_AUTH=-8837;
-
- /* don't ask me why mxci does this, but look at SqlCmd.cpp of
- * mxci's code line 1534, and you'll see that 72 is their limit,
- * after that they trim the whole last column header
- */
- final int MXCI_TRIM_FIX = 72;
-
- final int IQ=0;
- final int SQLQ=1;
- final int PRUNQ=2;
- //final int CSQ=3;
- final int NSQ=4;
- final int CQ=5; // conditional query
- //final int SECQ=6;
- final int SPJQ=7; // SPJ deployment
-
- final int USERI=0;
- final int PRUNI=1;
- final int PERLI=2;
- final int PYTHI=3;
-
- final int SQL_MODE=0;
- final int CS_MODE=2;
- final int WMS_MODE=4;
-
- final int CONSOLE_INPUT=0;
- final int FILE_INPUT=1;
-
- final int CONSOLE_READ_MODE=0;
- final int SCRIPT_READ_MODE=1;
- final int OBEY_READ_MODE=2;
-
- final int CONSOLE_WRITE_MODE=0;
- final int LOG_WRITE_MODE=1;
- final int SPOOL_WRITE_MODE=2;
- final int CONSOLE_SPOOL_WRITE_MODE=3;
- final int SILENT_SPOOL_WRITE_MODE=4;
-
- final int CIDEFAULT_VIEW=0;
- final int MXCI_VIEW=4;
-
- final int RAW_FORMAT=0;
- final int HTML_FORMAT=1;
- final int XML_FORMAT=2;
- final int CSV_FORMAT=3;
-
- // include only the interface commands first tokens
- final int iqKeyWordBase=100;
- final int EXIT=iqKeyWordBase + 1;
- //final int QUIT=iqKeyWordBase + 2;
- final int DISCONNECT=iqKeyWordBase + 3;
- final int SET=iqKeyWordBase + 4;
- final int ED=iqKeyWordBase + 5;
- final int EDIT=iqKeyWordBase + 6;
- final int SPOOL=iqKeyWordBase + 7;
- final int SLASH=iqKeyWordBase + 8;
- final int RUN=iqKeyWordBase + 9;
- final int SHOW=iqKeyWordBase + 10;
- final int AT=iqKeyWordBase + 11;
- final int OBEY=iqKeyWordBase + 12;
- final int LOG=iqKeyWordBase + 13;
- final int MODE=iqKeyWordBase+14;
- final int RESET=iqKeyWordBase+15;
- final int PRUN=iqKeyWordBase + 16;
- final int SET_TIME=iqKeyWordBase+17;
- final int SHOW_TIME=iqKeyWordBase+18;
- final int SET_TIMING=iqKeyWordBase+19;
- final int SHOW_TIMING=iqKeyWordBase+20;
- final int SET_SQLPROMPT=iqKeyWordBase+21;
- final int SHOW_SQLPROMPT=iqKeyWordBase+22;
- final int SET_SQLTERMINATOR=iqKeyWordBase+23;
- final int SHOW_SQLTERMINATOR=iqKeyWordBase+24;
- final int SET_PARAM=iqKeyWordBase+25;
- final int SHOW_PARAM=iqKeyWordBase+26;
- final int SET_IDLETIMEOUT=iqKeyWordBase+27;
- final int SHOW_IDLETIMEOUT=iqKeyWordBase+28;
- final int SHOW_SCHEMA=iqKeyWordBase+29;
- final int SHOW_CATALOG=iqKeyWordBase+30;
- final int SHOW_CATALOGS=iqKeyWordBase+31;
- final int SHOW_SCHEMAS=iqKeyWordBase+32;
- final int SHOW_TABLES=iqKeyWordBase+33;
- final int SHOW_VIEWS=iqKeyWordBase+34;
- final int SHOW_TABLE=iqKeyWordBase+35;
- final int SHOW_SYNONYMS=iqKeyWordBase+36;
- final int SHOW_MVS=iqKeyWordBase+37;
- final int SHOW_MVGROUPS=iqKeyWordBase+38;
- final int HISTORY=iqKeyWordBase+39;
- final int REPEAT=iqKeyWordBase+40;
- final int FC=iqKeyWordBase+41;
- final int CLEAR=iqKeyWordBase+42;
- final int SET_LISTCOUNT=iqKeyWordBase+43;
- final int SHOW_LISTCOUNT=iqKeyWordBase+44;
- final int SECTION=iqKeyWordBase+45;
- final int HELP=iqKeyWordBase+46;
- final int SHOW_PROCEDURES=iqKeyWordBase+47;
- final int ENV=iqKeyWordBase+48;
- final int SHOW_MODE=iqKeyWordBase+49;
- final int SESSION=iqKeyWordBase+50;
- final int SHOW_SESSION=iqKeyWordBase+51;
- final int SET_PROMPT=iqKeyWordBase+52;
- final int SAVEHIST=iqKeyWordBase+53;
- final int VERSION=iqKeyWordBase+54;
- final int SET_LOOKANDFEEL=iqKeyWordBase+55;
- final int SHOW_LOOKANDFEEL=iqKeyWordBase+56;
- final int SET_SERVICE=iqKeyWordBase+57;
- final int SHOW_SERVICE=iqKeyWordBase+58;
- final int SET_DISPLAY_COLSIZE=iqKeyWordBase+59;
- final int SHOW_DISPLAY_COLSIZE=iqKeyWordBase+60;
-
- final int SET_COLSEP=iqKeyWordBase+61;
- final int SHOW_COLSEP=iqKeyWordBase+62;
- final int CONNECT=iqKeyWordBase+63;
- final int RECONNECT=iqKeyWordBase+64;
- final int SHOW_PREPARED=iqKeyWordBase+65;
- final int SET_HISTOPT=iqKeyWordBase+66;
- final int SHOW_HISTOPT=iqKeyWordBase+67;
- final int GET=iqKeyWordBase+68;
- final int SET_STATISTICS=iqKeyWordBase+69;
-
- final int LOCALHOST=iqKeyWordBase+70;
-
- final int SET_MARKUP=iqKeyWordBase+71;
- final int SHOW_MARKUP=iqKeyWordBase+72;
- final int SHOW_PARAMS=iqKeyWordBase+73;
- final int AUDIT=iqKeyWordBase+74;
- final int SET_AUTOPREPARE=iqKeyWordBase+75;
- final int SHOW_AUTOPREPARE=iqKeyWordBase+76;
- final int ERROR=iqKeyWordBase+77;
- final int SHOW_LASTERROR=iqKeyWordBase+78;
- final int ONLINEDBDUMP=iqKeyWordBase+79;
- final int SHOW_INVENTORY=iqKeyWordBase+80;
- final int SHOW_RECCOUNT=iqKeyWordBase+81;
- final int SRUN=iqKeyWordBase+82;
- final int SHOW_STATISTICS=iqKeyWordBase+83;
- final int ALLOW=iqKeyWordBase+84;
- final int DENY=iqKeyWordBase+85;
- final int SCHEDULE=iqKeyWordBase+86;
- final int SHOW_ACCESS=iqKeyWordBase+87;
- final int LIST=iqKeyWordBase+88;
- final int LIST_OPENS=iqKeyWordBase+89;
- final int LIST_LOCKS=iqKeyWordBase+90;
- final int DELAY=iqKeyWordBase+91;
- final int SHOW_ERRORCODE=iqKeyWordBase+92;
- final int SHOW_ACTIVITYCOUNT=iqKeyWordBase+93;
- final int SET_CMDECHO=iqKeyWordBase+94;
-
- final int ALIAS=iqKeyWordBase+95;
- final int SHOW_ALIAS=iqKeyWordBase+96;
- final int SHOW_ALIASES=iqKeyWordBase+97;
-
- final int SET_FETCHSIZE=iqKeyWordBase+98;
- final int SHOW_FETCHSIZE=iqKeyWordBase+99;
-
- final int SET_PATTERN=iqKeyWordBase+100;
- final int SHOW_PATTERN=iqKeyWordBase+101;
- final int SHOW_PATTERNS=iqKeyWordBase+102;
- final int SET_PATTERNDEPTH=iqKeyWordBase+103;
- final int SHOW_PATTERNDEPTH=iqKeyWordBase+104;
- final int SET_DEBUG=iqKeyWordBase+105;
- final int SHOW_DEBUG=iqKeyWordBase+106;
-
- final int DOTSQL = iqKeyWordBase+107;
- final int DOTCS = iqKeyWordBase+108;
- final int DOTNS = iqKeyWordBase+109;
- final int DOTWMS = iqKeyWordBase+110;
- final int DOTSEC = iqKeyWordBase+111;
-
- final int SET_CMDDISPLAY = iqKeyWordBase+112;
- final int SHOW_CMDDISPLAY = iqKeyWordBase+113;
- final int CREATE_SERVER = iqKeyWordBase+114;
- final int ALTER_SERVER = iqKeyWordBase+115;
- final int DROP_SERVER = iqKeyWordBase+116;
- final int INFO_SERVER = iqKeyWordBase+117;
- final int CREATE_USER = iqKeyWordBase+118;
- final int ALTER_USER = iqKeyWordBase+119;
- final int DROP_USER = iqKeyWordBase+120;
- final int CREATE_CSR = iqKeyWordBase+121;
- final int CREATE_CERT = iqKeyWordBase+122;
- final int INFO_CERT_POLICY = iqKeyWordBase+123;
- final int INSERT_CERT = iqKeyWordBase+124;
- final int ALTER_CERT_POLICY = iqKeyWordBase+125;
- final int CHANGE_PASS = iqKeyWordBase+126;
- final int SHOW_PROCESSNAME= iqKeyWordBase+127;
- final int CREATE_ROLE = iqKeyWordBase+128;
- final int DROP_ROLE = iqKeyWordBase+129;
- final int GRANT_ROLE = iqKeyWordBase+130;
- final int REVOKE_ROLE = iqKeyWordBase+131;
- final int SET_DEFAULTROLE = iqKeyWordBase+132;
- final int CREATE_PLATFORM_USER = iqKeyWordBase+133;
- final int SHOW_USER = iqKeyWordBase+136;
- final int SHOW_SERVER = iqKeyWordBase+137;
- final int ALTER_ROLE = iqKeyWordBase+138;
- final int SHOW_ROLE = iqKeyWordBase+139;
- final int SET_CONNECTOPT = iqKeyWordBase+140;
- final int SHOW_CONNECTOPT = iqKeyWordBase+141;
- final int INFO_POLICY = iqKeyWordBase+142;
- final int ALTER_POLICY = iqKeyWordBase+143;
- final int INFO_USER = iqKeyWordBase+144;
- final int INFO_POLICY_WITH_OPTION = iqKeyWordBase+145;
- final int ALTER_LOG_POLICY = iqKeyWordBase+146;
- final int ALTER_PWD_COMPLEXITY_POLICY = iqKeyWordBase+147;
- final int ALTER_RESET_PWD_POLICY = iqKeyWordBase+148;
- final int ALTER_RESET_MOSTSECURE = iqKeyWordBase+149;
- final int ALTER_RESET_ALLDEFAULT = iqKeyWordBase+150;
- final int ALTER_PWD_QUALITY_POLICY = iqKeyWordBase+151;
- final int INFO_ROLE = iqKeyWordBase+152;
-
- final int LIST_JAR = iqKeyWordBase+153;
- final int LIST_JARS = iqKeyWordBase+154;
- final int UPLOAD_JAR = iqKeyWordBase+155;
- final int DROP_JAR = iqKeyWordBase+156;
-
- final int ADD_LIB = iqKeyWordBase+157;
- final int MODIFY_LIB = iqKeyWordBase+158;
- final int REMOVE_LIB = iqKeyWordBase+160;
-
- final int SHOW_INDEXES=iqKeyWordBase+159;
-
- // these are special query cases for
- // only to trim the output
- final int sqKeyBase=500;
- final int SHOWDDL=sqKeyBase+ 1;
- final int REORG=sqKeyBase + 2;
- final int REORGANIZE=sqKeyBase + 3;
- final int MAINTAIN=sqKeyBase + 4;
- final int SHOWLABEL=sqKeyBase + 5;
- final int SHOWPLAN=sqKeyBase + 6;
- final int SHOWSHAPE=sqKeyBase + 7;
- final int SHOWCONTROL=sqKeyBase + 8;
- final int INVOKE=sqKeyBase + 9;
- final int REPLICATE=sqKeyBase + 10;
- final int SHOWTRANSACTION=sqKeyBase + 11;
-
- // these are only db queries
- // but not a pass thru
-
- final int dbqKeyBase=1000;
- final int PREPARE=dbqKeyBase+1;
- final int EXECUTE=dbqKeyBase+2;
- final int EXPLAIN=dbqKeyBase+3;
- final int INFOSTATS=dbqKeyBase+4;
- final int SET_SCHEMA=dbqKeyBase+5;
- final int SET_CATALOG=dbqKeyBase+6;
- final int CALL=dbqKeyBase+7;
- final int CONTROL=dbqKeyBase+8;
-
- // conditional queries
- final int condKeyBase=1500;
- final int IF_THEN=condKeyBase+1;
- final int LABEL=condKeyBase+2;
- final int GOTO=condKeyBase+3;
-
- //version queries
- final int versionKeyBase = 2000;
- final int VERSION_M5 = versionKeyBase;
- final int VERSION_M6 = versionKeyBase+100;
- final int VERSION_M7 = versionKeyBase+200;
- final int VERSION_M8 = versionKeyBase+300;
- final int VERSION_M9 = versionKeyBase+400;
- final int VERSION_M10 = versionKeyBase+500;
- final int VERSION_M11 = versionKeyBase+600;
-
- //mode change command string
- final String CMDOPEN = "CMDOPEN";
- final String WMSOPEN = "WMSOPEN";
- final String CMDCLOSE = "CMDCLOSE";
- final String WMSCLOSE = "WMSCLOSE";
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/de7e7d4e/core/conn/trafci/src/org/trafodion/ci/SessionError.java
----------------------------------------------------------------------
diff --git a/core/conn/trafci/src/org/trafodion/ci/SessionError.java b/core/conn/trafci/src/org/trafodion/ci/SessionError.java
deleted file mode 100644
index 1aa55a9..0000000
--- a/core/conn/trafci/src/org/trafodion/ci/SessionError.java
+++ /dev/null
@@ -1,181 +0,0 @@
-// @@@ START COPYRIGHT @@@
-//
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-// @@@ END COPYRIGHT @@@
-
-package org.trafodion.ci;
-
-public interface SessionError
-{
-
- //The third arugment represents the ERROR TYPE. I = Informational, W = Warning
- ErrorObject CONSOLE_READER_ERR = new ErrorObject("29400", "Could not initialize the console reader.");
- ErrorObject CONSOLE_WRITER_ERR = new ErrorObject("29401", "Could not initialize the console writer.");
- ErrorObject CMD_LINE_ARGS_ERR = new ErrorObject("29402", "Invalid Number of arguments passed.");
- ErrorObject SCRIPT_FILE_NOT_FOUND = new ErrorObject("29403", "Could not find the script file specified.");
- ErrorObject DRIVER_INIT_ERR = new ErrorObject("29404", "Could not instantiate the driver class.");
- ErrorObject DRIVER_INIT_ILLEGAL_ERR = new ErrorObject("29405", "Could not instantiate the driver class because of an IllegalAccessException.");
- ErrorObject DRIVER_CLASS_ERR = new ErrorObject("29406", "Could not find JDBC Type 4 Driver in the classpath.");
-
- ErrorObject CONN_MAX_LIMIT_ERR = new ErrorObject("29407", "Failed to connect to the database. Connection limit exceeded");
-
- ErrorObject SET_NO_OPTION = new ErrorObject("29408", "SET command must have an option specified.");
- ErrorObject SHOW_NO_OPTION = new ErrorObject("29409", "SHOW command must have an option specified.");
- ErrorObject OBEY_FILE_NOT_FOUND = new ErrorObject("29410", "Could not find the file specified.");
- ErrorObject SPOOL_FILE_NOT_FOUND = new ErrorObject("29411", "Could not create the spool file.");
- ErrorObject CMD_NOT_CS_SUPPORTED = new ErrorObject("29412", "This command is not supported in CS mode.");
- ErrorObject CMD_NOT_SQL_SUPPORTED = new ErrorObject("29414", "This command is not supported in SQL mode.");
- ErrorObject CMD_NOT_MODE_SUPPORTED = new ErrorObject("29415", "This command is not supported in current mode.");
-
- //Warnings
- ErrorObject SHOW_TAB_NOT_FOUND = new ErrorObject("29416", "No tables found.", 'I');
- ErrorObject SHOW_CAT_NOT_FOUND = new ErrorObject("29417", "No catalogs found.", 'I');
- ErrorObject SHOW_SCH_NOT_FOUND = new ErrorObject("29418", "No schemas found.", 'I');
- ErrorObject SHOW_VIEW_NOT_FOUND = new ErrorObject("29419", "No views found.", 'I');
- ErrorObject SHOW_SYNONYM_NOT_FOUND = new ErrorObject("29420", "No synonyms found.", 'I');
- ErrorObject SHOW_MV_NOT_FOUND = new ErrorObject("29421", "No materialized views found.", 'I');
- ErrorObject SHOW_MVG_NOT_FOUND = new ErrorObject("29422", "No materialized view groups found.", 'I');
- ErrorObject SHOW_PROC_NOT_FOUND = new ErrorObject("29423", "No procedures found.", 'I');
- ErrorObject SHOW_TAB_IDX_NOT_FOUND = new ErrorObject("29424", "No indexes present for object, ", 'I');
- ErrorObject SHOW_TAB_MVS_NOT_FOUND = new ErrorObject("29425", "No materialized views present for object, ", 'I');
- ErrorObject SHOW_TAB_SYN_NOT_FOUND = new ErrorObject("29426", "No synonyms present for object, ", 'I');
- ErrorObject SHOW_PREP_NOT_FOUND = new ErrorObject("29427", "No prepared statements found.", 'I');
- ErrorObject SHOW_PARAM_NOT_FOUND = new ErrorObject("29428", "No parameters found.", 'I');
-
- //More Warnings
- ErrorObject SPOOL_ON_ON = new ErrorObject("29429", "Spooling is already ON.", 'I');
- ErrorObject SPOOL_OFF_OFF = new ErrorObject("29430", "Spooling is already OFF.", 'I');
- ErrorObject STMT_NOT_FOUND = new ErrorObject("29431", "Prepared statement %s was not found.");
- ErrorObject INVALID_PARAM_NUM = new ErrorObject("29432", "Invalid number of parameters for prepared statement %s.");
- ErrorObject NUMERIC_VAL_REQ = new ErrorObject("29433", "Non-numeric value cannot be specified for numeric data type.");
- ErrorObject SET_IDLETIMEOUT_VAL_ERR = new ErrorObject("29434", "Invalid IdleTimeout value. The value must be in the range 0-2147483647.");
- ErrorObject SET_LISTCOUNT_VAL_ERR = new ErrorObject("29435", "Invalid ListCount value. The value must be in the range 0-2147483647.");
- ErrorObject REPEAT_ERR = new ErrorObject("29436", "The specified statement does not exist in the history buffer.");
- ErrorObject HISTORY_ERR = new ErrorObject("29437", "The maximum size of the history buffer is "+SessionDefaults.QRY_HISTORY_MAX_LMT+".");
- ErrorObject HISTORY_BUF_ERR = new ErrorObject("29438", "The history buffer is empty.");
- ErrorObject SLASH_ERR = new ErrorObject("29439", "The query buffer is empty.");
- ErrorObject DIR_NOT_FOUND = new ErrorObject("29440", "Directory not found or"+SessionDefaults.lineSeperator+"does not have READ/WRITE permissions.");
- ErrorObject OBEY_SECTION_NOT_FOUND = new ErrorObject("29441", "was not found in file ");
- ErrorObject SAVE_FILE_CREATE_ERROR = new ErrorObject("29442", "Could not create the specified file.");
- ErrorObject DB_CONN_NOT_EXIST = new ErrorObject("29443", "Database connection does not exist. Please connect to the database by using the connect or the reconnect command.");
- ErrorObject DB_DISCONNECT_ON_USER_REQ = new ErrorObject("29444", "The current operation has been cancelled and the connection to the database has been lost."+SessionDefaults.lineSeperator+"Please connect to the database by using the connect or the reconnect command.");
- ErrorObject OPERATION_CANCELLED = new ErrorObject("29445", "The current operation has been cancelled.");
- ErrorObject PRUN_CONN_CNT_ERR = new ErrorObject("29446", "Number of connections entered is not within the allowable range.");
- ErrorObject INCORRECT_OVERWRITE_OPTION = new ErrorObject("29447", "Incorrect value specified for overwrite option.");
- ErrorObject EXECUTE_PRIVILEGE_ERR = new ErrorObject("29448", "The user does not have EXECUTE privilege.");
- ErrorObject SERVER_PRODUCT_ERR = new ErrorObject("29449", "Server product may not be installed or an internal error has occurred. Please contact support.");
- ErrorObject CALL_ERR = new ErrorObject("29450", "This command is not supported by this JDBC Type 4 Driver version.");
- ErrorObject INTERNAL_ERR = new ErrorObject("29451", "Internal error processing command.");
-
- ErrorObject INVALID_MAXCONN = new ErrorObject("29452", "Invalid value specified for property, trafci.prun.maxconn.");
- ErrorObject NO_FILES_OF_EXTENSION = new ErrorObject("29453", "No files present with this extension.");
- ErrorObject INVALID_CONN_VALUE = new ErrorObject("29454", "Invalid value specified for -c/connections option.");
- ErrorObject UNKOWN_OPTION = new ErrorObject("29455", "Unknown option specified: ");
- ErrorObject DEFAULT_OPTION_ERR = new ErrorObject("29456", "-d|defaults option cannot be specified with any other options.");
- ErrorObject NWMS_NOT_STARTED = new ErrorObject("29457", "NWMS not started on this server.", 'W');
-
- ErrorObject SCRIPTS_DIR_NOT_FOUND = new ErrorObject("29458", "Scripts Directory not found or"+SessionDefaults.lineSeperator+"does not have READ/WRITE permissions.");
- ErrorObject LOGS_DIR_NOT_FOUND = new ErrorObject("29459", "Logs Directory not found or"+SessionDefaults.lineSeperator+"does not have READ/WRITE permissions.");
-
-
- String GENERIC_SYNTAX_ERROR_CODE = "29460";
- String SYNTAX_ERROR_PREFIX = "A syntax error occurred at or before:";
- String ERROR_CODE_PREFIX = "*** ERROR[";
- String ERROR_CODE_SUFFIX = "]";
-
-
- ErrorObject LIST_NO_OPTION = new ErrorObject("29461", "LIST command must have an option specified.");
- ErrorObject OBEY_PATH_NOT_FOUND = new ErrorObject("29462", "Could not find the file or directory specified.");
- ErrorObject OBEY_WILDCARD_NOT_FOUND =new ErrorObject("29463", "Could not find any file(s) with the specified extension.");
- ErrorObject PARAM_NOT_FOUND = new ErrorObject("29464", "Param "); //Add Parameter name as suffix
-
- ErrorObject OBEY_BLANK_SESSION_ERR = new ErrorObject("29465","Obey commands inside of files are executed in non-interactive mode and require a filename or wildcard.");
- ErrorObject OBEY_DEPTH_MAX = new ErrorObject("29466","The max obey depth has been reached, breaking current obey loop. Recursion detected in ");
- String CS_SYNTAX_ERROR_CODE = "29467";
-
- ErrorObject SESSION_DISCONNECT_ERR = new ErrorObject("29468", "Session Disconnected. Please connect to the database by using connect/reconnect command.", 'I');
- ErrorObject MULTIBYTE_DISP_WARN = new ErrorObject("29469", "Unable to align display for multibyte characters." +
- " Try relaunching TrafCI with -Djava.awt.headless=true", 'W');
-
- /* Conditional Errors */
- ErrorObject VARIABLE_NOT_FOUND = new ErrorObject("29471", "Unable to find TrafCI variable ");
- // use 29464 for PARAM_NOT_FOUND
- ErrorObject INT_STR_COMPARISON = new ErrorObject("29472", "Unable to compare an integer with a string.");
- ErrorObject STR_INT_COMPARISON = new ErrorObject("29473", "Unable to compare a string with an integer.");
- ErrorObject INVALID_STRING_COMPARE = new ErrorObject("29474", "Unable to compare strings using the operator ");
-
- ErrorObject MAX_DELAY_LIMIT = new ErrorObject("29475", "Invalid delay time specified. The value must be in the range 0-");
-
- // warning for label:
- ErrorObject LABEL_WARNING = new ErrorObject("29476", "TrafCI encountered a blank label. Use the format LABEL <name>",'W');
- ErrorObject OUT_OF_BOUNDS = new ErrorObject("29477","ArrayIndexOutOfBounds exception has occurred.");
- ErrorObject MESSAGE_WARNING = new ErrorObject("29478", "Skipping command until a matching 'LABEL ",'W');
- ErrorObject GOTO_MESSAGE = new ErrorObject("29479", "GOTO statement executed, ignoring all commands until a 'LABEL ",'W');
- ErrorObject MATCHING_LABEL = new ErrorObject("29480", "Matching label encountered, no longer ignoring commands.",'I');
-
- /* Alias commands */
- ErrorObject SHOW_ALIAS_NOT_FOUND = new ErrorObject("29481", "No aliases found.", 'I');
- ErrorObject COMMAND_NAME_NOT_ALLOWED= new ErrorObject("29482", "Command name, ", 'I');
- String COMMAND_NAME_NOT_ALLOWED_SUFFIX= " not allowed as Alias.";
- ErrorObject INVALID_COMMAND_FOR_ALIAS = new ErrorObject("29483", "Alias on an alias not supported., ", 'I');
-
- ErrorObject SET_FETCHSIZE_VAL_ERR = new ErrorObject("29484", "Invalid fetch size value. The value must be in the range 0-2147483647.");
-
- /* Pattern commands */
- ErrorObject SET_PATTERN_DEPTH_VAL_ERR = new ErrorObject("29485", "Invalid pattern depth value. The value must be in the range 0-" + SessionDefaults.PATTERN_DEPTH_LIMIT+ ".");
- ErrorObject SHOW_PATTERN_NOT_FOUND = new ErrorObject("29486", "No patterns found.",'I');
- String PATTERN_COMMAND_NAME_NOT_ALLOWED_SUFFIX= " not allowed as Pattern.";
- ErrorObject INVALID_REGEXP = new ErrorObject("29487", "Invalid regular expression.",'I');
-
- /* Security commands */
- ErrorObject CMD_NOT_SUPPORTED_SERVER = new ErrorObject("29488", "This command is not supported on this server version.");
- ErrorObject FILE_NO_READ_PERMISSIONS = new ErrorObject("29489", "Unable to read the specified file.");
- ErrorObject CMD_NOT_SEC_SUPPORTED = new ErrorObject("29490", "This command is not supported in SEC mode.");
- ErrorObject CMD_NOT_WMS_SUPPORTED = new ErrorObject("29491", "This command is not supported in WMS mode.");
- ErrorObject INVALID_NUMBER_FORMAT = new ErrorObject("29492", "Numeric value out of range ");
- ErrorObject INFO_SEC_NO_ROWS = new ErrorObject("29493", "No server configuration found.",'I');
- ErrorObject MISSING_PARM = new ErrorObject("29494", "Required Parameter ",'E');
- ErrorObject INVALID_PWORD = new ErrorObject("29495", "Passwords do not match.",'E');
- ErrorObject DUPLICATE_PARAM = new ErrorObject("29496", "Duplicate Parameter ",'E');
- ErrorObject SET_DUMPPRIORITY_VAL_ERR = new ErrorObject("29497", "Invalid dump priority specified. The value must be in the range 1...199");
- /* Param commands */
- ErrorObject INVALID_PARAM_STRING_VALUE = new ErrorObject("29498", "Invalid parameter value. ");
- ErrorObject SET_BACKUPSYNC_DURATION_ERR = new ErrorObject("29499", "Invalid backup sync duration specified. The value must be in the range 1...31");
- //SPJ deployment error
- ErrorObject JAR_EXTENSION_MISSING = new ErrorObject("29500", "JAR extension is missing. ");
- ErrorObject JAR_EMPTY = new ErrorObject("29501", "JAR file is empty. Failed to upload jar file ", 'I');
- ErrorObject JAR_EMPTY_FOLDER = new ErrorObject("29502", "Specified directory contains no JAR file. SPJ Uploading failed.");
-
- //Server Side errors start from 29550 - 29599
-
- ErrorObject MISSING_NODE_DUMP = new ErrorObject("29550","Missing Node Dump Pattern.");
- ErrorObject MISSING_CORE_DUMP = new ErrorObject("29551","Missing Core File Pattern.");
- ErrorObject MISSING_CORE_NODE_DUMP = new ErrorObject("29552","Missing Node Dump and Core File Pattern.");
-
- ErrorObject NOT_SUPPORT = new ErrorObject("29553", "This platform does not support ", 'I');
- ErrorObject SHOW_TAB_TRIG_NOT_FOUND = new ErrorObject("29554", "No triggers present for object, ", 'I');
- ErrorObject CMD_NOT_SEAQUEST_SUPPORTED = new ErrorObject("29555", "This command is not supported.");
- ErrorObject CMD_ONLY_CS_SUPPORTED = new ErrorObject("29556", "This command is only supported in CS mode.");
- ErrorObject CMD_ONLY_WMS_SUPPORTED = new ErrorObject("29557", "This command is only supported in WMS mode.");
- ErrorObject CMD_ONLY_SQL_SUPPORTED = new ErrorObject("29558", "This command is only supported in SQL mode.");
- ErrorObject CMD_SYNTAX_ERROR = new ErrorObject("29559", "A syntax error occurred in the command.");
- ErrorObject SQL_RESERVED_WORD_ERROR = new ErrorObject("29560", "SQL is a reserved word. Please specify another string.");
- ErrorObject WMS_RESERVED_WORD_ERROR = new ErrorObject("29561", "WMS is a reserved word. Please specify another string.");
- ErrorObject CS_RESERVED_WORD_ERROR = new ErrorObject("29562", "CS is a reserved word. Please specify another string.");
-}