|
| Workspace |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
java.lang.Object | +--com.sas.workspace.AppServer
Provides a 'packaged' interface to an Application Server (ServerContext accessed as an IOM server). AppServer hides the details on IOM communication and OMA model navigation from callers. The following types of services are provided:
Usage: Specify ServerContext information directly
appServer = new AppServer( strServerContextId );
appServer.setLogin( strUserId );
...// Communicate with the server
appServer.termAppServer(); // Terminate the server
Usage: Allow AppServer to pick ServerContext based on accessed PhysicalTable
appServer = new AppServer(physTable);
appServer.setLogin( strUserId );
...// Communicate with the server
appServer.termAppServer(); // Terminate the server
Usage: Allow AppServer to pick ServerContext based on accessed EFile
appServer = new AppServer(extFile);
appServer.setLogin( strUserId );
...// Communicate with the server
appServer.termAppServer(); // Terminate the server
If initial values for ServerContext and UserId are unknown in a visual interactive environment, several components are available to default & query for the info, AppServerDialog and AppServerTab:
// for a dialog:
AppServer appServer = new AppServer();
AppServerDialog pDlg = new AppServerDialog(frame, appServer, strInfoText);
pDlg.setTitle("..."); // Optional, can use AppServerDialog default title
pDlg.show();
if( pDlg.getReturnValue() == AppServerDialog.OK ) {
// Do your stuff...
appServer.termAppServer();
}
// for a wizard
AppServerTab tab = new AppServerTab(appServer);
| Inner Class Summary |
| Field Summary | |
protected static com.sas.metadata.MetadataResource |
bundle
|
protected String |
m_2ndStatusMsg
|
protected boolean |
m_bLocalStore
|
protected com.sas.metadata.File |
m_EFile
|
protected com.sas.metadata.SASLibrary |
m_Library
|
protected com.sas.iom.SAS.ILanguageServicePackage.CarriageControlSeqHolder |
m_listCCHolder
|
protected com.sas.iom.SASIOMDefs.StringSeqHolder |
m_listLinesHolder
|
protected com.sas.iom.SAS.ILanguageServicePackage.LineTypeSeqHolder |
m_listTypeHolder
|
protected com.sas.iom.SAS.ILanguageServicePackage.CarriageControlSeqHolder |
m_logCCHolder
|
protected com.sas.metadata.LogicalServer |
m_LogicalServer
|
protected com.sas.iom.SASIOMDefs.StringSeqHolder |
m_logLinesHolder
|
protected com.sas.iom.SAS.ILanguageServicePackage.LineTypeSeqHolder |
m_logTypeHolder
|
protected boolean |
m_operationComplete
|
protected com.sas.metadata.PhysicalTable |
m_PhysTable
|
protected ArrayList |
m_populatedSC
|
protected ArrayList |
m_reposSC
|
protected com.sas.iom.SAS.IDataService |
m_rio
|
protected com.sas.rio.MVAResultSet |
m_rsltSet
|
protected com.sas.iom.SAS.ILanguageService |
m_sasLanguage
|
protected Boolean |
m_sasSubmitRunning
|
protected com.sas.iom.SAS.IWorkspace |
m_sasWorkspace
|
protected HashMap |
m_SCMap
|
protected com.sas.metadata.ServerContext |
m_ServerContext
|
protected Connection |
m_sqlConnection
|
protected com.sas.rio.MVAStatement |
m_sqlStmt
|
protected int |
m_status
|
protected String |
m_statusMsg
|
protected com.sas.metadata.MdObjectStore |
m_store
|
protected Workspace |
m_workspace
|
static int |
MAX_STATUS_ERROR
|
static int |
STATUS_Abort
|
static int |
STATUS_AttemptLimitReached
|
static int |
STATUS_BadServer
|
static int |
STATUS_CodeError
|
static int |
STATUS_ConnClosFail
|
static int |
STATUS_ConnectCancelled
|
static int |
STATUS_ConnFailed
|
static int |
Status_ExpiredCredentials
|
static int |
STATUS_NoConnObj
|
static int |
STATUS_NoDCMetadata
|
static int |
STATUS_NoDCObj
|
static int |
STATUS_NoLibAssign
|
static int |
STATUS_NoLibAssign2
|
static int |
STATUS_NoLibFound
|
static int |
STATUS_NoListFetch
|
static int |
STATUS_NoLogFetch
|
static int |
STATUS_NoLoginObj
|
static int |
STATUS_NoPassword
|
static int |
STATUS_NoPort
|
static int |
STATUS_NoServer
|
static int |
STATUS_NoSQLConn
|
static int |
STATUS_NoUserid
|
static int |
STATUS_NoWSConf
|
static int |
STATUS_OK
|
static int |
STATUS_SQLAbrtConn
|
static int |
STATUS_SQLQryFail
|
static int |
STATUS_SubmitCancelled
|
static int |
STATUS_SubmitFailed
|
static int |
STATUS_TblClosFail
|
static int |
STATUS_TblOpenFail
|
static int |
STATUS_TblOpenFail2
|
static String |
WORKSPACECLASSID
|
| Constructor Summary | |
AppServer()
Constructs an empty AppServer object. |
|
AppServer(com.sas.iom.SAS.IWorkspace iWorkspace)
|
|
AppServer(com.sas.metadata.MdStore owningStore)
Constructs an empty AppServer object. |
|
AppServer(com.sas.metadata.MdStore owningStore,
String serverContextId)
Constructs an AppServer object, using given ServerContext metadata-id |
|
AppServer(com.sas.metadata.MdStore owningStore,
String serverContextId,
String userLoginId,
String userPassword)
Constructs an AppServer object, using given ServerContext metadata-id and UserId strings. |
|
AppServer(com.sas.metadata.PhysicalTable physTable)
Deprecated. Use logical server constructor |
|
AppServer(String serverContextId)
Constructs an AppServer object, using given ServerContext metadata-id |
|
AppServer(String serverContextId,
String userLoginId,
String userPassword)
Constructs an AppServer object, using given ServerContext metadata-id and UserId strings. |
|
| Method Summary | |
String |
assignLibref(com.sas.metadata.SASLibrary iLib)
Make connection (libref) to library given the SASLibrary object. |
String |
assignLibref(String strLibref0,
String strEngine,
String strPath,
String strOptions)
Make connection (libref) to library given by path, engine, & options. |
String |
assignLibref(String strLibref0,
String strEngine,
String strPath,
String strOptions,
boolean useOldMethod)
Deprecated. As of 10/8/2001, the boolean has no efect |
static String |
bldOptionString(com.sas.metadata.AssociationList optionList,
String optionRole)
* @todo fix this to work with Property objects |
void |
clearLibref(com.sas.metadata.SASLibrary iLib)
Clear a previously assigned Libref |
void |
clearLibref(String strLibref)
Clear a previously assigned Libref |
void |
clearReposServerContexts()
Return ordered list of ServerContexts in our repositories. |
void |
closeJDBCTable()
Close our JDBC connection to opened PhysicalTable. |
int |
determineStatus()
Determine current status of AppServer. |
void |
dropConnection()
Drop connection to IOM server, if active. |
void |
dropSQLConnection()
Drop all JDBC access connections. |
String |
getAssignedLibref()
|
String |
getConnectionHostName()
|
String |
getFullStatusMsg()
Return full (2-level) message associated with current status of Application Server. |
com.sas.iom.SAS.ILanguageServicePackage.CarriageControlSeqHolder |
getListCCHolder()
Returns container of executed source Listing line carriage controls. |
com.sas.iom.SASIOMDefs.StringSeqHolder |
getListLinesHolder()
Returns container of executed source Listing lines. |
com.sas.iom.SAS.ILanguageServicePackage.LineTypeSeqHolder |
getListTypeHolder()
Returns container of executed source Listing line types. |
StringBuffer |
getLog()
Returns log in a simple string buffer. |
com.sas.iom.SAS.ILanguageServicePackage.CarriageControlSeqHolder |
getLogCCHolder()
Returns container of executed source Log line carriage controls. |
com.sas.iom.SASIOMDefs.StringSeqHolder |
getLogLinesHolder()
Returns container of executed source Log lines. |
com.sas.iom.SAS.ILanguageServicePackage.LineTypeSeqHolder |
getLogTypeHolder()
Returns container of executed source Log line types. |
ArrayList |
getReposServerContexts()
Return ordered list of ServerContexts in our repositories. |
com.sas.metadata.SASLibrary |
getSASLibrary()
|
com.sas.metadata.SASLibrary |
getSchemaLibrary(com.sas.metadata.DatabaseSchema m_metadata)
Return SASLibrary associated to a schema |
com.sas.metadata.ServerContext |
getServerContext()
Return current ServerContext object for AppServer. |
Connection |
getSQLConnection()
Returns the sql connection |
int |
getStatus()
Return current status of AppServer. |
String |
getStatusMsg()
Return message associated with current status of Application Server. |
String |
getStatusMsg2()
Return any secondary message associated with current status of Application Server. |
com.sas.metadata.MdObjectStore |
getStore()
|
com.sas.rio.MVAResultSet |
getTable(String strLibref,
String strTable,
String strMemType,
String[] sasPasswords,
String strOptions)
Return SQL ResultSet (via JDBC) for given table. |
boolean |
isLibrefAssigned(com.sas.metadata.SASLibrary iLib)
|
boolean |
isLibrefAssigned(String strLibref)
|
boolean |
isPreassignedMetaEngine(com.sas.metadata.SASLibrary iLib)
isPreassignedMetaEngine used to determine if a library is preassigned and is of type META |
com.sas.iom.SAS.IWorkspace |
makeConnection()
Make connection to IOM server on current ServerContext. |
void |
makeSQLConnection()
Make connection for SQL processing. |
String |
makeSQLConnection(String tempLibRef,
String engine,
String path,
String strIncomingOptions)
Make connection (libref) to library given by path, engine, & options. |
com.sas.rio.MVAResultSet |
openJDBCTable(com.sas.metadata.PhysicalTable physTable)
Return SQL ResultSet (via JDBC) for given table. |
void |
postCompletion()
Post that latest operation has completed. |
void |
resetStatus()
Set new status for AppServer. |
void |
setCloseOnError(boolean bDoTheClose)
Does the connection to the workspace need to be closed when a SAS code error occurs. |
void |
setLogin(String strUserid,
String strPassword)
Use Userid string and (optionally) Password string to create a Login object and set as current. |
void |
setPhysicalTable(com.sas.metadata.PhysicalTable table)
|
void |
setSASLibrary(com.sas.metadata.SASLibrary inLibrary)
Sets the Library used for Appserver. |
com.sas.metadata.ServerContext |
setServerContext(com.sas.metadata.PhysicalTable physTable)
Determine the 'best' ServerContext for access to a given PhysicalTable object. |
void |
setServerContext(com.sas.metadata.ServerContext scObj)
Make given ServerContext object AppServer's current ServerContext, and populate with metadata and associations if needed. |
com.sas.metadata.ServerContext |
setServerContext(String strSCId)
Make given ServerContext object AppServer's current ServerContext, and populate with metadata and associations if needed. |
protected void |
setStatus(int newStatus)
Set new status for AppServer. |
protected void |
setStatus(int newStatus,
Object[] subStrs)
Set new status for AppServer, and build associated message. |
protected void |
setStatus(int newStatus,
Object[] subStrs,
String str2ndMsg)
Set new status for AppServer, build associated message, and set secondary info message. |
protected void |
setStatus(int newStatus,
String str2ndMsg)
Set new status for AppServer, and secondary info message. |
void |
setStore(com.sas.metadata.MdObjectStore inStore)
|
com.sas.rio.MVAResultSet |
submitSQLStatement(String strStatement)
Execute the specified query against the rio connection in this appserver |
com.sas.rio.MVAResultSet |
submitSQLStatement(String strStatement,
com.sas.rio.MVAStatement sqlStatement)
Execute the specified query against the rio connection in this appserver |
int |
submitSrc(String sasStmts)
Submit SAS source statements for execution to an IOM Application Server. |
void |
termAppServer()
Terminate AppServer object. |
void |
testConnection()
|
void |
testConnection(String machine,
String port,
String userid,
String password)
Test given information for connecting to AppServer ServerContext Throws AppServerException if connect fails. |
void |
updateMetadataAll()
Update any new/changed metadata for this AppServer. |
int |
waitForCompletion()
Wait for completion of AppServer operation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static com.sas.metadata.MetadataResource bundle
protected HashMap m_SCMap
protected ArrayList m_populatedSC
protected ArrayList m_reposSC
protected com.sas.metadata.PhysicalTable m_PhysTable
protected com.sas.metadata.SASLibrary m_Library
protected com.sas.metadata.File m_EFile
protected com.sas.metadata.ServerContext m_ServerContext
protected com.sas.metadata.LogicalServer m_LogicalServer
protected Workspace m_workspace
protected com.sas.iom.SAS.IWorkspace m_sasWorkspace
protected Connection m_sqlConnection
protected com.sas.rio.MVAStatement m_sqlStmt
protected com.sas.rio.MVAResultSet m_rsltSet
protected com.sas.iom.SAS.ILanguageService m_sasLanguage
protected Boolean m_sasSubmitRunning
protected boolean m_operationComplete
protected com.sas.iom.SAS.IDataService m_rio
protected com.sas.metadata.MdObjectStore m_store
protected boolean m_bLocalStore
protected com.sas.iom.SAS.ILanguageServicePackage.CarriageControlSeqHolder m_logCCHolder
protected com.sas.iom.SAS.ILanguageServicePackage.LineTypeSeqHolder m_logTypeHolder
protected com.sas.iom.SASIOMDefs.StringSeqHolder m_logLinesHolder
protected com.sas.iom.SAS.ILanguageServicePackage.CarriageControlSeqHolder m_listCCHolder
protected com.sas.iom.SAS.ILanguageServicePackage.LineTypeSeqHolder m_listTypeHolder
protected com.sas.iom.SASIOMDefs.StringSeqHolder m_listLinesHolder
protected int m_status
protected String m_statusMsg
protected String m_2ndStatusMsg
public static final String WORKSPACECLASSID
public static final int MAX_STATUS_ERROR
public static final int STATUS_OK
public static final int STATUS_NoDCObj
public static final int STATUS_NoConnObj
public static final int STATUS_NoWSConf
public static final int STATUS_NoPort
public static final int STATUS_NoLoginObj
public static final int STATUS_NoUserid
public static final int STATUS_NoPassword
public static final int STATUS_NoDCMetadata
public static final int STATUS_NoServer
public static final int STATUS_ConnFailed
public static final int STATUS_SubmitFailed
public static final int STATUS_SubmitCancelled
public static final int STATUS_NoLogFetch
public static final int STATUS_NoListFetch
public static final int STATUS_NoLibAssign
public static final int STATUS_NoSQLConn
public static final int STATUS_TblOpenFail
public static final int STATUS_TblClosFail
public static final int STATUS_NoLibFound
public static final int STATUS_NoLibAssign2
public static final int STATUS_SQLQryFail
public static final int STATUS_SQLAbrtConn
public static final int STATUS_TblOpenFail2
public static final int STATUS_ConnClosFail
public static final int STATUS_CodeError
public static final int STATUS_AttemptLimitReached
public static final int STATUS_ConnectCancelled
public static final int STATUS_BadServer
public static final int Status_ExpiredCredentials
public static final int STATUS_Abort
| Constructor Detail |
public AppServer()
public AppServer(com.sas.metadata.MdStore owningStore)
public AppServer(String serverContextId,
String userLoginId,
String userPassword)
serverContextId - - Metadata-Id string for AppServer ServerContextuserLoginId - - UserId string to use for Login purposesuserPassword - - User password string to use for Login purposes
public AppServer(com.sas.metadata.MdStore owningStore,
String serverContextId,
String userLoginId,
String userPassword)
serverContextId - - Metadata-Id string for AppServer ServerContextuserLoginId - - UserId string to use for Login purposesuserPassword - - User password string to use for Login purposespublic AppServer(String serverContextId)
serverContextId - - Metadata-Id string for AppServer ServerContext
public AppServer(com.sas.metadata.MdStore owningStore,
String serverContextId)
serverContextId - - Metadata-Id string for AppServer ServerContextpublic AppServer(com.sas.metadata.PhysicalTable physTable)
physTable - - PhysicalTable which is target of AppServer accesspublic AppServer(com.sas.iom.SAS.IWorkspace iWorkspace)
| Method Detail |
public void testConnection()
throws AppServerException
public void testConnection(String machine,
String port,
String userid,
String password)
throws AppServerException
public com.sas.iom.SAS.IWorkspace makeConnection()
throws AppServerException
public void dropConnection()
public void setStore(com.sas.metadata.MdObjectStore inStore)
public com.sas.metadata.MdObjectStore getStore()
public void termAppServer()
public int determineStatus()
public void setSASLibrary(com.sas.metadata.SASLibrary inLibrary)
public void setPhysicalTable(com.sas.metadata.PhysicalTable table)
throws com.sas.metadata.MdException
public com.sas.metadata.SASLibrary getSASLibrary()
public String getAssignedLibref()
public void clearLibref(String strLibref)
strLibref - Stringpublic void clearLibref(com.sas.metadata.SASLibrary iLib)
iLib - SASLibraryprotected void setStatus(int newStatus)
newStatus - - New status code.public void resetStatus()
newStatus - - New status code.
protected void setStatus(int newStatus,
Object[] subStrs)
newStatus - - New status code.subStrs - - List of objects to use as status message substitutions.
protected void setStatus(int newStatus,
String str2ndMsg)
newStatus - - New status code.str2ndMsg - - Optional additional informational message.
protected void setStatus(int newStatus,
Object[] subStrs,
String str2ndMsg)
newStatus - - New status code.subStrs - - List of objects to use as status message substitutions.str2ndMsg - - Optional additional informational message.public int getStatus()
public String getFullStatusMsg()
public String getStatusMsg()
public String getStatusMsg2()
public void postCompletion()
public int submitSrc(String sasStmts)
throws AppServerException
sasStmts - - String of SAS source statements to execute, delimited by '\n'spublic void setCloseOnError(boolean bDoTheClose)
bDoTheClose - - Close the AppServer on Submission errorspublic com.sas.iom.SASIOMDefs.StringSeqHolder getLogLinesHolder()
public com.sas.iom.SAS.ILanguageServicePackage.LineTypeSeqHolder getLogTypeHolder()
public com.sas.iom.SAS.ILanguageServicePackage.CarriageControlSeqHolder getLogCCHolder()
public com.sas.iom.SASIOMDefs.StringSeqHolder getListLinesHolder()
public StringBuffer getLog()
public Connection getSQLConnection()
public String getConnectionHostName()
public com.sas.iom.SAS.ILanguageServicePackage.LineTypeSeqHolder getListTypeHolder()
public com.sas.iom.SAS.ILanguageServicePackage.CarriageControlSeqHolder getListCCHolder()
public ArrayList getReposServerContexts()
public void clearReposServerContexts()
public com.sas.metadata.ServerContext getServerContext()
public void setServerContext(com.sas.metadata.ServerContext scObj)
throws AppServerException
scObj - - ServerContext object to make current.
public com.sas.metadata.ServerContext setServerContext(String strSCId)
throws AppServerException
scObj - - ServerContext object to make current.public com.sas.metadata.ServerContext setServerContext(com.sas.metadata.PhysicalTable physTable)
physTable - - PhysicalTable which is target of AppServer access
public void setLogin(String strUserid,
String strPassword)
strUserId - - UserId string used to find Login object.strPassword - - Password string used to find Login object.public void updateMetadataAll()
public com.sas.rio.MVAResultSet openJDBCTable(com.sas.metadata.PhysicalTable physTable)
throws AppServerException
physTable - - Object representing the PhysicalTable to open.public com.sas.metadata.SASLibrary getSchemaLibrary(com.sas.metadata.DatabaseSchema m_metadata)
physTable - - Object representing the PhysicalTable to open.
public static String bldOptionString(com.sas.metadata.AssociationList optionList,
String optionRole)
public void makeSQLConnection()
throws AppServerException
public com.sas.rio.MVAResultSet getTable(String strLibref,
String strTable,
String strMemType,
String[] sasPasswords,
String strOptions)
throws AppServerException
strLibref - - Libref string for library.strTable - - Table name string.strMemType - - SAS Table membertype. Pass null or "" for no type.sasPasswords - - Array[3] of SAS password strings, in Read, Write, Alter order. Pass
null or empty array for no password information.strOptions - - Table options, if any. Pass null or "" for no option specification.
public String makeSQLConnection(String tempLibRef,
String engine,
String path,
String strIncomingOptions)
throws AppServerException
tempLibRef - - Libref string to use for library.engine - - Libname engine for library. Pass null or "" for no engine specification.path - - Path to specified library. Pass null for no path specification.strIncomingOptions - - Libname options to use. Pass null or "" for no option specification.
public String assignLibref(String strLibref0,
String strEngine,
String strPath,
String strOptions)
throws AppServerException,
com.sas.metadata.MdException
strLibref0 - - Libref string to use for library.strEngine - - Libname engine for library. Pass null or "" for no engine specification.strPath - - Path to specified library. Pass null for no path specification.strOptions - - Libname options to use. Pass null or "" for no option specification.
public boolean isPreassignedMetaEngine(com.sas.metadata.SASLibrary iLib)
throws AppServerException
iLib - - the SASLibrary object that is to be assignedAppServerException -
public String assignLibref(com.sas.metadata.SASLibrary iLib)
throws AppServerException
iLib - - the SASLibrary object that is to be assigned
public String assignLibref(String strLibref0,
String strEngine,
String strPath,
String strOptions,
boolean useOldMethod)
throws AppServerException,
com.sas.metadata.MdException
strLibref0 - - Libref string to use for library.strEngine - - Libname engine for library. Pass null or "" for no engine specification.strPath - - Path to specified library. Pass null for no path specification.strOptions - - Libname options to use. Pass null or "" for no option specification.
public boolean isLibrefAssigned(com.sas.metadata.SASLibrary iLib)
throws AppServerException
public boolean isLibrefAssigned(String strLibref)
throws AppServerException
public com.sas.rio.MVAResultSet submitSQLStatement(String strStatement)
throws AppServerException
selectStatement - - SQL Select statement to execute.
public com.sas.rio.MVAResultSet submitSQLStatement(String strStatement,
com.sas.rio.MVAStatement sqlStatement)
throws AppServerException
strStatement - - SQL Select statement to execute.sqlStatement - - MVAStatement to use to execute the Select statement.
public void closeJDBCTable()
throws AppServerException
public void dropSQLConnection()
throws AppServerException
public int waitForCompletion()
throws AppServerException
|
| Workspace |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||