|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.altair.hwm.fileserver.server.HWMFileServer
public class HWMFileServer
Title: HWMFileServer
Description: This class initializes the file server and the database connection pool. It also provides some functions that will be required by more than one class
Company: Altair Engineering, Inc.
| Constructor Summary | |
|---|---|
HWMFileServer()
Constructor |
|
| Method Summary | |
|---|---|
java.lang.String |
AddFileToSystem(java.sql.Connection cxn,
java.lang.String strFName,
java.io.InputStream in)
Copies the contents from input stream into the new file with name = strFName. |
java.lang.String |
GetBaseDir()
Gets the base directory. |
java.lang.String |
GetCurrentDir(java.sql.Connection cxn)
Gets the current directory to use. |
HWMDBCxnPool |
GetCxnPool()
Returns the database cxn pool |
java.sql.ResultSet |
GetFileInfo(java.sql.Connection cxn,
int nFileID)
Gets the information from the file table about the file with given id. |
java.sql.ResultSet |
GetRevisionInfo(java.sql.Connection cxn,
int nFileID,
java.lang.String strRevision)
Gets the information from the revision table about the revision |
java.sql.ResultSet |
GetRevisions(java.sql.Connection cxn,
int nFileID)
Gets the revisions for a file (ordered such that the first row in the result set contains the most recent revision and the last row the earliest available revision) |
java.sql.ResultSet |
GetVersionInfo(java.sql.Connection cxn,
int nRevID,
int nVersion)
Gets the information from the version table about the version |
java.sql.ResultSet |
GetVersions(java.sql.Connection cxn,
int nRevID)
Gets the versions for a revision of a file (ordered such that the first row in the result set contains the most recent version and the last row the earliest available version) |
boolean |
HasRevisions(java.sql.Connection cxn,
int nRevID)
Returns a flag indicating if the given revision id has more recent revisions. |
boolean |
HasVersions(java.sql.Connection cxn,
int nRevID,
int nVersion)
Returns a flag indicating if the given version has more recent versions under the same revision id. |
void |
Init(java.lang.String strCfgFile)
Initialize the file server. |
void |
OnExit()
Called when the file server is exiting |
void |
RemoveEntries(java.sql.Connection cxn,
int nFileID,
int nRevID,
int nVerID)
Remove any IDS if above 0 |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HWMFileServer()
| Method Detail |
|---|
public void Init(java.lang.String strCfgFile)
throws java.lang.Exception
strCfgFile - The config file for the fileserver
java.lang.Exceptionpublic HWMDBCxnPool GetCxnPool()
public java.lang.String GetBaseDir()
throws java.lang.Exception
java.lang.Exception
public java.lang.String GetCurrentDir(java.sql.Connection cxn)
throws java.lang.Exception
cxn - The connection to database
java.lang.Exception
public java.lang.String AddFileToSystem(java.sql.Connection cxn,
java.lang.String strFName,
java.io.InputStream in)
throws java.lang.Exception
cxn - The connection to the databasestrFName - The file name to store the file asin - The input streamto read from
java.lang.Exception
public java.sql.ResultSet GetFileInfo(java.sql.Connection cxn,
int nFileID)
throws java.lang.Exception
cxn - The connection to the database.nFileID - The id of the file whose information should be retrieved.
java.lang.Exception
public java.sql.ResultSet GetRevisions(java.sql.Connection cxn,
int nFileID)
throws java.lang.Exception
cxn - The connection to the database.nFileID - The id for the file whose revisions are to be retrieved.
java.lang.Exception
public java.sql.ResultSet GetRevisionInfo(java.sql.Connection cxn,
int nFileID,
java.lang.String strRevision)
throws java.lang.Exception
nFileID - The id of the file whose revision information should be
retrieved.strRevision - The revision name of the file whose revision
information should be retrieved.
java.lang.Exception
public boolean HasRevisions(java.sql.Connection cxn,
int nRevID)
throws java.lang.Exception
cxn - The connection to the database.nRevID - The revision id of the file.
java.lang.Exception
public java.sql.ResultSet GetVersions(java.sql.Connection cxn,
int nRevID)
throws java.lang.Exception
cxn - The connection to the database.nRevID - The revision id for the file whose versions are to be
retrieved.
java.lang.Exception
public java.sql.ResultSet GetVersionInfo(java.sql.Connection cxn,
int nRevID,
int nVersion)
throws java.lang.Exception
nRevID - The revision id of the file whose version information
should be retrieved.nVersion - The version of the file whose version information
should be retrieved.
java.lang.Exception
public boolean HasVersions(java.sql.Connection cxn,
int nRevID,
int nVersion)
throws java.lang.Exception
cxn - The connection to the database.nRevID - The revision id of the file.nVersion - The version for the file.
java.lang.Exception
public void RemoveEntries(java.sql.Connection cxn,
int nFileID,
int nRevID,
int nVerID)
cxn - The connectionnFileID - The file id to removenRevID - The revision id to removenVerID - The version id to removepublic void OnExit()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||