Class ProjectControllerUtils


  • @Component
    public class ProjectControllerUtils
    extends java.lang.Object
    Common functions for project related controllers
    • Method Detail

      • getProjectTemplateDetails

        public void getProjectTemplateDetails​(org.springframework.ui.Model model,
                                              java.security.Principal principal,
                                              Project project)
        Adds to the current view model default template information:
        • Sidebar Information
        • If the current user is an admin
        Parameters:
        model - Model for the current view.
        principal - Principal currently logged in user.
        project - current project viewed.
      • getTemplateNames

        public java.util.List<java.util.Map<java.lang.String,​java.lang.String>> getTemplateNames​(java.util.Locale locale,
                                                                                                       Project project)
        Get a List of MetadataTemplates available for the current Project
        Parameters:
        locale - Locale users current locale
        project - Project the project to get MetadataTemplates for
        Returns:
        List of MetadataTemplate