public class ExternalProgramWrapper extends TransparentWrapper implements PersistentProcedure, MultiDeletable, DeferredDeletable
| Modifier and Type | Field and Description |
|---|---|
protected ProcedureManager.ProcedureHelper |
pm
Helper to use the ProcedureManager without any context local lookups.
|
referent| Constructor and Description |
|---|
ExternalProgramWrapper(java.lang.Object referent)
Constructs a new wrapper for the given external procedure instance.
|
ExternalProgramWrapper(ProcedureManager.ProcedureHelper pm,
java.lang.Object referent)
Constructs a new wrapper for the given external procedure instance.
|
| Modifier and Type | Method and Description |
|---|---|
logical |
addSuperProcedure(handle h)
Add the given handle as a super-procedure for the current handle.
|
logical |
addSuperProcedure(handle h,
int mode)
Add the given handle as a super-procedure for the current handle, using
the search-mode set as a string (one of the
SEARCH-TARGET
or SEARCH-SELF string literals). |
logical |
addSuperProcedure(handle h,
integer mode)
Add the given handle as a super-procedure for the current handle, using
the search-mode set as a string (one of the
SEARCH-TARGET
or SEARCH-SELF string literals). |
logical |
addSuperProcedure(handle h,
ProcedureManager.SearchMode mode)
Add the given handle as a super-procedure for the current handle, using
the explicit
mode. |
logical |
applyCallback(java.lang.String eventName)
Applies a callback procedure, which allows execution of a defined event without duplicating
the event procedure definition.
|
handle |
currentWindow()
Get CURRENT-WINDOW attribute for given procedure handle.
|
void |
deferredDelete()
Implements the DeferredDeletable interface.
|
void |
delete()
Perform actual delete of this procedure, by calling
ProcedureManager.delete(Object, boolean). |
character |
getADMData()
Get the value of the ADM-DATA attribute.
|
integer |
getAsyncRequestCount()
Returns the number of asynchronous requests.
|
handle |
getCallbackProcContext(java.lang.String eventName)
Retrieves the handle of the procedure that contains the internal procedure associated
with the ABL callback for the specified event
|
character |
getCallbackProcName(java.lang.String eventName)
Retrieves the name of the internal procedure associated with the ABL callback for the
specified event.
|
character |
getFileName()
Get the
FILE-NAME attribute of this
external procedure instance. |
handle |
getNextSibling()
Get the
NEXT-SIBLING attribute of this
external procedure instance. |
handle |
getPrevSibling()
Get the
PREV-SIBLING attribute of this
external procedure instance. |
character |
getPrivateData()
Get the
PRIVATE-DATA attribute of this
external procedure instance. |
character |
getPublishedEvents()
Get the named events published by this procedure.
|
handle |
getServerHandle()
Returns a handle to the app server in which the procedure is ran.
|
character |
getSignature(character internalEntry)
Execute the
GET-SIGNATURE method of this
external procedure instance. |
character |
getSignature(java.lang.String internalEntry)
Execute the
GET-SIGNATURE method of this
external procedure instance. |
handle |
getTransaction()
Returns a handle to the current opened transaction.
|
integer |
getUniqueID()
Gets the the unique ID number associated to this object by the underlying system.
|
boolean |
handleMultipleDeletes()
Implement the MuliDeletable interface; this resource is normally cleared at first delete.
|
void |
initFileInfo(character name)
Displays "FILE-INFO is not a setable attribute for PROCEDURE widget" error message.
|
void |
initFileInfo(java.lang.String name)
Displays "FILE-INFO is not a setable attribute for PROCEDURE widget" error message.
|
handle |
instantiatingProcedure()
Getter for the INSTANTIATING-PROCEDURE attribute.
|
character |
internalEntries()
Get the
INTERNAL-ENTRIES attribute of this
external procedure instance. |
logical |
isPersistent()
Get the
persistent attribute of this
external procedure instance. |
logical |
isProxy()
Indicates if the procedure is a proxy procedure.
|
logical |
isRemote()
Indicates if the procedure is ran as the remote top-level AppServer.
|
logical |
isSingleRun()
Get the
single-run attribute of this
external procedure instance. |
logical |
isSingleton()
Get the
single-run attribute of this
external procedure instance. |
character |
name()
Get the
NAME attribute of this
external procedure instance. |
void |
name(character name)
Calls
handle.readOnlyError(com.goldencode.p2j.util.handle, java.lang.String), as this attribute is read-only for procedure handles. |
void |
name(java.lang.String name)
Calls
handle.readOnlyError(com.goldencode.p2j.util.handle, java.lang.String), as this attribute is read-only for procedure handles. |
void |
readOnlyError(java.lang.String attribute)
Deprecated.
|
void |
readOnlyError(java.lang.String attribute,
java.lang.Object expr)
Shows a specific error, as this read-only
attribute was used on the right-side of an assignment. |
logical |
removeSuperProcedure(handle h)
Remove the given handle from this handle's list of super-procedures.
|
character |
resourceType()
Get the
TYPE attribute of this
external procedure instance. |
void |
setADMData(character value)
Set the value of the ADM-DATA attribute.
|
void |
setADMData(java.lang.String value)
Set the value of the ADM-DATA attribute.
|
logical |
setCallback(java.lang.String event,
java.lang.String proc,
object<?> context)
Associate the internal procedure with the given web-services event.
|
logical |
setCallbackProcedure(character event,
character proc)
Associate the internal procedure with the given web-services event.
|
logical |
setCallbackProcedure(character event,
character proc,
handle context)
Associate the internal procedure with the given web-services event.
|
logical |
setCallbackProcedure(character event,
java.lang.String proc)
Associate the internal procedure with the given web-services event.
|
logical |
setCallbackProcedure(character event,
java.lang.String proc,
handle context)
Associate the internal procedure with the given web-services event.
|
logical |
setCallbackProcedure(java.lang.String event,
character proc)
Associate the internal procedure with the given web-services event.
|
logical |
setCallbackProcedure(java.lang.String event,
character proc,
handle context)
Associate the internal procedure with the given web-services event.
|
logical |
setCallbackProcedure(java.lang.String event,
java.lang.String proc)
Associate the internal procedure with the given web-services event.
|
logical |
setCallbackProcedure(java.lang.String event,
java.lang.String proc,
handle context)
Associate the internal procedure with the given web-services event.
|
void |
setCurrentWindow(handle h)
Set CURRENT-WINDOW attribute for this procedure handle.
|
void |
setCurrentWindow(WindowWidget win)
Set CURRENT-WINDOW attribute for this procedure handle.
|
void |
setPrivateData(character data)
Set the
PRIVATE-DATA attribute of this
external procedure instance. |
void |
setPrivateData(java.lang.String data)
Set the
PRIVATE-DATA attribute of this
external procedure instance. |
character |
superProcedures()
Get the
SUPER-PROCEDURES attribute of this
external procedure instance. |
boolean |
valid()
Determine if this instance is valid.
|
equals, get, hashCode, id, id, set, unknownclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitapplyCallback, getCallbackProcContext, getCallbackProcName, setCallback, setCallback, setCallback, setCallback, setCallback, setCallbackid, id, unknownsetPersistent, setPersistentsetServerHandleallowDeleteprotected final ProcedureManager.ProcedureHelper pm
public ExternalProgramWrapper(java.lang.Object referent)
referent - The external procedure instance.public ExternalProgramWrapper(ProcedureManager.ProcedureHelper pm, java.lang.Object referent)
referent - The external procedure instance.public boolean valid()
TransparentWrapper.referent field must be set and valid. More,
this must be a known procedure instance, registered with
ProcedureManager.valid in interface WrappedResourcevalid in class TransparentWrappertrue if this instance is valid,
false otherways.@Deprecated public void readOnlyError(java.lang.String attribute)
readOnlyError in interface CommonHandleattribute - The attribute's name.public void readOnlyError(java.lang.String attribute,
java.lang.Object expr)
attribute was used on the right-side of an assignment.
If the expr is evaluated to ? (unknown value) and this attribute does not support it,
a specific error is raised.readOnlyError in interface CommonHandleattribute - The read-only attribute.expr - The expression whose value was attempted to be assigned to READ-ONLY attribute.public character internalEntries()
INTERNAL-ENTRIES attribute of this
external procedure instance.internalEntries in interface PersistentProcedurepublic character name()
NAME attribute of this
external procedure instance.public void name(java.lang.String name)
handle.readOnlyError(com.goldencode.p2j.util.handle, java.lang.String), as this attribute is read-only for procedure handles.public void name(character name)
handle.readOnlyError(com.goldencode.p2j.util.handle, java.lang.String), as this attribute is read-only for procedure handles.public character getFileName()
FILE-NAME attribute of this
external procedure instance.getFileName in interface CommonFilepublic logical isPersistent()
persistent attribute of this
external procedure instance.isPersistent in interface PersistableProcedurepublic logical isSingleRun()
single-run attribute of this
external procedure instance.isSingleRun in interface PersistentProcedurepublic logical isSingleton()
single-run attribute of this
external procedure instance.isSingleton in interface PersistentProcedurepublic character resourceType()
TYPE attribute of this
external procedure instance.resourceType in interface CommonHandle"PROCEDURE".public handle getNextSibling()
NEXT-SIBLING attribute of this
external procedure instance.getNextSibling in interface CommonHandleChainpublic handle getPrevSibling()
PREV-SIBLING attribute of this
external procedure instance.getPrevSibling in interface CommonHandleChainpublic character getPrivateData()
PRIVATE-DATA attribute of this
external procedure instance.getPrivateData in interface CommonHandleChainpublic void setPrivateData(character data)
PRIVATE-DATA attribute of this
external procedure instance.setPrivateData in interface CommonHandleChaindata - The new private-data value.public void setPrivateData(java.lang.String data)
PRIVATE-DATA attribute of this
external procedure instance.setPrivateData in interface CommonHandleChaindata - The new private-data value.public character getSignature(java.lang.String internalEntry)
GET-SIGNATURE method of this
external procedure instance.getSignature in interface PersistentProcedureinternalEntry - The legacy name of the internal-entry for which the signature
is needed.public character getSignature(character internalEntry)
GET-SIGNATURE method of this
external procedure instance.getSignature in interface PersistentProcedureinternalEntry - The legacy name of the internal-entry for which the signature
is needed.public character superProcedures()
SUPER-PROCEDURES attribute of this
external procedure instance.superProcedures in interface CommonProcedurepublic logical addSuperProcedure(handle h)
addSuperProcedure in interface CommonProcedureh - The handle to be added as a super-procedure.true if h is a valid procedure
handle.public logical addSuperProcedure(handle h, ProcedureManager.SearchMode mode)
mode.addSuperProcedure in interface CommonProcedureh - The handle to be added as a super-procedure.mode - The ProcedureManager.SearchMode to be set for the h
handle.true if h is a valid procedure
handle.public logical addSuperProcedure(handle h, int mode)
SEARCH-TARGET
or SEARCH-SELF string literals).addSuperProcedure in interface CommonProcedureh - The handle to be added as a super-procedure.mode - The search-mode to be set for the h handle.true if h is a valid procedure
handle.public logical addSuperProcedure(handle h, integer mode)
SEARCH-TARGET
or SEARCH-SELF string literals).addSuperProcedure in interface CommonProcedureh - The handle to be added as a super-procedure.mode - The search-mode to be set for the h handle.true if h is a valid procedure
handle.public logical removeSuperProcedure(handle h)
removeSuperProcedure in interface CommonProcedureh - The procedure handle to be removed.true if h is a valid procedure
handle.public handle currentWindow()
currentWindow in interface PersistentProcedurepublic void setCurrentWindow(handle h)
setCurrentWindow in interface PersistentProcedureh - A handle for the window.public void setCurrentWindow(WindowWidget win)
setCurrentWindow in interface PersistentProcedurewin - Window reference.public logical isRemote()
isRemote in interface CommonProceduretrue if the procedure is ran remote , false otherwise.public handle getServerHandle()
getServerHandle in interface Remotablepublic logical isProxy()
isProxy in interface PersistentProcedurefalsepublic handle getTransaction()
getTransaction in interface PersistentProcedurepublic character getADMData()
getADMData in interface ADMDatapublic void setADMData(java.lang.String value)
setADMData in interface ADMDatavalue - The new value.public void setADMData(character value)
setADMData in interface ADMDatavalue - The new value.public integer getUniqueID()
getUniqueID in interface UniqueIDpublic logical setCallback(java.lang.String event, java.lang.String proc, object<?> context)
This method returns false if the event name is not valid.
For external procedures, this always shows an error.
setCallback in interface CallbackProcedureevent - The event name, must evaluate to one of the "REQUEST-HEADER" or the "RESPONSE-HEADER" strings.proc - The internal procedure to be executed for this event, which will be executed using the current
THIS-PROCEDURE reference. To remove a callback mapping, set the this parameter to the empty
string.context - The context in which the callback will be executed.true if the event was registered.public logical setCallbackProcedure(java.lang.String event, java.lang.String proc)
This method returns false if the event name is not valid.
For external procedures, this always shows an error.
setCallbackProcedure in interface CallbackProcedureevent - The event name, must evaluate to one of the "REQUEST-HEADER" or the
"RESPONSE-HEADER" strings.proc - The internal procedure to be executed for this event, which will be executed using
the current THIS-PROCEDURE reference. To remove a callback mapping, set the this
parameter to the empty string.true if the event was registered.public logical setCallbackProcedure(character event, java.lang.String proc)
This method returns false if the event name is not valid.
For external procedures, this always shows an error.
setCallbackProcedure in interface CallbackProcedureevent - The event name, must evaluate to one of the "REQUEST-HEADER" or the
"RESPONSE-HEADER" strings.proc - The internal procedure to be executed for this event, which will be executed using
the current THIS-PROCEDURE reference. To remove a callback mapping, set the this
parameter to the empty string.true if the event was registered.public logical setCallbackProcedure(java.lang.String event, character proc)
This method returns false if the event name is not valid.
For external procedures, this always shows an error.
setCallbackProcedure in interface CallbackProcedureevent - The event name, must evaluate to one of the "REQUEST-HEADER" or the
"RESPONSE-HEADER" strings.proc - The internal procedure to be executed for this event, which will be executed using
the current THIS-PROCEDURE reference. To remove a callback mapping, set the this
parameter to the empty string.true if the event was registered.public logical setCallbackProcedure(character event, character proc)
This method returns false if the event name is not valid.
For external procedures, this always shows an error.
setCallbackProcedure in interface CallbackProcedureevent - The event name, must evaluate to one of the "REQUEST-HEADER" or the
"RESPONSE-HEADER" strings.proc - The internal procedure to be executed for this event, which will be executed using
the current THIS-PROCEDURE reference. To remove a callback mapping, set the this
parameter to the empty string.true if the event was registered.public logical setCallbackProcedure(java.lang.String event, java.lang.String proc, handle context)
This method returns false if the event name is not valid or if the procedure's context is not a valid handle.
For external procedures, this always shows an error.
setCallbackProcedure in interface CallbackProcedureevent - The event name, must evaluate to one of the "REQUEST-HEADER" or the
"RESPONSE-HEADER" strings.proc - The internal procedure to be executed for this event. To remove a callback
mapping, set the this parameter to the empty string.context - The procedure handle where the internal procedure will be searched and executed.true if the event was registered.public logical setCallbackProcedure(character event, java.lang.String proc, handle context)
This method returns false if the event name is not valid or if the procedure's context is not a valid handle.
For external procedures, this always shows an error.
setCallbackProcedure in interface CallbackProcedureevent - The event name, must evaluate to one of the "REQUEST-HEADER" or the
"RESPONSE-HEADER" strings.proc - The internal procedure to be executed for this event. To remove a callback
mapping, set the this parameter to the empty string.context - The procedure handle where the internal procedure will be searched and executed.true if the event was registered.public logical setCallbackProcedure(java.lang.String event, character proc, handle context)
This method returns false if the event name is not valid or if the procedure's context is not a valid handle.
For external procedures, this always shows an error.
setCallbackProcedure in interface CallbackProcedureevent - The event name, must evaluate to one of the "REQUEST-HEADER" or the
"RESPONSE-HEADER" strings.proc - The internal procedure to be executed for this event. To remove a callback
mapping, set the this parameter to the empty string.context - The procedure handle where the internal procedure will be searched and executed.true if the event was registered.public logical setCallbackProcedure(character event, character proc, handle context)
This method returns false if the event name is not valid or if the procedure's context is not a valid handle.
For external procedures, this always shows an error.
setCallbackProcedure in interface CallbackProcedureevent - The event name, must evaluate to one of the "REQUEST-HEADER" or the
"RESPONSE-HEADER" strings.proc - The internal procedure to be executed for this event. To remove a callback
mapping, set the this parameter to the empty string.context - The procedure handle where the internal procedure will be searched and executed.true if the event was registered.public handle getCallbackProcContext(java.lang.String eventName)
getCallbackProcContext in interface CallbackProcedureeventName - The name of the event.public character getCallbackProcName(java.lang.String eventName)
getCallbackProcName in interface CallbackProcedureeventName - The name of the event.public logical applyCallback(java.lang.String eventName)
applyCallback in interface CallbackProcedureeventName - The event whose callback will be called.true if operation is successful.public void delete()
ProcedureManager.delete(Object, boolean).
This will trigger a referent clear which won't happen necessarily now - it can be deferred
to a specific block, moment at which the deferredDelete method will be fired.public boolean handleMultipleDeletes()
handleMultipleDeletes in interface MultiDeletablefalse if this can't handle an invalid delete or true otherwise.public void deferredDelete()
deferredDelete in interface DeferredDeletablepublic integer getAsyncRequestCount()
getAsyncRequestCount in interface AsyncRequestCountAttributepublic character getPublishedEvents()
getPublishedEvents in interface PersistentProcedurepublic handle instantiatingProcedure()
The returned handle will refer a valid external procedure (persistent or not) or will be unknown, when this is a entry point procedure or in case its instantiating procedure was persistent and has been deleted.
instantiatingProcedure in interface InstantiatingProcedurepublic void initFileInfo(character name)
initFileInfo in interface CommonFilename - Not used.public void initFileInfo(java.lang.String name)
initFileInfo in interface CommonFilename - Not used.