|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ca.jcs.processor.AbstractBaseProcessor
com.ca.jcs.processor.AbstractScriptStyleOpProcessor
com.ca.jcs.jdbc.JDBCScriptStyleOpProcessor
public class JDBCScriptStyleOpProcessor
Executes SQL scripts generated by scripts via
MetaOpBindingsProxyHandler using configured
opbindings.
| Field Summary | |
|---|---|
protected JDBCMetaConnector |
connector
|
| Fields inherited from class com.ca.jcs.processor.AbstractBaseProcessor |
|---|
ldapExceptionPrefix, log |
| Constructor Summary | |
|---|---|
JDBCScriptStyleOpProcessor(BaseConnector connector)
Transaction management works without needing to explicitly refer to connector's transactionManager because managed implicitly using
datasource and JDBCStoredProcedure. |
|
| Method Summary | |
|---|---|
void |
activate()
This method is called when the target object has been fully initialised, and is ready to receive requests. |
void |
deactivate()
This method is called when the target object is no longer needed and should tidy-up any connections / resources it holds. |
void |
doAdd(ObjectInfo objInfo,
Attributes attrs,
String scriptText)
Create a new object on the managed system with the provided attributes stored for it. |
void |
doDelete(ObjectInfo objInfo,
String scriptText)
Delete the object referenced by objInfo from a managed system. |
Attributes |
doLookup(ObjectInfo objInfo,
String[] attrIds,
String scriptText)
Look up the provided attribute names on the managed object referenced by objInfo,
attribute ids not mapped to connector-speak will either be discarded or cause an error depending
on the level of strictness configured for the parent connector. |
void |
doModify(ObjectInfo objInfo,
ModificationItem[] items,
String scriptText)
Apply the provided items to the object on the managed system referenced by
objInfo. |
void |
doModifyRn(ObjectInfo objInfo,
String newRdn,
String scriptText)
Rename the managed object referenced by objInfo so that it has the new
Relative Distinguished Name (RDN) provided (an example newRdn might be
nameAttrId=MyNewName). |
void |
doMove(ObjectInfo objInfo,
Name newParentName,
String scriptText)
Move managed object to a new parent. |
void |
doMove(ObjectInfo objInfo,
Name newParentName,
String newRdn,
String scriptText)
Move the managed object referenced by objInfo to a new parent whilst
also changing its RDN (of form "attr=value"). |
NamingEnumeration<SearchResult> |
doSearch(ObjectInfo baseObjInfo,
FilterInfo filterInfo,
Map<String,String> environment,
SearchControls searchControls,
String scriptText)
Perform search under specified baseName on managed system, using the standard
JNDI interfaces and semantics. |
Opbindings |
getMetaData()
|
Opbindings |
getOpBindings()
|
void |
setMetaData(Opbindings opbindings)
Called when metadata used to configure this connector is changed. |
void |
setOpBindings(Opbindings opBindings)
|
| Methods inherited from class com.ca.jcs.processor.AbstractBaseProcessor |
|---|
getBaseConnector, makeNamingException |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final JDBCMetaConnector connector
| Constructor Detail |
|---|
public JDBCScriptStyleOpProcessor(BaseConnector connector)
transactionManager because managed implicitly using
datasource and JDBCStoredProcedure.
| Method Detail |
|---|
public void activate()
throws NamingException
Activatable
NamingException
public void deactivate()
throws NamingException
Activatable
NamingExceptionpublic Opbindings getOpBindings()
public void setOpBindings(Opbindings opBindings)
throws NamingException
NamingExceptionpublic Opbindings getMetaData()
public void setMetaData(Opbindings opbindings)
throws NamingException
ScriptStyleOpProcessor
opbindings - New opBindings to be internalised, where only
script payloads are included.
NamingException
public void doDelete(ObjectInfo objInfo,
String scriptText)
throws NamingException
ScriptStyleOpProcessorobjInfo from a managed system.
objInfo - References managed object to be deleted.scriptText - Connector's native script to be executed to
delete object.
NamingExceptionOpProcessor.doDelete(com.ca.jcs.ObjectInfo)
public void doAdd(ObjectInfo objInfo,
Attributes attrs,
String scriptText)
throws NamingException
ScriptStyleOpProcessor
objInfo - Contains information for the managed object which is to be created,
where its connector-speak distinguished Name (DN) is dictated by
objInfo.getConnectorDn() and its objectClass= is
dictated by objInfo.getobjectClassMapping().attrs - Attributes to be stored on the managed object.scriptText - Connector's native script to be executed to
add object.
NamingExceptionOpProcessor.doAdd(ObjectInfo, Attributes)
public void doModify(ObjectInfo objInfo,
ModificationItem[] items,
String scriptText)
throws NamingException
ScriptStyleOpProcessoritems to the object on the managed system referenced by
objInfo.
objInfo - References managed object which is to be modified.items - Modifications to be applied to the referenced object.scriptText - Connector's native script to be executed to
modify object.
NamingExceptionOpProcessor.doModify(ObjectInfo, ModificationItem[])
public void doModifyRn(ObjectInfo objInfo,
String newRdn,
String scriptText)
throws NamingException
ScriptStyleOpProcessorobjInfo so that it has the new
Relative Distinguished Name (RDN) provided (an example newRdn might be
nameAttrId=MyNewName).
objInfo - References managed object.newRdn - New terminal name (having form "attr=val") for managed object.scriptText - Connector's native script to be executed to perform rename.
NamingExceptionOpProcessor.doModifyRn(com.ca.jcs.ObjectInfo,javax.naming.ldap.Rdn)
public void doMove(ObjectInfo objInfo,
Name newParentName,
String newRdn,
String scriptText)
throws NamingException
ScriptStyleOpProcessorobjInfo to a new parent whilst
also changing its RDN (of form "attr=value").
objInfo - References managed object to be moved.newParentName - New parent for managed object.newRdn - New relative distinguished name (RDN) for managed object, will be
different from the object's current RDN or ScriptStyleOpProcessor.doMove(ObjectInfo, Name, String) will
have been called instead.scriptText - Connector's native script to be executed to perform move + rename.
NamingExceptionOpProcessor.doMove(com.ca.jcs.ObjectInfo,javax.naming.Name,javax.naming.ldap.Rdn)
public void doMove(ObjectInfo objInfo,
Name newParentName,
String scriptText)
throws NamingException
ScriptStyleOpProcessor
objInfo - References managed object to be moved.newParentName - New parent for managed object.scriptText - Connector's native script to be executed to perform move.
NamingExceptioncom.ca.jcs.processor.OpProcessor#doMove(ObjectInfo, Name)
public NamingEnumeration<SearchResult> doSearch(ObjectInfo baseObjInfo,
FilterInfo filterInfo,
Map<String,String> environment,
SearchControls searchControls,
String scriptText)
throws NamingException
ScriptStyleOpProcessorbaseName on managed system, using the standard
JNDI interfaces and semantics. All values (DN/filter/return attribute ids) have been mapped into
connector-speak by the time this method is called.
filterInfo - Information regarding the filter to be used for the search,
including referenced objectClass= values. Note that attribute names have been converted
to connector-speak and any required validators/converters have been run by the framework
prior to this method being invoked. The filter's text can be retrieved via
ExprNode.printToBuffer(StringBuffer) on
contained mappedFilter. If required this mappedFilter can
be converted to a different syntax, refer to SimpleFilterVisitor /
FilterVisitor and related classes.environment - Defines any values effecting how the search is performed (eg whether to follow
referrals etc). Can usually be ignored.searchControls - Defines important information about the search itself, for instance what
scope the search should have under baseName and which attributes should be returned
for each object matching the provided filter. Note that specifying a null String[] for the returned
attributes will cause all non-expensive attributes to be returned for each matching objects, whereas
specifying String[0] will cause no attributes to be returned except for the DNs of matching objects.scriptText - Connector's native script to be executed to perform search.
SearchResult objects, one per object falling within the specified scope
under baseName which matches the provided filter. Results can be handled in two different
manners depending on the connector's requirement (indeed, an advanced connector can implement both and
choose the best one based on heuristics and a threshold):doSearch() call has returned.NamingExceptionOpProcessor.doSearch(com.ca.jcs.ObjectInfo,com.ca.jcs.filter.FilterInfo,Map,javax.naming.directory.SearchControls)
public Attributes doLookup(ObjectInfo objInfo,
String[] attrIds,
String scriptText)
throws NamingException
ScriptStyleOpProcessorobjInfo,
attribute ids not mapped to connector-speak will either be discarded or cause an error depending
on the level of strictness configured for the parent connector. Extra attributes may also be
returned.
objInfo - Managed object for which attributes are to be looked up.attrIds - Connector-speak identifiers of attributes which are to be returned, null
means return all attributes and a zero length array means return no attributes (just
a way to check an object's existance).scriptText - Connector's native script to be executed to perform lookup.
attrIds.
NamingExceptionOpProcessor.doLookUp(ObjectInfo, String[])
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||