SiteManagerUtil (Custom Portal Handler 2.1.0-4.2.0-131316 API)
Date: 2016-12-14

org.gcube.portal.custom.communitymanager

## Class SiteManagerUtil

- java.lang.Object
- - org.gcube.portal.custom.communitymanager.SiteManagerUtil

- Direct Known Subclasses:
    GCubeSiteManagerImpl

      public class SiteManagerUtil
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_COMPANY_WEB_ID`
    `static String` | `ROOT_ORG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SiteManagerUtil()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addUserToGroup(long groupid, String username)`
    `static long` | `createLayout(com.liferay.portal.model.Group group, com.liferay.portal.model.User user, GCUBESiteLayout siteLayout)` Use this method to associate a layout to a Group (whether organization or community)
    `static com.liferay.portal.model.Company` | `getCompany()` return the companyId
    `static String` | `getDefaultCompanyWebId()`
    `List<GCUBEPortlet>` | `getDefaultPortlets()`
    `static String` | `getgCubeThemeId(String themeid)` get the themes id for from the property file
    `static String` | `getRootOrganizationName()` read the root VO name from a property file and retuns it
    `static String` | `getTomcatFolder()`
    `protected List<GCUBEPortlet>` | `getVREBelongingPortlets(List<String> belongingPorltets)`
    `static com.liferay.portal.model.User` | `validateUser(String username)` check if the user exists in the database and has AuthZ to perform the operation

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_COMPANY_WEB_ID

          public static final String DEFAULT_COMPANY_WEB_ID

      See Also:
        Constant Field Values

    - #### ROOT_ORG

          public static final String ROOT_ORG

      See Also:
        Constant Field Values

  - ### 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

    - #### getVREBelongingPortlets

          protected List<GCUBEPortlet> getVREBelongingPortlets(List<String> belongingPorltets)

      Returns:
        -

    - #### 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

Copyright © 2016. All Rights Reserved.