ref 12119:AccountingDashboard - Create a new Accounting Dashboard
https://support.d4science.org/issues/12119 Updated Tree git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/accounting-dashboard@169714 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
bc89cfa1de
commit
4dc461cfac
10
pom.xml
10
pom.xml
|
@ -225,6 +225,8 @@
|
|||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<!-- Authorization -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.common</groupId>
|
||||
|
@ -252,6 +254,14 @@
|
|||
<version>[0.0.1-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Portal Service -->
|
||||
<dependency>
|
||||
<groupId>com.liferay.portal</groupId>
|
||||
<artifactId>portal-service</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- LOGGING -->
|
||||
<dependency>
|
||||
<groupId>com.allen-sauer.gwt.log</groupId>
|
||||
|
|
|
@ -67,7 +67,7 @@ public class AccountingDashboardServiceImpl extends RemoteServiceServlet impleme
|
|||
@SuppressWarnings("unused")
|
||||
ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(this.getThreadLocalRequest());
|
||||
AccountingService as = new AccountingService(AccountingServiceType.PortalContex);
|
||||
ScopeData scopeData = as.getTree();
|
||||
ScopeData scopeData = as.getTree(this.getThreadLocalRequest());
|
||||
|
||||
return scopeData;
|
||||
} catch (ServiceException e) {
|
||||
|
|
|
@ -2,6 +2,8 @@ package org.gcube.portlets.user.accountingdashboard.server.accounting;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.gcube.data.access.accounting.summary.access.AccountingDao;
|
||||
import org.gcube.data.access.accounting.summary.access.model.ScopeDescriptor;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.data.ScopeData;
|
||||
|
@ -48,10 +50,10 @@ public class AccountingService {
|
|||
|
||||
}
|
||||
|
||||
public ScopeData getTree() throws ServiceException {
|
||||
public ScopeData getTree(HttpServletRequest httpServletRequest) throws ServiceException {
|
||||
try {
|
||||
logger.debug("AccountingService GetTree()");
|
||||
ScopeDescriptor scopeDescriptor = dao.getTree(null);
|
||||
ScopeDescriptor scopeDescriptor = dao.getTree(httpServletRequest);
|
||||
logger.debug("ScopeDescriptor: " + scopeDescriptor);
|
||||
ScopeData scopeData = getScopeData(scopeDescriptor);
|
||||
return scopeData;
|
||||
|
|
|
@ -14,8 +14,6 @@ import org.gcube.common.portal.PortalContext;
|
|||
import org.gcube.data.access.accounting.summary.access.impl.ContextTreeProvider;
|
||||
import org.gcube.data.access.accounting.summary.access.model.ScopeDescriptor;
|
||||
import org.gcube.vomanagement.usermanagement.GroupManager;
|
||||
import org.gcube.vomanagement.usermanagement.exception.GroupRetrievalFault;
|
||||
import org.gcube.vomanagement.usermanagement.exception.UserManagementSystemException;
|
||||
import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager;
|
||||
import org.gcube.vomanagement.usermanagement.model.GCubeGroup;
|
||||
import org.gcube.vomanagement.usermanagement.model.GCubeUser;
|
||||
|
@ -113,6 +111,7 @@ public class PortalContextTreeProvider implements ContextTreeProvider {
|
|||
}
|
||||
PortalContext pContext = PortalContext.getConfiguration();
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
List<GCubeGroup> currUserGroups = new ArrayList<GCubeGroup>();
|
||||
GCubeUser currUser = pContext.getCurrentUser(request);
|
||||
if (currUser != null) {
|
||||
|
|
|
@ -28,7 +28,7 @@ public class AccountingServiceTest extends TestCase {
|
|||
try {
|
||||
AuthTest.setToken();
|
||||
AccountingService accountingService = new AccountingService(AccountingServiceType.CurrentScope);
|
||||
accountingService.getTree();
|
||||
//accountingService.getTree();
|
||||
|
||||
assertTrue("Success", true);
|
||||
} catch (Throwable e) {
|
||||
|
|
Loading…
Reference in New Issue