Class SiteManagerUtil

    • Constructor Detail

      • SiteManagerUtil

        public SiteManagerUtil()
    • Method Detail

      • getCompany

        public static com.liferay.portal.model.Company getCompany()
                                                           throws com.liferay.portal.kernel.exception.PortalException,
                                                                  com.liferay.portal.kernel.exception.SystemException
        return the companyId
        Parameters:
        webId - .
        Returns:
        the company bean
        Throws:
        com.liferay.portal.kernel.exception.PortalException - .
        com.liferay.portal.kernel.exception.SystemException - .
      • getDefaultCompanyWebId

        public static String getDefaultCompanyWebId()
        Returns:
        the default company web-id (e.g. iMarine.eu)
      • getTomcatFolder

        public static String getTomcatFolder()
        Returns:
        $CATALINA_HOME
      • getgCubeThemeId

        public static String getgCubeThemeId​(String themeid)
        get the themes id for from the property file
        Parameters:
        themeid - see org.gcube.portal.custom.communitymanager.ThemesIdManager
        Returns:
        the themeid for LR
      • getDefaultPortlets

        public List<GCUBEPortlet> getDefaultPortlets()
        Returns:
        the default template for a community (just one Tab)
      • validateUser

        public static com.liferay.portal.model.User validateUser​(String username)
                                                          throws com.liferay.portal.kernel.exception.PortalException,
                                                                 com.liferay.portal.kernel.exception.SystemException
        check if the user exists in the database and has AuthZ to perform the operation
        Returns:
        Throws:
        com.liferay.portal.kernel.exception.SystemException
        com.liferay.portal.kernel.exception.PortalException
      • createLayout

        public static long createLayout​(com.liferay.portal.model.Group group,
                                        com.liferay.portal.model.User user,
                                        GCUBESiteLayout siteLayout)
                                 throws com.liferay.portal.kernel.exception.PortalException,
                                        com.liferay.portal.kernel.exception.SystemException
        Use this method to associate a layout to a Group (whether organization or community)
        Parameters:
        group - .
        user - .
        siteLayout - .
        Returns:
        the layoutid of the yet created layout
        Throws:
        com.liferay.portal.kernel.exception.PortalException - .
        com.liferay.portal.kernel.exception.SystemException - .
      • addUserToGroup

        public boolean addUserToGroup​(long groupid,
                                      String username)
        Parameters:
        groupid - the groupid of the organization
        username -
        Returns:
      • getRootOrganizationName

        public static String getRootOrganizationName()
        read the root VO name from a property file and retuns it