ref 17847: Updated to support accounting data visualization at the
infrastructure level
This commit is contained in:
parent
7406fa24c3
commit
6d43214019
|
@ -1,12 +1,12 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry including="**/*.java" kind="src" output="target/accounting-dashboard-1.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
<classpathentry including="**/*.java" kind="src" output="target/accounting-dashboard-1.1.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry excluding="**" kind="src" output="target/accounting-dashboard-1.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
<classpathentry excluding="**" kind="src" output="target/accounting-dashboard-1.1.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
|
@ -50,5 +50,5 @@
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.8.2/validation-api-1.0.0.GA.jar" sourcepath="/home/giancarlo/gwt/gwt-2.8.2/validation-api-1.0.0.GA-sources.jar"/>
|
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.8.2/validation-api-1.0.0.GA.jar" sourcepath="/home/giancarlo/gwt/gwt-2.8.2/validation-api-1.0.0.GA-sources.jar"/>
|
||||||
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.8.2/validation-api-1.0.0.GA-sources.jar"/>
|
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.8.2/validation-api-1.0.0.GA-sources.jar"/>
|
||||||
<classpathentry kind="output" path="target/accounting-dashboard-1.0.0-SNAPSHOT/WEB-INF/classes"/>
|
<classpathentry kind="output" path="target/accounting-dashboard-1.1.0-SNAPSHOT/WEB-INF/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
/target/
|
/target/
|
||||||
|
/test.log
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||||
<wb-module deploy-name="accounting-dashboard-1.0.0-SNAPSHOT">
|
<wb-module deploy-name="accounting-dashboard-1.1.0-SNAPSHOT">
|
||||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
<ReleaseNotes>
|
<ReleaseNotes>
|
||||||
<Changeset component="org.gcube.portlets.user.accounting-dashboard.1-0-0" date="2018-08-01">
|
<Changeset component="org.gcube.portlets.user.accounting-dashboard.1-1-0"
|
||||||
|
date="2019-10-01">
|
||||||
|
<Change>Updated to support accounting data visualization at the
|
||||||
|
infrastructure level [ticket #17847]</Change>
|
||||||
|
</Changeset>
|
||||||
|
<Changeset component="org.gcube.portlets.user.accounting-dashboard.1-0-0"
|
||||||
|
date="2018-08-01">
|
||||||
<Change>First Release</Change>
|
<Change>First Release</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
</ReleaseNotes>
|
</ReleaseNotes>
|
2
pom.xml
2
pom.xml
|
@ -13,7 +13,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.gcube.portlets.user</groupId>
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
<artifactId>accounting-dashboard</artifactId>
|
<artifactId>accounting-dashboard</artifactId>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.1.0-SNAPSHOT</version>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<name>accounting-dashboard</name>
|
<name>accounting-dashboard</name>
|
||||||
|
|
|
@ -105,7 +105,11 @@ public class AccountingDashboardServiceImpl extends RemoteServiceServlet impleme
|
||||||
if (scopeBean.is(Type.VRE)) {
|
if (scopeBean.is(Type.VRE)) {
|
||||||
return AccountingServiceType.CurrentScope;
|
return AccountingServiceType.CurrentScope;
|
||||||
} else {
|
} else {
|
||||||
return AccountingServiceType.PortalContex;
|
if (scopeBean.is(Type.VO)) {
|
||||||
|
return AccountingServiceType.PortalContex;
|
||||||
|
} else {
|
||||||
|
return AccountingServiceType.Infrastructure;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("getAccountingContext(): " + e.getLocalizedMessage(), e);
|
logger.error("getAccountingContext(): " + e.getLocalizedMessage(), e);
|
||||||
|
|
|
@ -48,7 +48,11 @@ public class AccountingService {
|
||||||
break;
|
break;
|
||||||
case PortalContex:
|
case PortalContex:
|
||||||
logger.debug("AccountingService: PortalContext");
|
logger.debug("AccountingService: PortalContext");
|
||||||
dao = AccountingDao.get(new PortalContextTreeProvider());
|
dao = AccountingDao.get(new PortalContextTreeProvider(accountingServiceType));
|
||||||
|
break;
|
||||||
|
case Infrastructure:
|
||||||
|
logger.debug("AccountingService: Infrastructure");
|
||||||
|
dao = AccountingDao.get(new PortalContextTreeProvider(accountingServiceType));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
logger.debug("AccountingService: CurrentScope");
|
logger.debug("AccountingService: CurrentScope");
|
||||||
|
|
|
@ -7,6 +7,6 @@ package org.gcube.portlets.user.accountingdashboard.server.accounting;
|
||||||
*/
|
*/
|
||||||
public enum AccountingServiceType {
|
public enum AccountingServiceType {
|
||||||
|
|
||||||
PortalContex, CurrentScope;
|
Infrastructure, PortalContex, CurrentScope;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,10 +9,10 @@ import java.util.Map.Entry;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import org.gcube.common.portal.GCubePortalConstants;
|
|
||||||
import org.gcube.common.portal.PortalContext;
|
|
||||||
import org.gcube.accounting.accounting.summary.access.impl.ContextTreeProvider;
|
import org.gcube.accounting.accounting.summary.access.impl.ContextTreeProvider;
|
||||||
import org.gcube.accounting.accounting.summary.access.model.ScopeDescriptor;
|
import org.gcube.accounting.accounting.summary.access.model.ScopeDescriptor;
|
||||||
|
import org.gcube.common.portal.GCubePortalConstants;
|
||||||
|
import org.gcube.common.portal.PortalContext;
|
||||||
import org.gcube.vomanagement.usermanagement.GroupManager;
|
import org.gcube.vomanagement.usermanagement.GroupManager;
|
||||||
import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager;
|
import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager;
|
||||||
import org.gcube.vomanagement.usermanagement.model.GCubeGroup;
|
import org.gcube.vomanagement.usermanagement.model.GCubeGroup;
|
||||||
|
@ -28,11 +28,21 @@ import com.liferay.portal.model.VirtualHost;
|
||||||
import com.liferay.portal.service.LayoutSetLocalServiceUtil;
|
import com.liferay.portal.service.LayoutSetLocalServiceUtil;
|
||||||
import com.liferay.portal.service.VirtualHostLocalServiceUtil;
|
import com.liferay.portal.service.VirtualHostLocalServiceUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Giancarlo Panichi
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class PortalContextTreeProvider implements ContextTreeProvider {
|
public class PortalContextTreeProvider implements ContextTreeProvider {
|
||||||
|
|
||||||
private static GroupManager groupsManager;
|
private static GroupManager groupsManager;
|
||||||
|
|
||||||
private static Logger log = LoggerFactory.getLogger(PortalContextTreeProvider.class);
|
private static Logger logger = LoggerFactory.getLogger(PortalContextTreeProvider.class);
|
||||||
|
private AccountingServiceType accountingServiceType;
|
||||||
|
|
||||||
|
public PortalContextTreeProvider(AccountingServiceType accountingServiceType) {
|
||||||
|
this.accountingServiceType = accountingServiceType;
|
||||||
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
groupsManager = new LiferayGroupManager();
|
groupsManager = new LiferayGroupManager();
|
||||||
|
@ -44,12 +54,93 @@ public class PortalContextTreeProvider implements ContextTreeProvider {
|
||||||
throw new Exception("Unable to get tree, Request is null.");
|
throw new Exception("Unable to get tree, Request is null.");
|
||||||
if (!(context instanceof HttpServletRequest))
|
if (!(context instanceof HttpServletRequest))
|
||||||
throw new Exception("Invalid request object : " + context);
|
throw new Exception("Invalid request object : " + context);
|
||||||
|
|
||||||
HttpServletRequest request = (HttpServletRequest) context;
|
HttpServletRequest request = (HttpServletRequest) context;
|
||||||
|
|
||||||
// PARSE TREE
|
if (accountingServiceType == null) {
|
||||||
LinkedHashMap<VRECategory, ArrayList<VRE>> gatewayTree = getPortalSitesMappedToVRE(request);
|
logger.error("Invalid AccountingServiceType requested: null");
|
||||||
|
}
|
||||||
|
|
||||||
log.debug("Parsing tree from gateway. Size {} ", gatewayTree.size());
|
ScopeDescriptor root = null;
|
||||||
|
switch (accountingServiceType) {
|
||||||
|
case CurrentScope:
|
||||||
|
logger.debug("AccountingService: CurrentScope");
|
||||||
|
break;
|
||||||
|
case PortalContex:
|
||||||
|
logger.debug("AccountingService: PortalContext");
|
||||||
|
root = recreateTreeForPortalContext(request);
|
||||||
|
break;
|
||||||
|
case Infrastructure:
|
||||||
|
logger.debug("AccountingService: Infrastructure");
|
||||||
|
root = recreateTreeForInfrastructure(request);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
logger.debug("AccountingService: CurrentScope");
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return root;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ScopeDescriptor recreateTreeForInfrastructure(HttpServletRequest request)
|
||||||
|
throws Exception, PortalException, SystemException {
|
||||||
|
ScopeDescriptor infra = null;
|
||||||
|
PortalContext portalContext = PortalContext.getConfiguration();
|
||||||
|
String infrastructureName = portalContext.getInfrastructureName();
|
||||||
|
String infrastructureScope = portalContext.getCurrentScope(request);
|
||||||
|
infra = new ScopeDescriptor(infrastructureName, infrastructureScope);
|
||||||
|
|
||||||
|
LinkedList<ScopeDescriptor> infraChildren = new LinkedList<>();
|
||||||
|
PortalContext pContext = PortalContext.getConfiguration();
|
||||||
|
GCubeUser currUser = pContext.getCurrentUser(request);
|
||||||
|
|
||||||
|
List<GCubeGroup> theGateways = new LiferayGroupManager().getGateways();
|
||||||
|
for (GCubeGroup gCubeGroup : theGateways) {
|
||||||
|
logger.debug("Gateway: [id=" + gCubeGroup.getGroupId() + ", name=" + gCubeGroup.getGroupName() + "]");
|
||||||
|
}
|
||||||
|
for (GCubeGroup gCubeGroup : theGateways) {
|
||||||
|
logger.debug("Gateway: [id=" + gCubeGroup.getGroupId() + ", name=" + gCubeGroup.getGroupName() + "]");
|
||||||
|
|
||||||
|
LinkedList<ScopeDescriptor> gatewayChildren = retrieveGatewayChildren(request, gCubeGroup.getGroupId(),
|
||||||
|
currUser);
|
||||||
|
ScopeDescriptor gatewayScopeDescriptor = new ScopeDescriptor(gCubeGroup.getGroupName(),
|
||||||
|
gCubeGroup.getGroupId() + "");
|
||||||
|
gatewayScopeDescriptor.setChildren(gatewayChildren);
|
||||||
|
infraChildren.add(gatewayScopeDescriptor);
|
||||||
|
}
|
||||||
|
|
||||||
|
infra.setChildren(infraChildren);
|
||||||
|
return infra;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ScopeDescriptor recreateTreeForPortalContext(HttpServletRequest request)
|
||||||
|
throws Exception, PortalException, SystemException {
|
||||||
|
ScopeDescriptor root;
|
||||||
|
|
||||||
|
long currentSiteGroupId = getSiteFromServletRequest(request).getGroupId();
|
||||||
|
|
||||||
|
PortalContext pContext = PortalContext.getConfiguration();
|
||||||
|
GCubeUser currUser = pContext.getCurrentUser(request);
|
||||||
|
|
||||||
|
LinkedList<ScopeDescriptor> rootChildren = null;
|
||||||
|
rootChildren = retrieveGatewayChildren(request, currentSiteGroupId, currUser);
|
||||||
|
|
||||||
|
Group rootGroup = getSiteFromServletRequest(request);
|
||||||
|
root = new ScopeDescriptor(rootGroup.getDescriptiveName(), rootGroup.getGroupId() + "");
|
||||||
|
root.setChildren(rootChildren);
|
||||||
|
logger.debug("TREE IS {} ", root);
|
||||||
|
return root;
|
||||||
|
}
|
||||||
|
|
||||||
|
private LinkedList<ScopeDescriptor> retrieveGatewayChildren(HttpServletRequest request, long currentSiteGroupId,
|
||||||
|
GCubeUser currUser) throws Exception, PortalException, SystemException {
|
||||||
|
|
||||||
|
// PARSE TREE
|
||||||
|
LinkedHashMap<VRECategory, ArrayList<VRE>> gatewayTree = getPortalSitesMappedToVRE(currUser,
|
||||||
|
currentSiteGroupId);
|
||||||
|
|
||||||
|
logger.debug("Parsing tree from gateway. Size {} ", gatewayTree.size());
|
||||||
|
|
||||||
LinkedList<ScopeDescriptor> rootChildren = new LinkedList<>();
|
LinkedList<ScopeDescriptor> rootChildren = new LinkedList<>();
|
||||||
for (Entry<VRECategory, ArrayList<VRE>> entry : gatewayTree.entrySet()) {
|
for (Entry<VRECategory, ArrayList<VRE>> entry : gatewayTree.entrySet()) {
|
||||||
|
@ -59,12 +150,7 @@ public class PortalContextTreeProvider implements ContextTreeProvider {
|
||||||
rootChildren.add(rootChild);
|
rootChildren.add(rootChild);
|
||||||
}
|
}
|
||||||
|
|
||||||
Group rootGroup = getSiteFromServletRequest(request);
|
return rootChildren;
|
||||||
ScopeDescriptor root = new ScopeDescriptor(rootGroup.getDescriptiveName(), rootGroup.getGroupId() + "");
|
|
||||||
root.setChildren(rootChildren);
|
|
||||||
log.debug("TREE IS {} ", root);
|
|
||||||
|
|
||||||
return root;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -74,12 +160,11 @@ public class PortalContextTreeProvider implements ContextTreeProvider {
|
||||||
* @throws SystemException
|
* @throws SystemException
|
||||||
* @throws PortalException
|
* @throws PortalException
|
||||||
*/
|
*/
|
||||||
private LinkedHashMap<VRECategory, ArrayList<VRE>> getPortalSitesMappedToVRE(HttpServletRequest request)
|
private LinkedHashMap<VRECategory, ArrayList<VRE>> getPortalSitesMappedToVRE(GCubeUser currUser,
|
||||||
throws Exception {
|
long currentSiteGroupId) throws Exception {
|
||||||
|
|
||||||
LinkedHashMap<VRECategory, ArrayList<VRE>> toReturn = new LinkedHashMap<VRECategory, ArrayList<VRE>>();
|
LinkedHashMap<VRECategory, ArrayList<VRE>> toReturn = new LinkedHashMap<VRECategory, ArrayList<VRE>>();
|
||||||
|
|
||||||
long currentSiteGroupId = getSiteFromServletRequest(request).getGroupId();
|
|
||||||
List<VirtualGroup> currentSiteVGroups = groupsManager.getVirtualGroups(currentSiteGroupId);
|
List<VirtualGroup> currentSiteVGroups = groupsManager.getVirtualGroups(currentSiteGroupId);
|
||||||
|
|
||||||
for (VirtualGroup vg : currentSiteVGroups) {
|
for (VirtualGroup vg : currentSiteVGroups) {
|
||||||
|
@ -91,17 +176,16 @@ public class PortalContextTreeProvider implements ContextTreeProvider {
|
||||||
GCubeGroup rootGroupVO = groupsManager.getRootVO();
|
GCubeGroup rootGroupVO = groupsManager.getRootVO();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
log.debug("root: " + rootGroupVO.getGroupName());
|
logger.debug("root: " + rootGroupVO.getGroupName());
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
log.error(
|
logger.error(
|
||||||
"Cannot find root organziation, please check gcube-data.properties file in $CATALINA_HOME/conf folder, unless your installing the Bundle");
|
"Cannot find root organziation, please check gcube-data.properties file in $CATALINA_HOME/conf folder, unless your installing the Bundle");
|
||||||
return toReturn;
|
return toReturn;
|
||||||
}
|
}
|
||||||
PortalContext pContext = PortalContext.getConfiguration();
|
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
List<GCubeGroup> currUserGroups = new ArrayList<GCubeGroup>();
|
List<GCubeGroup> currUserGroups = new ArrayList<GCubeGroup>();
|
||||||
GCubeUser currUser = pContext.getCurrentUser(request);
|
|
||||||
if (currUser != null) {
|
if (currUser != null) {
|
||||||
currUserGroups = groupsManager.listGroupsByUser(currUser.getUserId());
|
currUserGroups = groupsManager.listGroupsByUser(currUser.getUserId());
|
||||||
}
|
}
|
||||||
|
@ -124,29 +208,7 @@ public class PortalContextTreeProvider implements ContextTreeProvider {
|
||||||
for (VRECategory vre : toReturn.keySet()) {
|
for (VRECategory vre : toReturn.keySet()) {
|
||||||
if (vre.getName().compareTo(vreGroup.getName()) == 0) {
|
if (vre.getName().compareTo(vreGroup.getName()) == 0) {
|
||||||
ArrayList<VRE> toUpdate = toReturn.get(vre);
|
ArrayList<VRE> toUpdate = toReturn.get(vre);
|
||||||
// UserBelonging belongs =
|
|
||||||
// UserBelonging.NOT_BELONGING;
|
|
||||||
// VRE toAdd = new VRE(vreID,vreName,
|
|
||||||
// vreDescription, vreLogoURL, groupName,
|
|
||||||
// friendlyURL, belongs,
|
|
||||||
// getVREMembershipType(vreSite.getMembershipType()));
|
|
||||||
VRE toAdd = new VRE(vreName, vreDescription, vreID, friendlyURL, infraScope);
|
VRE toAdd = new VRE(vreName, vreDescription, vreID, friendlyURL, infraScope);
|
||||||
// if
|
|
||||||
// (GroupLocalServiceUtil.getGroup(vreID).getPublicLayoutsPageCount()
|
|
||||||
// > 0) {
|
|
||||||
// String publicURL =
|
|
||||||
// PREFIX_PUBLIC_URL+vreSite.getFriendlyURL();
|
|
||||||
// toAdd.setPublicURL(publicURL);
|
|
||||||
// }
|
|
||||||
// if (currUser != null) {
|
|
||||||
// //check if the user belongs to it
|
|
||||||
// if (currUserGroups.contains(vreSite)) {
|
|
||||||
// toAdd.setUserBelonging(UserBelonging.BELONGING);
|
|
||||||
// }
|
|
||||||
// else if (checkPending(currUser.getUsername(),
|
|
||||||
// vreSite.getGroupId()))
|
|
||||||
// toAdd.setUserBelonging(UserBelonging.PENDING);
|
|
||||||
// }
|
|
||||||
toUpdate.add(toAdd);
|
toUpdate.add(toAdd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -164,17 +226,17 @@ public class PortalContextTreeProvider implements ContextTreeProvider {
|
||||||
|
|
||||||
private Group getSiteFromServletRequest(final HttpServletRequest request) throws PortalException, SystemException {
|
private Group getSiteFromServletRequest(final HttpServletRequest request) throws PortalException, SystemException {
|
||||||
String serverName = request.getServerName();
|
String serverName = request.getServerName();
|
||||||
log.debug("currentHost is " + serverName);
|
logger.debug("currentHost is " + serverName);
|
||||||
Group site = null;
|
Group site = null;
|
||||||
List<VirtualHost> vHosts = VirtualHostLocalServiceUtil.getVirtualHosts(0,
|
List<VirtualHost> vHosts = VirtualHostLocalServiceUtil.getVirtualHosts(0,
|
||||||
VirtualHostLocalServiceUtil.getVirtualHostsCount());
|
VirtualHostLocalServiceUtil.getVirtualHostsCount());
|
||||||
for (VirtualHost virtualHost : vHosts) {
|
for (VirtualHost virtualHost : vHosts) {
|
||||||
log.debug("Found " + virtualHost.getHostname());
|
logger.debug("Found " + virtualHost.getHostname());
|
||||||
if (virtualHost.getHostname().compareTo("localhost") != 0 && virtualHost.getLayoutSetId() != 0
|
if (virtualHost.getHostname().compareTo("localhost") != 0 && virtualHost.getLayoutSetId() != 0
|
||||||
&& virtualHost.getHostname().compareTo(serverName) == 0) {
|
&& virtualHost.getHostname().compareTo(serverName) == 0) {
|
||||||
long layoutSetId = virtualHost.getLayoutSetId();
|
long layoutSetId = virtualHost.getLayoutSetId();
|
||||||
site = LayoutSetLocalServiceUtil.getLayoutSet(layoutSetId).getGroup();
|
site = LayoutSetLocalServiceUtil.getLayoutSet(layoutSetId).getGroup();
|
||||||
log.debug("Found match! Your site is " + site.getName());
|
logger.debug("Found match! Your site is " + site.getName());
|
||||||
return site;
|
return site;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue