public class OracleFileSystem extends DbFileSystem
OracleFileSystem is a JDBC-based FileSystem
implementation for Jackrabbit that persists file system entries in an
Oracle database.
It is configured through the following properties:
driver: the FQN name of the JDBC driver class
(default: "oracle.jdbc.OracleDriver")schema: type of schema to be used
(default: "oracle")url: the database url (e.g.
"jdbc:oracle:thin:@[host]:[port]:[sid]")user: the database userpassword: the user's passwordschemaObjectPrefix: prefix to be prepended to schema objectstablespace: the tablespace to use for tables (also used for indexes if indexTablespace is omitted)indexTablespace: the tablespace to use for indexesDbFileSystem.
The following is a fragment from a sample configuration:
<FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
<param name="url" value="jdbc:oracle:thin:@127.0.0.1:1521:orcl"/>
<param name="user" value="scott"/>
<param name="password" value="tiger"/>
<param name="schemaObjectPrefix" value="rep_"/>
<param name="tablespace" value="user"/>
<param name="indexTablespace" value="user"/>
</FileSystem>
| Modifier and Type | Field and Description |
|---|---|
protected static String |
DEFAULT_TABLESPACE_CLAUSE
The default tablespace clause used when
tablespace or indexTablespace
are not specified. |
protected static String |
INDEX_TABLESPACE_VARIABLE
Name of the replacement variable in the DDL for
indexTablespace. |
protected String |
indexTablespace
The Oracle tablespace to use for indexes
|
protected String |
tablespace
The Oracle tablespace to use for tables
|
protected static String |
TABLESPACE_VARIABLE
Name of the replacement variable in the DDL for
tablespace. |
dataSourceName, driver, password, url, userconHelper, copyFileSQL, copyFilesSQL, deleteFileSQL, deleteFolderSQL, INITIAL_BUFFER_SIZE, initialized, insertFileSQL, insertFolderSQL, schema, schemaObjectPrefix, selectChildCountSQL, selectDataSQL, selectExistSQL, selectFileAndFolderNamesSQL, selectFileExistSQL, selectFileNamesSQL, selectFolderExistSQL, selectFolderNamesSQL, selectLastModifiedSQL, selectLengthSQL, updateDataSQL, updateLastModifiedSQLSEPARATOR, SEPARATOR_CHAR| Constructor and Description |
|---|
OracleFileSystem()
Creates a new
OracleFileSystem instance. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
buildSQLStatements()
Builds the SQL statements
Since Oracle treats emtpy strings and BLOBs as null values the SQL
statements had to be adapated accordingly.
|
protected CheckSchemaOperation |
createCheckSchemaOperation()
This method is called from
#init(PMContext) after the
DatabaseFileSystem.createConnectionHelper(DataSource) method, and returns a default CheckSchemaOperation. |
protected ConnectionHelper |
createConnectionHelper(DataSource dataSrc)
This method is called from the
#init(PMContext) method of this class and returns a
ConnectionHelper instance which is assigned to the conHelper field. |
String |
getIndexTablespace()
Returns the configured Oracle tablespace for indexes.
|
String |
getTablespace()
Returns the configured Oracle tablespace for tables.
|
void |
setIndexTablespace(String tablespaceName)
Sets the Oracle tablespace for indexes.
|
void |
setTablespace(String tablespaceName)
Sets the Oracle tablespace for tables.
|
equals, getDataSource, getDataSourceName, getDriver, getPassword, getUrl, getUser, hashCode, setConnectionFactory, setDataSourceName, setDriver, setPassword, setUrl, setUserclose, createDeepFolder, createFolder, deleteFile, deleteFolder, exists, getInputStream, getOutputStream, getSchema, getSchemaObjectPrefix, hasChildren, init, isFile, isFolder, isSchemaCheckEnabled, lastModified, length, list, listFiles, listFolders, setSchema, setSchemaCheckEnabled, setSchemaObjectPrefix, verifyRootExistsprotected static final String DEFAULT_TABLESPACE_CLAUSE
tablespace or indexTablespace
are not specified.protected static final String TABLESPACE_VARIABLE
tablespace.protected static final String INDEX_TABLESPACE_VARIABLE
indexTablespace.protected String tablespace
protected String indexTablespace
public OracleFileSystem()
OracleFileSystem instance.public String getTablespace()
public void setTablespace(String tablespaceName)
tablespaceName - the Oracle tablespace for tables.public String getIndexTablespace()
public void setIndexTablespace(String tablespaceName)
tablespaceName - the Oracle tablespace for indexes.protected ConnectionHelper createConnectionHelper(DataSource dataSrc) throws Exception
#init(PMContext) method of this class and returns a
ConnectionHelper instance which is assigned to the conHelper field. Subclasses may
override it to return a specialized connection helper.createConnectionHelper in class DatabaseFileSystemdataSrc - the DataSource of this persistence managerConnectionHelperException - on errorprotected CheckSchemaOperation createCheckSchemaOperation()
#init(PMContext) after the
DatabaseFileSystem.createConnectionHelper(DataSource) method, and returns a default CheckSchemaOperation.
Subclasses can overrride this implementation to get a customized implementation.createCheckSchemaOperation in class DatabaseFileSystemCheckSchemaOperation instanceprotected void buildSQLStatements()
buildSQLStatements in class DatabaseFileSystemCopyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.