diff --git a/.classpath b/.classpath index 0ac8405..71ac460 100644 --- a/.classpath +++ b/.classpath @@ -1,6 +1,6 @@ - + @@ -35,5 +35,5 @@ - + diff --git a/.tern-project b/.tern-project new file mode 100644 index 0000000..a185ba0 --- /dev/null +++ b/.tern-project @@ -0,0 +1 @@ +{"ide":{"scriptPaths":[]},"plugins":{"aui":{},"liferay":{},"yui":{}},"libs":["ecma5","browser"]} \ No newline at end of file diff --git a/distro/changelog.xml b/distro/changelog.xml index 4d77362..873c650 100644 --- a/distro/changelog.xml +++ b/distro/changelog.xml @@ -1,4 +1,9 @@ + + ASL session removed + Moved to Liferay logging system + Minor dependencies fix diff --git a/pom.xml b/pom.xml index c8e22d9..e9fc777 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ org.gcube.portlets.user social-profile war - 2.0.1-SNAPSHOT + 2.1.0-SNAPSHOT gCube Social Profile Portlet Social Profile @@ -67,7 +67,7 @@ org.gcube.portlets.user gcube-widgets - provided + compile org.gcube.portal @@ -93,7 +93,7 @@ org.gcube.core common-scope-maps - compile + provided com.googlecode.json-simple @@ -106,11 +106,6 @@ 1.2.0 compile - - org.gcube.applicationsupportlayer - aslcore - provided - org.gcube.portal social-networking-library @@ -176,6 +171,11 @@ ic-client provided + + org.gcube.common.portal + portal-manager + provided + diff --git a/src/main/gwt-unitCache/gwt-unitCache-0000013FF1ABCB9C b/src/main/gwt-unitCache/gwt-unitCache-0000013FF1ABCB9C deleted file mode 100644 index 4328ec8..0000000 Binary files a/src/main/gwt-unitCache/gwt-unitCache-0000013FF1ABCB9C and /dev/null differ diff --git a/src/main/gwt-unitCache/gwt-unitCache-0000013FF1AD2AD9 b/src/main/gwt-unitCache/gwt-unitCache-0000013FF1AD2AD9 deleted file mode 100644 index 0b2fa4f..0000000 Binary files a/src/main/gwt-unitCache/gwt-unitCache-0000013FF1AD2AD9 and /dev/null differ diff --git a/src/main/gwt-unitCache/gwt-unitCache-0000013FF1AE025B b/src/main/gwt-unitCache/gwt-unitCache-0000013FF1AE025B deleted file mode 100644 index c27dc6f..0000000 Binary files a/src/main/gwt-unitCache/gwt-unitCache-0000013FF1AE025B and /dev/null differ diff --git a/src/main/gwt-unitCache/gwt-unitCache-0000013FF1AF379F b/src/main/gwt-unitCache/gwt-unitCache-0000013FF1AF379F deleted file mode 100644 index c1c6c84..0000000 Binary files a/src/main/gwt-unitCache/gwt-unitCache-0000013FF1AF379F and /dev/null differ diff --git a/src/main/gwt-unitCache/gwt-unitCache-0000013FF1C07D7D b/src/main/gwt-unitCache/gwt-unitCache-0000013FF1C07D7D deleted file mode 100644 index c6049b8..0000000 Binary files a/src/main/gwt-unitCache/gwt-unitCache-0000013FF1C07D7D and /dev/null differ diff --git a/src/main/gwt-unitCache/gwt-unitCache-0000013FF1C17F4D b/src/main/gwt-unitCache/gwt-unitCache-0000013FF1C17F4D deleted file mode 100644 index 806fb2b..0000000 Binary files a/src/main/gwt-unitCache/gwt-unitCache-0000013FF1C17F4D and /dev/null differ diff --git a/src/main/gwt-unitCache/gwt-unitCache-0000013FF1C66245 b/src/main/gwt-unitCache/gwt-unitCache-0000013FF1C66245 deleted file mode 100644 index 907d023..0000000 Binary files a/src/main/gwt-unitCache/gwt-unitCache-0000013FF1C66245 and /dev/null differ diff --git a/src/main/gwt-unitCache/gwt-unitCache-0000013FF1C7CCC9 b/src/main/gwt-unitCache/gwt-unitCache-0000013FF1C7CCC9 deleted file mode 100644 index dad8353..0000000 Binary files a/src/main/gwt-unitCache/gwt-unitCache-0000013FF1C7CCC9 and /dev/null differ diff --git a/src/main/java/org/gcube/portlets/user/socialprofile/server/SocialServiceImpl.java b/src/main/java/org/gcube/portlets/user/socialprofile/server/SocialServiceImpl.java index bccd987..fc27e84 100644 --- a/src/main/java/org/gcube/portlets/user/socialprofile/server/SocialServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/socialprofile/server/SocialServiceImpl.java @@ -11,6 +11,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; +import javax.servlet.http.HttpServletRequest; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; @@ -24,9 +25,8 @@ import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.HttpClients; import org.apache.http.message.BasicNameValuePair; -import org.gcube.application.framework.core.session.ASLSession; -import org.gcube.application.framework.core.session.SessionManager; import org.gcube.common.encryption.StringEncrypter; +import org.gcube.common.portal.PortalContext; import org.gcube.common.resources.gcore.ServiceEndpoint; import org.gcube.common.resources.gcore.ServiceEndpoint.AccessPoint; import org.gcube.common.resources.gcore.ServiceEndpoint.Property; @@ -35,7 +35,6 @@ import org.gcube.common.scope.api.ScopeProvider; import org.gcube.common.scope.impl.ScopeBean; import org.gcube.common.scope.impl.ScopeBean.Type; import org.gcube.portal.custom.communitymanager.SiteManagerUtil; -import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper; import org.gcube.portal.databook.shared.UserInfo; import org.gcube.portlets.user.socialprofile.client.SocialService; import org.gcube.portlets.user.socialprofile.shared.UserContext; @@ -47,11 +46,11 @@ import org.gcube.vomanagement.usermanagement.model.CustomAttributeKeys; import org.gcube.vomanagement.usermanagement.model.GCubeUser; import org.json.simple.parser.ContainerFactory; import org.json.simple.parser.JSONParser; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.w3c.dom.Document; import com.google.gwt.user.server.rpc.RemoteServiceServlet; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.model.Contact; import com.liferay.portal.service.ContactLocalServiceUtil; import com.liferay.portal.service.UserLocalServiceUtil; @@ -62,7 +61,8 @@ import com.liferay.portal.service.UserLocalServiceUtil; @SuppressWarnings("serial") public class SocialServiceImpl extends RemoteServiceServlet implements SocialService { - private static final Logger _log = LoggerFactory.getLogger(SocialServiceImpl.class); + //private static final Logger logger = LoggerFactory.getLogger(SocialServiceImpl.class); + private static final Log logger = LogFactoryUtil.getLog(SocialServiceImpl.class); private static final String LINKEDIN_HOST_SERVICE_NAME = "host"; private static final String LINKEDIN_CLIEND_ID_PROPNAME = "client_id"; @@ -71,29 +71,36 @@ public class SocialServiceImpl extends RemoteServiceServlet implements SocialSer private static final String LINKEDIN_API_REQUEST = "https://api.linkedin.com/v1/people/~:(id,headline,summary,location:(name),industry,positions,picture-urls::(original),public-profile-url)"; /** - * the current ASLSession - * @return the session + * Retrieve the current user by using the portal manager + * @return a GcubeUser object */ - private ASLSession getASLSession() { - String sessionID = this.getThreadLocalRequest().getSession().getId(); - String user = (String) this.getThreadLocalRequest().getSession().getAttribute(ScopeHelper.USERNAME_ATTRIBUTE); - if (user == null) { - _log.warn("USER IS NULL setting test.user and Running OUTSIDE PORTAL"); - user = getDevelopmentUser(); - SessionManager.getInstance().getASLSession(sessionID, user).setScope("/gcube"); - } - return SessionManager.getInstance().getASLSession(sessionID, user); - } + private GCubeUser getCurrentUser(HttpServletRequest request){ - /** - * when packaging test will fail if the user is not set to test.user - * @return . - */ - public String getDevelopmentUser() { - String user = "test.user"; - // user = "costantino.perciante"; + if(request == null) + throw new IllegalArgumentException("HttpServletRequest is null!"); + + PortalContext pContext = PortalContext.getConfiguration(); + GCubeUser user = pContext.getCurrentUser(request); + logger.debug("Returning user " + user); return user; } + + /** + * Retrieve the current scope by using the portal manager + * @return a string representing the context + */ + private String getCurrentContext(HttpServletRequest request){ + + if(request == null) + throw new IllegalArgumentException("HttpServletRequest is null!"); + + PortalContext pContext = PortalContext.getConfiguration(); + String context = pContext.getCurrentScope(request); + logger.debug("Returning context " + context); + + return context; + } + /** * * @return true if you're running into the portal, false if in development @@ -104,37 +111,39 @@ public class SocialServiceImpl extends RemoteServiceServlet implements SocialSer return true; } catch (com.liferay.portal.kernel.bean.BeanLocatorException ex) { - _log.trace("Development Mode ON"); + logger.trace("Development Mode ON"); return false; } } + @Override public UserContext getUserContext(String userid) { - if (userid == null || userid.equals("") || userid.equals(getASLSession().getUsername())) { + if (userid == null || userid.equals("") || userid.equals(getCurrentUser(this.getThreadLocalRequest()).getUsername())) { System.out.println("Own Profile"); - _log.info("Own Profile"); + logger.info("Own Profile"); return getOwnProfile(); } else { System.out.println("Reading Profile"); - _log.info(userid + " Reading Profile"); + logger.info(userid + " Reading Profile"); return getUserProfile(userid); } } @Override public String saveProfessionalBackground(String summary) { + + String username = getCurrentUser(this.getThreadLocalRequest()).getUsername(); // parse (html sanitize) String toReturn = transformSummary(summary); if(isWithinPortal()){ UserManager um = new LiferayUserManager(); - ASLSession session = getASLSession(); try{ - GCubeUser user = um.getUserByUsername(session.getUsername()); + GCubeUser user = um.getUserByUsername(username); um.setUserProfessionalBackground(user.getUserId(), summary); // save as it is return toReturn; // sanitized }catch(Exception e){ - _log.error("Unable to save the professional background " + summary + " for user " + session.getUsername()); + logger.error("Unable to save the professional background " + summary + " for user " + username); return null; } }else @@ -142,10 +151,11 @@ public class SocialServiceImpl extends RemoteServiceServlet implements SocialSer } private UserContext getUserProfile(String username) { - ASLSession session = getASLSession(); String email = username+"@isti.cnr.it"; String fullName = username+" FULL"; String thumbnailURL = "images/Avatar_default.png"; + PortalContext pContext = PortalContext.getConfiguration(); + String contextName = pContext.getCurrentGroupName(this.getThreadLocalRequest()); if (isWithinPortal()) { try { UserManager um = new LiferayUserManager(); @@ -160,14 +170,14 @@ public class SocialServiceImpl extends RemoteServiceServlet implements SocialSer String company = user.getLocation_industry(); String summary = transformSummary(um.getUserProfessionalBackground(user.getUserId())); - return new UserContext(userInfo, headline, company, summary, session.getScopeName(), false, isInfrastructureScope()); + return new UserContext(userInfo, headline, company, summary, contextName, false, isInfrastructureScope()); } catch (Exception e) { e.printStackTrace(); return new UserContext(); } } else { - _log.info("Returning test USER"); + logger.info("Returning test USER"); HashMap fakeVreNames = new HashMap(); fakeVreNames.put("/gcube/devsec/devVRE","devVRE"); //fakeVreNames.put("/gcube/devNext/NexNext","NexNext"); @@ -175,14 +185,15 @@ public class SocialServiceImpl extends RemoteServiceServlet implements SocialSer UserInfo user = new UserInfo(username, username+ "FULL", thumbnailURL, email, "fakeAccountUrl", true, false, fakeVreNames); return new UserContext(user, "", "", "" + "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam." - + "", session.getScopeName(), false, isInfrastructureScope()); + + "", contextName, false, isInfrastructureScope()); } } private UserContext getOwnProfile() { try { - ASLSession session = getASLSession(); - String username = session.getUsername(); + PortalContext pContext = PortalContext.getConfiguration(); + String contextName = pContext.getCurrentGroupName(this.getThreadLocalRequest()); + String username = getCurrentUser(this.getThreadLocalRequest()).getUsername(); String email = username+"@isti.cnr.it"; String fullName = username+" FULL"; String thumbnailURL = "images/Avatar_default.png"; @@ -203,18 +214,18 @@ public class SocialServiceImpl extends RemoteServiceServlet implements SocialSer String company = user.getLocation_industry(); String summary = transformSummary(um.getUserProfessionalBackground(user.getUserId())); - return new UserContext(userInfo, headline, company, summary, session.getScopeName(), true, isInfrastructureScope() ); + return new UserContext(userInfo, headline, company, summary, contextName, true, isInfrastructureScope() ); } else { - _log.info("Returning test USER"); + logger.info("Returning test USER"); HashMap fakeVreNames = new HashMap(); fakeVreNames.put("/gcube/devsec/devVRE","devVRE"); //fakeVreNames.put("/gcube/devNext/NexNext","NexNext"); - UserInfo user = new UserInfo(getASLSession().getUsername(), fullName, thumbnailURL, email, "fakeAccountUrl", true, false, fakeVreNames); + UserInfo user = new UserInfo(username, fullName, thumbnailURL, email, "fakeAccountUrl", true, false, fakeVreNames); return new UserContext(user, "", "", "" + "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam." - + "", session.getScopeName(), true, isInfrastructureScope() ); + + "", contextName, true, isInfrastructureScope() ); } } catch (Exception e) { @@ -237,7 +248,7 @@ public class SocialServiceImpl extends RemoteServiceServlet implements SocialSer public Boolean saveHeadline(String newHeadline) { try { UserManager um = new LiferayUserManager(); - return um.updateJobTitle(um.getUserId(getASLSession().getUsername()), newHeadline); + return um.updateJobTitle(um.getUserId(getCurrentUser(this.getThreadLocalRequest()).getUsername()), newHeadline); } catch (Exception e) { e.printStackTrace(); return false; @@ -249,7 +260,7 @@ public class SocialServiceImpl extends RemoteServiceServlet implements SocialSer //try save the location/industry try { UserManager um = new LiferayUserManager(); - um.saveCustomAttr(um.getUserId(getASLSession().getUsername()), CustomAttributeKeys.USER_LOCATION_INDUSTRY.getKeyName(), institution); + um.saveCustomAttr(um.getUserId(getCurrentUser(this.getThreadLocalRequest()).getUsername()), CustomAttributeKeys.USER_LOCATION_INDUSTRY.getKeyName(), institution); return true; } catch (Exception e) { e.printStackTrace(); @@ -287,7 +298,7 @@ public class SocialServiceImpl extends RemoteServiceServlet implements SocialSer InputStream myInputStream = entity.getContent(); try { String jsonText = IOUtils.toString(myInputStream, "UTF-8"); - _log.debug("LinkedIn response: " + jsonText); + logger.debug("LinkedIn response: " + jsonText); if (jsonText == null) return null; @@ -336,7 +347,7 @@ public class SocialServiceImpl extends RemoteServiceServlet implements SocialSer // add request header as in the documentation, @see https://developer.linkedin.com/documents/authentication request.addHeader("Authorization", "Bearer " + token); try { - _log.debug("Asking LinkedIn profile via http GET for " + getASLSession().getUsername()); + logger.debug("Asking LinkedIn profile via http GET for " + getCurrentUser(this.getThreadLocalRequest()).getUsername()); HttpResponse httpResponse = httpClient.execute(request); HttpEntity entity = httpResponse.getEntity(); @@ -345,14 +356,14 @@ public class SocialServiceImpl extends RemoteServiceServlet implements SocialSer try { String xmlResponse = IOUtils.toString(myInputStream, "UTF-8"); //xmlResponse = testParsing(); - _log.debug("LinkedIn xmlResponse: " + xmlResponse); + logger.debug("LinkedIn xmlResponse: " + xmlResponse); DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); Document doc = dBuilder.parse(IOUtils.toInputStream(xmlResponse)); - _log.debug("Parsing LinkedIn profile xmlResponse for " + getASLSession().getUsername()); + logger.debug("Parsing LinkedIn profile xmlResponse for " + getCurrentUser(this.getThreadLocalRequest()).getUsername()); String headline = ""; String summary = ""; String location = ""; @@ -380,7 +391,7 @@ public class SocialServiceImpl extends RemoteServiceServlet implements SocialSer String positions = ""; currValue = helper.evaluate("/person/positions/position"); int positionsNo = currValue.size(); - _log.debug("Number of positions: " + positions); + logger.debug("Number of positions: " + positions); if (positionsNo > 0) { positions = (positionsNo > 1) ? "\n\nCurrent Positions:" : "\n\nCurrent Position:"; for (int i = 0; i < positionsNo; i++) { @@ -434,9 +445,9 @@ public class SocialServiceImpl extends RemoteServiceServlet implements SocialSer summary += positions; if (isWithinPortal()) { - _log.debug("LinkedIn Profile gotten correctly for " + getASLSession().getUsername() + " attempting to write into DB ..."); + logger.debug("LinkedIn Profile gotten correctly for " + getCurrentUser(this.getThreadLocalRequest()).getUsername() + " attempting to write into DB ..."); com.liferay.portal.model.User user; - user = UserLocalServiceUtil.getUserByScreenName(SiteManagerUtil.getCompany().getCompanyId(), getASLSession().getUsername()); + user = UserLocalServiceUtil.getUserByScreenName(SiteManagerUtil.getCompany().getCompanyId(), getCurrentUser(this.getThreadLocalRequest()).getUsername()); //headline if (headline.compareTo("") != 0) { String checkedHeadline = headline; @@ -467,7 +478,7 @@ public class SocialServiceImpl extends RemoteServiceServlet implements SocialSer if (pictureURL.compareTo("") != 0 && pictureURL.startsWith("http")) { byte[] pictureData = getUserPictureFromURL(httpClient, pictureURL); if (pictureData != null) { - _log.debug("Updating Image Profile with this one: " + pictureURL); + logger.debug("Updating Image Profile with this one: " + pictureURL); UserLocalServiceUtil.updatePortrait(user.getUserId(), pictureData); } } @@ -479,7 +490,7 @@ public class SocialServiceImpl extends RemoteServiceServlet implements SocialSer return publicProfileURL; else return null; } else { - _log.warn("Development Mode ON, not attempting to write into DB"); + logger.warn("Development Mode ON, not attempting to write into DB"); return "fakePublicURL"; } } @@ -508,7 +519,7 @@ public class SocialServiceImpl extends RemoteServiceServlet implements SocialSer try { return IOUtils.toByteArray(httpClient.execute(request).getEntity().getContent()); } catch (Exception e) { - _log.error("Could not get bytes from picture URL " + e.getMessage()); + logger.error("Could not get bytes from picture URL " + e.getMessage()); e.printStackTrace(); return null; } @@ -520,8 +531,8 @@ public class SocialServiceImpl extends RemoteServiceServlet implements SocialSer * @return an hashmap containing the 3 info needed */ private HashMap getLinkedInUASInfo(){ - String scope = getASLSession().getScope(); - _log.info("Looking for a LinkedIn UAS in " + scope); + String scope = getCurrentContext(this.getThreadLocalRequest()); + logger.info("Looking for a LinkedIn UAS in " + scope); String previousScope = ScopeProvider.instance.get(); ScopeProvider.instance.set(scope); SimpleQuery query = queryFor(ServiceEndpoint.class); @@ -533,7 +544,7 @@ public class SocialServiceImpl extends RemoteServiceServlet implements SocialSer ScopeProvider.instance.set(previousScope); if (list.size() > 1) { - _log.warn("Multiple LinkedIn-user-authorization Service Endpoints available in the scope, should be only one."); + logger.warn("Multiple LinkedIn-user-authorization Service Endpoints available in the scope, should be only one."); return null; } else if (list.size() == 1) { @@ -566,7 +577,7 @@ public class SocialServiceImpl extends RemoteServiceServlet implements SocialSer * @return true if it is, false otherwise. */ private boolean isInfrastructureScope() { - ScopeBean scope = new ScopeBean(getASLSession().getScope()); + ScopeBean scope = new ScopeBean(getCurrentContext(this.getThreadLocalRequest())); return scope.is(Type.INFRASTRUCTURE); } /** diff --git a/src/main/java/org/gcube/portlets/user/socialprofile/server/portlet/SocialProfilePortlet.java b/src/main/java/org/gcube/portlets/user/socialprofile/server/portlet/SocialProfilePortlet.java index 83d753c..1276a34 100644 --- a/src/main/java/org/gcube/portlets/user/socialprofile/server/portlet/SocialProfilePortlet.java +++ b/src/main/java/org/gcube/portlets/user/socialprofile/server/portlet/SocialProfilePortlet.java @@ -1,16 +1,15 @@ package org.gcube.portlets.user.socialprofile.server.portlet; -import javax.portlet.GenericPortlet; -import javax.portlet.ActionRequest; -import javax.portlet.RenderRequest; -import javax.portlet.ActionResponse; -import javax.portlet.RenderResponse; -import javax.portlet.PortletException; import java.io.IOException; -import javax.portlet.PortletRequestDispatcher; -import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper; +import javax.portlet.ActionRequest; +import javax.portlet.ActionResponse; +import javax.portlet.GenericPortlet; +import javax.portlet.PortletException; +import javax.portlet.PortletRequestDispatcher; +import javax.portlet.RenderRequest; +import javax.portlet.RenderResponse; /** * WfTemplatesPortlet Portlet Class @@ -21,7 +20,6 @@ import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper; public class SocialProfilePortlet extends GenericPortlet { public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException { response.setContentType("text/html"); - ScopeHelper.setContext(request); PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/WEB-INF/jsp/SocialProfile_view.jsp"); dispatcher.include(request, response); } diff --git a/src/main/java/org/gcube/portlets/user/socialprofile/shared/UserContext.java b/src/main/java/org/gcube/portlets/user/socialprofile/shared/UserContext.java index c0e7421..753cf6e 100644 --- a/src/main/java/org/gcube/portlets/user/socialprofile/shared/UserContext.java +++ b/src/main/java/org/gcube/portlets/user/socialprofile/shared/UserContext.java @@ -77,7 +77,4 @@ public class UserContext implements Serializable { public void setInfrastructure(boolean isInfrastructure) { this.isInfrastructure = isInfrastructure; } - - - } diff --git a/src/main/resources/clientlog4j.properties b/src/main/resources/clientlog4j.properties deleted file mode 100644 index 834ba2c..0000000 --- a/src/main/resources/clientlog4j.properties +++ /dev/null @@ -1,19 +0,0 @@ -log4j.rootLogger=DEBUG, A1 -log4j.appender.A1=org.apache.log4j.ConsoleAppender -log4j.appender.A1.layout=org.apache.log4j.PatternLayout - -# Print the date in ISO 8601 format -log4j.appender.A1.layout.ConversionPattern=%d %-5p %c - %m%n - -# Print only messages of level TRACE or above in the package org.gcube -log4j.logger.org.gcube=TRACE -log4j.logger.org.gcube.application.framework.core.session=INFO -log4j.logger.org.gcube.contentmanager=ERROR -log4j.logger.org.gcube.common.scope=ERROR -log4j.logger.org.gcube.contentmanagement=ERROR -log4j.logger.org.gcube.resources.discovery.icclient=ERROR -log4j.logger.org.gcube.common.clients=ERROR -log4j.logger.org.gcube.common.homelibrary.jcr=ERROR -log4j.logger.org.gcube.application.framework.accesslogger=ERROR -log4j.logger.org.apache.pdfbox.util.PDFStreamEngine=ERROR -log4j.logger.org.apache.http=INFO \ No newline at end of file diff --git a/src/main/resources/org/gcube/portlets/user/socialprofile/SocialProfile.gwt.xml b/src/main/resources/org/gcube/portlets/user/socialprofile/SocialProfile.gwt.xml index 80f8de3..836432c 100644 --- a/src/main/resources/org/gcube/portlets/user/socialprofile/SocialProfile.gwt.xml +++ b/src/main/resources/org/gcube/portlets/user/socialprofile/SocialProfile.gwt.xml @@ -8,13 +8,12 @@ - - + diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 5e99f90..5d3b558 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -35,17 +35,6 @@ /socialprofile/WorkspaceExplorerService - - checkServlet - org.gcube.portlets.widgets.sessionchecker.server.SessionCheckerServiceImpl - - - - checkServlet - /socialprofile/checksession - - - SocialProfile.html diff --git a/src/test/java/org/gcube/portlets/user/socialprofile/test/TestForDeploy.java b/src/test/java/org/gcube/portlets/user/socialprofile/test/TestForDeploy.java deleted file mode 100644 index 528bbc1..0000000 --- a/src/test/java/org/gcube/portlets/user/socialprofile/test/TestForDeploy.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.gcube.portlets.user.socialprofile.test; - -import static org.junit.Assert.assertTrue; - -import org.gcube.portlets.user.socialprofile.server.SocialServiceImpl; -import org.junit.Test; - -public class TestForDeploy { - - @Test - public void testUserIsTestUser() { - SocialServiceImpl serviceImpl = new SocialServiceImpl(); - String username = serviceImpl.getDevelopmentUser(); - System.out.println("username for deploy is: " + username); - assertTrue(username.compareTo("test.user") == 0); - System.out.println("Test OK!"); - } - -}