Class ClientProps

  • All Implemented Interfaces:
    EventListener, IGProp<GProp<?>[]>, IPropCnr, java.lang.Cloneable

    public final class ClientProps
    extends PropCnr
    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 Detail

      • envProps

        protected EnvProps envProps
        The environment properties.
    • Constructor Detail

      • ClientProps

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

      • 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 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<?>[]>
        Overrides:
        getPropRootPropMgr in class GProp<GProp<?>[]>
        Returns:
        The Property Manager, or null when not attached to a root.
      • isPropRoot

        public 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.
      • getRootName

        public java.lang.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​(java.lang.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 java.lang.String getProjectName​(GProp<?> requestor,
                                               java.lang.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,
                                       java.lang.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.