Class AppPropCnr

java.lang.Object
com.iizix.prop.GProp<GProp<?>[]>
com.iizix.prop.PropCnr
com.iizix.server.app.prop.AppPropCnr
All Implemented Interfaces:
EventListener, IGProp<GProp<?>[]>, IInitializePropMgr, IPropCnr, Cloneable
Direct Known Subclasses:
EditorAppPropCnr

public class AppPropCnr extends PropCnr implements IInitializePropMgr
The Application root property container that contains ModuleProjectPropCnr's for the Module Projects in the application.
Author:
Christopher Mindus
  • Constructor Details

    • AppPropCnr

      public AppPropCnr()
      Constructs the instance without an AppID. This constructor is used for the Designer and the property system.
    • AppPropCnr

      public AppPropCnr(Atom appID)
      Constructs the instance with an application ID. This constructor is made for loading an entire iiziApp from a Jar file.
      Parameters:
      appID - The application ID.
  • Method Details

    • isPropRootTreeModificationsAllowed

      protected 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.
    • isPropReferenceTreeValid

      public 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).
      Specified by:
      isPropReferenceTreeValid in interface IGProp<GProp<?>[]>
      Overrides:
      isPropReferenceTreeValid in class GProp<GProp<?>[]>
      Returns:
      true if the root property manager is found, false otherwise.
    • getModuleProjectPropProvider

      public IModuleProjectPropProvider getModuleProjectPropProvider()
      Gets the Module properties provider.
    • initialize

      public void initialize(PropMgr propMgr)
      Initializes the Property Manager instance for the property.
      Specified by:
      initialize in interface IInitializePropMgr
      Parameters:
      propMgr - The Property Manager.
    • initialize

      public void initialize(AppFactory factory, EnvProps serverEnvProps)
      Creates a PropCnr for the designer with the specified name with a null value.
      Parameters:
      factory - The factory.
      serverEnvProps - The server environment.
      Throws:
      IllegalStateException - If this is called twice.
    • getJarFile

      public IJarFile getJarFile()
      Gets the Jar file for the Module. This Jar file can be a Jar-in-Jar file, or null if running in development mode.
      Returns:
      The Jar file or null when running in development mode.
      Throws:
      NullPointerException - If called when not in the Server.
    • getAppFactory

      public AppFactory getAppFactory()
      Gets the application factory.
      Returns:
      The AppFactory.
    • clone

      public AppPropCnr clone() throws CloneNotSupportedException
      Cloning is not supported.
      Overrides:
      clone in class PropCnr
      Throws:
      CloneNotSupportedException - Always!
    • isPropRoot

      public final boolean isPropRoot()
      Checks if this is a root property container.
      Specified by:
      isPropRoot in interface IGProp<GProp<?>[]>
      Overrides:
      isPropRoot in class GProp<GProp<?>[]>
      Returns:
      true, always.
    • isPropRootLoading

      public final boolean isPropRootLoading()
      Checks if the root property container is currently loading properties from Jar or files to avoid reference checking until the end.
      Overrides:
      isPropRootLoading in class GProp<GProp<?>[]>
      Returns:
      The loading flag, always false unless overridden by the real root property that handles loading.
    • 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 Server Property Manager. If the server instance fails to be retrieved, the super.getPropRootPropMgr() is called.
    • 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 "{APP_ROOT}:", because each Module project property container is a root itself, and this name is illegal for Atoms and paths.
    • 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 session, client application or server environment in respective priority order depending on what can be retrieved at the moment of calling this method.
    • getRootFromName

      public ModuleProjectPropCnr getRootFromName(GProp<?> requestor, String module)
      Gets the module root for a name. As this is the Designer, the module is the project.
      Overrides:
      getRootFromName in class GProp<GProp<?>[]>
      Parameters:
      requestor - The requestor property.
      module - The module name (without colon), i.e. the project name in the Designer.
      Returns:
      The root property container, or null if the module name is not found.
    • getModulePropFromReference

      public GProp<?> getModulePropFromReference(GProp<?> requestor, String reference)
      Gets a property from a reference name. The property is looked up by attempting a virtualized instance first, then if not found, the "static" non-virtualized properties.
      Parameters:
      requestor - The requestor property.
      reference - The reference string.
      Returns:
      The property with the reference in question, or null if not found.
    • getModuleProjects

      public ModuleProjectPropCnr[] getModuleProjects()
      Gets the Module model projects that are loaded for this application.
    • getClassPaths

      public String[] getClassPaths()
      Get the classpath entries for the modules inside the application when it is inside a Jar file.
      Returns:
      The classpath entries, directory list, where each entry ends with "/".