Interface PInfranetConnection

All Superinterfaces:
Remote
All Known Implementing Classes:
PInfranetAppControllerImpl, PInfranetConnectionImpl

public interface PInfranetConnection extends Remote
PInfranetConnection is used purely as a handle on the client side. It represents a connection to the BAS server, not to Portal.
Author:
Larry Lynch-Freshner
  • Method Details

    • getPermissionFor

      boolean getPermissionFor(String componentName) throws RemoteException
      Gets permission to use a component.
      Parameters:
      componentName - the component's name
      Returns:
      True if use is permitted; false otherwise.
      Throws:
      RemoteException - thrown for errors
    • getRestrictionOn

      PRestriction getRestrictionOn(String fieldSpecification) throws RemoteException
      Retrieves the restrictions on a field, for example, whether it is a read-only field.
      Parameters:
      fieldSpecification - the field's specification
      Returns:
      The PRestriction object.
      Throws:
      RemoteException - thrown for errors
    • registerApp

      void registerApp(String appName, Locale locale, Object data) throws RemoteException
      Registers the application with the BAS server. This gives the server-side components access to the application name and client locale.
      Parameters:
      appName - the application's name
      locale - the client's locale
      data - other application-specific data
      Throws:
      RemoteException - thrown for errors
    • createController

      PControllerBean createController(String controllerClass) throws RemoteException
      Registers the client portion of a component with the BAS server.
      Parameters:
      controllerClass - the class name of the component controller
      Returns:
      A stub to the controller.
      Throws:
      RemoteException - thrown in case of failure
    • registerComponent

      void registerComponent(PRemoteComponent comp, String controllerClass) throws RemoteException
      Deprecated.
      As of Release 6.1, this method is deprecated and replaced by createController and registerController.
      Registers the client portion of a component with the BAS server.
      Parameters:
      comp - the component to register
      controllerClass - the class name of the component controller
      Throws:
      RemoteException - thrown in case of failure
    • unregisterComponent

      void unregisterComponent(PRemoteComponent comp) throws RemoteException
      Deprecated.
      As of Release 6.1, this method is deprecated and replaced by unregisterController.
      Unregisters the client portion of a component with the BAS server.
      Parameters:
      comp - the component to unregister
      Throws:
      RemoteException - thrown in case of failure
    • createNewModel

      PModelHandle createNewModel(String type) throws RemoteException
      Creates a new, empty data model.
      Parameters:
      type - the type of model to create
      Returns:
      A new data model.
      Throws:
      RemoteException - thrown for errors
    • getModelField

      Object getModelField(PModelHandle data, String desc) throws RemoteException
      Gets a field from a model. This version returns a PModelHandle only for a field that is itself a model. Use this method when the returned field data will be sent to the client. For compound specifications, an object array is returned.
      Parameters:
      data - the model from which to get a field
      desc - a description of which field(s) to get
      Returns:
      The contents of the field. This is an Integer, BigDecimal, Date, Double, byte array, String, or ModelHandle.
      Throws:
      RemoteException - thrown for errors
    • setModelField

      void setModelField(PModelHandle data, String desc, Object val) throws RemoteException
      Sets a field in a model to a new value. This version handles the case where the new value is a PModelHandle.
      Parameters:
      data - the model to set a field in
      desc - a description of which field to set
      val - the new value to be set
      Throws:
      RemoteException - thrown for errors
    • getUserPreferences

      Properties getUserPreferences() throws RemoteException
      Gets the user's UI preferences.
      Returns:
      The Properties object that contains the user's preferences.
      Throws:
      RemoteException - thrown for errors
    • saveUserPreferences

      void saveUserPreferences() throws RemoteException
      Save user preferences Properties object. Saves the object managed by this class that is retrieved using getUserPreferences() method. Always use this preferred method to save user prefs.
      Throws:
      RemoteException
    • setUserPreferences

      void setUserPreferences(Properties userPrefs) throws RemoteException
      Deprecated.
      use saveUserPreferences()
      Saves changes to the user's UI preferences Properties object.
      Parameters:
      userPrefs - a Properties object that contains the user's preferences
      Throws:
      RemoteException - thrown for errors
    • login

      void login(String user, String password, String url) throws RemoteException
      Logs user into the Portal server specified by url.
      Parameters:
      user - the username
      password - user's password
      url - a string containing connection information in URL format, e.g., pcp://host:port
      Throws:
      RemoteException - if login fails.
    • close

      void close(boolean logout) throws RemoteException
      Closes the connection to the Portal server.
      Parameters:
      logout - if true, logs out before closing the connection
      Throws:
      RemoteException
    • getContext

      PortalContext getContext()
      Returns the current connection context. May be null if no connection to Portal has been made. For every call to getContext() there must be a corresponding call to releaseContext().
      Returns:
      A CachedContext object or null
      See Also:
    • releaseContext

      void releaseContext(PortalContext ctx)
      Releases the connection retrieved by getContext(). For every call to getContext() there must be a corresponding call to releaseContext().
      Parameters:
      ctx - the connection to be released.
      See Also: