From 93fdce97c50d31479d6a532adaa94f5bd9f44181 Mon Sep 17 00:00:00 2001 From: Massimiliano Assante Date: Thu, 28 Jul 2016 10:48:27 +0000 Subject: [PATCH] removed liferay exceptions causing classnotfound exceptions git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portal/portal-manager@130881 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../org/gcube/common/portal/PortalContext.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/gcube/common/portal/PortalContext.java b/src/main/java/org/gcube/common/portal/PortalContext.java index 7cf8453..ee20889 100644 --- a/src/main/java/org/gcube/common/portal/PortalContext.java +++ b/src/main/java/org/gcube/common/portal/PortalContext.java @@ -14,8 +14,6 @@ import org.gcube.vomanagement.usermanagement.model.CustomAttributeKeys; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.util.StringBundler; import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.model.Group; @@ -152,11 +150,9 @@ public class PortalContext { CompanyLocalServiceUtil.getCompany(defaultCompanyId); return PortalUtil.getPortalURL(CompanyLocalServiceUtil.getCompany(defaultCompanyId).getVirtualHostname(), 443, true); - } catch (PortalException e) { + } catch (Exception e) { e.printStackTrace(); - } catch (SystemException e) { - e.printStackTrace(); - } + } return ""; } /** @@ -210,7 +206,7 @@ public class PortalContext { * @throws PortalException * @throws SystemException */ - private Group getSiteFromServletRequest(final HttpServletRequest request) throws PortalException, SystemException { + private Group getSiteFromServletRequest(final HttpServletRequest request) throws Exception { String serverName = request.getServerName(); Group site = null; List vHosts = VirtualHostLocalServiceUtil.getVirtualHosts(0, VirtualHostLocalServiceUtil.getVirtualHostsCount()); @@ -233,7 +229,7 @@ public class PortalContext { * @throws PortalException * @throws SystemException */ - private Group getSiteFromServerName(final String serverName) throws PortalException, SystemException { + private Group getSiteFromServerName(final String serverName) throws Exception { _log.debug("serverName passed is " + serverName); Group site = null; List vHosts = VirtualHostLocalServiceUtil.getVirtualHosts(0, VirtualHostLocalServiceUtil.getVirtualHostsCount()); @@ -260,7 +256,7 @@ public class PortalContext { * @throws SystemException */ @Deprecated - private static String getGroupFriendlyURL(HttpServletRequest request, final Group currentGroup) throws PortalException, SystemException { + private static String getGroupFriendlyURL(HttpServletRequest request, final Group currentGroup) throws Exception { String friendlyURL = GCubePortalConstants.PREFIX_GROUP_URL; StringBundler sb = new StringBundler(); sb.append(friendlyURL).append(currentGroup.getFriendlyURL()); @@ -275,7 +271,7 @@ public class PortalContext { * @throws PortalException * @throws SystemException */ - private static String getGroupFriendlyURL(final Group currentGroup) throws PortalException, SystemException { + private static String getGroupFriendlyURL(final Group currentGroup) throws Exception { String friendlyURL = GCubePortalConstants.PREFIX_GROUP_URL; StringBundler sb = new StringBundler(); sb.append(friendlyURL).append(currentGroup.getFriendlyURL());