Class LocalHome


  • public class LocalHome
    extends java.lang.Object
    Fuer Initialisierung und andere Dinge ist es nuetzlich Platz auf der lokalen UserPlatte zu haben. Diese Klasse managed den Ort. Der User kann das schreiben auf die lokale Platte verweigern. Diese Klasse ist rein statisch und applikationsunabhaengig. Sie ist nur MstApp spezifisch. Die Klasse ist package privat, da nur als teil des lokalen bootstraps fuer ConfigMgr gebraucht.
    Version:
    1.0.0
    Author:
    schuette
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String HOME_DIR_NAME
      Wurzel des lokalen Verzeichnisses mit MstApp Daten
    • Constructor Summary

      Constructors 
      Constructor Description
      LocalHome()  
    • Field Detail

      • HOME_DIR_NAME

        public static final java.lang.String HOME_DIR_NAME
        Wurzel des lokalen Verzeichnisses mit MstApp Daten
        See Also:
        Constant Field Values
    • Constructor Detail

      • LocalHome

        public LocalHome()
    • Method Detail

      • noLocalHomeWanted

        public static final boolean noLocalHomeWanted()
      • isLocalHomeConfiguered

        public static final boolean isLocalHomeConfiguered()
      • getHome

        public static final java.lang.String getHome()
        Returns:
        Returns the mstApp_Home, falls "noLocalHomeWanted == false"
        Throws:
        java.lang.IllegalStateException - falls "noLocalHomeWanted == true"
      • getHomeProtokoll

        public static java.lang.String getHomeProtokoll()
        Returns:
        Returns the mstApp_Home, falls "noLocalHomeWanted == false"
        Throws:
        java.lang.IllegalStateException - falls "noLocalHomeWanted == true"
      • hatAbweichendesProtokollVerzeichnis

        public static boolean hatAbweichendesProtokollVerzeichnis()
      • changeHomeByUserDialog

        public static void changeHomeByUserDialog()
        this routine asks the user for a home directory. No movement is done. But the new home directory is stored in the Java Prefs.
      • setHomeProtokoll

        public static void setHomeProtokoll​(java.lang.String newHomeProtokoll,
                                            boolean newIsAbweichendesProtokoll)
      • calcLocalPath

        public static final java.lang.String calcLocalPath​(java.lang.String srvName,
                                                           java.lang.String appName,
                                                           java.lang.String suffix)
        Parameters:
        srvName - ...like "Ini"
        appName - ...application of the local path
        suffix - ....like ".xml"
      • calcLocalUserPath

        public static final java.lang.String calcLocalUserPath​(java.lang.String srvName,
                                                               java.lang.String appName,
                                                               java.lang.String suffix)
        Parameters:
        srvName - ...like "Ini"
        appName - ...application of the local path
        suffix - ....like ".xml"
      • calcLocalUserPrefPath

        public static final java.lang.String calcLocalUserPrefPath​(java.lang.String srvName,
                                                                   java.lang.String appName,
                                                                   java.lang.String suffix)
        Parameters:
        srvName - ...like "Ini"
        appName - ...application of the local path
        suffix - ....like ".xml"
      • calcLocalPath

        public static final java.lang.String calcLocalPath​(java.lang.String srvName,
                                                           java.lang.String appName,
                                                           java.lang.String fileName,
                                                           java.lang.String suffix)
        Parameters:
        srvName - ...like "Ini"
        appName - ...application name for the path
        fileName - ...name of the file without path and suffix, like "mySpecialData"
        suffix - ...like ".xml"
      • calcLocalDirectory

        public static java.lang.String calcLocalDirectory​(java.lang.String srvName,
                                                          java.lang.String appName)
        Parameters:
        srvName - ...like "Ini"
        appName - ...application name for the path
        Returns:
        the complete path to directory
      • tryToCreateAllParentDirs

        public static void tryToCreateAllParentDirs​(java.lang.String lokalesVerz)
        Parameters:
        lokalesVerz -
      • initAndRegisterJMenuForAllowLocalHome

        public static void initAndRegisterJMenuForAllowLocalHome​(javax.swing.JMenu menuParent)
        Parameters:
        menuParent - unter diesem Menu richtet sich das Local Home ein
      • askTheUser

        public static final java.lang.String askTheUser​(java.lang.String defaultHome)