public abstract class DriverGeneric
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static char |
LINSEP
Linux path separatos
|
static java.lang.String |
S_ALTER
Order for remote session
|
static java.lang.String |
S_ALTERDEL
Order for remote session
|
static java.lang.String |
S_CANCEL
Order for remote session
|
static java.lang.String |
S_COMMIT
Order for remote session
|
static java.lang.String |
S_CREATE
Order for remote session
|
static java.lang.String |
S_DELETE
Order for remote session
|
static java.lang.String |
S_DELFILE
Order for remote session
|
static java.lang.String |
S_DROP
Order for remote session
|
static java.lang.String |
S_FTDEL
Order for remote session
|
static java.lang.String |
S_FTINS
Order for remote session
|
static java.lang.String |
S_FTSEARCH
Order for remote session
|
static java.lang.String |
S_FTUPD
Order for remote session
|
static java.lang.String |
S_INITTRANS
Order for remote session
|
static java.lang.String |
S_INSERT
Order for remote session
|
static java.lang.String |
S_INSFILE
Order for remote session
|
static java.lang.String |
S_INTEGRIT
Order for remote session
|
static java.lang.String |
S_INTEGRIT2
Order for remote session
|
static java.lang.String |
S_LOGIN
Order for remote session
|
static java.lang.String |
S_LOGOUT
Order for remote session
|
static java.lang.String |
S_RENFILE
Order for remote session
|
static java.lang.String |
S_RETRIEVEFILE
Order for remote session
|
static java.lang.String |
S_SELECT
Order for remote session
|
static java.lang.String |
S_UNLOCK
Order for remote session
|
static java.lang.String |
S_UPDATE
Order for remote session
|
static char |
WINSEP
Windows path separator
|
Constructor and Description |
---|
DriverGeneric(java.lang.String pURL,
java.lang.String pPARAM,
java.lang.String pUser,
java.lang.String pPassword)
Defualt constructor
|
Modifier and Type | Method and Description |
---|---|
abstract void |
AnularTrans()
Stops/roolback a transaction
|
ObjPD |
BuildObj(org.w3c.dom.Node OPDObject)
Build an OpenProdoc object from an XML node
|
abstract void |
CerrarTrans()
Starts a transaction
|
void |
ChangePassword(java.lang.String UserName,
java.lang.String OldPassword,
java.lang.String NewPassword)
Changes (or transmit the change to server defined in the authenticator) the password
|
abstract void |
CloseCursor(Cursor CursorIdent)
Closes the cursor, calling also to
delCursor(prodoc.Cursor) |
static java.lang.String |
Codif(java.lang.String Text)
Escape of values for avoiding problems with xml/html
|
void |
ConvertJavaDocImport(PDFolders FoldAct,
java.lang.String ImpPath,
java.lang.String FoldType,
java.lang.String DocType,
boolean Strict)
Imports a folder structure of Javadoc files, MODIFYING them for use in OpenProdoc
|
void |
CreateRep(PDRepository Rep)
Creates a repository using the definition received (i.e. a Folder, a table blob, etc)
|
static java.lang.String |
DeCodif(java.lang.String Text)
UNescape of values for avoiding problems with xml/html
|
static java.lang.String |
DefTT(java.lang.String Text)
Translates a text using the default language and the language properties
|
static java.lang.String |
DefTT(java.lang.String Lang,
java.lang.String Text)
Translates a text using the specified language and the language properties
|
abstract void |
delete()
Deletes e sesion
|
void |
DestroyRep(PDRepository Rep)
DESTROY a repository using the definition received (i.e. a Folder, a table blob, etc)
|
static java.lang.String |
FixPath(java.lang.String Path,
boolean isFolder)
Converts any path to a "Linux" format managed by Java
|
static void |
generateProps(java.lang.String FileName,
java.lang.String ConnectName,
java.lang.String UrlServer,
java.lang.String UserName,
java.lang.String Password,
java.lang.String JDBCClass)
Creates a properties file to be used by any client, including to create metadata repository
Review Installation product help for details
|
java.lang.String |
getAppLang()
Returns the language to use
|
java.lang.String |
getDBUser() |
static java.lang.String |
getDefAppLang()
Returns the default language
|
static java.lang.String |
getHelpLang(java.lang.String UserLang)
Returns the language of the help for a session language
|
int |
getImpDocs() |
int |
getImpFolds() |
java.lang.String |
getPARAM() |
PDCustomization |
getPDCust()
Returns the customization assigned to session, creating if needed
|
java.util.Date |
getTimeLocked()
Returns when the session was locked
|
java.util.Date |
getTimeUsed()
Returns the last tme the session was used
|
java.lang.String |
getToken() |
java.lang.String |
getURL() |
PDUser |
getUser()
Returns, and create if needed, the session user
|
static java.lang.String |
getVersion()
Returns the core(nucleo) version
|
java.util.ArrayList<java.lang.String> |
ImportDefs(java.lang.String FolderPath,
boolean CreateTypes)
Import a set of definitions
|
void |
ImportFolder(PDFolders FoldAct,
java.lang.String OriginPath,
boolean IsOneLevel,
boolean IncludeMetadata,
boolean IncludeDocs,
java.lang.String FoldType,
java.lang.String DocType,
boolean Strict) |
java.util.ArrayList<java.lang.String> |
ImportPack(java.lang.String FolderPath)
Imports a complete OPD package, with definitions, thesauri and folders/documents
|
java.util.ArrayList<java.lang.String> |
ImportThes(java.lang.String FolderPath)
Imports a group of thesauri from a folder
|
abstract void |
IniciarTrans()
Ends/commit a transaction
|
void |
InsertFile(java.lang.String Id,
java.lang.String Ver,
java.io.InputStream FileData)
Creates a File in the repository
|
void |
Install(java.lang.String RootPassword,
java.lang.String DefLang,
java.lang.String DefTimeFormat,
java.lang.String DefDateFormat,
java.lang.String MainKey,
java.lang.String RepName,
boolean RepEncrypt,
java.lang.String RepUrl,
java.lang.String RepUser,
java.lang.String RepPassword,
java.lang.String RepType,
java.lang.String RepParam,
java.util.Vector<java.lang.String> Trace)
Installs OpenProdoc in the current/configured session database, creating all the datamodel
and inserting the base definitions and elements (document types, users, folders, roles, groups, acl,...)
|
abstract boolean |
isConnected()
Returns if the session is connected
|
boolean |
IsConnected()
Checks if OpenProdoc is connected to the server (Database or renmote)
|
boolean |
isInTransaction()
When true the session is in a transaction
|
boolean |
isLocked()
Returns true when the session is locked (by a thread/http session)
|
void |
Lock()
Locks the session, setting the timestamp
|
abstract Record |
NextRec(Cursor CursorIdent)
Returns the next record of the cursor
|
int |
ProcessXML(java.io.File XMLFile,
java.lang.String ParentFolderId)
Imports ANY kind of OpenProdoc object(s) (doc, folder, definition, object of any kind,..) in XML format from a file
|
int |
ProcessXML(java.io.InputStream XMLFile,
java.lang.String ParentFolderId)
Imports ANY kind of OpenProdoc object(s) (doc, folder, definition, object of any kind,..) in XML format from a InputStream
|
int |
ProcessXMLB64(java.io.InputStream XMLFile,
java.lang.String ParentFolderId)
Imports ANY kind of OpenProdoc object(s) (doc, folder, definition, object of any kind,..) in XML format from a InputStream with base64 content
|
void |
RefreshUser()
Refresh current all the information of current user
|
java.lang.String |
RemoteOrder(java.lang.String Order,
org.w3c.dom.Document XMLObjects)
Executes a received order from a remote installation
|
void |
setAppLang(java.lang.String pAppLang)
Sets the language to use
|
static void |
setDefAppLang(java.lang.String aDefAppLang)
Sets the default language
|
void |
setInTransaction(boolean pInTransaction)
Assign the transaction status to a the session
|
void |
SetPassword(java.lang.String UserName,
java.lang.String NewPassword)
Assigns (or transmit the assignation to server defined in the authenticator) the password
|
java.lang.String |
TT(java.lang.String Text)
Translates a text using the session language and the language properties
|
void |
Uninstall()
Uninstall OpenProdoc from the database
|
void |
UnLock()
Unlocks the session
|
void |
Update(boolean UpMetadataInc,
java.util.Vector<java.lang.String> Trace)
Updates the version and structure of repository database
|
public static final java.lang.String S_LOGIN
public static final java.lang.String S_LOGOUT
public static final java.lang.String S_SELECT
public static final java.lang.String S_INSERT
public static final java.lang.String S_DELETE
public static final java.lang.String S_UPDATE
public static final java.lang.String S_CREATE
public static final java.lang.String S_DROP
public static final java.lang.String S_ALTER
public static final java.lang.String S_ALTERDEL
public static final java.lang.String S_INTEGRIT
public static final java.lang.String S_INTEGRIT2
public static final java.lang.String S_INITTRANS
public static final java.lang.String S_COMMIT
public static final java.lang.String S_CANCEL
public static final java.lang.String S_UNLOCK
public static final java.lang.String S_DELFILE
public static final java.lang.String S_RENFILE
public static final java.lang.String S_RETRIEVEFILE
public static final java.lang.String S_INSFILE
public static final java.lang.String S_FTINS
public static final java.lang.String S_FTUPD
public static final java.lang.String S_FTDEL
public static final java.lang.String S_FTSEARCH
public static final char LINSEP
public static final char WINSEP
public DriverGeneric(java.lang.String pURL, java.lang.String pPARAM, java.lang.String pUser, java.lang.String pPassword)
pURL
- url of database or OPD server when remotepPARAM
- Additional paramspUser
- User of connnectionpPassword
- password of connectionpublic java.lang.String getToken()
public java.lang.String getURL()
public java.lang.String getPARAM()
public java.lang.String getDBUser()
public boolean isLocked()
public void Lock()
public void UnLock()
public java.util.Date getTimeUsed()
public java.util.Date getTimeLocked()
public abstract void delete() throws PDException
PDException
- in any errorpublic abstract boolean isConnected()
public void Install(java.lang.String RootPassword, java.lang.String DefLang, java.lang.String DefTimeFormat, java.lang.String DefDateFormat, java.lang.String MainKey, java.lang.String RepName, boolean RepEncrypt, java.lang.String RepUrl, java.lang.String RepUser, java.lang.String RepPassword, java.lang.String RepType, java.lang.String RepParam, java.util.Vector<java.lang.String> Trace) throws PDException
RootPassword
- Password for "root" userDefLang
- Default languageRepUrl
- Url of the default documents repositoryDefTimeFormat
- Default TimeStamp format for Swing interfaceDefDateFormat
- Default Date format for Swing interfaceRepName
- name of the default repositoryMainKey
- Key for encription oof documentsRepEncrypt
- When true, the repository is encriptedTrace
- Vector for storing the messages of the installation in order to show the evolution or final result of the installationRepUser
- Name of the Repository user (i.e. name for a database-blob repository)RepParam
- Additional parameter of the repositoryRepType
- Kind of rspository (FileSystem, blob, S3, Custom,..)RepPassword
- Repository PasswordPDException
- in any errorpublic void Update(boolean UpMetadataInc, java.util.Vector<java.lang.String> Trace) throws PDException
UpMetadataInc
- when tru, the updating will be incremental, doing as much as posible, even afcter error, otherwise the process stops at the first errorTrace
- Vector for storing the messages of the installation in order to show the evolution or final result of the installationPDException
- In any errorpublic void Uninstall() throws PDException
PDException
- In any Errorpublic boolean isInTransaction()
public void setInTransaction(boolean pInTransaction)
pInTransaction
- boolean value indicating the statuspublic abstract void IniciarTrans() throws PDException
PDException
- In any errorpublic abstract void CerrarTrans() throws PDException
PDException
- In any errorpublic abstract void AnularTrans() throws PDException
PDException
- In any errorpublic abstract Record NextRec(Cursor CursorIdent) throws PDException
CursorIdent
- Cursor IdentifierPDException
- In any errorpublic abstract void CloseCursor(Cursor CursorIdent) throws PDException
delCursor(prodoc.Cursor)
CursorIdent
- Cursor IdentifierPDException
- In any errorpublic void RefreshUser() throws PDException
PDException
- In any errorpublic PDUser getUser() throws PDException
PDException
- In any errorpublic void CreateRep(PDRepository Rep) throws PDException
Rep
- Repository definitionPDException
- In any errorpublic void DestroyRep(PDRepository Rep) throws PDException
Rep
- Repository definitionPDException
- In any errorpublic void ChangePassword(java.lang.String UserName, java.lang.String OldPassword, java.lang.String NewPassword) throws PDException
UserName
- Name of the user changing the passwordOldPassword
- Old passwordNewPassword
- New passwordPDException
- In any errorpublic void SetPassword(java.lang.String UserName, java.lang.String NewPassword) throws PDException
UserName
- Name of the user changing the passwordNewPassword
- New passwordPDException
- In any errorpublic static java.lang.String getVersion()
public static void generateProps(java.lang.String FileName, java.lang.String ConnectName, java.lang.String UrlServer, java.lang.String UserName, java.lang.String Password, java.lang.String JDBCClass) throws java.lang.Exception
FileName
- Name of the properties file to createUserName
- User name for connecting to the databaseConnectName
- name of connection (PD usually)UrlServer
- URL of he database serverJDBCClass
- JDBC class for connectionPassword
- Password (clear)for connecting to the databasejava.lang.Exception
- In any errorpublic java.lang.String TT(java.lang.String Text)
Text
- Text to translatepublic static java.lang.String DefTT(java.lang.String Text)
Text
- Text to translatepublic static java.lang.String DefTT(java.lang.String Lang, java.lang.String Text)
Lang
- language to useText
- Text to translatepublic java.lang.String getAppLang()
public void setAppLang(java.lang.String pAppLang)
pAppLang
- the AppLang to setpublic static java.lang.String getDefAppLang()
public static void setDefAppLang(java.lang.String aDefAppLang)
aDefAppLang
- the DefAppLang to setpublic PDCustomization getPDCust() throws PDException
PDException
- in any errorpublic int ProcessXML(java.io.File XMLFile, java.lang.String ParentFolderId) throws PDException
XMLFile
- local file containing the objectParentFolderId
- Folder Id for importing folders or docs.PDException
- In any errorpublic int ProcessXML(java.io.InputStream XMLFile, java.lang.String ParentFolderId) throws PDException
XMLFile
- InputStream containing the objectParentFolderId
- Folder Id for importing folders or docs.PDException
- In any errorpublic int ProcessXMLB64(java.io.InputStream XMLFile, java.lang.String ParentFolderId) throws PDException
XMLFile
- InputStream containing the objectParentFolderId
- Folder Id for importing folders or docs.PDException
- In any errorpublic ObjPD BuildObj(org.w3c.dom.Node OPDObject) throws PDException
OPDObject
- XML node containing an objectPDException
- in any errorpublic java.lang.String RemoteOrder(java.lang.String Order, org.w3c.dom.Document XMLObjects) throws PDException
Order
- Order to executeXMLObjects
- XML containign the parameters for the orderPDException
- In any errorpublic void InsertFile(java.lang.String Id, java.lang.String Ver, java.io.InputStream FileData) throws PDException
Id
- Identification of fileVer
- Version of fileFileData
- InpusStream cotaining the dataPDException
- In any errorpublic static java.lang.String Codif(java.lang.String Text)
Text
- Text to escapepublic static java.lang.String DeCodif(java.lang.String Text)
Text
- Text to UNescapepublic static java.lang.String getHelpLang(java.lang.String UserLang)
UserLang
- Language of current session/userpublic void ImportFolder(PDFolders FoldAct, java.lang.String OriginPath, boolean IsOneLevel, boolean IncludeMetadata, boolean IncludeDocs, java.lang.String FoldType, java.lang.String DocType, boolean Strict) throws PDException
FoldAct
- Id of OpenProdoc folder where the filesystem foplders will be importedOriginPath
- Filesystem pathIsOneLevel
- when true, only first level will be imported, otherwise ALL the folders and documentsIncludeMetadata
- when true, OPD will try to obtain metadata from OPD filesIncludeDocs
- when true, the documents will be imported, otherwise, only foldersFoldType
- Folder type to be assigned when no metadata if importedDocType
- Document type to be assigned when no metadata if importedStrict
- when trueexisting folders with the same name will throw an error otherwise, the folders will be accepted/mixed.PDException
- in any errorpublic int getImpFolds()
public int getImpDocs()
public java.util.ArrayList<java.lang.String> ImportThes(java.lang.String FolderPath) throws PDException
FolderPath
- Filesystem path conmtaning the thesauriPDException
- in any errorpublic java.util.ArrayList<java.lang.String> ImportDefs(java.lang.String FolderPath, boolean CreateTypes) throws PDException
FolderPath
- Filesystem path where definitions are storedCreateTypes
- when true, after importing the definitions the document types will be createdPDException
- in any errorpublic java.util.ArrayList<java.lang.String> ImportPack(java.lang.String FolderPath) throws PDException
FolderPath
- Filesystem folder where the package uis storedPDException
- in any errorpublic boolean IsConnected()
public static java.lang.String FixPath(java.lang.String Path, boolean isFolder)
Path
- path to convertisFolder
- when true, the path is from a folderpublic void ConvertJavaDocImport(PDFolders FoldAct, java.lang.String ImpPath, java.lang.String FoldType, java.lang.String DocType, boolean Strict) throws PDException
FoldAct
- Id of OPD Folder where Javadoc will be importedImpPath
- Filesystem pathFoldType
- Folder type to applyDocType
- Document type to applyStrict
- when true, if a folder exists with the same name, the import will be rejectedPDException
- in any error