Class ChangeHistoryUtil


  • public class ChangeHistoryUtil
    extends Object
    Utility class for working with change history.
    Version:
    2.13
    Author:
    Nicklas
    Last modified
    $Date: 2009-08-21 12:15:11 +0200 (fr, 21 aug 2009) $
    • Constructor Detail

      • ChangeHistoryUtil

        private ChangeHistoryUtil()
    • Method Detail

      • showChangeHistoryTab

        public static final boolean showChangeHistoryTab​(SessionControl sc)
        Check if the "Change history" tab should be visible for the current user or not. The tab is visible if change history logging has been enabled by the administrator and if the current user has READ permission for CHANGEHISTORY.
        Parameters:
        sc - The current session control
        Returns:
        TRUE if the tab should be visible, FALSE otherwise
      • getItem

        public static String getItem​(DbControl dc,
                                     ChangeHistory ch,
                                     boolean link,
                                     boolean editLink)
        Get the item that was changed in HTML format.
        Parameters:
        dc - A DbControl for database access
        ch - The change history entry
        link - TRUE to link the name to the view page
        editLink - TRUE to enable CTRL/ALT/SHIFT-click for editing
        Returns:
        A HTML string
      • getUser

        public static String getUser​(DbControl dc,
                                     ChangeHistory ch,
                                     boolean link,
                                     boolean editLink)
        Get the user that made the change in HTML format.
        Parameters:
        dc - A DbControl for database access
        ch - The change history entry
        link - TRUE to link the name to theview page
        editLink - TRUE to enable CTRL/ALT/SHIFT-click for editing
        Returns:
        A HTML string
      • getSession

        public static String getSession​(DbControl dc,
                                        ChangeHistory ch,
                                        boolean link,
                                        boolean editLink)
        Get the session in which the changes was made in HTML format.
        Parameters:
        dc - A DbControl for database access
        ch - The change history entry
        link - TRUE to link the name to theview page
        editLink - TRUE to enable CTRL/ALT/SHIFT-click for editing
        Returns:
        A HTML string
      • getClient

        public static String getClient​(DbControl dc,
                                       ChangeHistory ch,
                                       boolean link,
                                       boolean editLink)
        Get the client application that was used to make the change in HTML format.
        Parameters:
        dc - A DbControl for database access
        ch - The change history entry
        link - TRUE to link the name to theview page
        editLink - TRUE to enable CTRL/ALT/SHIFT-click for editing
        Returns:
        A HTML string
      • getProject

        public static String getProject​(DbControl dc,
                                        ChangeHistory ch,
                                        boolean link,
                                        boolean editLink)
        Get the project that was active when the change was made in HTML format.
        Parameters:
        dc - A DbControl for database access
        ch - The change history entry
        link - TRUE to link the name to theview page
        editLink - TRUE to enable CTRL/ALT/SHIFT-click for editing
        Returns:
        A HTML string
      • getPlugin

        public static String getPlugin​(DbControl dc,
                                       ChangeHistory ch,
                                       boolean link,
                                       boolean editLink)
        Get the plug-in that made the change in HTML format.
        Parameters:
        dc - A DbControl for database access
        ch - The change history entry
        link - TRUE to link the name to theview page
        editLink - TRUE to enable CTRL/ALT/SHIFT-click for editing
        Returns:
        A HTML string
      • getJob

        public static String getJob​(DbControl dc,
                                    ChangeHistory ch,
                                    boolean link,
                                    boolean editLink)
        Get the job that made the change in HTML format.
        Parameters:
        dc - A DbControl for database access
        ch - The change history entry
        link - TRUE to link the name to theview page
        editLink - TRUE to enable CTRL/ALT/SHIFT-click for editing
        Returns:
        A HTML string
      • getLink

        private static String getLink​(String ID,
                                      Nameable item,
                                      Integer itemId,
                                      boolean denied,
                                      boolean notFound,
                                      boolean link,
                                      boolean editLink)