Class DerbyManager

    • Method Detail

      • checkServerConnection

        public boolean checkServerConnection()
        Returns true if the connections with Derby can be established.
        Returns:
        true if the connections with Derby can be established.
        Since:
        jcms-7.0.0
      • getDerbyPath

        public java.lang.String getDerbyPath()
      • getJdbcUrl

        public java.lang.String getJdbcUrl()
        Returns the JDBC URL to access the internal Derby Server.
        Returns:
        the JDBC URL to access the internal Derby Server.
        Since:
        jcms-6.0.0
      • isServerStarted

        public boolean isServerStarted()
        Returns true if internal Derby server has been started.
        Returns:
        true if internal Derby server has been started.
        Since:
        jcms-6.0.0
      • getServerPort

        public int getServerPort()
        Returns the port of the Derby server.
        Returns:
        the port of the Derby server.
        Since:
        jcms-6.0.0
      • isBackupEnabled

        public boolean isBackupEnabled()
        Returns true if the backup is enabled.
        Returns:
        true if the backup is enabled.
        Since:
        jcms-6.0.0
      • getBackupSchedule

        public java.lang.String getBackupSchedule()
        Returns the backup schedule (JDring/cron syntax).
        Returns:
        the backup schedule.
        Since:
        jcms-6.0.0
      • getBackupDir

        public java.io.File getBackupDir()
        Returns the backup directory.
        Returns:
        the backup directory.
        Since:
        jcms-6.0.0
      • getSysInfo

        public java.lang.String getSysInfo()
        Returns information about the running Derby Server.
        Returns:
        information about the running Derby Server.
        Since:
        jcms-6.0.0
      • getRuntimeInfo

        public java.lang.String getRuntimeInfo()
        Returns runtime information about the running Derby Server.
        Returns:
        runtime information about the running Derby Server.
        Since:
        jcms-6.0.0
      • freezeDatabase

        public void freezeDatabase()
        Freezes the database.
        Since:
        jcms-6.0.0
      • unfreezeDatabase

        public void unfreezeDatabase()
        Unfreezes the database.
        Since:
        jcms-6.0.0
      • backupDatabase

        public void backupDatabase​(java.lang.String backupdirectory)
        Backups the database.
        Parameters:
        backupdirectory - the path of the backup directory
        Since:
        jcms-6.0.0
      • shutdown

        public void shutdown()
        Shutdown the internal Derby server
        Since:
        jcms-6.0.0
      • performBackup

        public void performBackup()
        Performs a backup of the database and save the backup as a zip file in the backup directory.
        Since:
        jcms-6.0.0
      • initAfterStoreLoad

        public void initAfterStoreLoad()
                                throws java.lang.Exception
        Description copied from class: ChannelListener
        Called just after the store has been loaded and the channel has been initialized. If for any reason you want to interrupt JCMS startup, you can throw an exception. The exception's message will be displayed in JCMS status page (to any user!).
        Overrides:
        initAfterStoreLoad in class ChannelListener
        Throws:
        java.lang.Exception - any exception you may want to throw if a problem occurs needing to interrupt JCMS startup.
      • initBeforeStoreLoad

        public void initBeforeStoreLoad()
                                 throws java.lang.Exception
        Description copied from class: ChannelListener
        Called just before the store has been loaded. If for any reason you want to interrupt JCMS startup, you can throw an exception. The exception's message will be displayed in JCMS status page (to any user!).
        Overrides:
        initBeforeStoreLoad in class ChannelListener
        Throws:
        java.lang.Exception - any exception you may want to throw if a problem occurs needing to interrupt JCMS startup.