|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.opencms.file.genericSql.CmsDbAccess
|
+--com.opencms.file.oraclesql.CmsDbAccess
This is the generic access module to load and store resources from and into the database.
| Field Summary |
| Fields inherited from interface com.opencms.boot.I_CmsLogChannels |
C_FLEX_CACHE, C_FLEX_LOADER, C_LOGGING, C_MODULE_CRITICAL, C_MODULE_DEBUG, C_MODULE_INFO, C_OPENCMS_CACHE, C_OPENCMS_CRITICAL, C_OPENCMS_CRONSCHEDULER, C_OPENCMS_DEBUG, C_OPENCMS_ELEMENTCACHE, C_OPENCMS_INFO, C_OPENCMS_INIT, C_OPENCMS_POOL, C_OPENCMS_STATICEXPORT, C_OPENCMS_STREAMING, C_PREPROCESSOR_IS_LOGGING |
| Constructor Summary | |
CmsDbAccess(source.org.apache.java.util.Configurations config)
Instanciates the access-module and sets up all required modules and connections. |
|
| Method Summary | |
CmsUser |
addImportUser(String name,
String password,
String recoveryPassword,
String description,
String firstname,
String lastname,
String email,
long lastlogin,
long lastused,
int flags,
Hashtable additionalInfos,
CmsGroup defaultGroup,
String address,
String section,
int type)
Adds a user to the database. |
Serializable |
addSystemProperty(String name,
Serializable object)
Creates a serializable object in the systempropertys. |
CmsUser |
addUser(String name,
String password,
String description,
String firstname,
String lastname,
String email,
long lastlogin,
long lastused,
int flags,
Hashtable additionalInfos,
CmsGroup defaultGroup,
String address,
String section,
int type)
Adds a user to the database. |
protected void |
createFileContent(int fileId,
byte[] fileContent,
int versionId,
String usedPool,
String usedStatement)
Creates the content entry for a file |
void |
createSession(String sessionId,
Hashtable data)
This method creates a new session in the database. |
void |
destroy()
Destroys this access-module |
Vector |
getAllBackupProjects()
Returns all projects from the history. |
protected byte[] |
getBytesFromResultset(ResultSet res,
String columnName)
Returns the bytes from a result set |
protected CmsQueries |
getQueries()
retrieve the correct instance of the queries holder. |
protected byte[] |
readFileContent(int projectId,
int fileId)
Private helper method to read the fileContent for publishProject(export). |
int |
updateSession(String sessionId,
Hashtable data)
This method updates a session in the database. |
protected void |
writeFileContent(int fileId,
byte[] fileContent,
String usedPool,
String usedStatement)
Writes the file content of an existing file |
Serializable |
writeSystemProperty(String name,
Serializable object)
Writes a serializable object to the systemproperties. |
void |
writeUser(CmsUser user)
Writes a user to the database. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CmsDbAccess(source.org.apache.java.util.Configurations config)
throws CmsException
config - The OpenCms configuration.
CmsException - Throws CmsException if something goes wrong.| Method Detail |
public Serializable addSystemProperty(String name,
Serializable object)
throws CmsException
addSystemProperty in class CmsDbAccessname - The name of the property.object - The property-object.
CmsException - Throws CmsException if something goes wrong.
public CmsUser addUser(String name,
String password,
String description,
String firstname,
String lastname,
String email,
long lastlogin,
long lastused,
int flags,
Hashtable additionalInfos,
CmsGroup defaultGroup,
String address,
String section,
int type)
throws CmsException
addUser in class CmsDbAccessname - usernamepassword - user-passworddescription - user-descriptionfirstname - user-firstnamelastname - user-lastnameemail - user-emaillastlogin - user-lastloginlastused - user-lastusedflags - user-flagsadditionalInfos - user-additional-infosdefaultGroup - user-defaultGroupaddress - user-defauladdresssection - user-sectiontype - user-type
thorws - CmsException if something goes wrong.
CmsException
public CmsUser addImportUser(String name,
String password,
String recoveryPassword,
String description,
String firstname,
String lastname,
String email,
long lastlogin,
long lastused,
int flags,
Hashtable additionalInfos,
CmsGroup defaultGroup,
String address,
String section,
int type)
throws CmsException
addImportUser in class CmsDbAccessname - usernamepassword - user-passwordrecoveryPassword - user-recoveryPassworddescription - user-descriptionfirstname - user-firstnamelastname - user-lastnameemail - user-emaillastlogin - user-lastloginlastused - user-lastusedflags - user-flagsadditionalInfos - user-additional-infosdefaultGroup - user-defaultGroupaddress - user-defauladdresssection - user-sectiontype - user-type
thorws - CmsException if something goes wrong.
CmsException
public void createSession(String sessionId,
Hashtable data)
throws CmsException
createSession in class CmsDbAccesssessionId - the id of the session.
CmsException
public Vector getAllBackupProjects()
throws CmsException
getAllBackupProjects in class CmsDbAccessCmsExceptionprotected CmsQueries getQueries()
getQueries in class CmsDbAccess
protected byte[] readFileContent(int projectId,
int fileId)
throws CmsException
readFileContent in class CmsDbAccessfileId - the fileId.
CmsException - Throws CmsException if operation was not succesful.
public int updateSession(String sessionId,
Hashtable data)
throws CmsException
updateSession in class CmsDbAccesssessionId - the id of the session.
CmsException
public Serializable writeSystemProperty(String name,
Serializable object)
throws CmsException
writeSystemProperty in class CmsDbAccessname - The name of the property.object - The property-object.
CmsException - Throws CmsException if something goes wrong.
public void writeUser(CmsUser user)
throws CmsException
writeUser in class CmsDbAccessuser - the user to write
thorws - CmsException if something goes wrong.
CmsException
public void destroy()
throws CmsException
destroy in class CmsDbAccessthrows - CmsException if something goes wrong.
CmsException
protected void createFileContent(int fileId,
byte[] fileContent,
int versionId,
String usedPool,
String usedStatement)
throws CmsException
createFileContent in class CmsDbAccessfileId - The ID of the new filefileContent - The content of the new fileversionId - For the content of a backup file you need to insert the versionId of the backupusedPool - The name of the databasepool to useusedStatement - Specifies which tables must be used: offline, online or backup
CmsException
protected void writeFileContent(int fileId,
byte[] fileContent,
String usedPool,
String usedStatement)
throws CmsException
writeFileContent in class CmsDbAccessfileId - The ID of the file to updatefileContent - The new content of the fileusedPool - The name of the database pool to useusedStatement - Specifies which tables must be used: offline, online or backup
CmsException
protected byte[] getBytesFromResultset(ResultSet res,
String columnName)
throws SQLException
getBytesFromResultset in class CmsDbAccessres - The ResultSet to read fromcolumnName - The name of the column to read from
SQLException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||