not throwing Liferay exception on public method fixed, catching them
git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portal/portal-manager@128231 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
78c6497969
commit
75905b622d
|
@ -106,8 +106,8 @@ public class PortalContext {
|
|||
}
|
||||
/**
|
||||
*
|
||||
* @deprecated use getConfiguration().getGatewayName() method
|
||||
* read the portal instance name from a property file and returns it
|
||||
* @deprecated use getConfiguration().getGatewayName() method
|
||||
* read the portal instance name from a property file and returns it
|
||||
*/
|
||||
@Deprecated
|
||||
public static String getPortalInstanceName() {
|
||||
|
@ -140,7 +140,7 @@ public class PortalContext {
|
|||
try {
|
||||
CompanyLocalServiceUtil.getCompany(defaultCompanyId);
|
||||
|
||||
return PortalUtil.getPortalURL(CompanyLocalServiceUtil.getCompany(defaultCompanyId).getVirtualHostname(), 443, true);
|
||||
return PortalUtil.getPortalURL(CompanyLocalServiceUtil.getCompany(defaultCompanyId).getVirtualHostname(), 443, true);
|
||||
} catch (PortalException e) {
|
||||
e.printStackTrace();
|
||||
} catch (SystemException e) {
|
||||
|
@ -155,13 +155,18 @@ public class PortalContext {
|
|||
* @throws PortalException
|
||||
* @throws SystemException
|
||||
*/
|
||||
public String getSiteLandingPagePath(final HttpServletRequest request) throws PortalException, SystemException {
|
||||
public String getSiteLandingPagePath(final HttpServletRequest request) {
|
||||
String sitePath = StringPool.BLANK;
|
||||
Group site = getSiteFromServletRequest(request);
|
||||
if (site.getPrivateLayoutsPageCount() > 0) {
|
||||
sitePath = getGroupFriendlyURL(request, site);
|
||||
} else {
|
||||
_log.debug(site.getName() + " site doesn't have any private page. Default landing page will be used");
|
||||
Group site;
|
||||
try {
|
||||
site = getSiteFromServletRequest(request);
|
||||
if (site.getPrivateLayoutsPageCount() > 0) {
|
||||
sitePath = getGroupFriendlyURL(request, site);
|
||||
} else {
|
||||
_log.debug(site.getName() + " site doesn't have any private page. Default landing page will be used");
|
||||
}
|
||||
}catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return sitePath;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue