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 Description static StringDEFAULT_COMPANY_WEB_IDstatic StringROOT_ORG
-
Constructor Summary
Constructors Constructor Description SiteManagerUtil()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddUserToGroup(long groupid, String username)static longcreateLayout(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.CompanygetCompany()return the companyIdstatic StringgetDefaultCompanyWebId()List<GCUBEPortlet>getDefaultPortlets()static StringgetgCubeThemeId(String themeid)get the themes id for from the property filestatic StringgetRootOrganizationName()read the root VO name from a property file and retuns itstatic StringgetTomcatFolder()protected List<GCUBEPortlet>getVREBelongingPortlets(List<String> belongingPorltets)static com.liferay.portal.model.UservalidateUser(String username)check if the user exists in the database and has AuthZ to perform the operation
-
-
-
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
-
-
Method Detail
-
getCompany
public static com.liferay.portal.model.Company getCompany() throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemExceptionreturn 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- seeorg.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.SystemExceptioncom.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.SystemExceptionUse 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 organizationusername-- Returns:
-
getRootOrganizationName
public static String getRootOrganizationName()
read the root VO name from a property file and retuns it
-
-