|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bea.content.manager.RepositoryConfig
public class RepositoryConfig
Represents the configuration of a content repository. Each Repository may have specific properties that are necessary in order to be properly configured. Please see the specific repositories documentation for configuration information.
****************WARNING****************
When getting binaries from the BEA Repository (including both a binary Node Property and also a binary PropertyChoice) the default is to return the InputStream as a ByteArrayInputStream, thus consuming server memory until the bytes are released. If your application will be reading in very large files, you may switch to streaming mode. This means that the InputStream returned may read directly from a database resource, depending on the database or driver. This is accomplished by creating a property on the RepositoryConfig called "STREAMING_ENABLED" with the value set to "true". To disable streaming you must remove the "STREAMING_ENABLED" property entirely. Switching to streaming mode must be done with caution as it places additional requirements on developers using the api. The issue is that the InputStream through a BLOB, may be attached to a database connection (or other transactional resource). The use of this stream must therefore be within the context of a transaction to ensure that it is isolated from uses by other threads, etc. If you don't begin a UserTransaction before calling this method and then either commit or rollback the tx after you close the InputStream, the connection may go back to the WLS connection Pool and will be reused by another thread. This will lead to deadlocking the server. All of the BEA code that uses the api (tags, servlets, portlets and admin tools) are all protected through the use of a transaction. For those that are calling the API directly, here is an example of wrapping the call in a tx with exception handling left out
try { Context initCtx = new InitialContext(); tx = (UserTransaction)initCtx.lookup( "java:comp/UserTransaction" ); tx.setTransactionTimeout( transactionTimeout ); tx.begin(); bytes = nodeOps.getPropertyBytes(nodeId, propertyId); // empty the bytes } finally { // make sure to close InputStream if ( bytes != null ) { bytes.close(); } if ( tx != null ) { switch ( tx.getStatus() ) { case Status.STATUS_ACTIVE: tx.commit(); break; case Status.STATUS_MARKED_ROLLBACK: tx.rollback(); break; default: // this is bad - an unexpected status // throw exception break; } } }
Field Summary | |
---|---|
static boolean |
DEFAULT_BINARY_CACHE_IS_ENABLED
Default value to enable the binary cache. |
static int |
DEFAULT_BINARY_CACHE_MAX_ENTRIES
Default value for the binary cache max-entries. |
static long |
DEFAULT_BINARY_CACHE_MAX_ENTRY_SIZE
Default value for the binary cache max value size. |
static long |
DEFAULT_BINARY_CACHE_TTL
Default value for the binary cache time-to-live. |
static String |
DEFAULT_CLASS_NAME
The repository connection class for the BEA Repository. |
static boolean |
DEFAULT_FULLTEXT_SEARCH_IS_ENABLED
Default value to enable full-text search query support. |
static boolean |
DEFAULT_NODE_CACHE_IS_ENABLED
Default value to enable the node cache. |
static int |
DEFAULT_NODE_CACHE_MAX_ENTRIES
Default value for the node cache max-entries. |
static long |
DEFAULT_NODE_CACHE_TTL
Default value for the node cache time-to-live. |
static String |
DEFAULT_NODE_OPS_HOME
Deprecated No longer used. |
static String |
DEFAULT_OBJECT_CLASS_OPS_HOME
Deprecated No longer used. |
static boolean |
DEFAULT_READ_ONLY
Default value for the read-only flag on the repository configuration. |
static String |
DEFAULT_REPO_BINARY_CACHE_IS_ENABLED
The default value used to determine if the BEA Repository binary cache is enabled. |
static String |
DEFAULT_REPO_BINARY_CACHE_MAX_ENTRIES
The default number of entries in the BEA Repository binary cache. |
static String |
DEFAULT_REPO_BINARY_CACHE_MAX_ENTRY_SIZE
The default maximum size of entries in the BEA Repository binary cache. |
static String |
DEFAULT_REPO_BINARY_CACHE_TTL
The default Time to live for entries in the BEA Repository binary cache. |
static String |
DEFAULT_REPO_NODE_CACHE_IS_ENABLED
The default value used to determine if the BEA Repository Node Cache is enabled. |
static String |
DEFAULT_REPO_NODE_CACHE_MAX_ENTRIES
The default number of nodes to cache in the BEA Repository Node Cache. |
static String |
DEFAULT_REPO_NODE_CACHE_TTL
The default Time to live for nodes in the BEA Repository Node Cache. |
static String |
DEFAULT_REPO_TYPE_CACHE_IS_ENABLED
The default value used to determine if the BEA Repository Type Cache is enabled. |
static String |
DEFAULT_REPO_TYPE_CACHE_MAX_ENTRIES
The default number of types to cache in the BEA Repository Type Cache. |
static String |
DEFAULT_REPO_TYPE_CACHE_TTL
The default Time to live for types in the BEA Repository Type Cache. |
static boolean |
DEFAULT_SEARCH_CACHE_ENABLED
Default value to enable the search cache. |
static boolean |
DEFAULT_SEARCH_INDEXING_IS_ENABLED
Default value to enable full-text search indexing support. |
static boolean |
DEFAULT_SEARCH_IS_ENABLED
Default value to enable meta-data search query support. |
static String |
DEFAULT_SEARCH_OPS_HOME
Deprecated No longer used. |
static String |
FEDERATED_EVENTS_ENABLED_KEY
used to determine if events are fired for this repository at the federated layer or not |
static String |
FILESYSTEM_CLASS_NAME
The repository connection class for the BEA Filesystem Repository. |
static String |
FILESYSTEM_DIRECTORY_KEY
the shared drive location of the file system |
static String |
FILESYSTEM_IS_LINKED
used to see if the current file system is linked or not. |
static String |
FILESYSTEM_NIO
whether or not we want to allow nio for a filesystem read |
static String |
FILESYSTEM_TEMP_DIR_KEY
|
static String |
FILESYSTEM_WEBAPP_KEY
optional - the webapp location of the file system used by showBinaryServlet, getPropertyTag etc |
static String |
FOLDER_BADGES_KEY
Used for third-party repositories to specify list of ObjectClasses that will represent a "badged folder". |
static String |
FULLTEXT_SEARCH_INDEX_LANGUAGE_TYPE_KEY
The repository property key for the full text search index language type |
static String |
FULLTEXT_SEARCH_QUERY_ANY_LANGUAGE_KEY
The repository property key for the full text search query any language setting |
static String |
FULLTEXT_SEARCH_QUERY_LANGUAGE_TYPE_KEY
The repository property key for the full text search query language type |
static String |
MANAGEMENT_ENABLED_KEY
The repository configuration property key to enable management (library services). |
static String |
REPO_BINARY_CACHE_IS_ENABLED_KEY
The repository property key for the BEA Repository binary Cache Enabled flag. |
static String |
REPO_BINARY_CACHE_MAX_ENTRIES_KEY
The repository property key for the BEA Repository binary Cache Max Entries value. |
static String |
REPO_BINARY_CACHE_MAX_ENTRY_SIZE_KEY
The repository property key for the BEA Repository binary cache max entry size value. |
static String |
REPO_BINARY_CACHE_TTL_KEY
The repository property key for the BEA Repository binary Cache TTL value. |
static String |
REPO_NODE_CACHE_IS_ENABLED_KEY
The repository property key for the BEA Repository Node Cache Enabled flag. |
static String |
REPO_NODE_CACHE_MAX_ENTRIES_KEY
The repository property key for the BEA Repository Node Cache Max Entries value. |
static String |
REPO_NODE_CACHE_TTL_KEY
The repository property key for the BEA Repository Node Cache TTL value. |
static String |
REPO_TYPE_CACHE_IS_ENABLED_KEY
The repository property key for the BEA Repository Type Cache Enabled flag. |
static String |
REPO_TYPE_CACHE_MAX_ENTRIES_KEY
The repository property key for the BEA Repository Type Cache Max Entries value. |
static String |
REPO_TYPE_CACHE_TTL_KEY
The repository property key for the BEA Repository Type Cache TTL value. |
static String |
REPOSITORY_EVENTS_ENABLED_KEY
used to determine if events are fired for this repository or not. |
static String |
STREAMING_ENABLED_KEY
The repository configuration property key to enable streaming. |
static String[] |
SYSTEM_PROPERTY_KEYS
An array of the system property keys which can be set for a repository configuration. |
Constructor Summary | |
---|---|
RepositoryConfig(String name)
Constructs an instance with just name using the defined DEFAULTS for other attributes. |
|
RepositoryConfig(String name,
String className,
Properties properties)
Constructs an instance with just name, className and properties using the defined DEFAULTS for other attributes. |
|
RepositoryConfig(String name,
String className,
Properties properties,
String userName,
String password,
boolean readOnly,
int nodeCacheMaxEntries,
long nodeCacheTtl,
boolean nodeCacheIsEnabled,
int binaryCacheMaxEntries,
long binaryCacheMaxEntrySize,
long binaryCacheTtl,
boolean binaryCacheIsEnabled)
Deprecated |
|
RepositoryConfig(String name,
String className,
Properties properties,
String userName,
String password,
boolean readOnly,
int nodeCacheMaxEntries,
long nodeCacheTtl,
boolean nodeCacheIsEnabled,
int binaryCacheMaxEntries,
long binaryCacheMaxEntrySize,
long binaryCacheTtl,
boolean binaryCacheIsEnabled,
boolean searchIsEnabled)
Constructs an instance using all attributes. |
Method Summary | |
---|---|
RepositoryConfig |
clone()
|
boolean |
getBinaryCacheIsEnabled()
Gets the active state for the binary cache of a repository. |
int |
getBinaryCacheMaxEntries()
Gets the max entries for the binary cache of a repository. |
long |
getBinaryCacheMaxEntrySize()
Gets the max size for the binary cache of a repository. |
long |
getBinaryCacheTtl()
Gets the time-to-live for entries in a binary cache of a repository. |
String |
getClassName()
The class that implements com.bea.content.repostiory.Repository. |
String |
getFulltextSearchIndexLanguageType()
Retrieves the full-text search index language type, or null if it is not set. |
boolean |
getFulltextSearchIsEnabled()
Returns true if fulltext searches are allowed for this repository. |
Boolean |
getFulltextSearchQueryAnyLanguage()
Retrieves the full-text-search query any lanuage setting, or null if it is not set. |
String |
getFulltextSearchQueryLanguageType()
Retrieves the full-text search query language type, or null if it is not set. |
String |
getName()
The name of the Repository. |
boolean |
getNodeCacheIsEnabled()
Gets the active state for the node cache of a repository. |
int |
getNodeCacheMaxEntries()
Gets the max entries for the node cache of a repository. |
long |
getNodeCacheTtl()
Gets the time-to-live for entries in a node cache of a repository. |
String |
getPassword()
Gets the password for the repository. |
Properties |
getProperties()
Gets the configuration properties for the repository. |
boolean |
getReadOnly()
Gets the read-only attribute for the repository. |
boolean |
getSearchIndexingIsEnabled()
Returns true if this repository will index items into its full text search index. |
boolean |
getSearchIsEnabled()
Returns true if metadata searches are allowed for this repository. |
static List<String> |
getSystemPropertyKeys()
Return the default unmodifiable list of system property keys |
String |
getUserName()
Gets the username for the repository. |
boolean |
isManaged()
True if this repository is versionable, false otherwise. |
boolean |
isStreamable()
True if this repository is versionable, false otherwise. |
void |
setBinaryCacheIsEnabled(boolean binaryCacheIsEnabled)
|
void |
setBinaryCacheMaxEntries(int binaryCacheMaxEntries)
Sets the binary cache max entries |
void |
setBinaryCacheMaxEntrySize(long binaryCacheMaxEntrySize)
Sets the binary cache max entry size in bytes. |
void |
setBinaryCacheTtl(long binaryCacheTtl)
Sets the binary cache time to live |
void |
setClassName(String className)
Set the className of the repository. |
void |
setFulltextSearchIsEnabled(boolean fulltextSearchIsEnabled)
Sets whether or not this repository is fulltext searchable via the search API. |
void |
setNodeCacheIsEnabled(boolean nodeCacheIsEnabled)
Sets whether or not the node cache is enabled for the repository |
void |
setNodeCacheMaxEntries(int nodeCacheMaxEntries)
Sets the ndoe cache max entires for the repository |
void |
setNodeCacheTtl(long nodeCacheTtl)
Sets the node cache time to live for the repo |
void |
setPassword(String password)
Sets the password |
void |
setProperties(Properties properties)
Sets the properties for the repo config |
void |
setReadOnly(boolean readOnly)
Sets the readOnly attribute of the repository |
void |
setSearchIndexingIsEnabled(boolean searchIndexingIsEnabled)
Sets whether or not this repository is indexing content into its full text search index. |
void |
setSearchIsEnabled(boolean searchIsEnabled)
Sets whether or not this repository is metadata searchable via the search API. |
void |
setUserName(String userName)
Sets the user name |
String |
toString()
Gets attributes as String. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_CLASS_NAME
public static final String FILESYSTEM_CLASS_NAME
@Deprecated public static final String DEFAULT_OBJECT_CLASS_OPS_HOME
@Deprecated public static final String DEFAULT_NODE_OPS_HOME
@Deprecated public static final String DEFAULT_SEARCH_OPS_HOME
public static final boolean DEFAULT_READ_ONLY
public static final int DEFAULT_NODE_CACHE_MAX_ENTRIES
public static final long DEFAULT_NODE_CACHE_TTL
public static final boolean DEFAULT_NODE_CACHE_IS_ENABLED
public static final int DEFAULT_BINARY_CACHE_MAX_ENTRIES
public static final long DEFAULT_BINARY_CACHE_MAX_ENTRY_SIZE
public static final long DEFAULT_BINARY_CACHE_TTL
public static final boolean DEFAULT_BINARY_CACHE_IS_ENABLED
public static final boolean DEFAULT_SEARCH_IS_ENABLED
public static final boolean DEFAULT_FULLTEXT_SEARCH_IS_ENABLED
public static final boolean DEFAULT_SEARCH_INDEXING_IS_ENABLED
public static final String FULLTEXT_SEARCH_INDEX_LANGUAGE_TYPE_KEY
public static final String FULLTEXT_SEARCH_QUERY_LANGUAGE_TYPE_KEY
public static final String FULLTEXT_SEARCH_QUERY_ANY_LANGUAGE_KEY
public static final boolean DEFAULT_SEARCH_CACHE_ENABLED
public static final String REPO_TYPE_CACHE_MAX_ENTRIES_KEY
public static final String DEFAULT_REPO_TYPE_CACHE_MAX_ENTRIES
public static final String REPO_TYPE_CACHE_TTL_KEY
public static final String DEFAULT_REPO_TYPE_CACHE_TTL
public static final String REPO_TYPE_CACHE_IS_ENABLED_KEY
public static final String DEFAULT_REPO_TYPE_CACHE_IS_ENABLED
public static final String REPO_NODE_CACHE_MAX_ENTRIES_KEY
public static final String DEFAULT_REPO_NODE_CACHE_MAX_ENTRIES
public static final String REPO_NODE_CACHE_TTL_KEY
public static final String DEFAULT_REPO_NODE_CACHE_TTL
public static final String REPO_NODE_CACHE_IS_ENABLED_KEY
public static final String DEFAULT_REPO_NODE_CACHE_IS_ENABLED
public static final String REPO_BINARY_CACHE_MAX_ENTRIES_KEY
public static final String DEFAULT_REPO_BINARY_CACHE_MAX_ENTRIES
public static final String REPO_BINARY_CACHE_MAX_ENTRY_SIZE_KEY
public static final String DEFAULT_REPO_BINARY_CACHE_MAX_ENTRY_SIZE
public static final String REPO_BINARY_CACHE_TTL_KEY
public static final String DEFAULT_REPO_BINARY_CACHE_TTL
public static final String REPO_BINARY_CACHE_IS_ENABLED_KEY
public static final String DEFAULT_REPO_BINARY_CACHE_IS_ENABLED
public static final String STREAMING_ENABLED_KEY
public static final String MANAGEMENT_ENABLED_KEY
public static final String FILESYSTEM_DIRECTORY_KEY
public static final String FILESYSTEM_TEMP_DIR_KEY
public static final String FILESYSTEM_WEBAPP_KEY
public static final String FILESYSTEM_IS_LINKED
public static final String FILESYSTEM_NIO
public static final String FEDERATED_EVENTS_ENABLED_KEY
public static final String REPOSITORY_EVENTS_ENABLED_KEY
public static final String FOLDER_BADGES_KEY
public static final String[] SYSTEM_PROPERTY_KEYS
Constructor Detail |
---|
public RepositoryConfig(String name)
public RepositoryConfig(String name, String className, Properties properties)
@Deprecated public RepositoryConfig(String name, String className, Properties properties, String userName, String password, boolean readOnly, int nodeCacheMaxEntries, long nodeCacheTtl, boolean nodeCacheIsEnabled, int binaryCacheMaxEntries, long binaryCacheMaxEntrySize, long binaryCacheTtl, boolean binaryCacheIsEnabled)
public RepositoryConfig(String name, String className, Properties properties, String userName, String password, boolean readOnly, int nodeCacheMaxEntries, long nodeCacheTtl, boolean nodeCacheIsEnabled, int binaryCacheMaxEntries, long binaryCacheMaxEntrySize, long binaryCacheTtl, boolean binaryCacheIsEnabled, boolean searchIsEnabled)
Method Detail |
---|
public static List<String> getSystemPropertyKeys()
public String getName()
public String getClassName()
public Properties getProperties()
public String getUserName()
public String getPassword()
public boolean getReadOnly()
public int getNodeCacheMaxEntries()
public long getNodeCacheTtl()
public boolean getNodeCacheIsEnabled()
public int getBinaryCacheMaxEntries()
public long getBinaryCacheMaxEntrySize()
public long getBinaryCacheTtl()
public boolean getBinaryCacheIsEnabled()
public boolean getSearchIsEnabled()
public boolean getFulltextSearchIsEnabled()
public boolean getSearchIndexingIsEnabled()
public String getFulltextSearchIndexLanguageType()
public String getFulltextSearchQueryLanguageType()
public Boolean getFulltextSearchQueryAnyLanguage()
public boolean isManaged()
public boolean isStreamable()
public void setClassName(String className)
className
- The class namepublic void setProperties(Properties properties)
properties
- public void setUserName(String userName)
userName
- public void setPassword(String password)
password
- public void setReadOnly(boolean readOnly)
readOnly
- public void setNodeCacheMaxEntries(int nodeCacheMaxEntries)
nodeCacheMaxEntries
- public void setNodeCacheIsEnabled(boolean nodeCacheIsEnabled)
nodeCacheIsEnabled
- public void setNodeCacheTtl(long nodeCacheTtl)
nodeCacheTtl
- public void setBinaryCacheMaxEntries(int binaryCacheMaxEntries)
binaryCacheMaxEntries
- public void setBinaryCacheMaxEntrySize(long binaryCacheMaxEntrySize)
binaryCacheMaxEntrySize
- public void setBinaryCacheTtl(long binaryCacheTtl)
binaryCacheTtl
- public void setBinaryCacheIsEnabled(boolean binaryCacheIsEnabled)
public void setSearchIsEnabled(boolean searchIsEnabled)
searchIsEnabled
- public void setFulltextSearchIsEnabled(boolean fulltextSearchIsEnabled)
fulltextSearchIsEnabled
- public void setSearchIndexingIsEnabled(boolean searchIndexingIsEnabled)
searchIndexingIsEnabled
- public String toString()
toString
in class Object
public RepositoryConfig clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |