Feature #16194, Isolate Gateway user list in Messages
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/message-conversations@178377 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
3cd5a30c1b
commit
c5976d8938
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/messages-2.1.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<classpathentry kind="src" output="target/messages-2.3.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/messages-2.1.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<classpathentry excluding="**" kind="src" output="target/messages-2.3.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
@ -22,7 +22,7 @@
|
|||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/messages-2.1.0-SNAPSHOT/WEB-INF/classes" path="target/generated-sources/gwt">
|
||||
<classpathentry kind="src" output="target/messages-2.3.0-SNAPSHOT/WEB-INF/classes" path="target/generated-sources/gwt">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
|
@ -35,5 +35,5 @@
|
|||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/messages-2.1.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/messages-2.3.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -5,12 +5,6 @@
|
|||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
||||
<dependent-module archiveName="workspace-explorer-2.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/workspace-explorer-TRUNK-1.5.0-SNAPSHOT/workspace-explorer-TRUNK-1.5.0-SNAPSHOT">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="storagehub-icons-library-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/storagehub-icons-library/storagehub-icons-library">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="client-context-library-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/client-context-library/client-context-library">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.portlets-user.messages.2-3-0"
|
||||
date="2019-02-28">
|
||||
<Change>Feature #16194, Isolate Gateway user list in Messages</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets-user.messages.2-1-0"
|
||||
date="2018-06-14">
|
||||
<Change>Updated Workspace Explorer dependency</Change>
|
||||
|
|
6
pom.xml
6
pom.xml
|
@ -12,7 +12,7 @@
|
|||
<groupId>org.gcube.portets.user</groupId>
|
||||
<artifactId>messages</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>2.1.0-SNAPSHOT</version>
|
||||
<version>2.3.0-SNAPSHOT</version>
|
||||
<description>
|
||||
gCube Messages Portlet for exchanging messages with other users.
|
||||
</description>
|
||||
|
@ -60,6 +60,10 @@
|
|||
<artifactId>workspace-explorer</artifactId>
|
||||
<version>[2.0.0-SNAPSHOT,3.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>storagehub-client-library</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.applicationsupportlayer</groupId>
|
||||
<artifactId>aslsocial</artifactId>
|
||||
|
|
|
@ -43,11 +43,8 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
|
||||
import com.liferay.portal.kernel.dao.orm.QueryUtil;
|
||||
import com.liferay.portal.kernel.exception.PortalException;
|
||||
import com.liferay.portal.kernel.exception.SystemException;
|
||||
import com.liferay.portal.kernel.util.OrderByComparator;
|
||||
import com.liferay.portal.kernel.util.OrderByComparatorFactoryUtil;
|
||||
import com.liferay.portal.model.User;
|
||||
import com.liferay.portal.service.GroupLocalServiceUtil;
|
||||
import com.liferay.portal.service.UserLocalServiceUtil;
|
||||
|
@ -340,14 +337,14 @@ public class ConvServiceImpl extends RemoteServiceServlet implements MessageServ
|
|||
public ArrayList<WSUser> searchUsers(String keyword) {
|
||||
ArrayList<WSUser> toReturn = new ArrayList<>();
|
||||
if (isWithinPortal()) {
|
||||
OrderByComparator comparator = OrderByComparatorFactoryUtil.create("User_", "screenname", true);
|
||||
long gatewayGroupId = pContext.getCurrentGroupId(this.getThreadLocalRequest());
|
||||
try {
|
||||
_log.debug("Searching " + keyword);
|
||||
List<User> lrUsers = UserLocalServiceUtil.search(ManagementUtils.getCompany().getCompanyId(), keyword, 0, null, QueryUtil.ALL_POS, QueryUtil.ALL_POS, comparator);
|
||||
for (User user : lrUsers) {
|
||||
toReturn.add(new WSUser(""+user.getUserId(), user.getScreenName(), user.getFullName(), extractDomainFromEmail(user.getEmailAddress())));
|
||||
}
|
||||
} catch (SystemException | PortalException e) {
|
||||
List<GCubeUser> users = um.searchUsersByGroup(keyword, gatewayGroupId);
|
||||
for (GCubeUser user : users) {
|
||||
toReturn.add(new WSUser(""+user.getUserId(), user.getUsername(), user.getFullname(), extractDomainFromEmail(user.getEmail())));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else { //development
|
||||
|
|
Loading…
Reference in New Issue