|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ca.jcs.cfg.ConnectorConfig
public class ConnectorConfig
Common configuration settings shared by all connector implementations.
| Field Summary | |
|---|---|
static Logger |
CONFIG_LOG
Centralized point of control for logging of configuration information, for instance to verify that override connector.xml is being used etc. |
| Constructor Summary | |
|---|---|
ConnectorConfig()
|
|
| Method Summary | |
|---|---|
List<String> |
getAcceptedUnknownAttrIds()
|
Boolean |
getAllowMetadataModify()
|
String |
getAttrHeaderMsgFormatId()
|
Class<? extends CacheManager> |
getCacheManagerClass()
|
String |
getCacheManagerConfigReference()
|
MetaPluginConfigSuite |
getConverters()
|
Map<String,ExceptionRetryGroup> |
getExceptionRetryMap()
Most connectors need to handle some exceptions specially, and this map allows list of messages strings / class names to be defined via configuration to allow maximum flexibility, including adding to entries in this map when new native endpoint vendors are added or higher level support libraries such as drivers are changed etc. |
String |
getObjHeaderMsgFormatId()
|
long |
getResilientDelay()
Deprecated. Now configure in a more fine-grained manner using ExceptionRetryGroup. |
long |
getResilientMaxRetries()
Deprecated. Now configure in a more fine-grained manner using ExceptionRetryGroup. |
boolean |
getRollbackConnectionAttrs()
|
String |
getStaticMetadataFile()
|
String |
getStaticMethodScriptStyleMetaDataFile()
|
int |
getStreamingQueryThreshold()
|
AttributeConverter |
getTypeConverter(String typeString)
|
MetaPluginConfigSuite |
getValidators()
|
boolean |
isCachingRequired()
Use is primarily to force caching to be deactivated, even when it is applicable. |
boolean |
isCaseSensitive()
|
Boolean |
isCheckObjectExistenceForDeletion()
|
boolean |
isFailOnUnknownAttrIds()
|
boolean |
isImmediateQueryFlush()
|
boolean |
isLazyConnect()
|
boolean |
isMapAcceptedUnknownAttrIds()
|
boolean |
isSearchExpensiveAttrs()
Only return cheap attributes unless explicitly mention expensive ones in one-level/subtree searches. |
boolean |
isTransactional()
For connectors supporting a notion of transactions, this field allows them to be expliclty turned off so the steps involved in processing an LDAP operation are not grouped into a single top level transaction as would normally happen. |
boolean |
isValidateFromConnector()
Validate ldap attributes outbound from the connector before passing them back, as opposed inbound traffic passed in to the connector. |
boolean |
isValidateToConnector()
Validate ldap attributes inbound to the connector as per registered validator configuration. |
void |
mergeMap(Map<String,List<String>> dest,
Map<String,List<String>> src)
Merge provided maps, concatenating value lists where the same key exists in both. |
void |
setAcceptedUnknownAttrIds(List<String> acceptedUnknownAttrIds)
When isFailOnUnknownAttrIds() is true then this list can be used to define
attribute ids which aren't mapped, but shouldn't cause an add() or modify() operation
to fail when they are mentioned. |
void |
setAllowMetadataModify(Boolean allowMetadataModify)
When set to true, values provided to setStaticMetadataFile(java.lang.String) and
setStaticMethodScriptStyleMetaDataFile(java.lang.String) can be overridden by LDAP modifies operations
on the ConnectorType. |
void |
setAttrHeaderMsgFormatId(String attrHeaderFmt)
|
void |
setCacheManagerClass(Class<? extends CacheManager> cacheManagerClass)
Can be set to a class which extends CacheManager, but will be ignored unless
connector's BaseConnector.isCachingRequired() returns true (signifying that caching makes sense
for it's domain). |
void |
setCacheManagerConfigReference(String cacheManagerConfigReference)
Optional configuration string which can be passed to concrete implementation of CacheManager, to be interpretted by it (expectation is that it will
usually be some kind of URL or reference to a resource or file containing configuration settings). |
void |
setCachingRequired(boolean cachingRequired)
|
void |
setCaseSensitive(boolean caseSensitive)
|
void |
setCheckObjectExistenceForDeletion(Boolean checkObjectExistenceForDeletion)
|
void |
setConverters(MetaPluginConfigSuite converters)
|
void |
setExceptionRetryMap(Map<String,ExceptionRetryGroup> exceptionRetryMap)
Store provided map of entries taken from settings in connector.xml. |
void |
setFailOnUnknownAttrIds(boolean failOnUnknownAttrIds)
If set to true then unknown attributes (excluding any defined in getAcceptedUnknownAttrIds())
appearing in add() and modify() calls will cause these operations to fail with an exception, if
set to false then only a warning is logged but the operation continues. |
void |
setImmediateQueryFlush(boolean immediateQueryFlush)
Read and process all results in an internal list cache, and then have NamingEnumeration just return the results from the buffer, may be useful when debugging to help synchronize processing to the call stack. |
void |
setLazyConnect(boolean lazyConnect)
When true a connector implementation should not attempt to get a connection from the pool immediately. |
void |
setMapAcceptedUnknownAttrIds(boolean mapAcceptedUnknownAttrIds)
|
void |
setObjHeaderMsgFormatId(String objHeaderMsgFormatId)
|
void |
setResilientDelay(long resilientDelay)
Deprecated. Now configure in a more fine-grained manner using ExceptionRetryGroup. |
void |
setResilientMaxRetries(long resilientMaxRetries)
Deprecated. Now configure in a more fine-grained manner using ExceptionRetryGroup. |
void |
setRollbackConnectionAttrs(boolean rollbackConnectionAttrs)
|
void |
setSearchExpensiveAttrs(boolean searchExpensiveAttrs)
|
void |
setStaticMetadataFile(String staticMetadataFile)
Non-dynamic options may have their datamodel.xsd metadata stored
in a local file rather then managed as an attribute. |
void |
setStaticMethodScriptStyleMetaDataFile(String staticMethodScriptStyleMetaDataFile)
Non-dynamic options may have their opbindings.xsd metadata stored
in a local file rather then managed as an attribute. |
void |
setStreamingQueryThreshold(int streamingQueryThreshold)
Threshold on count of number of instances of an objectclass, at which list() and search() on the objectclass should be dealt with using streaming of results on-by-one rather then a single immediate query. |
void |
setTransactional(boolean transactional)
|
void |
setValidateFromConnector(boolean validateFromConnector)
|
void |
setValidateToConnector(boolean validateToConnector)
Set validation of ldap attributes inbound to the connector as per registered validator configuration - turn off only with extreme caution (defaults to true)! |
void |
setValidators(MetaPluginConfigSuite validators)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Logger CONFIG_LOG
| Constructor Detail |
|---|
public ConnectorConfig()
| Method Detail |
|---|
public MetaPluginConfigSuite getValidators()
public void setValidators(MetaPluginConfigSuite validators)
public MetaPluginConfigSuite getConverters()
public void setConverters(MetaPluginConfigSuite converters)
public AttributeConverter getTypeConverter(String typeString)
public boolean isSearchExpensiveAttrs()
public void setSearchExpensiveAttrs(boolean searchExpensiveAttrs)
public boolean isValidateToConnector()
public void setValidateToConnector(boolean validateToConnector)
public boolean isValidateFromConnector()
public void setValidateFromConnector(boolean validateFromConnector)
public boolean isCaseSensitive()
public void setCaseSensitive(boolean caseSensitive)
public Boolean getAllowMetadataModify()
public void setAllowMetadataModify(Boolean allowMetadataModify)
setStaticMetadataFile(java.lang.String) and
setStaticMethodScriptStyleMetaDataFile(java.lang.String) can be overridden by LDAP modifies operations
on the ConnectorType.
public String getObjHeaderMsgFormatId()
public void setObjHeaderMsgFormatId(String objHeaderMsgFormatId)
public String getAttrHeaderMsgFormatId()
public void setAttrHeaderMsgFormatId(String attrHeaderFmt)
public boolean isLazyConnect()
public void setLazyConnect(boolean lazyConnect)
public boolean isFailOnUnknownAttrIds()
public void setFailOnUnknownAttrIds(boolean failOnUnknownAttrIds)
getAcceptedUnknownAttrIds())
appearing in add() and modify() calls will cause these operations to fail with an exception, if
set to false then only a warning is logged but the operation continues.
failOnUnknownAttrIds - True for strict handling.public List<String> getAcceptedUnknownAttrIds()
public void setAcceptedUnknownAttrIds(List<String> acceptedUnknownAttrIds)
isFailOnUnknownAttrIds() is true then this list can be used to define
attribute ids which aren't mapped, but shouldn't cause an add() or modify() operation
to fail when they are mentioned.
acceptedUnknownAttrIds - List of legal, but never-the-less unmapped, LDAP attribute ids.public int getStreamingQueryThreshold()
public boolean isImmediateQueryFlush()
public void setImmediateQueryFlush(boolean immediateQueryFlush)
immediateQueryFlush - If true, then results will be readn and processed immediately and place in cache.public void setStreamingQueryThreshold(int streamingQueryThreshold)
streamingQueryThreshold - When there are more instances of an objectclass then this
threshold, then query results should be streamed. If it is set to 0 then streaming
will be exclusively for all objectclasses, if set to -1 then streaming will never be used.
Connectors can decide to ignore this threshold for one or more objectclasses but if so,
they must clearly document this fact.public long getResilientDelay()
ExceptionRetryGroup.
public void setResilientDelay(long resilientDelay)
ExceptionRetryGroup.
public long getResilientMaxRetries()
ExceptionRetryGroup.
public void setResilientMaxRetries(long resilientMaxRetries)
ExceptionRetryGroup.
public boolean isTransactional()
public void setTransactional(boolean transactional)
public boolean isCachingRequired()
public void setCachingRequired(boolean cachingRequired)
public Class<? extends CacheManager> getCacheManagerClass()
public void setCacheManagerClass(Class<? extends CacheManager> cacheManagerClass)
CacheManager, but will be ignored unless
connector's BaseConnector.isCachingRequired() returns true (signifying that caching makes sense
for it's domain). Currently expected that caching will only make sense for connectors making use of
connectorMapToAmbiguous= metadata settings, particularly when one or more naming attributes
are ambiguous and the native system is heirarchical. Can be set to null (or simply omitted) to explicitly
turn off caching for a connector for which caching makes sense, for instance when trying to compare performance
tests with and without. The recommended default class is EHCacheManager (just use
the string <cacheManagerClass>com.ca.jcs.cache.EHCacheManager</cacheManagerClass>
in conf/connector.xml).
- Parameters:
cacheManagerClass -
public String getCacheManagerConfigReference()
public void setCacheManagerConfigReference(String cacheManagerConfigReference)
CacheManager, to be interpretted by it (expectation is that it will
usually be some kind of URL or reference to a resource or file containing configuration settings).
public void mergeMap(Map<String,List<String>> dest,
Map<String,List<String>> src)
public Map<String,ExceptionRetryGroup> getExceptionRetryMap()
public void setExceptionRetryMap(Map<String,ExceptionRetryGroup> exceptionRetryMap)
exceptionRetryMap - Map containing exception maps.public boolean getRollbackConnectionAttrs()
public void setRollbackConnectionAttrs(boolean rollbackConnectionAttrs)
public Boolean isCheckObjectExistenceForDeletion()
public void setCheckObjectExistenceForDeletion(Boolean checkObjectExistenceForDeletion)
public boolean isMapAcceptedUnknownAttrIds()
public void setMapAcceptedUnknownAttrIds(boolean mapAcceptedUnknownAttrIds)
public String getStaticMetadataFile()
public void setStaticMetadataFile(String staticMetadataFile)
datamodel.xsd metadata stored
in a local file rather then managed as an attribute.
staticMetadataFile - Name of file on local filesystem (to the machine on which the JCS
is installed) containing static metadata for implemented connector type. If null then
connector is dynamic and metadata must instead be provided in an attribute when new ConnectorType
is created via LDAP add.setAllowMetadataModify(java.lang.Boolean),
#isAllowMetadataModifypublic String getStaticMethodScriptStyleMetaDataFile()
public void setStaticMethodScriptStyleMetaDataFile(String staticMethodScriptStyleMetaDataFile)
opbindings.xsd metadata stored
in a local file rather then managed as an attribute.
staticMetadataFile - Name of file on local filesystem (to the machine on which the JCS
is installed) containing static metadata for implemented connector type. If null then
connector is dynamic and metadata must instead be provided in an attribute when new ConnectorType
is created via LDAP add.setAllowMetadataModify(java.lang.Boolean),
#isAllowMetadataModify
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||