Class ModuleProjectSettings


  • public class ModuleProjectSettings
    extends java.lang.Object
    Class used to wrap the property container for Module Settings.
    Author:
    Christopher Mindus
    • Field Summary

      Fields 
      Modifier and TypeFieldDescription
      static java.lang.StringALIAS
      Static strings.
      static java.lang.StringALIASES
      Static strings.
      static java.lang.StringCLASSPATH
      Static strings.
      static java.lang.StringCUSTOM_APP
      Static strings.
      static java.lang.StringEXT_LOGIN
      Static strings.
      static java.lang.StringPROJECT
      Static strings.
      static java.lang.StringUSER_AUTH
      Static strings.
    • Constructor Summary

      Constructors 
      ConstructorDescription
      ModuleProjectSettings​(PropCnr pc)
      Creates an instance of the Module Project Settings for a property container.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.util.ArrayList<java.lang.String[]>getAliases()
      Gets the list of Project/Alias.
      ClasspathEntry[]getClasspathEntries()
      Gets the classpath entries for the module project.
      <PC extends PropCnr>
      PC
      getContainer​(java.lang.String name, java.lang.Class<PC> clazz)
      Gets a container by name and class type.
      java.util.Map<java.lang.String,​java.lang.String>getCustomAppMap()
      Gets the unmodifiable map of custom app properties, a map with keys and values.
      java.lang.StringgetCustomAppValue​(java.lang.String key)
      Gets a value for a key in the custom app properties.
      java.lang.StringgetDescription()
      Gets the description of the application.
      PropCnrgetMainPropCnr()
      Gets the main property container storage.
      ModuleAppgetModuleApp()
      Gets the ModuleApp instance.
      java.lang.StringgetPlugins()
      Gets the plug-ins required by the module.
      SettingsPropCnrgetSettings​(java.lang.String name)
      Gets or creates the settings container of the specified name.
      booleanisEditing()
      Flag for settings being edited.
      booleanisExternalLoginUsed()
      Returns if the application uses external login.
      booleanisUserAuthenticationAlwaysRequired()
      Returns if the application requires user authentication every time it's started.
      voidsetAliases​(java.util.ArrayList<java.lang.String[]> list)
      Sets a new list of Project/Aliases.
      booleansetClasspath​(java.util.Collection<ClasspathEntry> classpath)
      Sets the classpath.
      voidsetEditing​(boolean isEditing)
      Flag for settings being edited.
      voidsetUseAliases​(boolean on)
      Sets if Aliases are used for Reference or Project names.
      booleanuseAliases()
      Checks if Aliases are used for Reference or Project names.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ModuleProjectSettings

        public ModuleProjectSettings​(PropCnr pc)
        Creates an instance of the Module Project Settings for a property container.
    • Method Detail

      • setEditing

        public void setEditing​(boolean isEditing)
        Flag for settings being edited.
      • isEditing

        public boolean isEditing()
        Flag for settings being edited.
      • getMainPropCnr

        public PropCnr getMainPropCnr()
        Gets the main property container storage.
      • getModuleApp

        public ModuleApp getModuleApp()
        Gets the ModuleApp instance.
      • getDescription

        public java.lang.String getDescription()
        Gets the description of the application.
        Returns:
        The application description, or null if not defined.
      • useAliases

        public boolean useAliases()
        Checks if Aliases are used for Reference or Project names.
      • setUseAliases

        public void setUseAliases​(boolean on)
        Sets if Aliases are used for Reference or Project names.
      • getAliases

        public java.util.ArrayList<java.lang.String[]> getAliases()
        Gets the list of Project/Alias.
        Returns:
        A list of String [2], where first index is Project, second is Alias.
      • setAliases

        public void setAliases​(java.util.ArrayList<java.lang.String[]> list)
        Sets a new list of Project/Aliases.
        Parameters:
        list - A list of String [2], where first index is Project, second is Alias.
      • getSettings

        public SettingsPropCnr getSettings​(java.lang.String name)
                                    throws PropException
        Gets or creates the settings container of the specified name.
        Throws:
        PropException - If the settings couldn't be created.
      • getPlugins

        public java.lang.String getPlugins()
        Gets the plug-ins required by the module.
        Returns:
        A comma separated string, or null for none.
      • getContainer

        public <PC extends PropCnr> PC getContainer​(java.lang.String name,
                                                    java.lang.Class<PC> clazz)
        Gets a container by name and class type. This is used to store data for plug-in's.
        Returns:
        null if not found.
      • isUserAuthenticationAlwaysRequired

        public boolean isUserAuthenticationAlwaysRequired()
        Returns if the application requires user authentication every time it's started.
        Returns:
        true for user authentication always required, by password or fingerprint.
      • isExternalLoginUsed

        public boolean isExternalLoginUsed()
        Returns if the application uses external login. When "true", the iiziRun user is not used and a new session is always started until the login has completed.
        Returns:
        true if external login is used, e.g. using LinkedIn, false for internal user authentication.
      • getCustomAppValue

        public java.lang.String getCustomAppValue​(java.lang.String key)
        Gets a value for a key in the custom app properties.
        Parameters:
        key - The key or name of the property to retrieve.
        Returns:
        The value, or null if no value is defined for the key, or the custom map is not defined.
      • getCustomAppMap

        public java.util.Map<java.lang.String,​java.lang.String> getCustomAppMap()
        Gets the unmodifiable map of custom app properties, a map with keys and values.
        Returns:
        The map, or null if not defined.
      • setClasspath

        public boolean setClasspath​(java.util.Collection<ClasspathEntry> classpath)
        Sets the classpath.
        Parameters:
        classpath - The classpath.
        Returns:
        true for changes, false for no changes.
      • getClasspathEntries

        public ClasspathEntry[] getClasspathEntries()
        Gets the classpath entries for the module project.
        Returns:
        The classpath entries array to use for the module project.