|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ca.jcs.ImplBundle
public class ImplBundle
Information for each connector implementation bundle, telling the JCS framework everything it needs to know
to create a new active connector instance. This information is usually initialized from the
conf/connector.xml file contained within each connector's jcs_connector-*.jar file, by the
Spring framework XML support, but will
eventually be replaced by information in OSGi bundles (at least for custom connectors).
| Constructor Summary | |
|---|---|
ImplBundle()
|
|
ImplBundle(Collection<ImplBundle> bundles)
Deprecated. Left for compatibility with connector.xml files for r12 sample and custom connectors. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
Boolean |
getAllowMetadataModify()
Deprecated. Should use ConnectorConfig.getAllowMetadataModify() instead, as it can be configured in the
jcs/conf/override/<connector>/connector.xml file. Left for compatibility with connector.xml files
for r12 sample and custom connectors. |
Boolean |
getCompoundValueCapable()
|
String |
getConnectionManagerClass()
Obtain the name of the custom connection manager (pooling) class for this connector |
String |
getConnectorClass()
|
String |
getConnectorTypeClass()
|
String |
getConnectorTypeLdapObjClass()
|
String |
getConnectorTypeName()
Optional field which can be specified for deployments where multiple connector implementations share the same naming attribute for their connector types (as Admin does), in which case this common naming attribute is stored in PartitionLoaderService.dnConnectorTypeKeyAttribute and the
value specified for it in a DN is used to look up a matching ImplBundle, if one exists. |
String |
getConnNamingAttr()
Naming attribute for connectors implemented by this bundle, used to perform sanity check when resolving DNs. |
String |
getCustomMetadataFile()
Deprecated. Since r12.1: Use Connector Xpress templates and manually provide mappings for custom attributes etc instead. |
ConnectorConfig |
getDefaultConnectorConfig()
|
String |
getDynamicSchemaFile()
This optional field can be used to specify the name of an OpenLDAP formatted .schema file containing attribute types/object classes etc to be loaded when the JCS is started up. |
List<MetaDataDefs.AssocType> |
getEnforceCompoundAssocs()
|
String |
getFatalError()
|
Boolean |
getIndirectAssociations()
|
String |
getMessageResourceBundle()
This optional field can be used to specify the base name for a property resource bundle containing connector specific message format strings, for instance a value of "/conf/myconnector" will
result in message formats being read from "/conf/myconnector.properties" by default,
"/conf/myconnector_fr.properties" if the locale is French etc. |
boolean |
getModifyNullStringToEmpty()
If true then null attribute values are converted to empty strings ("") before passing to the connector. |
String |
getName()
This name is used to determine whether this bundle is for the variety of connector which knows how to service an LDAP request, by comparing the value of the connector type's (aka Admin Namespace) attribute configured via the implBundleAttr attribute on the connectorFactory instance created from conf/server_jcs.xml. |
String |
getOpProcessorProxyHandlerClass()
|
Class<? extends AbstractAttributeStyleOpProcessor> |
getRealAttributeStyleProcessorClass()
|
Class<? extends MetaConnector> |
getRealConnectorClass()
|
Class<? extends MetaConnectorType> |
getRealConnectorTypeClass()
|
Class<? extends ConnectorProcessorProxyHandler> |
getRealOpProcessorProxyHandlerClass()
|
String |
getStaticMetadataFile()
|
String |
getStaticMethodScriptStyleMetaDataFile()
|
int |
hashCode()
|
boolean |
init(Logger log)
Attempts to resolve the class names provided to real Class instances. |
boolean |
isDefinedInMetadata()
Returns true if ImplBundle descriptor was supplied dynamically by embedding in the metadata (connectorXML=...) |
Boolean |
isOverride()
|
boolean |
matches(String implBundleName,
String implBundleConnectorTypeName,
String implBundleConnectorTypeObjectClass)
ImplBundle matches if any of the primary attribute values match. |
String |
readStaticMetadata()
Reads the static metadata file used by this implBundle and returns its contents |
String |
readStaticOpbindingsMetadata()
Reads the static metadata op-bindings file used by this implBundle and returns its contents |
void |
setAllowMetadataModify(Boolean allowMetadataModify)
Deprecated. Should use ConnectorConfig#setAllowMetadataModify(boolean) instead, as it can be configured in the
jcs/conf/override/<connector>/connector.xml file. Left for compatibility for r12 sample and custom connectors.
Left for compatibility with connector.xml files for r12 sample and custom connectors. |
void |
setCompoundValueCapable(Boolean capable)
Does the connector support compound values? |
void |
setConnectionManagerClass(String connectorPoolingClass)
|
void |
setConnectorClass(String connectorClass)
Specifies the name of the connector-specific class to be used to represent connector instances by the bundle. |
void |
setConnectorTypeClass(String connectorTypeClass)
Specifies the name of the class to be used to represent connector types in the bundle, usually MetaConnectorType will suffice. |
void |
setConnectorTypeLdapObjClass(String ldapObjClass)
Used to set LDAP object class for connector type (aka Admin Namespace) managed by this bundle, which is used as the fall-back means of matching a ImplBundle to an LDAP ADD request (if no exact
match is found against any bundle's name property). |
void |
setConnectorTypeName(String connectorTypeName)
|
void |
setConnNamingAttr(String connNamingAttr)
|
void |
setCustomMetadataFile(String customMetadataFile)
Deprecated. Since r12.1: Use Connector Xpress templates and manually provide mappings for custom attributes etc instead. |
void |
setDefaultConnectorConfig(ConnectorConfig cfg)
The constructor for the concrete connector instance is passed an instance of class deriving from connectorConfig (created by conf/connector.xml contained in connector's
jcs-connector-*.jar file) so that it can be used to
initialize the connector. |
void |
setDefinedInMetadata(boolean isDynamic)
|
void |
setDynamicSchemaFile(String dynamicSchemaFile)
|
void |
setEnforceCompoundAssocs(List<MetaDataDefs.AssocType> types)
If the connector supports compound values, then this method allows a restriction on which compound association types are allowed (leave set to null if no restriction should be enforced, empty list signifies assocs are not supported for compound values and otherwise list acceptable style of assocs). |
void |
setFatalError(String fatalError)
Can be set if bundle is found to be inoperable, for instance if it's schema contains errors. |
void |
setIndirectAssociations(Boolean indirectAssociations)
If associations are supported, should they be restricted to indirect/direct ones? |
void |
setIsOverride(Boolean isOverride)
|
void |
setMessageResourceBundle(String messageResourceBundle)
|
void |
setModifyNullStringToEmpty(boolean modifyNullStringToEmpty)
|
void |
setName(String name)
|
void |
setOpProcessorProxyHandlerClass(String proxyHandlerClass)
Allows user to specify the name of a proxy class (such as the generic exception mapping to NamingExceptions offered by JDBCExceptionMappingProxy)
which the framework will automatically wrap around all the styles of
op processor (attribute-style, method-style or script-style) supported by
the connector. |
void |
setStaticMetadataFile(String staticMetadataFile)
Deprecated. Should use ConnectorConfig#setStaticMetadataFile() instead, as it can be configured in the
jcs/conf/override/<connector>/connector.xml file. Left for compatibility for r12 sample and custom connectors.
Left for compatibility with connector.xml files for r12 sample and custom connectors. |
void |
setStaticMethodScriptStyleMetaDataFile(String staticMetadataFile)
Deprecated. Should use ConnectorConfig#setStaticMethodScriptStyleMetaDataFile() instead, as it can be configured in the
jcs/conf/override/<connector>/connector.xml file. Left for compatibility for r12 sample and custom connectors.
Left for compatibility with connector.xml files for r12 sample and custom connectors. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
@Deprecated public ImplBundle(Collection<ImplBundle> bundles)
public ImplBundle()
| Method Detail |
|---|
public String getName()
public void setName(String name)
public String getFatalError()
public void setFatalError(String fatalError)
public String getConnectorTypeName()
PartitionLoaderService.dnConnectorTypeKeyAttribute and the
value specified for it in a DN is used to look up a matching ImplBundle, if one exists.
In Admin this property needs to be set on all static namespaces but is not set for dynamic (DYN) namespaces
which are instead resolved using ImplBundles' name property.
public void setConnectorTypeName(String connectorTypeName)
public String getMessageResourceBundle()
"/conf/myconnector" will
result in message formats being read from "/conf/myconnector.properties" by default,
"/conf/myconnector_fr.properties" if the locale is French etc. Note that any base names
used must be unique across all connectors, until such time as support for deploying connectors as OSGi
bundles is added.
public void setMessageResourceBundle(String messageResourceBundle)
public String getDynamicSchemaFile()
public void setDynamicSchemaFile(String dynamicSchemaFile)
public Boolean getIndirectAssociations()
public void setIndirectAssociations(Boolean indirectAssociations)
public Boolean getCompoundValueCapable()
public void setCompoundValueCapable(Boolean capable)
public List<MetaDataDefs.AssocType> getEnforceCompoundAssocs()
public void setEnforceCompoundAssocs(List<MetaDataDefs.AssocType> types)
public ConnectorConfig getDefaultConnectorConfig()
public void setDefaultConnectorConfig(ConnectorConfig cfg)
connectorConfig (created by conf/connector.xml contained in connector's
jcs-connector-*.jar file) so that it can be used to
initialize the connector.
cfg - Configuration to be usedpublic String getConnectorTypeLdapObjClass()
public void setConnectorTypeLdapObjClass(String ldapObjClass)
ImplBundle to an LDAP ADD request (if no exact
match is found against any bundle's name property). For instance the NDS connector specifies
this value as eTNDSNamespace.
public String getConnectorTypeClass()
public void setConnectorTypeClass(String connectorTypeClass)
MetaConnectorType will suffice.
connectorTypeClass - Instances of this class will be created to act as the connector type
(aka Admin Namespace) parents of connector instances.public String getConnectorClass()
public void setConnectorClass(String connectorClass)
connectorClass - Instances of this class will be created to act as connector
(aka Admin Directory) instances, for instance the JDBC connector uses the value
JDBCMetaConnector.public String getOpProcessorProxyHandlerClass()
public void setOpProcessorProxyHandlerClass(String proxyHandlerClass)
JDBCExceptionMappingProxy)
which the framework will automatically wrap around all the styles of
op processor (attribute-style, method-style or script-style) supported by
the connector.
proxyHandlerClass - Class extending ConnectorProcessorProxyHandler
which implements its wrapping logic in its invoke()
method.public Class<? extends MetaConnectorType> getRealConnectorTypeClass()
public Class<? extends MetaConnector> getRealConnectorClass()
public Class<? extends AbstractAttributeStyleOpProcessor> getRealAttributeStyleProcessorClass()
public Class<? extends ConnectorProcessorProxyHandler> getRealOpProcessorProxyHandlerClass()
public String getConnNamingAttr()
eTNDSTreeName.public void setConnNamingAttr(String connNamingAttr)
@Deprecated public Boolean getAllowMetadataModify()
ConnectorConfig.getAllowMetadataModify() instead, as it can be configured in the
jcs/conf/override/<connector>/connector.xml file. Left for compatibility with connector.xml files
for r12 sample and custom connectors.
@Deprecated public void setAllowMetadataModify(Boolean allowMetadataModify)
ConnectorConfig#setAllowMetadataModify(boolean) instead, as it can be configured in the
jcs/conf/override/<connector>/connector.xml file. Left for compatibility for r12 sample and custom connectors.
Left for compatibility with connector.xml files for r12 sample and custom connectors.
setStaticMetadataFile(java.lang.String) and
setStaticMethodScriptStyleMetaDataFile(java.lang.String) can be overridden by LDAP modifies operations
on the ConnectorType.
public String getStaticMetadataFile()
@Deprecated public void setStaticMetadataFile(String staticMetadataFile)
ConnectorConfig#setStaticMetadataFile() instead, as it can be configured in the
jcs/conf/override/<connector>/connector.xml file. Left for compatibility for r12 sample and custom connectors.
Left for compatibility with connector.xml files for r12 sample and custom connectors.
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),
#isAllowMetadataModify@Deprecated public String getCustomMetadataFile()
@Deprecated public void setCustomMetadataFile(String customMetadataFile)
<jcs-home>/conf/override/<connector>/ and then reference it
here, which will then be merged over the top of the static metadata file when the
ConnectorType is activated on first reference. A common use-case is to provide
customer-defined mappings for custom attributes.
customMetadataFile - Sparse metadata file also adhering to the
datamodel.xsd schema which is merged over the top of the
static metadata file. It must match the exact namespace and class names
in the file it overrides. If a file is named here but doesn't exist a warning
will be logged but it is not a serious error.public String getStaticMethodScriptStyleMetaDataFile()
@Deprecated public void setStaticMethodScriptStyleMetaDataFile(String staticMetadataFile)
ConnectorConfig#setStaticMethodScriptStyleMetaDataFile() instead, as it can be configured in the
jcs/conf/override/<connector>/connector.xml file. Left for compatibility for r12 sample and custom connectors.
Left for compatibility with connector.xml files for r12 sample and custom connectors.
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),
#isAllowMetadataModifypublic boolean getModifyNullStringToEmpty()
public void setModifyNullStringToEmpty(boolean modifyNullStringToEmpty)
public String getConnectionManagerClass()
public void setConnectionManagerClass(String connectorPoolingClass)
public void setDefinedInMetadata(boolean isDynamic)
public boolean isDefinedInMetadata()
public boolean init(Logger log)
log - Logger to which error messages should be output.
public String readStaticMetadata()
public String readStaticOpbindingsMetadata()
public String toString()
toString in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object
public boolean matches(String implBundleName,
String implBundleConnectorTypeName,
String implBundleConnectorTypeObjectClass)
implBundleName - Either desired implBundle's name, or null to mean "match other fields".implBundleConnectorTypeName - Either desired connector type name, or null to mean "match other fields".implBundleConnectorTypeObjectClass - Either desired connector type object class name, or null to mean "match other fields".
public Boolean isOverride()
public void setIsOverride(Boolean isOverride)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||