refs:4041: Accounting Manager portlet: give possibility to download raw data to users
https://support.d4science.org/issues/4041 Updated to Liferay 6.2 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/admin/accounting-manager@129389 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
4c413b970f
commit
cd8e818eba
|
@ -1,7 +1,8 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.portlets.admin.accounting-manager.1-3-0"
|
||||
date="2016-07-01">
|
||||
date="2016-07-15">
|
||||
<Change>Added CSV download [Ticket #4041]</Change>
|
||||
<Change>Updated to Liferay 6.2</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets.admin.accounting-manager.1-2-0"
|
||||
date="2016-05-01">
|
||||
|
|
|
@ -66,11 +66,14 @@ public class AccountingManagerServiceImpl extends RemoteServiceServlet
|
|||
try {
|
||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||
ASLSession aslSession = SessionUtil.getASLSession(session);
|
||||
String token=SessionUtil.getToken(aslSession);
|
||||
UserInfo userInfo = new UserInfo(aslSession.getUsername(),
|
||||
aslSession.getGroupId(), aslSession.getGroupName(),
|
||||
aslSession.getScope(), aslSession.getScopeName(),
|
||||
aslSession.getUserEmailAddress(),
|
||||
aslSession.getUserFullName());
|
||||
logger.debug("UserInfo: "+userInfo);
|
||||
logger.debug("UserToken: "+token);
|
||||
return userInfo;
|
||||
} catch (ServiceException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -92,7 +95,10 @@ public class AccountingManagerServiceImpl extends RemoteServiceServlet
|
|||
SeriesRequest seriesRequest) throws ServiceException {
|
||||
try {
|
||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||
SessionUtil.getASLSession(session);
|
||||
ASLSession aslSession = SessionUtil.getASLSession(session);
|
||||
String token=SessionUtil.getToken(aslSession);
|
||||
logger.debug("UserToken: "+token);
|
||||
|
||||
AccountingCallerInterface accountingCaller;
|
||||
if (Constants.DEBUG_MODE) {
|
||||
accountingCaller = new AccountingCallerTester();
|
||||
|
@ -127,7 +133,10 @@ public class AccountingManagerServiceImpl extends RemoteServiceServlet
|
|||
throws ServiceException {
|
||||
try {
|
||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||
SessionUtil.getASLSession(session);
|
||||
ASLSession aslSession = SessionUtil.getASLSession(session);
|
||||
String token=SessionUtil.getToken(aslSession);
|
||||
logger.debug("UserToken: "+token);
|
||||
|
||||
AccountingCallerInterface accountingCaller;
|
||||
if (Constants.DEBUG_MODE) {
|
||||
accountingCaller = new AccountingCallerTester();
|
||||
|
@ -159,7 +168,9 @@ public class AccountingManagerServiceImpl extends RemoteServiceServlet
|
|||
FilterValuesRequest filterValuesRequest) throws ServiceException {
|
||||
try {
|
||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||
SessionUtil.getASLSession(session);
|
||||
ASLSession aslSession = SessionUtil.getASLSession(session);
|
||||
String token=SessionUtil.getToken(aslSession);
|
||||
logger.debug("UserToken: "+token);
|
||||
|
||||
AccountingCallerInterface accountingCaller;
|
||||
if (Constants.DEBUG_MODE) {
|
||||
|
@ -189,6 +200,8 @@ public class AccountingManagerServiceImpl extends RemoteServiceServlet
|
|||
try {
|
||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||
ASLSession aslSession = SessionUtil.getASLSession(session);
|
||||
String token=SessionUtil.getToken(aslSession);
|
||||
logger.debug("UserToken: "+token);
|
||||
|
||||
logger.debug("SaveDataOnWorkspace(): " + accountingType);
|
||||
AccountingStateData accountingStateData = SessionUtil
|
||||
|
@ -218,6 +231,9 @@ public class AccountingManagerServiceImpl extends RemoteServiceServlet
|
|||
try {
|
||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||
ASLSession aslSession = SessionUtil.getASLSession(session);
|
||||
String token=SessionUtil.getToken(aslSession);
|
||||
logger.debug("UserToken: "+token);
|
||||
|
||||
logger.debug("GetPublicLink(): " + itemDescription);
|
||||
String link = StorageUtil.getPublicLink(aslSession.getUsername(),
|
||||
itemDescription.getId());
|
||||
|
|
|
@ -80,8 +80,18 @@ public class ExportServlet extends HttpServlet {
|
|||
}
|
||||
logger.debug("ExportServlet session id: " + session.getId());
|
||||
|
||||
ASLSession aslSession = SessionUtil.getASLSession(session);
|
||||
ASLSession aslSession;
|
||||
try {
|
||||
aslSession = SessionUtil.getASLSession(session);
|
||||
String token = SessionUtil.getToken(aslSession);
|
||||
logger.debug("UserToken: " + token);
|
||||
|
||||
} catch (ServiceException e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
e.printStackTrace();
|
||||
throw new ServletException(e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
String exportType = request.getParameter(Constants.EXPORT_SERVLET_TYPE_PARAMETER);
|
||||
String accountingType = request.getParameter(Constants.EXPORT_SERVLET_ACCOUNTING_TYPE_PARAMETER);
|
||||
|
||||
|
|
|
@ -1,8 +1,27 @@
|
|||
/* FIX FOR Portal Theme */
|
||||
.aui input[type="text"], .aui select, .aui textarea, .aui .uneditable-input {
|
||||
margin-bottom: 0px !important;
|
||||
margin-bottom: 1px !important;
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
.aui p {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.aui img {
|
||||
vertical-align: baseline !important;
|
||||
}
|
||||
|
||||
.aui fieldset {
|
||||
padding: 9px !important;
|
||||
/* margin: 0; */
|
||||
border: 1px solid rgb(181, 184, 200) !important;
|
||||
}
|
||||
|
||||
.aui legend {
|
||||
margin-bottom: 0px !important;
|
||||
width: auto !important;
|
||||
border-bottom: none !important;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -14,5 +14,11 @@
|
|||
<title>AccountingManager</title>
|
||||
<short-title>AccountingManager</short-title>
|
||||
</portlet-info>
|
||||
<portlet-preferences>
|
||||
<preference>
|
||||
<name>portlet-setup-show-borders</name>
|
||||
<value>false</value>
|
||||
</preference>
|
||||
</portlet-preferences>
|
||||
</portlet>
|
||||
</portlet-app>
|
||||
|
|
Loading…
Reference in New Issue