Package com.portal.bas
Class PComponentImpl
java.lang.Object
com.portal.bas.PComponentImpl
- All Implemented Interfaces:
PComponent
,PRemoteComponent
,PViewDataChangeListener
,Serializable
,Remote
,EventListener
- Direct Known Subclasses:
PFieldComponentImpl
Deprecated.
PComponentImpl
is a distributed class that provides the base
functionality needed by a new UI control to support display and editing of
Portal database information. This class is used as a delegate
by PViewComponent
to work around multiple inheritance problems.
PViewComponent
is the class that should be inherited from for
new components.- Version:
- 12
- Author:
- Larry Lynch-Freshner
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PComponentController
Deprecated.protected PViewComponent
Deprecated. -
Constructor Summary
ConstructorsConstructorDescriptionPComponentImpl
(PViewComponent comp) Deprecated.Creates an instance of the implementation object to delegate to thePViewComponent
interface. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRemoteListener
(Object remoteListenerHandle) Deprecated.Adds a controller-side event listener.getArraySpecEnum
(String spec, int[] vals) Deprecated.Gets an enumeration for an array description, given a set of possible index values.int[]
getArraySpecRange
(PModelHandle mh, String spec) Deprecated.Given a model and a specification for an array in that model, get the range of actual elements in the array.Deprecated.Gets the controller.Deprecated.Gets the name for the controller of this class.getElementOfSpec
(String spec, int element) Deprecated.A helper function which, given an array specification string and an index, returns aString
with the index used in the array.Deprecated.Gets the model handle.getProperty
(String prop) Deprecated.Gets the value of an arbitrary property.Deprecated.Gets a remote listener handle from the controller.getResource
(String tag) Deprecated.Gets the resource string associated with the parameter.Deprecated.Gets the base resource name.getTools()
Deprecated.Gets a list of Actions supported by this component.boolean
isLight()
Deprecated.Determines whether this is a lightweight component.void
register()
Deprecated.A utility method called to retrieve the name of a subclass and register it as a new GUI component.void
releaseRemoteListener
(Object remoteListenerHandle) Deprecated.Releases a remote listener handle.void
removeRemoteListener
(Object remoteListenerHandle) Deprecated.Removes a controller-side event listener.sendDataActionEvent
(String command, Object data) Deprecated.A utility method used to send actions to the controller to be handled.void
setComponentController
(PComponentController controller) Deprecated.An internal method called by the BAS server to assign the created controller.void
setModelHandle
(PModelHandle data) Deprecated.Sets thePModelHandle
property.void
setProperty
(String prop, Object val) Deprecated.Sets the value of an arbitrary property.void
setResourceName
(String name) Deprecated.Sets the base resource name.void
Deprecated.A utility method called to unregister a subclass from its controller, thus allowing both to be garbage collected.void
Deprecated.OverridesPViewDataChangeListener
.
-
Field Details
-
mDel
Deprecated. -
mComponentController
Deprecated.
-
-
Constructor Details
-
PComponentImpl
Deprecated.Creates an instance of the implementation object to delegate to thePViewComponent
interface. Any implementations ofPViewComponent
must delegate to this object. Because this implementation provides the remote object behavior, there is some delegation back to thePAppComponent
subclass as well.- Parameters:
comp
- the derivitive ofPViewComponent
for which this instance implements remote behavior- Throws:
RemoteException
- thrown for all problems
-
-
Method Details
-
setModelHandle
Deprecated.Sets thePModelHandle
property. This data is forwarded to the controller as well.- Specified by:
setModelHandle
in interfacePComponent
- Parameters:
data
- the new model handle- Throws:
RemoteException
- thrown for all problems
-
getModelHandle
Deprecated.Gets the model handle.- Specified by:
getModelHandle
in interfacePComponent
- Returns:
- A
PModelHandle
. - Throws:
RemoteException
- thrown for all problems
-
isLight
Deprecated.Determines whether this is a lightweight component. Lightweight components do not have their own model. Instead, they use the model of their container. This means thatgetModelHandle()
always returns null,setModelHandle()
is ignored, and no property change events are generated.- Specified by:
isLight
in interfacePComponent
- Returns:
- True if component is lightweight; false otherwise.
- Throws:
RemoteException
- thrown for all problems
-
getControllerClassName
Deprecated.Gets the name for the controller of this class. The default is to add the word "Controller" to the component's class name. This should be overridden by the delegator to use other names.- Specified by:
getControllerClassName
in interfacePComponent
- Returns:
- A
String
with the component's controller class name. - Throws:
RemoteException
- thrown for all problems
-
viewDataChange
Deprecated.OverridesPViewDataChangeListener
. This method is no longer called by the controller itself. To ensure backward compatibility, it is called after the model is set, by any operation that causes a change in the display data. The client code should call the appropriateget
methods on the controller to get the data, as the() PViewDataChangeEvent
parameter is no longer used. The default behavior handles async errors.- Specified by:
viewDataChange
in interfacePViewDataChangeListener
- Parameters:
event
- thePViewDataChangeEvent
event that describes the change. No longer used. By default, the value passed in is always set to null.- Throws:
RemoteException
- thrown for errors
-
setComponentController
Deprecated.An internal method called by the BAS server to assign the created controller.- Specified by:
setComponentController
in interfacePRemoteComponent
- Parameters:
controller
- the new controller object- Throws:
RemoteException
- thrown for problems
-
getComponentController
Deprecated.Gets the controller. Sometimes called by a delegator for special direct access.- Specified by:
getComponentController
in interfacePRemoteComponent
- Returns:
- A
PComponentController
object. - Throws:
RemoteException
- thrown for all problems
-
setResourceName
Deprecated.Sets the base resource name.- Parameters:
name
- aString
with the resource name
-
getResourceName
Deprecated.Gets the base resource name. If one has not been set for this component specifically, it returns one set in a parent object.- Returns:
- A
String
that contains the resource base name, if any; null otherwise.
-
getTools
Deprecated.Gets a list of Actions supported by this component. When subclassed, the override class should call its superclass, then add its actions to the returned list. This preserves actions supplied by base classes. The default, supplied here, includes help for this component.- Returns:
- A
Vector
that contains Action objects.
-
getResource
Deprecated.Gets the resource string associated with the parameter. Takes the base resource name into account.- Parameters:
tag
- the resource tag- Returns:
- A
String
resource. If none is found, returns the tag. - Throws:
RemoteException
- thrown for errors
-
register
Deprecated.A utility method called to retrieve the name of a subclass and register it as a new GUI component.- Throws:
RemoteException
- thrown for errors
-
unregister
Deprecated.A utility method called to unregister a subclass from its controller, thus allowing both to be garbage collected.- Throws:
RemoteException
-
sendDataActionEvent
Deprecated.A utility method used to send actions to the controller to be handled.- Parameters:
command
- the action command for the controller to handledata
- the data for the controller to use- Returns:
- The result, if any, of the action performed.
- Throws:
RemoteException
- thrown for errors
-
setProperty
Deprecated.Sets the value of an arbitrary property. The property has meaning only to a specific subclass.- Parameters:
prop
- aString
property nameval
- the property value- Throws:
RemoteException
- thrown for all problems
-
getProperty
Deprecated.Gets the value of an arbitrary property. The property has meaning only to a specific subclass.- Parameters:
prop
- aString
property name- Returns:
- The property value.
- Throws:
RemoteException
- thrown for all problems
-
getRemoteListenerHandle
Deprecated.Gets a remote listener handle from the controller. Can be used to add a remote listener to another component.- Parameters:
type
- the listener's type- Returns:
- The listener's handle.
- Throws:
RemoteException
- thrown for all problems
-
addRemoteListener
Deprecated.Adds a controller-side event listener.- Parameters:
remoteListenerHandle
- a handle to a controller-side listener- Throws:
RemoteException
- thrown for all problems
-
removeRemoteListener
Deprecated.Removes a controller-side event listener.- Parameters:
remoteListenerHandle
- a handle to a controller-side listener- Throws:
RemoteException
- thrown for all problems
-
releaseRemoteListener
Deprecated.Releases a remote listener handle.- Parameters:
remoteListenerHandle
- the listener's handle- Throws:
RemoteException
- thrown for all problems
-
getArraySpecRange
Deprecated.Given a model and a specification for an array in that model, get the range of actual elements in the array. The return array will contain the lowest element number in [0], and the highest in [1]. If the array is sparse, each element is iterated starting in [2] otherwise, only the range is provided.- Parameters:
mh
- aPModelHandle
spec
- a field description- Returns:
- An int array, where indexes 0 and 1 contain the low and high
bounds (if the array has a single element, only the low bound is
given). If the array doesn't contain consecutive indices,
then indices 2 and up contain the specific element number
used in the
SparseArray
. - Throws:
RemoteException
- thrown for errors
-
getArraySpecEnum
Deprecated.Gets an enumeration for an array description, given a set of possible index values. The enumeration produces string descriptions of specific array elements.- Parameters:
spec
- a field description string that describes an arrayvals
- possible array index values- Returns:
- An
Enumeration
object.
-
getElementOfSpec
Deprecated.A helper function which, given an array specification string and an index, returns aString
with the index used in the array.- Parameters:
spec
- a field description string that describes an arrayelement
- a specific element in the array- Returns:
- The specified
String
, with the array element replaced by the specified new element.
-
PComponentImpl
is deprecated and replaced byPComponentDelegate
.