Package com.portal.bas
Class PInfranetConnectionImpl
java.lang.Object
com.portal.bas.PInfranetAppControllerImpl
com.portal.bas.PInfranetConnectionImpl
- All Implemented Interfaces:
PInfranetAppController
,PInfranetConnection
,CMConnectionListener
,Remote
Deprecated.
PInfranetConnectionImpl
is the implementation portion of the
PInfranetConnection
distributed class. This class is imposed between
the client application and a PortalContext
so that the model cache may
be consulted prior to reads, and updated properly after writes.- Version:
- 20.1.2
- Author:
- Larry Lynch-Freshner
-
Field Summary
Fields inherited from class com.portal.bas.PInfranetAppControllerImpl
mCompMap
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Constructs an instance ofPInfranetConnectionImpl
from the login information stored in PortalUser.properties.Deprecated.Constructs an instance ofPInfranetConnectionImpl
from another connection.PInfranetConnectionImpl
(String name, String password, String connectInfo) Deprecated.Constructs an instance ofPInfranetConnectionImpl
from login information. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.Halts an Portal transaction and rolls back the logs.callOpcode
(int opcode, PModelHandle in) Deprecated.Given an input flist model, calls an opcode with a default value of "0" for the opcode flags.callOpcode
(int opcode, PModelHandle in, int flags) Deprecated.Given an input flist model, calls an opcode, using the opcode flag values passed in.callOpcode
(int opcode, FList in) Deprecated.Given an input flist, calls an opcode with a default value of "0" for the opcode flags.callOpcode
(int opcode, FList in, int flags) Deprecated.Given an input flist, calls an opcode, using the opcode flag values passed in.void
Deprecated.Commits an Portal transaction.createModelFrom
(FList fl) Deprecated.Creates a new model handle from an flist, and sets that flist in the cache.createModelFrom
(Poid pd) Deprecated.Creates a new model handle from aPoid
.Deprecated.Creates a new model handle from aSparseArray
.void
Deprecated.Removes a model from the cache to free resources.long
Deprecated.Returns the database number that this context is connected to.getField
(PModelHandle mh, PDataFieldSpecification spec) Deprecated.Gets a field from a model.getField
(FList list, PDataFieldSpecification spec) Deprecated.Gets a field from an flist.getModelField
(PModelHandle data, PFieldSpecification spec) Deprecated.Gets a field from a model.getModelField
(FList data, PFieldSpecification spec) Deprecated.Gets a field from an flist.Deprecated.Creates a model for the specified flist, but does not put the flist in the cache unless there is no match for the newly-created model handle.Deprecated.Returns the current userid.Deprecated.Forces the cache to be loaded with an entire storable class for a given model handle.void
logCache()
Deprecated.Serves as a debug function to dump the cache to the log file.Deprecated.Looks up a controller for a given component.lookupModel
(PModelHandle modl) Deprecated.Gets the model from the cache for a model handle.lookupPoid
(PModelHandle modl) Deprecated.Gets the POID from the cache for a model handle.void
openTransaction
(int flags) Deprecated.Opens an Portal transaction.void
registerComponent
(PRemoteComponent comp, String controllerClass) Deprecated.Registers the client portion of a component with the Portal server.Deprecated.Calls the search opcode, but returns an array of model handles.void
setField
(PModelHandle modl, PDataFieldSpecification spec, Object val) Deprecated.Sets a field in a model.void
setField
(FList list, PDataFieldSpecification spec, Object val) Deprecated.Sets a field in an flist.void
setModel
(PModelHandle modl, FList fl) Deprecated.Sets an flist model in the cache and associates it with a handle.void
setModel
(PModelHandle modl, Poid pd) Deprecated.Sets a POID model in the cache and associates it with a handle.void
setModel
(PModelHandle modl, SparseArray sa) Deprecated.Sets aSparseArray
model in the cache and associates it with a handle.void
Deprecated.Unregisters the client portion of a component with the Portal server.Methods inherited from class com.portal.bas.PInfranetAppControllerImpl
close, cmreconnected, createController, createNewModel, duplicate, duplicate, getAccountHandle, getAppName, getClientLocale, getConnection, getContext, getEventListener, getModelField, getOtherData, getPermissionFor, getPermissions, getRestrictionOn, getServiceHandle, getUserPreferences, isBrandingEnabled, login, lookupController, postEventListener, registerApp, registerController, releaseConnection, releaseContext, removeEventListener, saveUserPreferences, setBrandContext, setConnection, setModelField, setUserPreferences, storeUserPrefs, throwInfranetException, unregisterController, unregisterControllers, unsetBrandContext, verifyAndSwitchToUser
-
Constructor Details
-
PInfranetConnectionImpl
Deprecated.Constructs an instance ofPInfranetConnectionImpl
from the login information stored in PortalUser.properties.- Throws:
RemoteException
- thrown for errors
-
PInfranetConnectionImpl
public PInfranetConnectionImpl(String name, String password, String connectInfo) throws RemoteException Deprecated.Constructs an instance ofPInfranetConnectionImpl
from login information.- Parameters:
name
- the user's login namepassword
- the user's passwordconnectInfo
- the hostname and port- Throws:
RemoteException
- thrown for errors
-
PInfranetConnectionImpl
Deprecated.Constructs an instance ofPInfranetConnectionImpl
from another connection. This creates a separate connection that shares a cache with the specified connection. Use this constructor when you need a separate connection, for example, to use for long step searches.- Parameters:
conn
- the existing connection- Throws:
RemoteException
- thrown for errors
-
-
Method Details
-
callOpcode
Deprecated.Given an input flist, calls an opcode with a default value of "0" for the opcode flags.- Parameters:
opcode
- the opcode to callin
- the input flist- Returns:
- The output flist model.
- Throws:
EBufException
- thrown for Portal errorsRemoteException
- thrown for remote errors
-
callOpcode
Deprecated.Given an input flist model, calls an opcode with a default value of "0" for the opcode flags.- Parameters:
opcode
- the opcode to callin
- the input flist model- Returns:
- The output flist model.
- Throws:
EBufException
- thrown for Portal errorsRemoteException
- thrown for remote errors
-
callOpcode
public FList callOpcode(int opcode, PModelHandle in, int flags) throws RemoteException, EBufException Deprecated.Given an input flist model, calls an opcode, using the opcode flag values passed in.- Parameters:
opcode
- the opcode to callin
- the input flist modelflags
- the opcode flags- Returns:
- The output flist model.
- Throws:
EBufException
- thrown for Portal errorsRemoteException
- thrown for remote errors
-
callOpcode
Deprecated.Given an input flist, calls an opcode, using the opcode flag values passed in.- Parameters:
opcode
- the opcode to callin
- the input flistflags
- the opcode flags- Returns:
- The output flist model.
- Throws:
EBufException
- thrown for Portal errorsRemoteException
- thrown for remote errors
-
search
Deprecated.Calls the search opcode, but returns an array of model handles.- Parameters:
opcode
- an Portal search opcode (SEARCH, STEP_SEARCH, STEP_NEXT
)in
- the input flist- Returns:
- An array of model handles.
- Throws:
EBufException
- thrown for Portal errorsRemoteException
- thrown for remote errors
-
openTransaction
Deprecated.Opens an Portal transaction.- Parameters:
flags
- the transaction flags- Throws:
RemoteException
- thrown for remote errors
-
abortTransaction
Deprecated.Halts an Portal transaction and rolls back the logs.- Throws:
RemoteException
- thrown for remote errors
-
commitTransaction
Deprecated.Commits an Portal transaction.- Throws:
RemoteException
- thrown for remote errors
-
getUserID
Deprecated.Returns the current userid.- Returns:
- The userid POID.
- Throws:
RemoteException
- thrown for errors
-
getCurrentDB
Deprecated.Returns the database number that this context is connected to.- Returns:
- The current database number.
- Throws:
RemoteException
- thrown for errors
-
registerComponent
Deprecated.Registers the client portion of a component with the Portal server.- Specified by:
registerComponent
in interfacePInfranetConnection
- Overrides:
registerComponent
in classPInfranetAppControllerImpl
- Parameters:
comp
- the remote component to registercontrollerClass
- the class name of the component controller- Throws:
RemoteException
- thrown in case of failure
-
unregisterComponent
Deprecated.Unregisters the client portion of a component with the Portal server.- Specified by:
unregisterComponent
in interfacePInfranetConnection
- Overrides:
unregisterComponent
in classPInfranetAppControllerImpl
- Parameters:
comp
- the remote component to unregister- Throws:
RemoteException
- thrown for errors
-
lookupController
Deprecated.Looks up a controller for a given component.- Parameters:
comp
- aPRemoteComponent
component stub- Returns:
- The controller, if any, associated with the component.
-
getOrCreateModelFrom
Deprecated.Creates a model for the specified flist, but does not put the flist in the cache unless there is no match for the newly-created model handle.- Parameters:
fl
- the model to create a handle for- Returns:
- A new model handle.
- Throws:
RemoteException
- thrown for errors
-
createModelFrom
Deprecated.Creates a new model handle from an flist, and sets that flist in the cache.- Parameters:
fl
- the model to create a handle from- Returns:
- A new model handle.
- Throws:
RemoteException
- thrown for errors
-
createModelFrom
Deprecated.Creates a new model handle from aSparseArray
.- Parameters:
sa
- the model to create a handle from- Returns:
- A new model handle.
- Throws:
RemoteException
- thrown for errors
-
createModelFrom
Deprecated.Creates a new model handle from aPoid
.- Parameters:
pd
- the model to create a handle from- Returns:
- A new model handle.
- Throws:
RemoteException
- thrown for errors
-
lookupPoid
Deprecated.Gets the POID from the cache for a model handle.- Parameters:
modl
- the model handle to look up- Returns:
- The model's POID.
- Throws:
EBufException
- thrown for Portal errorsRemoteException
- thrown for remote errors
-
lookupModel
Deprecated.Gets the model from the cache for a model handle.- Parameters:
modl
- the model handle to look up- Returns:
- An
Object
, which is either an flist, aSparseArray
, or aPOID
. - Throws:
EBufException
- thrown for Portal errorsRemoteException
- thrown for remote errors
-
setModel
Deprecated.Sets an flist model in the cache and associates it with a handle.- Parameters:
modl
- the model handle to use as a keyfl
- the flist model to store- Throws:
RemoteException
- thrown for errors
-
setModel
Deprecated.Sets aSparseArray
model in the cache and associates it with a handle.- Parameters:
modl
- the model handle to use as a keysa
- theSparseArray
model to store- Throws:
RemoteException
- thrown for errors
-
setModel
Deprecated.Sets a POID model in the cache and associates it with a handle.- Parameters:
modl
- the POID's model handle to use as a keypd
- the POID model to store- Throws:
RemoteException
- thrown for errors
-
discardModel
Deprecated.Removes a model from the cache to free resources.- Parameters:
mh
- a model handle- Throws:
RemoteException
- thrown for errors
-
getModelField
Deprecated.Gets a field from an flist. This version only returns a model handle for a field that is itself a model. Use this method when the returned field data will be sent to the client. In the case of compound specifications, an object array is returned.- Parameters:
data
- the model to get a field fromspec
- a specification for which field(s) to get- Returns:
- The contents of the field, in the form of an Integer, BigDecimal, Date, Double, byte array, String, or ModelHandle.
- Throws:
RemoteException
- thrown for errors
-
getModelField
Deprecated.Gets a field from a model. This version returns a model handle only for a field that is itself a model. Use this method when the returned field data will be sent to the client. In the case of compound specifications, an object array is returned.- Parameters:
data
- the model to get a field fromspec
- a specification for which field(s) to get- Returns:
- The contents of the field, in the form of an Integer, BigDecimal, Date, Double, byte array, String, or ModelHandle.
- Throws:
RemoteException
- thrown for errors
-
getWholeObject
Deprecated.Forces the cache to be loaded with an entire storable class for a given model handle. Called when the caller knows it will access more than a field or two.- Parameters:
mh
- a model handle- Returns:
- An
Flist
object. - Throws:
EBufException
- thrown for Portal errorsRemoteException
- thrown for remote errors
-
getField
Deprecated.Gets a field from an flist.- Parameters:
list
- the flist to get a field fromspec
- a specification of which field to get- Returns:
- The field's value.
- Throws:
RemoteException
- thrown for errors
-
getField
Deprecated.Gets a field from a model.- Parameters:
mh
- the model handle to get a field fromspec
- a specification of which field to get- Returns:
- The field's value.
- Throws:
RemoteException
- thrown for errors
-
setField
public void setField(PModelHandle modl, PDataFieldSpecification spec, Object val) throws RemoteException Deprecated.Sets a field in a model.- Parameters:
modl
- the model to set a field inspec
- a specification of which field to setval
- the new value to set- Throws:
RemoteException
- thrown for errors
-
setField
Deprecated.Sets a field in an flist.- Parameters:
list
- the flist to set a field inspec
- a specification of which field to setval
- the new value to set- Throws:
RemoteException
- thrown for errors
-
logCache
public void logCache()Deprecated.Serves as a debug function to dump the cache to the log file.
-
PInfranetConnectionImpl
is deprecated and replaced byPInfranetAppController
andPCachedContext
.