Class ClientProps

All Implemented Interfaces:
EventListener, IGProp<GProp<?>[]>, IPropCnr, IPropRoot, Cloneable

public final class ClientProps extends PropCnr implements IPropRoot
This client property is a container that holds everything a client/server needs in order to establish communication with the other party, and information about themselves (such as environment).

The client properties has the following properties:

  • $apps - AppsProps
  • $environment - EnvProps
Author:
Christopher Mindus
  • Field Details

    • envProps

      protected EnvProps envProps
      The environment properties.
  • Constructor Details

    • ClientProps

      protected ClientProps()
      Creates the client properties without a name. The name must be set in all cases using the setPropertyAtom call.
  • Method Details

    • getEnvironment

      public EnvProps getEnvironment()
      Gets the environment properties.
      Specified by:
      getEnvironment in interface IGProp<GProp<?>[]>
      Overrides:
      getEnvironment in class GProp<GProp<?>[]>
      Returns:
      The EnvProps for the client environment.
    • getServerEnv

      public StringMapProp getServerEnv()
      Gets the server environment properties.
      Returns:
      StringMapProp for the server environment.
    • getClientEnv

      public StringMapProp getClientEnv()
      Gets the client environment properties.
      Returns:
      StringMapProp for the server environment.
    • getPropRootPropMgr

      public final PropMgr getPropRootPropMgr()
      Gets the Property Manager used for communication for the root container. If this is not the root container, the parent function is called upwards in tree.
      Specified by:
      getPropRootPropMgr in interface IGProp<GProp<?>[]>
      Specified by:
      getPropRootPropMgr in interface IPropRoot
      Overrides:
      getPropRootPropMgr in class GProp<GProp<?>[]>
      Returns:
      The Property Manager, or null when not attached to a root.
    • isPropRoot

      public final boolean isPropRoot()
      Checks if this is a root property container. It is overridden by the root property.
      Specified by:
      isPropRoot in interface IGProp<GProp<?>[]>
      Overrides:
      isPropRoot in class GProp<GProp<?>[]>
      Returns:
      true for the root, false otherwise.
    • isPropReferenceTreeValid

      public final boolean isPropReferenceTreeValid()
      Verifies if the tree is valid for reference creation. This method is typically overridden in a root property that has a Property Manager owner that in turn is checked for a particular configuration (e.g. Client-related references such as LabelForReference that does not create references when communicating).

      The code implementation for a root property should be:

           return (!isDisposed() invalid input: '&'invalid input: '&' getPropRootPropMgr()!=null);
       

      Specified by:
      isPropReferenceTreeValid in interface IGProp<GProp<?>[]>
      Specified by:
      isPropReferenceTreeValid in interface IPropRoot
      Overrides:
      isPropReferenceTreeValid in class GProp<GProp<?>[]>
      Returns:
      true if the root property manager is found, false otherwise.
    • isPropRootTreeModificationsAllowed

      protected final boolean isPropRootTreeModificationsAllowed()
      Checking if a root property is allowed to be modified even after loading has completed.
      Overrides:
      isPropRootTreeModificationsAllowed in class GProp<GProp<?>[]>
      Returns:
      Flag indicating that the tree of properties below this container can be modified.
    • getRootName

      public String getRootName(GProp<?> requestor)
      Gets the name of the root container as in the Designer "module:".
      Overrides:
      getRootName in class GProp<GProp<?>[]>
      Parameters:
      requestor - The requestor property.
      Returns:
      The application root returns "{CLIENT_ROOT}:", because each Module project property container is a root itself, and this name is illegal for Atoms and paths.
    • onEventSelf

      public void onEventSelf(GEvent event)
      Checks for self-event to queue remote events.
      Specified by:
      onEventSelf in interface IGProp<GProp<?>[]>
      Overrides:
      onEventSelf in class GProp<GProp<?>[]>
      Parameters:
      event - The property event.
    • setUIThemes

      public boolean setUIThemes(String themes)
      Sets the UI themes for desktop and mobile.
      Parameters:
      themes - The themes, comma separated "desktop,mobile".
      Returns:
      true for success, false for no change or failure.
    • assignModuleProvider

      public boolean assignModuleProvider(IModuleProjectPropProvider modulePropProvider)
      Assigns a module project property provider.
      Parameters:
      modulePropProvider - The provider, or null to clear it.
      Returns:
      true for changed, false for no change.
    • getProjectName

      public String getProjectName(GProp<?> requestor, String alias)
      Gets the project name from an alias, the alias does NOT begin with "*".
      Overrides:
      getProjectName in class GProp<GProp<?>[]>
      Parameters:
      requestor - The requestor.
      alias - The alias name.
      Returns:
      The project name for the alias, or null if not found.
    • getRootFromName

      public PropCnr getRootFromName(GProp<?> requestor, String module)
      Gets the module root for a name. In the Editor, the module is the project, and that root container is returned. In the Server, the module doesn't matter, so the real root returns itself.

      When running with assertions, this call throws an assertion error by default, showing that the call is directed to a non-root property container.

      Overrides:
      getRootFromName in class GProp<GProp<?>[]>
      Parameters:
      requestor - The requestor.
      module - The module name (without colon), i.e. the project name in the Designer.
      Returns:
      The root property container, or null if this container is not the root, or if the module name is not found. The default implementation returns null.