public class ExternalProgramWrapper extends TransparentWrapper implements PersistentProcedure, MultiDeletable, DeferredDeletable
referent
Constructor and Description |
---|
ExternalProgramWrapper(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.
|
character |
getResourceType()
Get the
TYPE attribute of this
external procedure instance. |
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.
|
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, unknown
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
applyCallback, getCallbackProcContext, getCallbackProcName, setCallback, setCallback, setCallback, setCallback, setCallback, setCallback
id, id, unknown
setPersistent, setPersistent
setServerHandle
public ExternalProgramWrapper(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 WrappedResource
valid
in class TransparentWrapper
true
if this instance is valid,
false
otherways.@Deprecated public void readOnlyError(java.lang.String attribute)
readOnlyError
in interface CommonHandle
attribute
- 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 CommonHandle
attribute
- 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 PersistentProcedure
public 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 CommonFile
public logical isPersistent()
persistent
attribute of this
external procedure instance.
isPersistent
in interface PersistableProcedure
public logical isSingleRun()
single-run
attribute of this
external procedure instance.
isSingleRun
in interface PersistentProcedure
public logical isSingleton()
single-run
attribute of this
external procedure instance.
isSingleton
in interface PersistentProcedure
public character getResourceType()
TYPE
attribute of this
external procedure instance.
getResourceType
in interface CommonHandle
"PROCEDURE"
.public handle getNextSibling()
NEXT-SIBLING
attribute of this
external procedure instance.
getNextSibling
in interface CommonHandleChain
public handle getPrevSibling()
PREV-SIBLING
attribute of this
external procedure instance.
getPrevSibling
in interface CommonHandleChain
public character getPrivateData()
PRIVATE-DATA
attribute of this
external procedure instance.
getPrivateData
in interface CommonHandleChain
public void setPrivateData(character data)
PRIVATE-DATA
attribute of this
external procedure instance.
setPrivateData
in interface CommonHandleChain
data
- The new private-data value.public void setPrivateData(java.lang.String data)
PRIVATE-DATA
attribute of this
external procedure instance.
setPrivateData
in interface CommonHandleChain
data
- The new private-data value.public character getSignature(java.lang.String internalEntry)
GET-SIGNATURE
method of this
external procedure instance.
getSignature
in interface PersistentProcedure
internalEntry
- 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 PersistentProcedure
internalEntry
- 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 CommonProcedure
public logical addSuperProcedure(handle h)
addSuperProcedure
in interface CommonProcedure
h
- 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 CommonProcedure
h
- 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 CommonProcedure
h
- 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 CommonProcedure
h
- 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 CommonProcedure
h
- The procedure handle to be removed.true
if h
is a valid procedure
handle.public handle currentWindow()
currentWindow
in interface PersistentProcedure
public void setCurrentWindow(handle h)
setCurrentWindow
in interface PersistentProcedure
h
- A handle for the window.public void setCurrentWindow(WindowWidget win)
setCurrentWindow
in interface PersistentProcedure
win
- Window reference.public logical isRemote()
isRemote
in interface CommonProcedure
true
if the procedure is ran remote , false
otherwise.public handle getServerHandle()
getServerHandle
in interface Remotable
public logical isProxy()
isProxy
in interface PersistentProcedure
false
public handle getTransaction()
getTransaction
in interface PersistentProcedure
public character getADMData()
getADMData
in interface ADMData
public void setADMData(java.lang.String value)
setADMData
in interface ADMData
value
- The new value.public void setADMData(character value)
setADMData
in interface ADMData
value
- The new value.public integer getUniqueID()
getUniqueID
in interface UniqueID
public 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 CallbackProcedure
event
- 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 CallbackProcedure
event
- 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 CallbackProcedure
event
- 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 CallbackProcedure
event
- 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 CallbackProcedure
event
- 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 CallbackProcedure
event
- 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 CallbackProcedure
event
- 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 CallbackProcedure
event
- 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 CallbackProcedure
event
- 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 CallbackProcedure
eventName
- The name of the event.public character getCallbackProcName(java.lang.String eventName)
getCallbackProcName
in interface CallbackProcedure
eventName
- The name of the event.public logical applyCallback(java.lang.String eventName)
applyCallback
in interface CallbackProcedure
eventName
- 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 MultiDeletable
false
if this can't handle an invalid delete or true
otherwise.public void deferredDelete()
deferredDelete
in interface DeferredDeletable
public integer getAsyncRequestCount()
getAsyncRequestCount
in interface AsyncRequestCountAttribute
public character getPublishedEvents()
getPublishedEvents
in interface PersistentProcedure
public 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 InstantiatingProcedure
public void initFileInfo(character name)
initFileInfo
in interface CommonFile
name
- Not used.public void initFileInfo(java.lang.String name)
initFileInfo
in interface CommonFile
name
- Not used.