diff --git a/component/api/src/main/java/io/meeds/social/translation/service/TranslationService.java b/component/api/src/main/java/io/meeds/social/translation/service/TranslationService.java index 33b3bae9498..66bb2effccd 100644 --- a/component/api/src/main/java/io/meeds/social/translation/service/TranslationService.java +++ b/component/api/src/main/java/io/meeds/social/translation/service/TranslationService.java @@ -87,6 +87,22 @@ String getTranslationLabel(String objectType, String fieldName, Locale locale); + /** + * Retrieves the Translation Label for a given field of an Object (identified + * by its type and id) with a designated {@link Locale}. not. + * + * @param objectType Object type for which the Translation Metadata will be + * attached + * @param objectId Object unique identifier + * @param fieldName Object field + * @param locale {@link Locale} + * @return the translated label for a given {@link Locale} + */ + String getTranslationLabelOrDefault(String objectType, + long objectId, + String fieldName, + Locale locale); + /** * Saves Translation Labels for a given Object's field. This will replace any * existing list of translations @@ -201,4 +217,5 @@ void deleteTranslationLabel(String objectType, * @param objectType Object type */ void removePlugin(String objectType); + } diff --git a/component/api/src/main/java/org/exoplatform/social/common/lifecycle/AbstractLifeCycle.java b/component/api/src/main/java/org/exoplatform/social/common/lifecycle/AbstractLifeCycle.java index d4fd319b93c..48f4c0fd30b 100644 --- a/component/api/src/main/java/org/exoplatform/social/common/lifecycle/AbstractLifeCycle.java +++ b/component/api/src/main/java/org/exoplatform/social/common/lifecycle/AbstractLifeCycle.java @@ -70,28 +70,30 @@ public void removeListener(T listener) { */ protected void broadcast(final E event) { for (final T listener : listeners) { - if (completionService.isAsync() || listener.getClass().isAnnotationPresent(Asynchronous.class)) { - completionService.addTask(new Callable() { - public E call() throws Exception { - begin(); - try { - dispatchEvent(listener, event); - } catch (Exception e) { - LOG.warn("Error dispatching event", e); - } finally { - end(); + try { + if (completionService.isAsync() || listener.getClass().isAnnotationPresent(Asynchronous.class)) { + completionService.addTask(new Callable() { + public E call() throws Exception { + begin(); + try { + dispatchEvent(listener, event); + } catch (Exception e) { + LOG.warn("Error dispatching event", e); + } finally { + end(); + } + return event; } - return event; - } - }); - } else { - try { + }); + } else { dispatchEvent(listener, event); - } catch (Exception e) { - LOG.warn("Error dispatching event", e); } + } catch (Exception e) { + LOG.warn("Error dispatching event, source: {}, payload: {}. Continue braocasting other events.", + event.getSource(), + event.getPayload(), + e); } - } } diff --git a/component/api/src/main/java/org/exoplatform/social/common/lifecycle/LifeCycleCompletionService.java b/component/api/src/main/java/org/exoplatform/social/common/lifecycle/LifeCycleCompletionService.java index 284a2d9c20b..4413a431292 100644 --- a/component/api/src/main/java/org/exoplatform/social/common/lifecycle/LifeCycleCompletionService.java +++ b/component/api/src/main/java/org/exoplatform/social/common/lifecycle/LifeCycleCompletionService.java @@ -18,7 +18,6 @@ package org.exoplatform.social.common.lifecycle; import java.util.concurrent.Callable; -import java.util.concurrent.Executor; import java.util.concurrent.ExecutorCompletionService; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -30,72 +29,56 @@ import org.exoplatform.container.xml.InitParams; import org.exoplatform.container.xml.ValueParam; +import lombok.SneakyThrows; + /** * Process the callable request out of the http request. * * @author Alain Defrance * @version $Revision$ */ +@SuppressWarnings("rawtypes") public class LifeCycleCompletionService implements Startable { - private final String THREAD_NUMBER_KEY = "thread-number"; + private static final String THREAD_NUMBER_KEY = "thread-number"; - private final String ASYNC_EXECUTION_KEY = "async-execution"; + private static final String ASYNC_EXECUTION_KEY = "async-execution"; - private Executor executor; + private static final int DEFAULT_THREAD_NUMBER = 1; - private ExecutorCompletionService ecs; + private static final boolean DEFAULT_ASYNC_EXECUTION = true; - private final int DEFAULT_THREAD_NUMBER = 1; + private ExecutorService executor; - private final boolean DEFAULT_ASYNC_EXECUTION = true; + private ExecutorCompletionService ecs; - private int configThreadNumber; + private int configThreadNumber; - private boolean configAsyncExecution; + private boolean configAsyncExecution; public LifeCycleCompletionService(InitParams params) { + ValueParam threadNumber = params == null ? null : params.getValueParam(THREAD_NUMBER_KEY); + ValueParam asyncExecution = params == null ? null : params.getValueParam(ASYNC_EXECUTION_KEY); - // - ValueParam threadNumber = params.getValueParam(THREAD_NUMBER_KEY); - ValueParam asyncExecution = params.getValueParam(ASYNC_EXECUTION_KEY); - - // - try { - this.configThreadNumber = Integer.valueOf(threadNumber.getValue()); - } - catch (Exception e) { - this.configThreadNumber = DEFAULT_THREAD_NUMBER; - } - - // - try { - this.configAsyncExecution = Boolean.valueOf(asyncExecution.getValue()); - } - catch (Exception e) { - this.configAsyncExecution = DEFAULT_ASYNC_EXECUTION; - } - + this.configThreadNumber = threadNumber == null ? DEFAULT_THREAD_NUMBER : Integer.valueOf(threadNumber.getValue()); + this.configAsyncExecution = asyncExecution == null ? DEFAULT_ASYNC_EXECUTION : Boolean.valueOf(asyncExecution.getValue()); this.executor = Executors.newFixedThreadPool(this.configThreadNumber); - this.ecs = new ExecutorCompletionService(executor); + } + @Override + public void stop() { + executor.shutdown(); } + @SuppressWarnings("unchecked") public void addTask(Callable callable) { ecs.submit(callable); - } + @SneakyThrows public void waitCompletionFinished() { - try { - if (executor instanceof ExecutorService) { - ((ExecutorService) executor).awaitTermination(1, TimeUnit.SECONDS); - } - } - catch (InterruptedException e) { - throw new RuntimeException(e); - } + executor.awaitTermination(1, TimeUnit.SECONDS); } public boolean isAsync() { @@ -105,27 +88,17 @@ public boolean isAsync() { public long getActiveTaskCount() { if (executor instanceof ThreadPoolExecutor threadPoolExecutor) { return threadPoolExecutor.getActiveCount(); + } else { + return 0; } - return 0; } + @SneakyThrows public void waitAllTaskFinished(long timeout) { long start = System.currentTimeMillis(); - try { - while (getActiveTaskCount() != 0 && System.currentTimeMillis() - start <= timeout) { - Thread.sleep(100); - } - } - catch (InterruptedException e) { - throw new RuntimeException(e); + while (getActiveTaskCount() != 0 && System.currentTimeMillis() - start <= timeout) { + Thread.sleep(100); } } - public void start() {} - - public void stop() { - if (executor instanceof ExecutorService) { - ((ExecutorService) executor).shutdown(); - } - }; } diff --git a/component/api/src/main/java/org/exoplatform/social/core/activity/model/ActivityPluginType.java b/component/api/src/main/java/org/exoplatform/social/core/activity/model/ActivityPluginType.java index 4b7c7e7d7c3..e7915373830 100644 --- a/component/api/src/main/java/org/exoplatform/social/core/activity/model/ActivityPluginType.java +++ b/component/api/src/main/java/org/exoplatform/social/core/activity/model/ActivityPluginType.java @@ -10,7 +10,6 @@ public enum ActivityPluginType { DEFAULT(""), LINK("LINK_ACTIVITY"), DOC("DOC_ACTIVITY"), - SPACE("SPACE_ACTIVITY"), PROFILE("USER_PROFILE_ACTIVITY"), FILE("files:spaces"), SHARE_FILE("sharefiles:spaces"), diff --git a/component/api/src/main/java/org/exoplatform/social/core/space/SpaceApplication.java b/component/api/src/main/java/org/exoplatform/social/core/space/SpaceApplication.java deleted file mode 100644 index 661517ee80c..00000000000 --- a/component/api/src/main/java/org/exoplatform/social/core/space/SpaceApplication.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (C) 2003-2019 eXo Platform SAS. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License - * as published by the Free Software Foundation; either version 3 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see. - */ - -package org.exoplatform.social.core.space; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -/** - * Definition of space application model. - * - */ -import java.util.Map; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -@Data -@NoArgsConstructor -@AllArgsConstructor -public class SpaceApplication implements Cloneable { - - private String portletApp; - - private String portletName; - - private String appTitle; - - private boolean removable; - - private int order; - - private String uri; - - private String icon; - - private Map preferences; - - private List roles; - - private String profiles; - - @Override - public SpaceApplication clone() { - return new SpaceApplication(portletApp, - portletName, - appTitle, - removable, - order, - uri, - icon, - preferences == null ? null : new HashMap<>(preferences), - roles == null ? null : new ArrayList(roles), - profiles); - } - -} diff --git a/component/api/src/main/java/org/exoplatform/social/core/space/SpaceApplicationConfigPlugin.java b/component/api/src/main/java/org/exoplatform/social/core/space/SpaceApplicationConfigPlugin.java deleted file mode 100644 index 4aec5b3c6ae..00000000000 --- a/component/api/src/main/java/org/exoplatform/social/core/space/SpaceApplicationConfigPlugin.java +++ /dev/null @@ -1,268 +0,0 @@ -/* - * Copyright (C) 2003-2010 eXo Platform SAS. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License - * as published by the Free Software Foundation; either version 3 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see. - */ -package org.exoplatform.social.core.space; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import org.exoplatform.container.component.BaseComponentPlugin; -import org.exoplatform.container.xml.InitParams; - -/** - * Component plugin for configuring default applications to be installed when creating a new space. - * - * @author hoatle (hoatlevan at gmail dot com) - * @since Sep 1, 2010 - * @since 1.2.0-GA - * @deprecated Use {@link SpaceTemplateConfigPlugin} instead. - */ -@Deprecated -public class SpaceApplicationConfigPlugin extends BaseComponentPlugin { - - private static final String SPACE_HOME_PARAM_NAME = "spaceHomeApplication"; - - private static final String SPACE_APPLICATION_LIST_PARAM_NAME = "spaceApplicationList"; - - private SpaceApplication homeApplication; - - private List spaceApplicationList; - - /** - * Constructor - */ - public SpaceApplicationConfigPlugin() { - - } - - /** - * Constructor with init params - * - * @param initParams - */ - public SpaceApplicationConfigPlugin(InitParams initParams) { - homeApplication = (SpaceApplication) initParams.getObjectParam(SPACE_HOME_PARAM_NAME).getObject(); - spaceApplicationList = initParams.getObjectParamValues(SpaceApplicationConfigPlugin.class). - get(0).getSpaceApplicationList(); - } - - /** - * Sets home space application. - * - * @param application - */ - public void setHomeApplication(SpaceApplication application) { - homeApplication = application; - } - - /** - * Gets home space application. - * - * @return - */ - public SpaceApplication getHomeApplication() { - return homeApplication; - } - - /** - * Adds a space application to space application list. - * - * @param spaceApplication - */ - public void addToSpaceApplicationList(SpaceApplication spaceApplication) { - if (spaceApplicationList == null) { - spaceApplicationList = new ArrayList(); - } - spaceApplicationList.add(spaceApplication); - } - - /** - * Sets space application list to be installed. - * - * @param applicationList - */ - public void setSpaceApplicationList(List applicationList) { - spaceApplicationList = applicationList; - } - - /** - * Gets space application list to be installed. - * - * @return - */ - public List getSpaceApplicationList() { - return spaceApplicationList; - } - - /** - * The space application model. - */ - public static class SpaceApplication { - private String portletApp; - private String portletName; - private String appTitle; - private boolean removable; - private int order; - private String uri; - private String icon; - private Map preferences; - - /** - * Sets the portletApp - the war name file which has that portlet. - * - * @param portletApp - */ - public void setPortletApp(String portletApp) { - this.portletApp = portletApp; - } - - /** - * Gets the portletApp. - * - * @return - */ - public String getPortletApp() { - return portletApp; - } - - /** - * Sets portletName. - * - * @param portletName - */ - public void setPortletName(String portletName) { - this.portletName = portletName; - } - - /** - * Gets portletName. - * - * @return - */ - public String getPortletName() { - return portletName; - } - - /** - * Sets appTitle to be displayed on space's navigation. - * - * @param appTitle - */ - public void setAppTitle(String appTitle) { - this.appTitle = appTitle; - } - - /** - * Gets appTitle to be displayed on space's navigation. - * - * @return - */ - public String getAppTitle() { - return appTitle; - } - - /** - * Indicates if this application is removable or not. - * - * @param isRemovable - */ - public void isRemovable(boolean isRemovable) { - this.removable = isRemovable; - } - - /** - * Checks if this application is removable for not. - * - * @return - */ - public boolean isRemovable() { - return removable; - } - - /** - * Sets the order in the space's navigation. - * - * @param order - */ - public void setOrder(int order) { - this.order = order; - } - - /** - * Gets the order in the space's navigation. - * - * @return - */ - public int getOrder() { - return order; - } - - /** - * Sets the uri of this application page node. - * - * @param uri - */ - public void setUri(String uri) { - this.uri = uri; - } - - /** - * Gets the uri of the application page node. - * - * @return - */ - public String getUri() { - return uri; - } - - /** - * Sets the icon class for the application page node. - * - * @param icon - */ - public void setIcon(String icon) { - this.icon = icon; - } - - /** - * Gets the icon class for the application page node. - * @return - */ - public String getIcon() { - return icon; - } - - /** - * Sets preferences for this application when installed. - * - * @param preferences - */ - public void setPreferences(Map preferences) { - this.preferences = preferences; - } - - /** - * Gets preferences for this application when installed. - * - * @return - */ - public Map getPreferences() { - return this.preferences; - } - - } -} \ No newline at end of file diff --git a/component/api/src/main/java/org/exoplatform/social/core/space/SpaceException.java b/component/api/src/main/java/org/exoplatform/social/core/space/SpaceException.java index b288d432ef2..05ad26d97df 100644 --- a/component/api/src/main/java/org/exoplatform/social/core/space/SpaceException.java +++ b/component/api/src/main/java/org/exoplatform/social/core/space/SpaceException.java @@ -17,11 +17,8 @@ package org.exoplatform.social.core.space; /** - * Created by IntelliJ IDEA. - * User: jeremi - * Date: Dec 4, 2008 - * Time: 11:50:29 AM - * To change this template use File | Settings | File Templates. + * Created by IntelliJ IDEA. User: jeremi Date: Dec 4, 2008 Time: 11:50:29 AM To + * change this template use File | Settings | File Templates. */ public class SpaceException extends Exception { @@ -35,29 +32,8 @@ public enum Code { /** The INTERNA l_ serve r_ error. */ INTERNAL_SERVER_ERROR, - /** The UNABL e_ t o_ lis t_ availabl e_ applications. */ - UNABLE_TO_LIST_AVAILABLE_APPLICATIONS, - - /** The UNABL e_ t o_ ad d_ application. */ - UNABLE_TO_ADD_APPLICATION, - - /** The UNABL e_ t o_ remov e_ application. */ - UNABLE_TO_REMOVE_APPLICATION, - - UNABLE_TO_RESTORE_APPLICATION_LAYOUT, - - APPLICATION_NOT_FOUND, - - APPLICATION_NOT_FOUND_IN_TEMPLATE, - UNAUTHORIZED_TO_RENAME_SPACE, - /** The UNABL e_ t o_ remov e_ application. */ - UNABLE_TO_MOVE_APPLICATION, - - /** The UNABL e_ t o_ remov e_ applications. */ - UNABLE_TO_REMOVE_APPLICATIONS, - /** The UNABL e_ t o_ creat e_ group. */ UNABLE_TO_CREATE_GROUP, @@ -74,9 +50,10 @@ public enum Code { UNABLE_TO_REMOVE_USER, /** The USE r_ onl y_ leader. */ - USER_ONLY_LEADER, //user is the only leader of a space + USER_ONLY_LEADER, // user is the only leader of a space + /** The USE r_ no t_ member. */ - USER_NOT_MEMBER, + USER_NOT_MEMBER, /** The USE r_ no t_ invited. */ USER_NOT_INVITED, @@ -132,12 +109,6 @@ public enum Code { /** The UNABL e_ reques t_ t o_ joi n_ hidden. */ UNABLE_REQUEST_TO_JOIN_HIDDEN, - /** The UNABL e_ t o_ ini t_ app. */ - UNABLE_TO_INIT_APP, - - /** The UNABL e_ t o_ deini t_ app. */ - UNABLE_TO_DEINIT_APP, - /** The UNABL e_ t o_ delet e_ space. */ UNABLE_TO_DELETE_SPACE } @@ -203,4 +174,3 @@ public String toString() { return super.toString() + " Code = " + code; } } - diff --git a/component/api/src/main/java/org/exoplatform/social/core/space/SpaceFilter.java b/component/api/src/main/java/org/exoplatform/social/core/space/SpaceFilter.java index 54e3fe7a4dd..380cd38afc6 100644 --- a/component/api/src/main/java/org/exoplatform/social/core/space/SpaceFilter.java +++ b/component/api/src/main/java/org/exoplatform/social/core/space/SpaceFilter.java @@ -55,7 +55,7 @@ public class SpaceFilter implements Cloneable { private long identityId; - private String template; + private long templateId; private SpaceMembershipStatus status; @@ -105,7 +105,7 @@ public SpaceFilter clone() { // NOSONAR exclusions, remoteId, identityId, - template, + templateId, status, extraStatus, sorting, diff --git a/component/api/src/main/java/org/exoplatform/social/core/space/SpaceLifecycle.java b/component/api/src/main/java/org/exoplatform/social/core/space/SpaceLifecycle.java index 80261056038..036daf82810 100644 --- a/component/api/src/main/java/org/exoplatform/social/core/space/SpaceLifecycle.java +++ b/component/api/src/main/java/org/exoplatform/social/core/space/SpaceLifecycle.java @@ -23,7 +23,6 @@ import org.exoplatform.social.core.space.spi.SpaceLifeCycleEvent.Type; - /** * Implementation of the lifecycle of spaces.
* Events are dispatched asynchronously but sequentially to their listeners @@ -64,26 +63,6 @@ protected void dispatchEvent(SpaceLifeCycleListener listener, SpaceLifeCycleEven case SPACE_REMOVED: listener.spaceRemoved(event); break; - case APP_ACTIVATED: - if (isSpaceProperEvent(event)) { - listener.applicationActivated(event); - } - break; - case APP_DEACTIVATED: - if (isSpaceProperEvent(event)) { - listener.applicationDeactivated(event); - } - break; - case APP_ADDED: - if (isSpaceProperEvent(event)) { - listener.applicationAdded(event); - } - break; - case APP_REMOVED: - if (isSpaceProperEvent(event)) { - listener.applicationRemoved(event); - } - break; case JOINED: if (isSpaceProperEvent(event)) { listener.joined(event); @@ -144,6 +123,18 @@ protected void dispatchEvent(SpaceLifeCycleListener listener, SpaceLifeCycleEven case REMOVE_PENDING_USER: listener.removePendingUser(event); break; + case ADD_REDACTOR_USER: + listener.addRedactorUser(event); + break; + case REMOVE_REDACTOR_USER: + listener.removeRedactorUser(event); + break; + case ADD_PUBLISHER_USER: + listener.addPublisherUser(event); + break; + case REMOVE_PUBLISHER_USER: + listener.removePublisherUser(event); + break; default: break; } @@ -157,27 +148,6 @@ public void spaceRemoved(Space space, String remover) { broadcast(new SpaceLifeCycleEvent(space, remover, Type.SPACE_REMOVED)); } - public void addApplication(Space space, String appId) { - SpaceLifeCycleEvent event = new SpaceLifeCycleEvent(space, appId, Type.APP_ADDED); - event.getSource(); - broadcast(event); - } - - public void deactivateApplication(Space space, String appId) { - SpaceLifeCycleEvent event = new SpaceLifeCycleEvent(space, appId, Type.APP_DEACTIVATED); - broadcast(event); - } - - public void activateApplication(Space space, String appId) { - SpaceLifeCycleEvent event = new SpaceLifeCycleEvent(space, appId, Type.APP_ACTIVATED); - broadcast(event); - } - - public void removeApplication(Space space, String appId) { - SpaceLifeCycleEvent event = new SpaceLifeCycleEvent(space, appId, Type.APP_REMOVED); - broadcast(event); - } - public void memberJoined(Space space, String userId) { broadcast(new SpaceLifeCycleEvent(space, userId, Type.JOINED)); } @@ -193,15 +163,15 @@ public void grantedLead(Space space, String userId) { public void revokedLead(Space space, String userId) { broadcast(new SpaceLifeCycleEvent(space, userId, Type.REVOKED_LEAD)); } - + public void spaceRenamed(Space space, String userId) { broadcast(new SpaceLifeCycleEvent(space, userId, Type.SPACE_RENAMED)); } - + public void spaceDescriptionEdited(Space space, String userId) { broadcast(new SpaceLifeCycleEvent(space, userId, Type.SPACE_DESCRIPTION_EDITED)); } - + public void spaceAvatarEdited(Space space, String userId) { broadcast(new SpaceLifeCycleEvent(space, userId, Type.SPACE_AVATAR_EDITED)); } @@ -209,7 +179,7 @@ public void spaceAvatarEdited(Space space, String userId) { public void spaceBannerEdited(Space space, String userId) { broadcast(new SpaceLifeCycleEvent(space, userId, Type.SPACE_BANNER_EDITED)); } - + public void spaceAccessEdited(Space space, String userId) { broadcast(new SpaceLifeCycleEvent(space, userId, Type.SPACE_HIDDEN)); } @@ -242,6 +212,22 @@ public void removePendingUser(Space space, String userId) { broadcast(new SpaceLifeCycleEvent(space, userId, Type.REMOVE_PENDING_USER)); } + public void addRedactorUser(Space space, String userId) { + broadcast(new SpaceLifeCycleEvent(space, userId, Type.ADD_REDACTOR_USER)); + } + + public void removeRedactorUser(Space space, String userId) { + broadcast(new SpaceLifeCycleEvent(space, userId, Type.REMOVE_REDACTOR_USER)); + } + + public void addPublisherUser(Space space, String userId) { + broadcast(new SpaceLifeCycleEvent(space, userId, Type.ADD_PUBLISHER_USER)); + } + + public void removePublisherUser(Space space, String userId) { + broadcast(new SpaceLifeCycleEvent(space, userId, Type.REMOVE_PUBLISHER_USER)); + } + private boolean isSpaceProperEvent(SpaceLifeCycleEvent event) { Type currentEvent = getCurrentEvent(); return currentEvent == null || currentEvent == event.getType(); diff --git a/component/api/src/main/java/org/exoplatform/social/core/space/SpaceListenerPlugin.java b/component/api/src/main/java/org/exoplatform/social/core/space/SpaceListenerPlugin.java index b5f3317e3b5..1c5dea09e2c 100644 --- a/component/api/src/main/java/org/exoplatform/social/core/space/SpaceListenerPlugin.java +++ b/component/api/src/main/java/org/exoplatform/social/core/space/SpaceListenerPlugin.java @@ -25,114 +25,64 @@ * @author Patrice Lamarque * @version $Revision$ */ -public abstract class SpaceListenerPlugin implements - SpaceLifeCycleListener { +public abstract class SpaceListenerPlugin implements SpaceLifeCycleListener { - /** - * {@inheritDoc} - */ + @Override public void spaceCreated(SpaceLifeCycleEvent event) { // No default implementation } - /** - * {@inheritDoc} - */ + @Override public void spaceRemoved(SpaceLifeCycleEvent event) { // No default implementation } - /** - * {@inheritDoc} - */ - public void applicationActivated(SpaceLifeCycleEvent event) { - // No default implementation - } - - /** - * {@inheritDoc} - */ - public void applicationAdded(SpaceLifeCycleEvent event) { - // No default implementation - } - - /** - * {@inheritDoc} - */ - public void applicationDeactivated(SpaceLifeCycleEvent event) { - // No default implementation - } - - /** - * {@inheritDoc} - */ - public void applicationRemoved(SpaceLifeCycleEvent event) { - // No default implementation - } - - /** - * {@inheritDoc} - */ + @Override public void grantedLead(SpaceLifeCycleEvent event) { // No default implementation } - /** - * {@inheritDoc} - */ + @Override public void joined(SpaceLifeCycleEvent event) { // No default implementation } - /** - * {@inheritDoc} - */ + @Override public void left(SpaceLifeCycleEvent event) { // No default implementation } - /** - * {@inheritDoc} - */ + @Override public void revokedLead(SpaceLifeCycleEvent event) { // No default implementation } - - /** - * {@inheritDoc} - */ + + @Override public void spaceRenamed(SpaceLifeCycleEvent event) { // No default implementation } - - /** - * {@inheritDoc} - */ + + @Override public void spaceDescriptionEdited(SpaceLifeCycleEvent event) { // No default implementation } - - /** - * {@inheritDoc} - */ + + @Override public void spaceAvatarEdited(SpaceLifeCycleEvent event) { // No default implementation } - - /** - * {@inheritDoc} - */ + + @Override public void addInvitedUser(SpaceLifeCycleEvent event) { // No default implementation } - - /** - * {@inheritDoc} - */ + + @Override public void addPendingUser(SpaceLifeCycleEvent event) { // No default implementation } + @Override public void removePendingUser(SpaceLifeCycleEvent event) { // No default implementation } diff --git a/component/api/src/main/java/org/exoplatform/social/core/space/SpaceTemplate.java b/component/api/src/main/java/org/exoplatform/social/core/space/SpaceTemplate.java deleted file mode 100644 index 68319e66994..00000000000 --- a/component/api/src/main/java/org/exoplatform/social/core/space/SpaceTemplate.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Copyright (C) 2003-2019 eXo Platform SAS. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License - * as published by the Free Software Foundation; either version 3 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see. - */ - -package org.exoplatform.social.core.space; - -import java.util.ArrayList; -import java.util.Comparator; -import java.util.List; - -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; - -/** - * Definition of space template model. - */ -@NoArgsConstructor -@AllArgsConstructor -public class SpaceTemplate implements Cloneable { - private String name; - - private String resolvedLabel; - - private String resolvedDescription; - - private String visibility; - - private String registration; - - private String bannerPath; - - private String permissions; - - private String permissionsLabels; - - private String invitees; - - private SpaceApplication homePageApplication; - - private List applications; - - @Getter - @Setter - private String publicSiteTemplateName; - - /** - * Sets the template name - * - * @param name - */ - public void setName(String name) { - this.name = name; - } - - /** - * Gets the name. - * - * @return - */ - public String getName() { - return name; - } - - /** - * Set resolved label switch a selected language - * - * @param resolvedLabel - */ - public void setResolvedLabel(String resolvedLabel) { - this.resolvedLabel = resolvedLabel; - } - - /** - * @return resolved label switch a selected language - */ - public String getResolvedLabel() { - return resolvedLabel; - } - - /** - * Sets a resolved description switch a selected language - * - * @param resolvedDescription - */ - public void setResolvedDescription(String resolvedDescription) { - this.resolvedDescription = resolvedDescription; - } - - /** - * @return resolved space template description switch a selected language - */ - public String getResolvedDescription() { - return resolvedDescription; - } - - /** - * Sets visibility. - * - * @param visibility - */ - public void setVisibility(String visibility) { - this.visibility = visibility; - } - - /** - * Gets visibility. - * - * @return - */ - public String getVisibility() { - return visibility; - } - - /** - * Sets registration. - * - * @param registration - */ - public void setRegistration(String registration) { - this.registration = registration; - } - - /** - * Gets registration. - * - * @return - */ - public String getRegistration() { - return registration; - } - - /** - * Sets space banner path.. - * - * @param bannerPath - */ - public void setBannerPath(String bannerPath) { - this.bannerPath = bannerPath; - } - - /** - * Gets space banner path. - * - * @return - */ - public String getBannerPath() { - return bannerPath; - } - - /** - * Sets space template visibility permissions. - * - * @param permissions - */ - public void setPermissions(String permissions) { - this.permissions = permissions; - } - - /** - * Gets the space template visibility permissions - * - * @return permissions - */ - public String getPermissions() { - return permissions; - } - - /** - * Sets space template permissionsLabels. - * - * @param permissionsLabels - */ - public void setPermissionsLabels(String permissionsLabels) { - this.permissionsLabels = permissionsLabels; - } - - /** - * Gets the space template permissionsLabels - * - * @return permissionsLabels - */ - public String getPermissionsLabels() { - return permissionsLabels; - } - - /** - * Sets space template invitees to invite. - * - * @param invitees - */ - public void setInvitees(String invitees) { - this.invitees = invitees; - } - - /** - * Gets the space template invitees to invite. - * - * @return invitees - */ - public String getInvitees() { - return invitees; - } - - /** - * Adds a space application to space application list. - * - * @param spaceApplication - */ - public void addToSpaceApplicationList(SpaceApplication spaceApplication) { - if (applications == null) { - applications = new ArrayList<>(); - } - applications.removeIf(o -> (o.getPortletApp().equals(spaceApplication.getPortletApp()) - && o.getPortletName().equals(spaceApplication.getPortletName()))); - applications.add(spaceApplication); - } - - /** - * Sets space application list to be installed. - * - * @param applicationList - */ - public void setSpaceApplicationList(List applicationList) { - applications = applicationList; - } - - /** - * Gets space application list to be installed. - * - * @return - */ - public List getSpaceApplicationList() { - return applications == null ? null : applications.stream().sorted(Comparator.comparing(SpaceApplication::getOrder)).toList(); - } - - /** - * Sets home space applications. - * - * @param homeApplication - */ - public void setHomeApplication(SpaceApplication homeApplication) { - homePageApplication = homeApplication; - } - - /** - * Gets home space application. - * - * @return - */ - public SpaceApplication getSpaceHomeApplication() { - return homePageApplication; - } - - @Override - public SpaceTemplate clone() { - return new SpaceTemplate(name, - resolvedLabel, - resolvedDescription, - visibility, - registration, - bannerPath, - permissions, - permissionsLabels, - invitees, - homePageApplication == null ? null : homePageApplication.clone(), - applications == null ? null : - new ArrayList<>(applications.stream().map(SpaceApplication::clone).toList()), - publicSiteTemplateName); - } -} diff --git a/component/api/src/main/java/org/exoplatform/social/core/space/SpaceTemplateConfigPlugin.java b/component/api/src/main/java/org/exoplatform/social/core/space/SpaceTemplateConfigPlugin.java deleted file mode 100644 index a55030fc49f..00000000000 --- a/component/api/src/main/java/org/exoplatform/social/core/space/SpaceTemplateConfigPlugin.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2003-2019 eXo Platform SAS. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License - * as published by the Free Software Foundation; either version 3 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see. - */ -package org.exoplatform.social.core.space; - -import org.exoplatform.container.component.BaseComponentPlugin; -import org.exoplatform.container.xml.InitParams; - -/** - * Component plugin for configuring the template of the space. - */ -public class SpaceTemplateConfigPlugin extends BaseComponentPlugin { - - private static final String SPACE_TEMPLATE_PARAM_NAME = "template"; - - private SpaceTemplate spaceTemplate; - - /** - * Constructor with init params - * - * @param initParams - */ - public SpaceTemplateConfigPlugin(InitParams initParams) { - spaceTemplate = (SpaceTemplate) initParams.getObjectParam(SPACE_TEMPLATE_PARAM_NAME).getObject(); - } - - /** - * Sets space template. - * - * @param template - */ - public void setSpaceTemplate(SpaceTemplate template) { - spaceTemplate = template; - } - - /** - * Gets space template. - * - * @return - */ - public SpaceTemplate getSpaceTemplate() { - return spaceTemplate; - } -} - diff --git a/component/api/src/main/java/org/exoplatform/social/core/space/SpacesAdministrationService.java b/component/api/src/main/java/org/exoplatform/social/core/space/SpacesAdministrationService.java index c461f951524..07d5f7f6a57 100644 --- a/component/api/src/main/java/org/exoplatform/social/core/space/SpacesAdministrationService.java +++ b/component/api/src/main/java/org/exoplatform/social/core/space/SpacesAdministrationService.java @@ -1,10 +1,9 @@ package org.exoplatform.social.core.space; -import org.exoplatform.services.security.MembershipEntry; -import org.exoplatform.social.core.space.model.Space; - import java.util.List; +import org.exoplatform.services.security.MembershipEntry; + /** * Service to manage administration of spaces */ @@ -24,25 +23,14 @@ public interface SpacesAdministrationService { void updateSpacesAdministratorsMemberships(List permissionsExpressions); /** - * Returns the list of creators memberships (permission expressions) + * Checks if the user is a super manager of all spaces * - * @return a {@link List} of memberships of type {@link String} - */ - List getSpacesCreatorsMemberships(); - - /** - * Update spaces super creator memberships - * - * @param permissionsExpressions - */ - void updateSpacesCreatorsMemberships(List permissionsExpressions); - - - /** - * Check if the user can create spaces - * @param username - * @return true if the user can create spaces + * @param username user name + * @return true if the user is member of super administrators groups, else + * false */ - boolean canCreateSpace(String username) ; + default boolean isSuperManager(String username) { + throw new UnsupportedOperationException(); + } } diff --git a/component/api/src/main/java/org/exoplatform/social/core/space/model/Space.java b/component/api/src/main/java/org/exoplatform/social/core/space/model/Space.java index da1d86b8cf0..69955f93f72 100644 --- a/component/api/src/main/java/org/exoplatform/social/core/space/model/Space.java +++ b/component/api/src/main/java/org/exoplatform/social/core/space/model/Space.java @@ -16,6 +16,8 @@ */ package org.exoplatform.social.core.space.model; +import java.util.List; + import org.exoplatform.social.common.Utils; import org.exoplatform.social.core.CacheEntry; import org.exoplatform.social.core.model.AvatarAttachment; @@ -34,63 +36,84 @@ public class Space implements CacheEntry { public static final String DEFAULT_SPACE_METADATA_OBJECT_TYPE = "space"; + /** The Constant ACTIVE_STATUS. */ + public static final String ACTIVE_STATUS = "active"; + + /** The Constant DEACTIVE_STATUS. */ + public static final String DEACTIVE_STATUS = "deactive"; + + /** The Constant INSTALL_STATUS. */ + public static final String INSTALL_STATUS = "installed"; + + /** The Constant PUBLIC. */ + public static final String PUBLIC = "public"; + + /** The Constant PRIVATE. */ + public static final String PRIVATE = "private"; + + /** The Constant HIDDEN. */ + public static final String HIDDEN = "hidden"; + + /** The Constant OPEN. */ + public static final String OPEN = "open"; + + /** The Constant VALIDATION. */ + public static final String VALIDATION = "validation"; + + /** The Constant CLOSED. */ + public static final String CLOSED = "closed"; + + public static final String HOME_URL = "home"; + /** The id. */ - private String id; + private String id; /** The display name. */ - private String displayName; + private String displayName; /** The group id. */ - private String groupId; + private String groupId; /** If the space has at least one binding. */ - private boolean hasBindings; - - /** The app. */ - private String app; + private boolean hasBindings; /** The parent. */ - private String parent; + private String parent; /** The description. */ - private String description; - - /** The tag. */ - private String tag; + private String description; /** The pending users. */ - private String[] pendingUsers; - + private String[] pendingUsers; + /** The invited users. */ - private String[] invitedUsers; + private String[] invitedUsers; - /** The template. */ - private String template; + @Getter + @Setter + private long templateId; /** The url. */ - private String url; + private String url; /** The visibility. */ - private String visibility; + private String visibility; /** The registration. */ - private String registration; - - /** The priority. */ - private String priority; + private String registration; /** The space avatar attachment. */ - private AvatarAttachment avatarAttachment; + private AvatarAttachment avatarAttachment; /** The space banner attachment. */ - private BannerAttachment bannerAttachment; + private BannerAttachment bannerAttachment; /** Created time. */ - private long createdTime; + private long createdTime; @Getter @Setter - private long cacheTime; + private long cacheTime; @Getter @Setter @@ -101,113 +124,73 @@ public class Space implements CacheEntry { private String publicSiteVisibility; /** Last Updated time */ - private long lastUpdatedTime; + private long lastUpdatedTime; + /** * The pretty name of space. * * @since 1.2.0-GA */ - private String prettyName; + private String prettyName; /** * The url of avatar. * * @since 1.2.0-GA */ - private String avatarUrl; + private String avatarUrl; + + private String bannerUrl; - private String bannerUrl; - - /** - * The creator of space. - * - * @since 1.2.0-GA - * @deprecated Use {@link managers} instead. - * Will be removed by 1.2.8 - */ - @Deprecated - private String creator; - /** * The editor of space. * * @since 4.0.0.Alpha1 */ - private String editor; - - /** + private String editor; + + /** * The managers of a space. * * @since 1.2.0-GA */ - private String[] managers; - + private String[] managers; + /** * The last updated time of avatar ( in millisecond) * * @since 1.2.1 */ - private Long avatarLastUpdated; + private Long avatarLastUpdated; /** * The last updated time of banner ( in millisecond) * * @since 1.2.1 */ - private Long bannerLastUpdated; - + private Long bannerLastUpdated; + /** * The members of a space. * * @since 1.2.0-GA */ - private String[] members; - - private String[] redactors; - + private String[] members; + + private String[] redactors; + /** * The publishers of a space. - * */ - private String[] publishers; - - /** The Constant ACTIVE_STATUS. */ - public final static String ACTIVE_STATUS = "active"; - - /** The Constant DEACTIVE_STATUS. */ - public final static String DEACTIVE_STATUS = "deactive"; - - /** The Constant INSTALL_STATUS. */ - public final static String INSTALL_STATUS = "installed"; - - /** The Constant PUBLIC. */ - public final static String PUBLIC = "public"; - - /** The Constant PRIVATE. */ - public final static String PRIVATE = "private"; - - /** The Constant HIDDEN. */ - public final static String HIDDEN = "hidden"; - - /** The Constant OPEN. */ - public final static String OPEN = "open"; - - /** The Constant VALIDATION. */ - public final static String VALIDATION = "validation"; + private String[] publishers; - /** The Constant CLOSED. */ - public final static String CLOSED = "closed"; - - /** The Constant HIGH_PRIORITY. */ - public final static String HIGH_PRIORITY = "1"; - - /** The Constant INTERMEDIATE_PRIORITY. */ - public final static String INTERMEDIATE_PRIORITY = "2"; + @Getter + @Setter + private List layoutPermissions; - /** The Constant LOW_PRIORITY. */ - public final static String LOW_PRIORITY = "3"; - - public static final String CREATOR = "space_creator"; + @Getter + @Setter + private List deletePermissions; public void setLastUpdatedTime(long lastUpdatedTime) { this.lastUpdatedTime = lastUpdatedTime; @@ -218,21 +201,20 @@ public long getLastUpdatedTime() { } /** Types of updating of space. */ - public static enum UpdatedField - { - DESCRIPTION(true); - - private boolean type; - - private UpdatedField(boolean type) { - this.type = type; - } - public boolean value() { - return this.type; - } - - }; - + public enum UpdatedField { + DESCRIPTION(true); + + private boolean type; + + private UpdatedField(boolean type) { + this.type = type; + } + + public boolean value() { + return this.type; + } + } + private UpdatedField field; public UpdatedField getField() { @@ -243,11 +225,6 @@ public void setField(UpdatedField field) { this.field = field; } - /** - * Instantiates a new space. - */ - public Space() {} - /** * Sets the id. * @@ -284,16 +261,6 @@ public String getDisplayName() { return displayName; } - /** - * Gets space name id for used as space url, space identity remote id. - * - * @return - * @deprecated use #getPrettyName() instead. To be removed at 1.3.x - */ - public String getName() { - return getPrettyName(); - } - /** * Sets the group id. * @@ -311,7 +278,7 @@ public void setGroupId(String groupId) { public String getGroupId() { return groupId; } - + /** * Sets if the space is bound or not. * @@ -330,24 +297,6 @@ public boolean hasBindings() { return hasBindings; } - /** - * Sets the app. - * - * @param app the new app - */ - public void setApp(String app) { - this.app = app; - } - - /** - * Gets the app. - * - * @return the app - */ - public String getApp() { - return app; - } - /** * Sets the parent. * @@ -384,24 +333,6 @@ public String getDescription() { return description; } - /** - * Sets the tag. - * - * @param tag the new tag - */ - public void setTag(String tag) { - this.tag = tag; - } - - /** - * Gets the tag. - * - * @return the tag - */ - public String getTag() { - return tag; - } - /** * Sets the pending users. * @@ -438,52 +369,13 @@ public String[] getInvitedUsers() { return invitedUsers; } - /** - * Sets the type. - * - * @param type the new type - **@deprecated Use {@link #setTemplate(String)} instead - */ - @Deprecated - public void setType(String type) { - this.template = type; - } - - /** - * Sets the template. - * - * @param template the new template - */ - public void setTemplate(String template) { - this.template = template; - } - - /** - * Gets the type. - * - * @return the type - **@deprecated Use {@link #getTemplate()} instead - */ - public String getType() { - return template; - } - - /** - * Gets the template. - * - * @return the template - */ - public String getTemplate() { - return template; - } - /** * Gets the short name. * * @return the short name */ public String getShortName() { - return groupId.substring(groupId.lastIndexOf("/")+1); + return groupId.substring(groupId.lastIndexOf("/") + 1); } /** @@ -544,24 +436,6 @@ public void setRegistration(String registration) { this.registration = registration; } - /** - * Gets the priority. - * - * @return the priority - */ - public String getPriority() { - return priority; - } - - /** - * Sets the priority. - * - * @param priority the new priority - */ - public void setPriority(String priority) { - this.priority = priority; - } - /** * Sets the space attachment. * @@ -569,8 +443,8 @@ public void setPriority(String priority) { */ public void setAvatarAttachment(AvatarAttachment avatarAttachment) { this.avatarAttachment = avatarAttachment; - if(avatarAttachment != null) { - this.setAvatarLastUpdated(avatarAttachment.getLastModified()); + if (avatarAttachment != null) { + this.setAvatarLastUpdated(avatarAttachment.getLastModified()); } else { this.setAvatarLastUpdated(null); this.setAvatarUrl(null); @@ -629,7 +503,8 @@ public String getAvatarUrl() { return this.avatarUrl; } - /** Sets the url of avatar. + /** + * Sets the url of avatar. * * @param avatarUrl * @since 1.2.0-GA @@ -646,31 +521,6 @@ public void setBannerUrl(String bannerUrl) { this.bannerUrl = bannerUrl; } - /** - * Gets the creator of a space. - * - * @return - * @since 1.2.0-GA - * @deprecated Use {@link #getManagers()} instead. - * Will be removed by 1.2.8 - */ - @Deprecated - public String getCreator() { - return creator; - } - - /** - * Sets the creator of a space. - * - * @since 1.2.0-GA - * @deprecated Use {@link #getManagers()} instead. - * Will be removed by 1.2.8 - */ - @Deprecated - public void setCreator(String creator) { - this.creator = creator; - } - /** * Gets the editor of a space. * @@ -700,7 +550,7 @@ public void setEditor(String editor) { public String[] getManagers() { return managers; } - + /** * Sets the managers of a space. * @@ -728,7 +578,7 @@ public String[] getMembers() { public void setMembers(String[] members) { this.members = members; } - + /** * @return the redactors */ @@ -742,7 +592,7 @@ public String[] getRedactors() { public void setRedactors(String[] redactors) { this.redactors = redactors; } - + /** * @return the publishers */ @@ -759,6 +609,7 @@ public void setPublishers(String[] publishers) { /** * Gets the last updated time in milliseconds of avatar in a space + * * @return {@link Void} * @since 1.2.1 */ @@ -768,6 +619,7 @@ public Long getAvatarLastUpdated() { /** * Sets the last updated time in milliseconds of avatar in a space + * * @param avatarLastUpdatedTime * @since 1.2.1 */ @@ -804,14 +656,14 @@ public int hashCode() { } @Override - public boolean equals(Object obj){ + public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; - Space other = (Space)obj; + Space other = (Space) obj; if (id == null) { if (other.id != null) return false; @@ -819,4 +671,4 @@ public boolean equals(Object obj){ return false; return true; } -} \ No newline at end of file +} diff --git a/component/api/src/main/java/org/exoplatform/social/core/space/spi/SpaceApplicationHandler.java b/component/api/src/main/java/org/exoplatform/social/core/space/spi/SpaceApplicationHandler.java deleted file mode 100644 index d6c48585ed9..00000000000 --- a/component/api/src/main/java/org/exoplatform/social/core/space/spi/SpaceApplicationHandler.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (C) 2003-2010 eXo Platform SAS. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License - * as published by the Free Software Foundation; either version 3 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see. - */ -package org.exoplatform.social.core.space.spi; - -import org.exoplatform.container.component.ComponentPlugin; -import org.exoplatform.social.core.space.SpaceException; -import org.exoplatform.social.core.space.SpaceTemplate; -import org.exoplatform.social.core.space.model.Space; - -/** - * Handler for working with space applications: install, activate, deactivate, - * uninstall... - * - * @author dang.tung - * @author hoatle (hoatlevan at gmail dot com) - * @since Oct 17, 2008 - */ - -public interface SpaceApplicationHandler extends ComponentPlugin { - - /** - * Initializes home space applications and space applications. - * - * @param space - * @param spaceTemplate - * @throws SpaceException - * @since 1.2.0-GA - */ - public void initApps(Space space, SpaceTemplate spaceTemplate) throws SpaceException; - - /** - * De-initializes a space application. - * - * @param space - * @throws SpaceException - */ - public void deInitApp(Space space) throws SpaceException; - - /** - * Installs an application to a space. - * - * @param space - * @param appId - * @throws SpaceException - */ - public void installApplication(Space space, String appId) throws SpaceException; - - /** - * Activates an installed application in a space. - * - * @param space - * @param appId - * @throws SpaceException - */ - public void activateApplication(Space space, String appId, String appName) throws SpaceException; - - /** - * Deactivates an installed application in a space. - * - * @param space - * @param appId - * @throws SpaceException - */ - public void deactiveApplication(Space space, String appId) throws SpaceException; - - /** - * Removes an application in a space. - * - * @param space - * @param appId - * @throws SpaceException - */ - public void removeApplication(Space space, String appId, String appName) throws SpaceException; - - /** - * Remove all applications in a space. - * - * @param space - * @throws SpaceException - */ - public void removeApplications(Space space) throws SpaceException; - - /** - * Gets name. - * - * @return - */ - public String getName(); - - /** - * @param space Space to change its location - * @param appId application identifier - * @param transition positive number to move up and negative number to move - * down - * @throws Exception when error saving moved node - */ - default void moveApplication(Space space, String appId, int transition) throws Exception { - throw new UnsupportedOperationException(); - } - - /** - * Restores a page layout to its default associated to Space Template - * - * @param space {@link Space} to change its layout - * @param appId Id of the installed application or can be 'home' to designate the space home page - * @throws Exception when error saving moved node - */ - default void restoreApplicationLayout(Space space, String appId) throws Exception { // NOSONAR - throw new UnsupportedOperationException(); - } - -} diff --git a/component/api/src/main/java/org/exoplatform/social/core/space/spi/SpaceLifeCycleEvent.java b/component/api/src/main/java/org/exoplatform/social/core/space/spi/SpaceLifeCycleEvent.java index b63600481a6..222cdc05891 100644 --- a/component/api/src/main/java/org/exoplatform/social/core/space/spi/SpaceLifeCycleEvent.java +++ b/component/api/src/main/java/org/exoplatform/social/core/space/spi/SpaceLifeCycleEvent.java @@ -32,10 +32,10 @@ public class SpaceLifeCycleEvent extends LifeCycleEvent{ public enum Type { - SPACE_CREATED, SPACE_REMOVED, APP_ADDED, APP_REMOVED, APP_ACTIVATED, APP_DEACTIVATED, JOINED, LEFT, + SPACE_CREATED, SPACE_REMOVED, JOINED, LEFT, GRANTED_LEAD, REVOKED_LEAD, SPACE_RENAMED, SPACE_DESCRIPTION_EDITED, SPACE_AVATAR_EDITED, SPACE_HIDDEN, - ADD_INVITED_USER, DENY_INVITED_USER, ADD_PENDING_USER, REMOVE_PENDING_USER, SPACE_REGISTRATION, SPACE_BANNER_EDITED, - SPACE_PUBLIC_SITE_CREATED, SPACE_PUBLIC_SITE_UPDATED + ADD_INVITED_USER, DENY_INVITED_USER, ADD_PENDING_USER, ADD_PUBLISHER_USER, REMOVE_PUBLISHER_USER, ADD_REDACTOR_USER, + REMOVE_REDACTOR_USER, REMOVE_PENDING_USER, SPACE_REGISTRATION, SPACE_BANNER_EDITED, SPACE_PUBLIC_SITE_CREATED, SPACE_PUBLIC_SITE_UPDATED }; /** @@ -68,7 +68,7 @@ public String getTarget() { } public String toString() { - return source + ":" + type + "@" + payload.getName(); + return source + ":" + type + "@" + payload.getPrettyName(); } } diff --git a/component/api/src/main/java/org/exoplatform/social/core/space/spi/SpaceLifeCycleListener.java b/component/api/src/main/java/org/exoplatform/social/core/space/spi/SpaceLifeCycleListener.java index 384ab177cd1..eee7ab1c450 100644 --- a/component/api/src/main/java/org/exoplatform/social/core/space/spi/SpaceLifeCycleListener.java +++ b/component/api/src/main/java/org/exoplatform/social/core/space/spi/SpaceLifeCycleListener.java @@ -46,45 +46,6 @@ default void spaceRemoved(SpaceLifeCycleEvent event) { // No default implementation } - /** - * Invokes this method when an application is added to a space. - * - * @param event the space lifecycle event - */ - default void applicationAdded(SpaceLifeCycleEvent event) { - // No default implementation - } - - - /** - * Invokes this method when an application is removed from a space. - * - * @param event the space lifecycle event. - */ - default void applicationRemoved(SpaceLifeCycleEvent event) { - // No default implementation - } - - - /** - * Invokes this method when an application is activated. - * - * @param event the space lifecyle event - */ - default void applicationActivated(SpaceLifeCycleEvent event) { - // No default implementation - } - - - /** - * Invokes this method when an application is deactivated from a space. - * - * @param event the space lifecycle event - */ - default void applicationDeactivated(SpaceLifeCycleEvent event) { - // No default implementation - } - /** * Invokes this method when a user joins a space. * @@ -195,6 +156,42 @@ default void removePendingUser(SpaceLifeCycleEvent event) { // No default implementation } + /** + * Triggered when a Redactor role has been added + * + * @param event the space lifecycle event + */ + default void addRedactorUser(SpaceLifeCycleEvent event) { + // No default implementation + } + + /** + * Triggered when a Redactor role has been removed + * + * @param event the space lifecycle event + */ + default void removeRedactorUser(SpaceLifeCycleEvent event) { + // No default implementation + } + + /** + * Triggered when a Publisher role has been added + * + * @param event the space lifecycle event + */ + default void addPublisherUser(SpaceLifeCycleEvent event) { + // No default implementation + } + + /** + * Triggered when a Publisher role has been removed + * + * @param event the space lifecycle event + */ + default void removePublisherUser(SpaceLifeCycleEvent event) { + // No default implementation + } + /** * Invokes this method when a user update the space registration * @param event diff --git a/component/api/src/main/java/org/exoplatform/social/core/space/spi/SpaceService.java b/component/api/src/main/java/org/exoplatform/social/core/space/spi/SpaceService.java index a5efe90ede9..05955034b7c 100644 --- a/component/api/src/main/java/org/exoplatform/social/core/space/spi/SpaceService.java +++ b/component/api/src/main/java/org/exoplatform/social/core/space/spi/SpaceService.java @@ -18,6 +18,7 @@ import java.time.Instant; import java.util.List; +import java.util.Map; import org.exoplatform.commons.exception.ObjectNotFoundException; import org.exoplatform.commons.utils.ListAccess; @@ -35,18 +36,6 @@ */ public interface SpaceService { - /** - * Gets a space by its display name. - * - * @param spaceDisplayName The space display name. - * @return The space. - * @LevelAPI Platform - * @since 1.2.0-GA - */ - default Space getSpaceByDisplayName(String spaceDisplayName) { - throw new UnsupportedOperationException(); - } - /** * Gets a space by its pretty name. * @@ -83,18 +72,6 @@ default Space getSpaceById(String spaceId) { throw new UnsupportedOperationException(); } - /** - * Gets a space by its URL. - * - * @param spaceUrl URL of the space. - * @return The space. - * @LevelAPI Platform - * @since 1.2.0-GA - */ - default Space getSpaceByUrl(String spaceUrl) { - throw new UnsupportedOperationException(); - } - /** * Gets a list access that contains all spaces. * @@ -263,8 +240,7 @@ default ListAccess getPendingSpacesByFilter(String username, SpaceFilter } /** - * Creates a new space: creating a group, its group navigation with pages for - * installing space applications. + * Creates a new space: creating a group, its group navigation with pages * * @param space The space to be created. * @param creatorUsername The remote user Id. @@ -605,6 +581,19 @@ default boolean canManageSpace(Space space, String username) { } } + /** + * Checks the deletion permissions added from SpaceTemplate entity to Space + * entity in space creation step. If empty, then space admin can delete the + * space + * + * @param space {@link Space} + * @param username + * @return true if can delete the space, else false + */ + default boolean canDeleteSpace(Space space, String username) { + return canManageSpace(space, username); + } + /** * checks whether the user can view the space or not * @@ -706,8 +695,7 @@ default boolean hasSettingPermission(Space space, String username) { } /** - * Registers a space listener plugin to listen to space lifecyle events: - * creating, updating, installing an application, and more. + * Registers a space listener plugin to listen to space lifecyle events * * @param spaceListenerPlugin The space listener plugin to be registered. * @LevelAPI Platform @@ -762,7 +750,7 @@ default Space createSpace(Space space, String creator, List identities * * @param space The space to be saved or updated. */ - default void createSpace(Space space) { + default Space createSpace(Space space) { throw new UnsupportedOperationException(); } @@ -852,146 +840,6 @@ default void setIgnored(String spaceId, String username) { throw new UnsupportedOperationException(); } - /** - * Restores a page layout to its default associated to Space Template - * - * @param spaceId {@link Space} technical identifier - * @param appId Id of the installed application or can be 'home' to designate - * the space home page - * @param identity user {@link Identity} making the change - * @throws IllegalAccessException when current user doesn't have permission to - * manage spaces - * @throws SpaceException when error reading Space identified by its id - * @deprecated Will be removed when the Meeds-io/MIPs#150 get implemented with new way of Layout management - */ - @Deprecated(since = "7.0", forRemoval = true) - default void restoreSpacePageLayout(String spaceId, - String appId, - org.exoplatform.services.security.Identity identity) throws IllegalAccessException, - SpaceException { - throw new UnsupportedOperationException(); - } - - /** - * Installs an application in a space. - * - * @param space The space that the application is installed. - * @param appId Id of the installed application. - * @throws SpaceException with code SpaceException.Code.ERROR_DATA_STORE - * @LevelAPI Platform - * @deprecated the spaces pages aren't managed through applications anymore, - * thus this operation isn't needed anymore - */ - @Deprecated(since = "7.0", forRemoval = true) - default void installApplication(Space space, String appId) throws SpaceException { - throw new UnsupportedOperationException(); - } - - /** - * Activates an installed application in a space. - * - * @param space The space that the installed application is activated. - * @param appId Id of the installed application. - * @throws SpaceException with possible code: - * SpaceException.Code.UNABLE_TO_ADD_APPLICATION, - * SpaceExeption.Code.ERROR_DATA_STORE - * @LevelAPI Platform - * @deprecated the spaces pages aren't managed through applications anymore, - * thus this operation isn't needed anymore - */ - @Deprecated(since = "7.0", forRemoval = true) - default void activateApplication(Space space, String appId) throws SpaceException { - throw new UnsupportedOperationException(); - } - - /** - * Activates an installed application in a space. - * - * @param spaceId Id of the space that the installed application is activated. - * @param appId Id of the installed application. - * @throws SpaceException with possible code: - * SpaceException.Code.UNABLE_TO_ADD_APPLICATION, - * SpaceExeption.Code.ERROR_DATA_STORE - * @LevelAPI Platform - * @deprecated the spaces pages aren't managed through applications anymore, - * thus this operation isn't needed anymore - */ - @Deprecated(since = "7.0", forRemoval = true) - default void activateApplication(String spaceId, String appId) throws SpaceException { - activateApplication(getSpaceById(spaceId), appId); - } - - /** - * Deactivates an installed application in a space. - * - * @param space The space that the installed application is deactivated. - * @param appId Id of the installed application. - * @throws SpaceException - * @LevelAPI Platform - * @deprecated the spaces pages aren't managed through applications anymore, - * thus this operation isn't needed anymore - */ - @Deprecated(since = "7.0", forRemoval = true) - default void deactivateApplication(Space space, String appId) throws SpaceException { - throw new UnsupportedOperationException(); - } - - /** - * Deactivates an installed application in a space. - * - * @param spaceId Id of the space that the installed application is - * deactivated. - * @param appId Id of the installed application. - * @throws SpaceException - * @LevelAPI Platform - * @deprecated the spaces pages aren't managed through applications anymore, - * thus this operation isn't needed anymore - */ - @Deprecated(since = "7.0", forRemoval = true) - default void deactivateApplication(String spaceId, String appId) throws SpaceException { - deactivateApplication(getSpaceById(spaceId), appId); - } - - /** - * Removes an installed application from a space. - * - * @param space The space that the installed application is removed. - * @param appId Id of the installed application. - * @throws SpaceException - * @LevelAPI Platform - * @deprecated the spaces pages aren't managed through applications anymore, - * thus this operation isn't needed anymore - */ - @Deprecated(since = "7.0", forRemoval = true) - default void removeApplication(Space space, String appId, String appName) throws SpaceException { - throw new UnsupportedOperationException(); - } - - /** - * @param spaceId technical id of the space - * @param appId application identifier - * @param transition how much levels to move up or down an application - * @throws SpaceException - */ - @Deprecated(since = "7.0", forRemoval = true) - default void moveApplication(String spaceId, String appId, int transition) throws SpaceException { - throw new UnsupportedOperationException(); - } - - /** - * Removes an installed application from a space. - * - * @param spaceId Id of the space that the installed application is removed. - * @param appId Id of the installed application. - * @LevelAPI Platform - * @deprecated the spaces pages aren't managed through applications anymore, - * thus this operation isn't needed anymore - */ - @Deprecated(since = "7.0", forRemoval = true) - default void removeApplication(String spaceId, String appId, String appName) throws SpaceException { - removeApplication(getSpaceById(spaceId), appId, appName); - } - /** * Updates the most recently accessed space of a user to the top of spaces * list. @@ -1255,4 +1103,11 @@ default String getSpacePublicSiteName(Space space) { throw new UnsupportedOperationException(); } + /** + * @return the count of spaces by Space Template identifier + */ + default Map countSpacesByTemplate() { + throw new UnsupportedOperationException(); + } + } diff --git a/component/api/src/main/java/org/exoplatform/social/core/space/spi/SpaceTemplateService.java b/component/api/src/main/java/org/exoplatform/social/core/space/spi/SpaceTemplateService.java deleted file mode 100644 index d19ab63f787..00000000000 --- a/component/api/src/main/java/org/exoplatform/social/core/space/spi/SpaceTemplateService.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (C) 2003-2019 eXo Platform SAS. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License - * as published by the Free Software Foundation; either version 3 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see. - */ -package org.exoplatform.social.core.space.spi; - -import org.exoplatform.social.core.space.SpaceException; -import org.exoplatform.social.core.space.SpaceTemplate; -import org.exoplatform.social.core.space.SpaceTemplateConfigPlugin; -import org.exoplatform.social.core.space.model.Space; - -import java.util.List; -import java.util.Locale; -import java.util.Map; - -/** - * Provides methods to define and word with space template. - * - */ -public interface SpaceTemplateService { - - /** - * Gets a list of space templates - * - * @return The space templates list. - * - */ - List getSpaceTemplates(); - - /** - * Gets all space templates on which the user has permissions - * - * @param userId - */ - List getSpaceTemplates(String userId) throws Exception; - - /** - * Gets all space templates on which the user has permissions with permission labels according to lang - * If userId is not an administrators, all permissions are empty - * @param userId - * @param lang - */ - List getLabelledSpaceTemplates(String userId, String lang) throws Exception; - - /** - * Gets a space template by name - * - * @param name - * @return The space template. - * - */ - SpaceTemplate getSpaceTemplateByName(String name); - - /** - * Adds space template config plugin for configuring the space applications, visibility, registration and banner. - *
- * - * @param spaceTemplateConfigPlugin The space template config plugin to be added. - */ - void registerSpaceTemplatePlugin(SpaceTemplateConfigPlugin spaceTemplateConfigPlugin); - - /** - * Extends space template config plugin for extending the space applications. - *
- * - * @param spaceTemplateConfigPlugin The space template config plugin to be added. - */ - void extendSpaceTemplatePlugin(SpaceTemplateConfigPlugin spaceTemplateConfigPlugin); - - /** - * Adds space application handler for configuring the space applications. - *
- * - * @param spaceApplicationHandler The space application handler to be added. - */ - void registerSpaceApplicationHandler(SpaceApplicationHandler spaceApplicationHandler); - - /** - * Gets registered space application handlers. - *
- * - */ - Map getSpaceApplicationHandlers(); - - /** - * Gets the default space template name. - *
- * - */ - String getDefaultSpaceTemplate(); - - /** - * Init space applications. - * - * @param space The space.. - */ - void initSpaceApplications(Space space, SpaceApplicationHandler applicationHandler) throws SpaceException; - - /** - * Creates a public site for the designated space - * - * @param space chosen {@link Space} to create its public site - * @param publicSiteName chosen Site Name to create - * @param publicSiteLabel chosen Site label - * @param accessPermissions Site access Permissions - * @return created site identifier - */ - long createSpacePublicSite(Space space, - String publicSiteName, - String publicSiteLabel, - String[] accessPermissions); - - /** - * an application status is composed with the form of: - * [appId:appDisplayName:isRemovableString:status]. And space app properties is the combined - * of application statuses separated by a comma (,). For example: - * space.getApp() ="SpaceSettingPortlet:SpaceSettingPortletName:false:active,MembersPortlet:MembersPortlet:true:active" - * ; - * - * @param space - * @param appId - * @param appName - * @param isRemovable - * @param status - */ - void setApp(Space space, String appId, String appName, boolean isRemovable, String status); - -} diff --git a/component/api/src/main/java/org/exoplatform/social/core/storage/api/SpaceStorage.java b/component/api/src/main/java/org/exoplatform/social/core/storage/api/SpaceStorage.java deleted file mode 100644 index b114b125114..00000000000 --- a/component/api/src/main/java/org/exoplatform/social/core/storage/api/SpaceStorage.java +++ /dev/null @@ -1,855 +0,0 @@ -/* - * Copyright (C) 2003-2011 eXo Platform SAS. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -package org.exoplatform.social.core.storage.api; - -import org.exoplatform.social.core.identity.model.Identity; -import org.exoplatform.social.core.model.SpaceExternalInvitation; -import org.exoplatform.social.core.space.SpaceFilter; -import org.exoplatform.social.core.space.model.Space; -import org.exoplatform.social.core.storage.SpaceStorageException; - -import java.time.Instant; -import java.util.List; - -/** - * @author Alain Defrance - * @version $Revision$ - */ -public interface SpaceStorage { - - /** - * Gets a space by its display name. - * - * @param spaceDisplayName - * @return the space with spaceDisplayName that matches the spaceDisplayName input. - * @since 1.2.0-GA - * @throws org.exoplatform.social.core.storage.SpaceStorageException - */ - public Space getSpaceByDisplayName(String spaceDisplayName) throws SpaceStorageException; - - /** - * Saves a space. If isNew is true, creates new space. If not only updates space - * an saves it. - * - * @param space - * @param isNew - * @throws SpaceStorageException - */ - public void saveSpace(Space space, boolean isNew) throws SpaceStorageException; - - /** - * Renames a space. - * - * @param space - * @param newDisplayName - * @throws SpaceStorageException - * @since 1.2.8 - */ - public void renameSpace(Space space, String newDisplayName) throws SpaceStorageException; - - /** - * Deletes a space by space id. - * - * @param id - * @throws SpaceStorageException - */ - public void deleteSpace(String id) throws SpaceStorageException; - - /** - * update the SpaceMembership between space and user - * - * @param spaceId the space Id - * @param userId user Id - */ - void ignoreSpace(String spaceId, String userId); - - /** - * Verify if a space is ignored by the user or not. - * - * @param spaceId the id of the space - * @param userId the id of the user - * @return true if user has ignored the space from suggested list - */ - - boolean isSpaceIgnored(String spaceId, String userId); - - /** - * Gets the count of the spaces that a user has the "manager" role. - * - * @param userId - * @return the count of the manager spaces - * @throws SpaceStorageException - * @since 1.2.0-GA - */ - public int getManagerSpacesCount(String userId); - - /** - * Gets the count of the spaces which user has "manager" role by filter. - * - * @param userId - * @param spaceFilter - * @return - * @since 1.2.0-GA - */ - public int getManagerSpacesByFilterCount(String userId, SpaceFilter spaceFilter); - - /** - * Gets the spaces that a user has the "manager" role with offset, limit. - * - * @param userId - * @param offset - * @param limit - * @return a list of the manager spaces with offset, limit - * @throws SpaceStorageException - * @since 1.2.0-GA - */ - public List getManagerSpaces(String userId, long offset, long limit); - - /** - * Gets the manager spaces of the user id by the filter with offset, limit. - * - * @param userId - * @param spaceFilter - * @param offset - * @param limit - * @return - * @since 1.2.0-GA - */ - public List getManagerSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit); - - /** - * Gets the count of the spaces that a user has the "member" role. - * - * @param userId - * @return the count of the member spaces - * @throws SpaceStorageException - * @since 1.2.0-GA - */ - public int getMemberSpacesCount(String userId) throws SpaceStorageException; - - /** - * Gets the count of the spaces which user has "member" role by filter. - * - * @param userId - * @param spaceFilter - * @return - * @since 1.2.0-GA - */ - public int getMemberSpacesByFilterCount(String userId, SpaceFilter spaceFilter); - - /** - * Gets the spaces that a user has the "member" role. - * - * @param userId - * @return a list of the member spaces - * @throws SpaceStorageException - * @deprecated use {@link SpaceStorage#getMemberSpaces(String, long, long)} - * instead with offset and limit - * @since 1.2.0-GA - */ - @Deprecated - public List getMemberSpaces(String userId) throws SpaceStorageException; - - /** - * Gets the spaces that a user has the "member" role with offset, limit. - * - * @param userId - * @param offset - * @param limit - * @return a list of the member spaces with offset, limit - * @throws SpaceStorageException - * @since 1.2.0-GA - */ - public List getMemberSpaces(String userId, long offset, long limit) throws SpaceStorageException; - - /** - * Gets the member spaces of the user id by the filter with offset, limit. - * - * @param userId - * @param spaceFilter - * @param offset - * @param limit - * @return - * @since 1.2.0-GA - */ - public List getMemberSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit); - - /** - * Gets the count of the favorite spaces of the user id. - * - * @param userId - * @param spaceFilter - * @return - * @since 1.2.0-GA - */ - public int getFavoriteSpacesByFilterCount(String userId, SpaceFilter spaceFilter); - - /** - * Gets the favorite spaces of the user id by the filter with offset, limit. - * - * @param userId - * @param spaceFilter - * @param offset - * @param limit - * @return - * @since 1.2.0-GA - */ - public List getFavoriteSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit); - - /** - * Gets the count of the pending spaces of the userId. - * - * @param userId - * @return the count of the pending spaces - * @throws SpaceStorageException - * @since 1.2.0-GA - */ - public int getPendingSpacesCount(String userId) throws SpaceStorageException; - - /** - * Gets the count of the pending spaces of the user by space filter. - * - * @param userId - * @param spaceFilter - * @return - * @since 1.2.0-GA - */ - public int getPendingSpacesByFilterCount(String userId, SpaceFilter spaceFilter); - - /** - * Gets a user's pending spaces and that the user can revoke that request. - * - * @param userId - * @return a list of the pending spaces - * @throws SpaceStorageException - * @since 1.2.0-GA - */ - public List getPendingSpaces(String userId) throws SpaceStorageException; - - /** - * Gets a user's pending spaces and that the user can revoke that request with offset, limit. - * - * @param userId - * @param offset - * @param limit - * @return a list of the pending spaces with offset, limit - * @throws SpaceStorageException - * @since 1.2.0-GA - */ - public List getPendingSpaces(String userId, long offset, long limit) throws SpaceStorageException; - - /** - * Gets the pending spaces of the user by space filter with offset, limit. - * - * @param userId - * @param spaceFilter - * @param offset - * @param limit - * @return - * @since 1.2.0-GA - */ - public List getPendingSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit); - - /** - * Gets the count of the invited spaces of the userId. - * - * @param userId - * @return the count of the invited spaces - * @throws SpaceStorageException - * @since 1.2.0-GA - */ - public int getInvitedSpacesCount(String userId) throws SpaceStorageException; - - /** - * Gets the count of the invited spaces of the user by filter. - * - * @param userId - * @param spaceFilter - * @return - * @since 1.2.0-GA - */ - public int getInvitedSpacesByFilterCount(String userId, SpaceFilter spaceFilter); - - /** - * Gets a user's invited spaces and that user can accept or deny the request. - * - * @param userId - * @return a list of the invited spaces. - * @throws SpaceStorageException - * @since 1.2.0-GA - */ - public List getInvitedSpaces(String userId) throws SpaceStorageException; - - /** - * Gets a user's invited spaces and that user can accept or deny the request with offset, limit. - * - * @param userId - * @param offset - * @param limit - * @return a list of the invited spaces with offset, limit - * @throws SpaceStorageException - * @since 1.2.0-GA - */ - public List getInvitedSpaces(String userId, long offset, long limit) throws SpaceStorageException; - - /** - * Gets the invited spaces of the user by space filter with offset, limit. - * - * @param userId - * @param spaceFilter - * @param offset - * @param limit - * @return - * @since 1.2.0-GA - */ - public List getInvitedSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit); - - /** - * Gets the count of the public spaces of the userId. - * - * @param userId - * @return the count of the spaces in which the user can request to join - * @throws SpaceStorageException - * @since 1.2.0-GA - */ - public int getPublicSpacesCount(String userId) throws SpaceStorageException; - - /** - * Gets the count of the public spaces of the user by space filter. - * - * @param userId - * @param spaceFilter - * @return - * @since 1.2.0-GA - */ - public int getPublicSpacesByFilterCount(String userId, SpaceFilter spaceFilter); - - /** - * Gets the public spaces of the user by filter with offset, limit. - * - * @param userId - * @param spaceFilter - * @param offset - * @param limit - * @return - * @since 1.2.0-GA - */ - public List getPublicSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit); - - /** - * Gets a user's public spaces and that user can request to join. - * - * @param userId - * @return spaces list in which the user can request to join. - * @throws SpaceStorageException - * @since 1.2.0-GA - */ - public List getPublicSpaces(String userId) throws SpaceStorageException; - - /** - * Gets a user's public spaces and that user can request to join with offset, limit. - * - * @param userId - * @param offset - * @param limit - * @return spaces list in which the user can request to join with offset, limit - * @throws SpaceStorageException - * @since 1.2.0-GA - */ - public List getPublicSpaces(String userId, long offset, long limit) throws SpaceStorageException; - - /** - * Gets the count of the accessible spaces of the userId. - * - * @param userId - * @return the count of the accessible spaces - * @throws SpaceStorageException - * @since 1.2.0-GA - */ - public int getAccessibleSpacesCount(String userId) throws SpaceStorageException; - - /** - * Gets the count of the visible spaces of the userId. - * - * @param userId - * @param spaceFilter - * @return - * @throws SpaceStorageException - * @since 1.2.5-GA - */ - public int getVisibleSpacesCount(String userId, SpaceFilter spaceFilter) throws SpaceStorageException; - - /** - * Gets the count of the accessible spaces of the user by filter. - * - * @param userId - * @param spaceFilter - * @return - * @since 1.2.0-GA - */ - public int getAccessibleSpacesByFilterCount(String userId, SpaceFilter spaceFilter); - - /** - * Gets the spaces of a user which that user has the "member" role or edit permission. - * - * @param userId the userId - * @return a list of the accessible spaces - * @throws SpaceStorageException - * @since 1.2.0-GA - * @deprecated 4.0.0-RC2 - */ - @Deprecated - public List getAccessibleSpaces(String userId) throws SpaceStorageException; - - /** - * Gets the spaces of a user which that user has the visible spaces. - * - * @param userId the userId - * @return a list of the accessible spaces - * @throws SpaceStorageException - * @since 1.2.5-GA - */ - public List getVisibleSpaces(String userId, SpaceFilter spaceFilter, long offset, long limit) - throws SpaceStorageException; - - /** - * Gets the spaces of a user which that user has the "member" role or edit permission. - * - * @param userId the userId - * @return a list of the accessible spaces - * @throws SpaceStorageException - * @since 1.2.0-GA - */ - public List getVisibleSpaces(String userId, SpaceFilter spaceFilter) throws SpaceStorageException; - - /** - * Gets the spaces of a user which that user has "member" role or edit permission with offset, limit. - * - * @param userId the userId - * @param offset - * @param limit - * @return a list of the accessible space with offset, limit - * @throws SpaceStorageException - * @since 1.2.0-GA - */ - public List getAccessibleSpaces(String userId, long offset, long limit) throws SpaceStorageException; - - /** - * Gets the accessible spaces of the user by filter with offset, limit. - * - * @param userId - * @param spaceFilter - * @param offset - * @param limit - * @return - * @since 1.2.0-GA - */ - public List getAccessibleSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit); - - /** - * Gets the count of the spaces of a user which that user has the edit permission. - * - * @param userId - * @return the count of the editable spaces. - * @throws SpaceStorageException - * @since 1.2.0-GA - */ - public int getEditableSpacesCount(String userId) throws SpaceStorageException; - - /** - * Gets the count of the editable spaces of the user by filter. - * - * @param userId - * @param spaceFilter - * @return - * @since 1.2.0-GA - */ - public int getEditableSpacesByFilterCount(String userId, SpaceFilter spaceFilter); - - /** - * Gets the spaces of a user which that user has the edit permission. - * - * @param userId - * @return a list of the editable spaces. - * @throws SpaceStorageException - * @since 1.2.0-GA - */ - public List getEditableSpaces(String userId) throws SpaceStorageException; - - /** - * Gets the spaces of a user which that user has the edit permission with offset, limit. - * - * @param userId - * @param offset - * @param limit - * @return a list of the spaces with offset, limit - * @throws SpaceStorageException - * @since 1.2.0-GA - */ - public List getEditableSpaces(String userId, long offset, long limit) throws SpaceStorageException; - - /** - * Gets the editable spaces of the user by filter with offset, limit. - * - * @param userId - * @param spaceFilter - * @param offset - * @param limit - * @return - * @since 1.2.0-GA - */ - public List getEditableSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit); - - /** - * Gets the count of the spaces. - * - * @return the count of all spaces - * @throws SpaceStorageException - * @since 1.2.0-GA - */ - public int getAllSpacesCount() throws SpaceStorageException; - - /** - * Gets all the spaces. By the default get the all spaces with OFFSET = 0, LIMIT = 200; - * - * @throws SpaceStorageException - * @return the list of all spaces - */ - public List getAllSpaces() throws SpaceStorageException; - - /** - * Gets the count of the spaces which are searched by space filter. - * - * @param spaceFilter - * @return - * @since 1.2.0-GA - */ - public int getAllSpacesByFilterCount(SpaceFilter spaceFilter); - - /** - * Gets the spaces with offset, limit. - * - * @param offset - * @param limit - * @return the list of the spaces with offset, limit - * @throws SpaceStorageException - * @since 1.2.0-GA - */ - public List getSpaces(long offset, long limit) throws SpaceStorageException; - - /** - * Gets the spaces by space filter with offset, limit. - * - * @param spaceFilter - * @param offset - * @param limit - * @return - * @throws SpaceStorageException - */ - public List getSpacesByFilter(SpaceFilter spaceFilter, long offset, long limit); - - /** - * Gets a space by its space id. - * - * @param id - * @return space with id specified - * @throws SpaceStorageException - */ - public Space getSpaceById(String id) throws SpaceStorageException; - - /** - * Gets a space simple by its space id to aim decrease workload to get full information. - * - * It's only to get a little space information such as displayName, groupId, prettyName - * description, id, avatar .. - * - * @param id - * @return space with id specified - * @throws SpaceStorageException - */ - public Space getSpaceSimpleById(String id) throws SpaceStorageException; - - /** - * Gets a space by its pretty name. - * - * @param spacePrettyName - * @return the space with spacePrettyName that matches spacePrettyName input. - * @throws SpaceStorageException - * @since 1.2.0-GA - */ - public Space getSpaceByPrettyName(String spacePrettyName) throws SpaceStorageException; - - /** - * Gets a space by its associated group id. - * - * @param groupId - * @return the space that has group id matching the groupId string input. - * @throws SpaceStorageException - * @since 1.2.0-GA - */ - public Space getSpaceByGroupId(String groupId) throws SpaceStorageException; - - /** - * Gets a space by its url. - * - * @param url - * @return the space with string url specified - * @throws SpaceStorageException - */ - public Space getSpaceByUrl(String url) throws SpaceStorageException; - - /** - * Update accessed space to top of space members list of Identity model - * - * @param remoteId - * @param space - */ - void updateSpaceAccessed(String remoteId, Space space) throws SpaceStorageException; - - /** - * Gets list of spaces which user has been last visited. - * @param offset TODO - * @param limit - * @param filter - */ - List getLastAccessedSpace(SpaceFilter filter, int offset, int limit) throws SpaceStorageException; - - /** - * Gets number of spaces which user has been last visited. - * @param filter - */ - int getLastAccessedSpaceCount(SpaceFilter filter) throws SpaceStorageException; - - /** - * Gets the count of the public spaces of the userId. - * - * @param userId - * @return number of public space of a user where he is member - * @since 4.0.0.Beta01 - */ - int getNumberOfMemberPublicSpaces(String userId); - - /** - * Get the visited spaces - * - * @param filter - * @param offset - * @param limit - * @return list of browsed spaces - * @throws SpaceStorageException - */ - List getVisitedSpaces(SpaceFilter filter, int offset, int limit) throws SpaceStorageException; - - /** - * Gets the last spaces that have been created. - * - * @param limit the limit of spaces to provide. - * @return The last spaces. - * @LevelAPI Experimental - * @since 4.0.x - */ - List getLastSpaces(int limit); - - /** - * Retrieves the list of Space {@link Identity} technical identifiers - * - * @param identityId user {@link Identity} technical identifier - * @param offset The starting point - * @param limit The limitation of returned results - * @return {@link List} of space {@link Identity} technical identifiers - * @throws SpaceStorageException - * @since 6.4.0 - * @deprecated use - * {@link SpaceStorage#getMemberRoleSpaceIdentityIds(String, int, int)} - * instead - */ - @Deprecated(since = "6.4.0", forRemoval = true) - default List getMemberSpaceIds(String identityId, int offset, int limit) throws SpaceStorageException { - return getMemberRoleSpaceIdentityIds(identityId, offset, limit); - } - - /** - * Retrieves the list of Space {@link Identity} technical identifiers - * - * @param remoteId user {@link Identity} remote Id - * @param status {@link String} equals to MEMBER, MANAGER, REDACTOR, PENDING, - * INVITED, IGNORED - * @param offset The starting point - * @param limit The limitation of returned results - * @return {@link List} of space {@link Identity} technical identifiers - */ - default List getSpaceIdentityIdsByUserRole(String remoteId, String status, int offset, int limit) { - throw new UnsupportedOperationException(); - } - - /** - * Retrieves the list of favorite Space {@link Identity} technical identifiers - * - * @param userIdentityId user {@link Identity} technical identifier - * @param spaceFilter {@link SpaceFilter} used to filter on spaces - * @param offset The starting point - * @param limit The limitation of returned results - * @return {@link List} of space {@link Identity} technical identifiers - */ - default List getFavoriteSpaceIdentityIds(String userIdentityId, SpaceFilter spaceFilter, int offset, int limit) { - throw new UnsupportedOperationException(); - } - - /** - * Retrieves the list of Space {@link Identity} technical identifiers - * - * @param identityId user {@link Identity} technical identifier - * @param offset The starting point - * @param limit The limitation of returned results - * @return {@link List} of space {@link Identity} technical identifiers - * @throws SpaceStorageException - */ - public List getMemberRoleSpaceIdentityIds(String identityId, int offset, int limit) throws SpaceStorageException; - - /** - * Retrieves the list of {@link Space} technical identifiers - * - * @param identityId user {@link Identity} technical identifier - * @param offset The starting point - * @param limit The limitation of returned results - * @return {@link List} of {@link Space} technical identifiers - * @throws SpaceStorageException - */ - public List getMemberRoleSpaceIds(String identityId, int offset, int limit) throws SpaceStorageException; - - /** - * Retrieves the list of {@link Space} technical identifiers - * - * @param identityId user {@link Identity} technical identifier - * @param offset The starting point - * @param limit The limitation of returned results - * @return {@link List} of {@link Space} technical identifiers - * @throws SpaceStorageException - */ - public List getManagerRoleSpaceIds(String identityId, int offset, int limit) throws SpaceStorageException; - - /** - * @param spaceId - * @return - * @throws SpaceStorageException - */ - public List findSpaceExternalInvitationsBySpaceId(String spaceId) throws SpaceStorageException; - - /** - * Saves a new external invitation in space - * - * @param spaceId - * @param email - * @throws SpaceStorageException - */ - public void saveSpaceExternalInvitation(String spaceId, String email, String tokenId) throws SpaceStorageException; - - /** - * Get an external invitation by invitation id - * - * @param invitationId - * @throws SpaceStorageException - */ - public SpaceExternalInvitation findSpaceExternalInvitationById(String invitationId) throws SpaceStorageException; - - /** - * Delete an external invitation from a space - * - * @param spaceExternalInvitation - * @throws SpaceStorageException - */ - public void deleteSpaceExternalInvitation(SpaceExternalInvitation spaceExternalInvitation) throws SpaceStorageException; - - /** - * get the list of spaces ids by external email - * - * @param email - * @throws SpaceStorageException - */ - public List findExternalInvitationsSpacesByEmail(String email) throws SpaceStorageException; - - /** - * Delete external invitations - * - * @param email - * @throws SpaceStorageException - */ - public void deleteExternalUserInvitations(String email) throws SpaceStorageException; - - /** - * @param username username used to retrieve user spaces - * @return the count of users requested to join spaces that user manages - */ - default int countPendingSpaceRequestsToManage(String username) { - throw new UnsupportedOperationException(); - } - - /** - * @param username username used to retrieve user spaces - * @param offset offset of the query - * @param limit limit of the query - * @return {@link List} of {@link Space} with pending users requesting to - * join spaces that the designated user manages - */ - default List getPendingSpaceRequestsToManage(String username, int offset, int limit) { - throw new UnsupportedOperationException(); - } - - /** - * Counts the number of external users in a specific space - * - * @param spaceId - * @return counts the external members in the space - */ - default int countExternalMembers(Long spaceId) { - throw new UnsupportedOperationException(); - } - - /** - * Get common spaces between two users - * - * @param userId connected user id - * @param otherUserId visited profile user id - * @return list of common spaces between two users in param - */ - default List getCommonSpaces(String userId, String otherUserId, int offset, int limit){ - throw new UnsupportedOperationException(); - } - /** - * Count common spaces between two users - * - * @param userId connected user id - * @param otherUserId visited profile user id - * @return list of common spaces between two users in param - */ - default int countCommonSpaces(String userId, String otherUserId){ - throw new UnsupportedOperationException(); - } - - /** - * Retrieves the Space Membership date - * - * @param spaceId {@link Space} technical id - * @param username User name (identifier) - * @return {@link Instant} corresponding to the creation date of the - * membership - */ - default Instant getSpaceMembershipDate(long spaceId, String username) { - throw new UnsupportedOperationException(); - } -} diff --git a/component/core/src/main/java/io/meeds/social/authorization/AuthorizationManager.java b/component/core/src/main/java/io/meeds/social/authorization/AuthorizationManager.java index bdd8eb9075e..f0173fe2cfb 100644 --- a/component/core/src/main/java/io/meeds/social/authorization/AuthorizationManager.java +++ b/component/core/src/main/java/io/meeds/social/authorization/AuthorizationManager.java @@ -21,7 +21,7 @@ import java.util.List; import java.util.stream.Stream; -import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.exoplatform.container.ExoContainerContext; @@ -32,22 +32,39 @@ import org.exoplatform.services.security.MembershipEntry; import org.exoplatform.social.core.space.SpaceUtils; import org.exoplatform.social.core.space.SpacesAdministrationService; +import org.exoplatform.social.core.space.model.Space; +import org.exoplatform.social.core.space.spi.SpaceService; import lombok.Setter; public class AuthorizationManager extends UserACL { - private static final String SPACES_GROUP_PREFIX = SpaceUtils.SPACE_GROUP + "/"; - @Setter private SpacesAdministrationService spacesAdministrationService; + @Setter + private SpaceService spaceService; + public AuthorizationManager(InitParams params) { super(params); } @Override public boolean hasEditPermission(Identity identity, String ownerType, String ownerId, String expression) { + if (isSpaceOwnerId(ownerType, ownerId)) { + Space space = getSpaceService().getSpaceByGroupId(ownerId); + if (space != null && identity != null) { + if (CollectionUtils.isNotEmpty(space.getLayoutPermissions())) { + return isAdministrator(identity) + || isSpacesAdministrator(identity) + || space.getLayoutPermissions() + .stream() + .anyMatch(permission -> identity.isMemberOf(getMembershipEntry(permission))); + } else { + return isAdministrator(identity) || isSpacesAdministrator(identity); + } + } + } return isAdministrator(identity, ownerType, ownerId) || super.hasEditPermission(identity, ownerType, ownerId, expression); } @@ -59,9 +76,7 @@ public boolean hasAccessPermission(Identity identity, String ownerType, String o } private boolean isAdministrator(Identity identity, String ownerType, String ownerId) { - return PortalConfig.GROUP_TYPE.equalsIgnoreCase(ownerType) - && StringUtils.startsWith(ownerId, SPACES_GROUP_PREFIX) - && isSpacesAdministrator(identity); + return isSpaceOwnerId(ownerType, ownerId) && isSpacesAdministrator(identity); } private boolean isSpacesAdministrator(Identity identity) { @@ -71,10 +86,26 @@ private boolean isSpacesAdministrator(Identity identity) { .anyMatch(permission -> isMemberOf(identity, permission.toString())); } - public SpacesAdministrationService getSpacesAdministrationService() { + private boolean isSpaceOwnerId(String ownerType, String ownerId) { + return PortalConfig.GROUP_TYPE.equalsIgnoreCase(ownerType) + && StringUtils.startsWith(ownerId, SpaceUtils.SPACE_GROUP_PREFIX); + } + + private MembershipEntry getMembershipEntry(String expression) { + return expression.contains(":") ? MembershipEntry.parse(expression) : new MembershipEntry(expression); + } + + private SpacesAdministrationService getSpacesAdministrationService() { if (spacesAdministrationService == null) { spacesAdministrationService = ExoContainerContext.getService(SpacesAdministrationService.class); } return spacesAdministrationService; } + + private SpaceService getSpaceService() { + if (spaceService == null) { + spaceService = ExoContainerContext.getService(SpaceService.class); + } + return spaceService; + } } diff --git a/component/core/src/main/java/io/meeds/social/core/search/listener/SpaceIndexingListenerImpl.java b/component/core/src/main/java/io/meeds/social/core/search/listener/SpaceIndexingListenerImpl.java index feb71380250..61cf3f3d580 100644 --- a/component/core/src/main/java/io/meeds/social/core/search/listener/SpaceIndexingListenerImpl.java +++ b/component/core/src/main/java/io/meeds/social/core/search/listener/SpaceIndexingListenerImpl.java @@ -86,58 +86,58 @@ public void spaceRegistrationEdited(SpaceLifeCycleEvent event) { } @Override - public void spaceBannerEdited(SpaceLifeCycleEvent event) { - // Banner not indexed + public void grantedLead(SpaceLifeCycleEvent event) { + reindex(event, "space member granted as manager"); } @Override - public void applicationActivated(SpaceLifeCycleEvent event) { - reindex(event, "space application activated"); + public void joined(SpaceLifeCycleEvent event) { + reindex(event, "space member joined"); } @Override - public void applicationAdded(SpaceLifeCycleEvent event) { - reindex(event, "space application added"); + public void left(SpaceLifeCycleEvent event) { + reindex(event, "space member left"); } @Override - public void applicationDeactivated(SpaceLifeCycleEvent event) { - reindex(event, "space application disabled"); + public void revokedLead(SpaceLifeCycleEvent event) { + reindex(event, "space member revoked as manager"); } @Override - public void applicationRemoved(SpaceLifeCycleEvent event) { - reindex(event, "space application removed"); + public void spaceAvatarEdited(SpaceLifeCycleEvent event) { + reindex(event, "space avatar updated"); } @Override - public void grantedLead(SpaceLifeCycleEvent event) { - reindex(event, "space member granted as manager"); + public void addRedactorUser(SpaceLifeCycleEvent event) { + reindex(event, "add redactor"); } @Override - public void joined(SpaceLifeCycleEvent event) { - reindex(event, "space member joined"); + public void removeRedactorUser(SpaceLifeCycleEvent event) { + reindex(event, "remove redactor"); } @Override - public void left(SpaceLifeCycleEvent event) { - reindex(event, "space member left"); + public void addPublisherUser(SpaceLifeCycleEvent event) { + reindex(event, "add publisher"); } @Override - public void revokedLead(SpaceLifeCycleEvent event) { - reindex(event, "space member revoked as manager"); + public void removePublisherUser(SpaceLifeCycleEvent event) { + reindex(event, "remove publisher"); } @Override - public void spaceAvatarEdited(SpaceLifeCycleEvent event) { - reindex(event, "space avatar updated"); + public void addInvitedUser(SpaceLifeCycleEvent event) { + reindex(event, "user invited to space"); } @Override - public void addInvitedUser(SpaceLifeCycleEvent event) { - reindex(event, "user invited to space"); + public void removeInvitedUser(SpaceLifeCycleEvent event) { + reindex(event, "user invitation to space canceled"); } @Override @@ -145,6 +145,11 @@ public void addPendingUser(SpaceLifeCycleEvent event) { reindex(event, "user requested access to space"); } + @Override + public void removePendingUser(SpaceLifeCycleEvent event) { + reindex(event, "user canceled request access to space"); + } + private void reindex(SpaceLifeCycleEvent event, String cause) { Space space = event.getSpace(); updateSpaceTags(space); @@ -162,7 +167,10 @@ private void updateSpaceTags(Space space) { Set tagNames = tagService.detectTagNames(space.getDescription()); IdentityManager identityManager = ExoContainerContext.getService(IdentityManager.class); Identity spaceIdentity = identityManager.getOrCreateSpaceIdentity(space.getPrettyName()); - String editor = StringUtils.firstNonBlank(space.getEditor(), space.getManagers() == null || space.getManagers().length == 0 ? null : space.getManagers()[0]); + String editor = StringUtils.firstNonBlank(space.getEditor(), + space.getManagers() == null + || space.getManagers().length == 0 ? null : + space.getManagers()[0]); if (editor == null) { LOG.warn("Can't update Space Tags due to missing editor username"); } else { diff --git a/component/core/src/main/java/io/meeds/social/core/space/constant/PublicSiteVisibility.java b/component/core/src/main/java/io/meeds/social/core/space/constant/PublicSiteVisibility.java new file mode 100644 index 00000000000..5de7066948c --- /dev/null +++ b/component/core/src/main/java/io/meeds/social/core/space/constant/PublicSiteVisibility.java @@ -0,0 +1,25 @@ +/* + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ +package io.meeds.social.core.space.constant; + +public enum PublicSiteVisibility { + MANAGER, MEMBER, INTERNAL, AUTHENTICATED, EVERYONE; +} diff --git a/component/core/src/main/java/io/meeds/social/core/space/constant/Registration.java b/component/core/src/main/java/io/meeds/social/core/space/constant/Registration.java new file mode 100644 index 00000000000..a5c895b974a --- /dev/null +++ b/component/core/src/main/java/io/meeds/social/core/space/constant/Registration.java @@ -0,0 +1,25 @@ +/* + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ +package io.meeds.social.core.space.constant; + +public enum Registration { + OPEN, VALIDATION, CLOSED +} \ No newline at end of file diff --git a/component/core/src/main/java/io/meeds/social/core/space/constant/Visibility.java b/component/core/src/main/java/io/meeds/social/core/space/constant/Visibility.java new file mode 100644 index 00000000000..89eefee5af6 --- /dev/null +++ b/component/core/src/main/java/io/meeds/social/core/space/constant/Visibility.java @@ -0,0 +1,25 @@ +/* + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ +package io.meeds.social.core.space.constant; + +public enum Visibility { + PUBLIC, PRIVATE, HIDDEN +} diff --git a/component/core/src/main/java/io/meeds/social/core/space/listener/SpaceLayoutHandlerPlugin.java b/component/core/src/main/java/io/meeds/social/core/space/listener/SpaceLayoutHandlerPlugin.java new file mode 100644 index 00000000000..f729b30f644 --- /dev/null +++ b/component/core/src/main/java/io/meeds/social/core/space/listener/SpaceLayoutHandlerPlugin.java @@ -0,0 +1,51 @@ +/** + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package io.meeds.social.core.space.listener; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import org.exoplatform.social.core.space.spi.SpaceLifeCycleEvent; +import org.exoplatform.social.core.space.spi.SpaceLifeCycleListener; +import org.exoplatform.social.core.space.spi.SpaceService; + +import io.meeds.social.core.space.service.SpaceLayoutService; + +import jakarta.annotation.PostConstruct; + +@Service +public class SpaceLayoutHandlerPlugin implements SpaceLifeCycleListener { + + @Autowired + private SpaceService spaceService; + + @Autowired + private SpaceLayoutService spaceLayoutService; + + @PostConstruct + public void init() { + spaceService.registerSpaceLifeCycleListener(this); + } + + @Override + public void spaceCreated(SpaceLifeCycleEvent event) { + spaceLayoutService.createSpaceSite(event.getPayload()); + } + +} diff --git a/component/core/src/main/java/io/meeds/social/core/space/listener/SpacePublicSiteListener.java b/component/core/src/main/java/io/meeds/social/core/space/listener/SpacePublicSiteListener.java index fd30ac55e5c..38d2e86765e 100644 --- a/component/core/src/main/java/io/meeds/social/core/space/listener/SpacePublicSiteListener.java +++ b/component/core/src/main/java/io/meeds/social/core/space/listener/SpacePublicSiteListener.java @@ -22,42 +22,48 @@ import org.apache.commons.lang3.StringUtils; import org.exoplatform.container.ExoContainerContext; -import org.exoplatform.portal.config.model.PortalConfig; -import org.exoplatform.portal.mop.service.LayoutService; +import org.exoplatform.services.listener.Asynchronous; import org.exoplatform.social.core.space.SpaceListenerPlugin; import org.exoplatform.social.core.space.SpaceUtils; import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.core.space.spi.SpaceLifeCycleEvent; -import org.exoplatform.social.core.space.spi.SpaceService; + +import io.meeds.common.ContainerTransactional; +import io.meeds.social.core.space.service.SpaceLayoutService; + +import lombok.SneakyThrows; /** * A listener to change public site visibility if the space has become hidden */ +@Asynchronous public class SpacePublicSiteListener extends SpaceListenerPlugin { + private SpaceLayoutService spaceLayoutService; + @Override + @SneakyThrows + @ContainerTransactional public void spaceAccessEdited(SpaceLifeCycleEvent event) { Space space = event.getSpace(); if (StringUtils.equals(space.getVisibility(), Space.HIDDEN) && space.getPublicSiteId() > 0 && !(StringUtils.equals(space.getPublicSiteVisibility(), SpaceUtils.MEMBER) || StringUtils.equals(space.getPublicSiteVisibility(), SpaceUtils.MANAGER))) { - ExoContainerContext.getService(SpaceService.class).saveSpacePublicSite(space, SpaceUtils.MEMBER); + getSpaceLayoutService().saveSpacePublicSite(space.getId(), SpaceUtils.MEMBER, event.getSource()); } } @Override + @ContainerTransactional public void spaceRemoved(SpaceLifeCycleEvent event) { - Space space = event.getSpace(); - if (space.getPublicSiteId() == 0) { - return; - } - LayoutService layoutService = ExoContainerContext.getService(LayoutService.class); - PortalConfig portalConfig = layoutService.getPortalConfig(space.getPublicSiteId()); - if (portalConfig == null) { - return; - } - layoutService.remove(portalConfig); + getSpaceLayoutService().removeSpacePublicSite(event.getPayload()); } + public SpaceLayoutService getSpaceLayoutService() { + if (spaceLayoutService == null) { + spaceLayoutService = ExoContainerContext.getService(SpaceLayoutService.class); + } + return spaceLayoutService; + } } diff --git a/component/core/src/main/java/io/meeds/social/core/space/service/SpaceLayoutService.java b/component/core/src/main/java/io/meeds/social/core/space/service/SpaceLayoutService.java new file mode 100644 index 00000000000..44f9cea32f1 --- /dev/null +++ b/component/core/src/main/java/io/meeds/social/core/space/service/SpaceLayoutService.java @@ -0,0 +1,261 @@ +/** + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package io.meeds.social.core.space.service; + +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import org.exoplatform.commons.exception.ObjectNotFoundException; +import org.exoplatform.portal.config.UserACL; +import org.exoplatform.portal.config.UserPortalConfigService; +import org.exoplatform.portal.config.model.PortalConfig; +import org.exoplatform.portal.mop.SiteKey; +import org.exoplatform.portal.mop.navigation.NodeContext; +import org.exoplatform.portal.mop.page.PageContext; +import org.exoplatform.portal.mop.service.LayoutService; +import org.exoplatform.portal.mop.service.NavigationService; +import org.exoplatform.social.core.space.SpaceUtils; +import org.exoplatform.social.core.space.model.Space; +import org.exoplatform.social.core.space.spi.SpaceService; + +import io.meeds.social.space.template.model.SpaceTemplate; +import io.meeds.social.space.template.service.SpaceTemplateService; + +@Service +public class SpaceLayoutService { + + public static final String DEFAULT_PUBLIC_SITE_TEMPLATE = "spacePublic"; + + public static final String DEFAULT_SITE_TEMPLATE = "space"; + + public static final String DEFAULT_SITE_TEMPLATE_PATH = "war:/conf/portal"; + + private UserPortalConfigService portalConfigService; + + private LayoutService layoutService; + + private NavigationService navigationService; + + private SpaceService spaceService; + + private SpaceTemplateService spaceTemplateService; + + public SpaceLayoutService(SpaceService spaceService, + SpaceTemplateService spaceTemplateService, + UserPortalConfigService portalConfigService, + LayoutService layoutService, + NavigationService navigationService) { + this.portalConfigService = portalConfigService; + this.layoutService = layoutService; + this.navigationService = navigationService; + this.spaceService = spaceService; + this.spaceTemplateService = spaceTemplateService; + } + + /** + * Create a {@link Space} site switch designated templateId characteristics + * + * @param space + */ + public void createSpaceSite(Space space) { + SpaceTemplate spaceTemplate = spaceTemplateService.getSpaceTemplate(space.getTemplateId()); + portalConfigService.createUserPortalConfig(PortalConfig.GROUP_TYPE, + space.getGroupId(), + StringUtils.firstNonBlank(spaceTemplate.getLayout(), DEFAULT_SITE_TEMPLATE), + DEFAULT_SITE_TEMPLATE_PATH); + PortalConfig portalConfig = layoutService.getPortalConfig(PortalConfig.GROUP_TYPE, + space.getGroupId()); + portalConfig.setEditPermission(StringUtils.join(spaceTemplate.getSpaceLayoutPermissions(), ",")); + portalConfig.setLabel(space.getDisplayName()); + layoutService.save(portalConfig); + + // Set URL of root node of the space + String url = getFirstSpacePageUri(space.getGroupId()); + space = spaceService.getSpaceById(space.getId()); + space.setUrl(url); + spaceService.updateSpace(space); + } + + /** + * Saves the space public site characteristics + * + * @param spaceId + * @param publicSiteVisibility Visibility of public site, possible values: + * manager, member, internal, authenticated or everyone. + * @param username user identifier who's making the operation + * @throws IllegalAccessException when + * @throws ObjectNotFoundException + */ + public void saveSpacePublicSite(String spaceId, + String publicSiteVisibility, + String username) throws ObjectNotFoundException, IllegalAccessException { + Space space = spaceService.getSpaceById(spaceId); + if (space == null) { + throw new ObjectNotFoundException("Space not found"); + } else if (!spaceService.canManageSpace(space, username)) { + throw new IllegalAccessException("User isn't manager of the space"); + } + space.setEditor(username); + + saveSpacePublicSite(space, publicSiteVisibility, username); + } + + /** + * Saves the space public site characteristics + * + * @param space {@link Space} + * @param publicSiteVisibility Visibility of public site, possible values: + * manager, member, internal, authenticated or everyone. + */ + public void saveSpacePublicSite(Space space, String publicSiteVisibility) { + saveSpacePublicSite(space, publicSiteVisibility, space.getEditor()); + } + + /** + * Removes Space Public Site + * + * @param space {@link Space} + */ + public void removeSpacePublicSite(Space space) { + if (space.getPublicSiteId() == 0) { + return; + } + PortalConfig portalConfig = layoutService.getPortalConfig(space.getPublicSiteId()); + if (portalConfig == null) { + return; + } + layoutService.remove(portalConfig); + } + + /** + * @param space {@link Space} + * @return Public site name if exists, else null + */ + public String getSpacePublicSiteName(Space space) { + if (space == null || space.getPublicSiteId() == 0) { + return null; + } else { + PortalConfig portalConfig = layoutService.getPortalConfig(space.getPublicSiteId()); + return portalConfig == null ? null : portalConfig.getName(); + } + } + + private long createSpacePublicSite(Space space, + String name, + String label, + String[] accessPermissions) { + String siteName = StringUtils.firstNonBlank(name, space.getPrettyName()); + portalConfigService.createUserPortalConfig(PortalConfig.PORTAL_TYPE, + siteName, + DEFAULT_PUBLIC_SITE_TEMPLATE, + DEFAULT_SITE_TEMPLATE_PATH); + PortalConfig portalConfig = layoutService.getPortalConfig(siteName); + + String editPermission = SpaceUtils.MANAGER + ":" + space.getGroupId(); + if (accessPermissions != null) { + portalConfig.setAccessPermissions(accessPermissions); + portalConfig.setEditPermission(editPermission); + } + portalConfig.setLabel(StringUtils.firstNonBlank(label, space.getDisplayName())); + portalConfig.setDefaultSite(false); + portalConfig.setProperty(SpaceUtils.PUBLIC_SITE_SPACE_ID, space.getId()); + portalConfig.setProperty(SpaceUtils.IS_PUBLIC_SITE_SPACE, "true"); + layoutService.save(portalConfig); + + List pages = layoutService.findPages(SiteKey.portal(siteName)); + pages.forEach(page -> { + page.setState(page.getState() + .builder() + .editPermission(editPermission) + .build()); + layoutService.save(page); + }); + return Long.parseLong(portalConfig.getStorageId().split("_")[1]); + } + + private void saveSpacePublicSite(Space space, String publicSiteVisibility, String authenticatedUser) { + boolean visibilityChanged = StringUtils.isNotBlank(publicSiteVisibility) + && !StringUtils.equals(space.getPublicSiteVisibility(), publicSiteVisibility); + + if (space.getPublicSiteId() == 0 + || layoutService.getPortalConfig(space.getPublicSiteId()) == null) { + long siteId = createSpacePublicSite(space, + space.getPrettyName(), + space.getDisplayName(), + getPublicSitePermissions(publicSiteVisibility, + space.getGroupId())); + space = spaceService.getSpaceById(space.getId()); + space.setPublicSiteId(siteId); + space.setPublicSiteVisibility(publicSiteVisibility); + space.setEditor(authenticatedUser == null ? space.getManagers()[0] : authenticatedUser); + spaceService.updateSpace(space); + } else { + PortalConfig portalConfig = layoutService.getPortalConfig(space.getPublicSiteId()); + if (visibilityChanged) { + String[] publicSitePermissions = getPublicSitePermissions(publicSiteVisibility, space.getGroupId()); + portalConfig.setAccessPermissions(publicSitePermissions); + portalConfig.setDefaultSite(false); + layoutService.save(portalConfig); + + space = spaceService.getSpaceById(space.getId()); + space.setPublicSiteVisibility(publicSiteVisibility); + space.setEditor(authenticatedUser == null ? space.getManagers()[0] : authenticatedUser); + spaceService.updateSpace(space); + } + } + } + + private String[] getPublicSitePermissions(String publicSiteVisibility, String spaceGroupId) { + if (StringUtils.isBlank(publicSiteVisibility)) { + return null; // NOSONAR + } + switch (publicSiteVisibility) { + case SpaceUtils.MANAGER: { + return new String[] { SpaceUtils.MANAGER + ":" + spaceGroupId }; + } + case SpaceUtils.MEMBER: { + return new String[] { SpaceUtils.MEMBER + ":" + spaceGroupId }; + } + case SpaceUtils.INTERNAL: { + return new String[] { SpaceUtils.MEMBER + ":" + SpaceUtils.PLATFORM_USERS_GROUP }; + } + case SpaceUtils.AUTHENTICATED: { + return new String[] { SpaceUtils.MEMBER + ":" + SpaceUtils.PLATFORM_USERS_GROUP, + SpaceUtils.MEMBER + ":" + SpaceUtils.PLATFORM_EXTERNALS_GROUP }; + } + case SpaceUtils.EVERYONE: { + return new String[] { UserACL.EVERYONE }; + } + default: + throw new IllegalArgumentException("Unexpected value: " + publicSiteVisibility); + } + } + + public String getFirstSpacePageUri(String groupId) { + NodeContext> rootNode = navigationService.loadNode(SiteKey.group(groupId)); + if (rootNode == null || rootNode.getNodeCount() == 0) { + return Space.HOME_URL; + } else { + return rootNode.getFirst().getNode().getName(); + } + } + +} diff --git a/component/core/src/main/java/org/exoplatform/social/core/space/impl/SpaceServiceImpl.java b/component/core/src/main/java/io/meeds/social/core/space/service/SpaceServiceImpl.java similarity index 61% rename from component/core/src/main/java/org/exoplatform/social/core/space/impl/SpaceServiceImpl.java rename to component/core/src/main/java/io/meeds/social/core/space/service/SpaceServiceImpl.java index 153f2c9fbdb..a522d2ef22f 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/space/impl/SpaceServiceImpl.java +++ b/component/core/src/main/java/io/meeds/social/core/space/service/SpaceServiceImpl.java @@ -1,55 +1,82 @@ /* - * Copyright (C) 2003-2007 eXo Platform SAS. + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License - * as published by the Free Software Foundation; either version 3 - * of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see. */ -package org.exoplatform.social.core.space.impl; +package io.meeds.social.core.space.service; + +import static org.exoplatform.social.core.space.SpaceUtils.AUTHENTICATED; +import static org.exoplatform.social.core.space.SpaceUtils.EVERYONE; +import static org.exoplatform.social.core.space.SpaceUtils.INTERNAL; +import static org.exoplatform.social.core.space.SpaceUtils.MANAGER; +import static org.exoplatform.social.core.space.SpaceUtils.MEMBER; +import static org.exoplatform.social.core.space.SpaceUtils.PLATFORM_PUBLISHER_GROUP; +import static org.exoplatform.social.core.space.SpaceUtils.PLATFORM_USERS_GROUP; +import static org.exoplatform.social.core.space.SpaceUtils.PUBLISHER; +import static org.exoplatform.social.core.space.SpaceUtils.SPACE_ADMIN_REFERENCE_NAME; +import static org.exoplatform.social.core.space.SpaceUtils.addUserToGroupWithManagerMembership; +import static org.exoplatform.social.core.space.SpaceUtils.addUserToGroupWithMemberMembership; +import static org.exoplatform.social.core.space.SpaceUtils.addUserToGroupWithPublisherMembership; +import static org.exoplatform.social.core.space.SpaceUtils.addUserToGroupWithRedactorMembership; +import static org.exoplatform.social.core.space.SpaceUtils.createGroup; +import static org.exoplatform.social.core.space.SpaceUtils.removeGroup; +import static org.exoplatform.social.core.space.SpaceUtils.removeMembershipFromGroup; +import static org.exoplatform.social.core.space.SpaceUtils.removeUserFromGroupWithAnyMembership; +import static org.exoplatform.social.core.space.SpaceUtils.removeUserFromGroupWithManagerMembership; +import static org.exoplatform.social.core.space.SpaceUtils.removeUserFromGroupWithMemberMembership; +import static org.exoplatform.social.core.space.SpaceUtils.removeUserFromGroupWithPublisherMembership; +import static org.exoplatform.social.core.space.SpaceUtils.removeUserFromGroupWithRedactorMembership; import java.time.Instant; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.List; +import java.util.Map; import java.util.Objects; -import java.util.Set; -import java.util.stream.Collectors; import java.util.stream.Stream; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; -import org.exoplatform.commons.exception.ObjectNotFoundException; +import org.exoplatform.commons.file.model.FileItem; +import org.exoplatform.commons.file.services.FileService; import org.exoplatform.commons.utils.CommonsUtils; import org.exoplatform.commons.utils.ListAccess; import org.exoplatform.container.ExoContainerContext; import org.exoplatform.portal.config.UserACL; -import org.exoplatform.portal.config.model.PortalConfig; -import org.exoplatform.portal.mop.service.LayoutService; import org.exoplatform.services.log.ExoLogger; import org.exoplatform.services.log.Log; import org.exoplatform.services.organization.Group; import org.exoplatform.services.organization.GroupHandler; import org.exoplatform.services.organization.OrganizationService; -import org.exoplatform.services.security.Authenticator; -import org.exoplatform.services.security.IdentityConstants; -import org.exoplatform.services.security.IdentityRegistry; +import org.exoplatform.services.resources.LocaleConfigService; +import org.exoplatform.services.resources.ResourceBundleService; +import org.exoplatform.services.security.MembershipEntry; import org.exoplatform.social.core.binding.model.GroupSpaceBinding; import org.exoplatform.social.core.identity.model.Identity; import org.exoplatform.social.core.identity.model.Profile; import org.exoplatform.social.core.identity.provider.SpaceIdentityProvider; +import org.exoplatform.social.core.jpa.storage.SpaceStorage; import org.exoplatform.social.core.manager.IdentityManager; +import org.exoplatform.social.core.model.BannerAttachment; import org.exoplatform.social.core.model.SpaceExternalInvitation; import org.exoplatform.social.core.space.SpaceException; import org.exoplatform.social.core.space.SpaceException.Code; @@ -58,37 +85,26 @@ import org.exoplatform.social.core.space.SpaceListAccess; import org.exoplatform.social.core.space.SpaceListAccessType; import org.exoplatform.social.core.space.SpaceListenerPlugin; -import org.exoplatform.social.core.space.SpaceTemplate; -import org.exoplatform.social.core.space.SpaceUtils; import org.exoplatform.social.core.space.SpacesAdministrationService; import org.exoplatform.social.core.space.model.Space; -import org.exoplatform.social.core.space.spi.SpaceApplicationHandler; import org.exoplatform.social.core.space.spi.SpaceLifeCycleEvent.Type; import org.exoplatform.social.core.space.spi.SpaceLifeCycleListener; import org.exoplatform.social.core.space.spi.SpaceService; -import org.exoplatform.social.core.space.spi.SpaceTemplateService; import org.exoplatform.social.core.storage.api.GroupSpaceBindingStorage; -import org.exoplatform.social.core.storage.api.SpaceStorage; import org.exoplatform.web.security.security.CookieTokenService; import org.exoplatform.web.security.security.RemindPasswordTokenService; import io.meeds.social.core.search.SpaceSearchConnector; +import io.meeds.social.space.template.model.SpaceTemplate; +import io.meeds.social.space.template.service.SpaceTemplateService; import lombok.SneakyThrows; -/** - * {@link org.exoplatform.social.core.space.spi.SpaceService} implementation. - * - * @author dang.tung - * @since August 29, 2008 - */ public class SpaceServiceImpl implements SpaceService { - private static final Log LOG = ExoLogger.getLogger(SpaceServiceImpl.class.getName()); - - public static final String MEMBER = "member"; + private static final Log LOG = ExoLogger.getLogger(SpaceServiceImpl.class.getName()); - public static final String MANAGER = "manager"; + private static final int MAX_SPACE_NAME_LENGTH = 200; private SpaceStorage spaceStorage; @@ -98,45 +114,40 @@ public class SpaceServiceImpl implements SpaceService { private IdentityManager identityManager; - private OrganizationService organizationService; - - private UserACL userACL; - - private IdentityRegistry identityRegistry; + private UserACL userAcl; - private Authenticator authenticator; + private SpacesAdministrationService spacesAdministrationService; - private SpaceLifecycle spaceLifeCycle = new SpaceLifecycle(); + private ResourceBundleService resourceBundleService; - /** The limit for list access loading. */ - private static final int LIMIT = 200; + private LocaleConfigService localeConfigService; - private SpacesAdministrationService spacesAdministrationService; + private OrganizationService organizationService; private SpaceTemplateService spaceTemplateService; - private LayoutService layoutService; + private FileService fileService; + + private SpaceLifecycle spaceLifeCycle = new SpaceLifecycle(); public SpaceServiceImpl(SpaceStorage spaceStorage, // NOSONAR - SpaceSearchConnector spaceSearchConnector, GroupSpaceBindingStorage groupSpaceBindingStorage, + SpaceSearchConnector spaceSearchConnector, IdentityManager identityManager, - UserACL userACL, - IdentityRegistry identityRegistry, - Authenticator authenticator, SpacesAdministrationService spacesAdministrationService, - SpaceTemplateService spaceTemplateService, - LayoutService layoutService) { + UserACL userAcl, + ResourceBundleService resourceBundleService, + LocaleConfigService localeConfigService, + FileService fileService) { this.spaceStorage = spaceStorage; + this.groupSpaceBindingStorage = groupSpaceBindingStorage; this.spaceSearchConnector = spaceSearchConnector; this.identityManager = identityManager; - this.identityRegistry = identityRegistry; - this.userACL = userACL; - this.authenticator = authenticator; this.spacesAdministrationService = spacesAdministrationService; - this.spaceTemplateService = spaceTemplateService; - this.groupSpaceBindingStorage = groupSpaceBindingStorage; - this.layoutService = layoutService; + this.userAcl = userAcl; + this.resourceBundleService = resourceBundleService; + this.localeConfigService = localeConfigService; + this.fileService = fileService; } @Override @@ -144,11 +155,6 @@ public ListAccess getAllSpacesWithListAccess() { return new SpaceListAccess(spaceStorage, spaceSearchConnector, SpaceListAccessType.ALL); } - @Override - public Space getSpaceByDisplayName(String spaceDisplayName) { - return spaceStorage.getSpaceByDisplayName(spaceDisplayName); - } - @Override public Space getSpaceByPrettyName(String spacePrettyName) { return spaceStorage.getSpaceByPrettyName(spacePrettyName); @@ -169,11 +175,6 @@ public Space getSpaceById(String id) { return spaceStorage.getSpaceById(id); } - @Override - public Space getSpaceByUrl(String url) { - return spaceStorage.getSpaceByUrl(url); - } - @Override public SpaceListAccess getAccessibleSpacesWithListAccess(String username) { return new SpaceListAccess(spaceStorage, spaceSearchConnector, username, SpaceListAccessType.ACCESSIBLE); @@ -198,86 +199,72 @@ public SpaceListAccess getPendingSpacesWithListAccess(String username) { @Override @SneakyThrows - public Space createSpace(Space space, String creator) { - return createSpace(space, creator, null); + public Space createSpace(Space space, String username) { + return createSpace(space, username, null); } @Override public Space createSpace(Space space, String username, List identitiesToInvite) throws SpaceException { - if (!spacesAdministrationService.canCreateSpace(username)) { + if (!getSpaceTemplateService().canCreateSpace(space.getTemplateId(), username)) { throw new SpaceException(Code.SPACE_PERMISSION); - } else if (space.getDisplayName().length() > LIMIT) { - throw new IllegalArgumentException("Error while creating the space " + space.getDisplayName() + - ": space name cannot exceed 200 characters"); } - // Check the space template before creating the space and/or group - SpaceTemplate spaceTemplate = getSpaceTemplateOrDefault(space.getTemplate()); - if (spaceTemplate == null) { - throw new SpaceException(Code.UNKNOWN_SPACE_TEMPLATE); - } - - // Add creator as a manager and a member to this space - String[] managers = space.getManagers(); - if (!ArrayUtils.contains(managers, username)) { - managers = ArrayUtils.add(managers, username); - } - space.setManagers(managers); - - String[] members = space.getMembers(); - if (!ArrayUtils.contains(members, username)) { - members = ArrayUtils.add(members, username); - } - space.setMembers(members); - - // Creates new space by creating new group - String groupId = SpaceUtils.createGroup(space.getDisplayName(), space.getPrettyName(), username); - String prettyName = groupId.split("/")[2]; - if (!prettyName.equals(space.getPrettyName())) { - // work around for SOC-2366 - space.setPrettyName(groupId.split("/")[2]); - } + // Copy only settable properties from provided DTO + Space spaceToCreate = new Space(); + setSpaceProperties(space, spaceToCreate); + spaceToCreate.setEditor(username); + spaceToCreate.setMembers(new String[] { username }); + spaceToCreate.setManagers(new String[] { username }); - space.setGroupId(groupId); - space.setUrl(space.getPrettyName()); - space.setTemplate(spaceTemplate.getName()); + SpaceTemplate spaceTemplate = getSpaceTemplateService().getSpaceTemplate(spaceToCreate.getTemplateId()); + copySpaceTemplateProperties(spaceToCreate, spaceTemplate, username, getUsersToInvite(identitiesToInvite)); spaceLifeCycle.setCurrentEvent(Type.SPACE_CREATED); + Space createdSpace; try { - spaceTemplateService.initSpaceApplications(space, getSpaceApplicationHandler(space)); - spaceStorage.saveSpace(space, true); - spaceLifeCycle.spaceCreated(space, username); + createdSpace = spaceStorage.saveSpace(spaceToCreate, true); + space.setId(createdSpace.getId()); + spaceLifeCycle.spaceCreated(spaceToCreate, username); } catch (Exception e) { - throw new SpaceException(Code.UNABLE_TO_INIT_APP, "Failed to init apps for space " + space.getPrettyName(), e); + throw new SpaceException(Code.ERROR_DATASTORE, + String.format("Failed to save the space %s", + spaceToCreate.getPrettyName()), + e); } finally { spaceLifeCycle.resetCurrentEvent(Type.SPACE_CREATED); } - if (CollectionUtils.isNotEmpty(identitiesToInvite)) { - try { - inviteIdentities(space, identitiesToInvite); - } catch (Exception e) { - LOG.warn("Error inviting identities {} to space {}", identitiesToInvite, space.getDisplayName(), e); - } + long bannerId = spaceTemplateService.getSpaceTemplateBannerId(spaceTemplate.getId()); + if (bannerId > 0) { + duplicateBannerById(createdSpace, bannerId, username); } - return getSpaceById(space.getId()); + try { + createdSpace.setEditor(username); + inviteIdentities(createdSpace, identitiesToInvite); + } catch (Exception e) { + LOG.warn("Error inviting identities {} to space {}", identitiesToInvite, spaceToCreate.getDisplayName(), e); + } + return getSpaceById(createdSpace.getId()); } @Override public void inviteIdentities(Space space, List identitiesToInvite) { - if (identitiesToInvite == null || identitiesToInvite.isEmpty()) { + if (CollectionUtils.isEmpty(identitiesToInvite)) { return; } - Set usernames = getUsersToInvite(identitiesToInvite); + // Get a fresh instance in case changes made by listeners + Space existingSpace = getSpaceById(space.getId()); + existingSpace.setEditor(space.getEditor()); + List usernames = getUsersToInvite(identitiesToInvite); for (String username : usernames) { - if (isMember(space, username)) { + if (isMember(existingSpace, username)) { continue; } - if (!isInvitedUser(space, username)) { - addInvitedUser(space, username); + if (!isInvitedUser(existingSpace, username)) { + addInvitedUser(existingSpace, username); } } } @@ -288,14 +275,12 @@ public boolean isSpaceContainsExternals(Long spaceId) { } @Override - public void createSpace(Space space) { - spaceLifeCycle.setCurrentEvent(Type.SPACE_CREATED); - try { - spaceStorage.saveSpace(space, true); - spaceLifeCycle.spaceCreated(space, space.getEditor()); - } finally { - spaceLifeCycle.resetCurrentEvent(Type.SPACE_CREATED); + public Space createSpace(Space space) { + if (ArrayUtils.isEmpty(space.getManagers()) && space.getEditor() == null) { + throw new IllegalArgumentException("Can't Find Space editor username"); } + String username = space.getEditor() == null ? space.getManagers()[0] : space.getEditor(); + return createSpace(space, username); } @Override @@ -331,7 +316,7 @@ public void deleteSpace(Space space, boolean deleteGroup) throws SpaceException groupSpaceBindings.stream().map(GroupSpaceBinding::getId).forEach(groupSpaceBindingStorage::deleteGroupBinding); // remove memberships of users with deleted space. - SpaceUtils.removeMembershipFromGroup(space); + removeMembershipFromGroup(space); Identity spaceIdentity = null; if (identityManager.identityExisted(SpaceIdentityProvider.NAME, space.getPrettyName())) { @@ -343,16 +328,12 @@ public void deleteSpace(Space space, boolean deleteGroup) throws SpaceException } if (deleteGroup) { - UserACL acl = getUserACL(); GroupHandler groupHandler = getOrgService().getGroupHandler(); - Group deletedGroup = groupHandler.findGroupById(space.getGroupId()); - List mandatories = acl.getMandatoryGroups(); - if (deletedGroup != null && !isMandatory(groupHandler, deletedGroup, mandatories)) { - SpaceUtils.removeGroup(space); + Group spaceGroup = groupHandler.findGroupById(space.getGroupId()); + List mandatories = userAcl.getMandatoryGroups(); + if (spaceGroup != null && !isMandatory(groupHandler, spaceGroup, mandatories)) { + removeGroup(space); } - - // remove pages and group navigation of space - SpaceUtils.removePagesAndGroupNavigation(space); } spaceLifeCycle.spaceRemoved(space, space.getEditor()); } finally { @@ -370,8 +351,10 @@ public void addMember(Space space, String username) { if (!ArrayUtils.contains(members, username)) { members = ArrayUtils.add(members, username); space.setMembers(members); - this.updateSpace(space); - SpaceUtils.addUserToGroupWithMemberMembership(username, space.getGroupId()); + spaceStorage.saveSpace(space, false); + // Add User to Group after adding member to space to not + // invoke twice the membership change + addUserToGroupWithMemberMembership(username, space.getGroupId()); spaceLifeCycle.memberJoined(space, username); } } finally { @@ -408,13 +391,13 @@ public void removeMember(Space space, String username) { members = ArrayUtils.addAll(members, disabledMembers.toArray(String[]::new)); } if (ArrayUtils.contains(members, username)) { + removeUserFromGroupWithMemberMembership(username, space.getGroupId()); members = ArrayUtils.removeAllOccurrences(members, username); space.setMembers(members); - this.updateSpace(space); - SpaceUtils.removeUserFromGroupWithMemberMembership(username, space.getGroupId()); + spaceStorage.saveSpace(space, false); setManager(space, username, false); removeRedactor(space, username); - SpaceUtils.removeUserFromGroupWithAnyMembership(username, space.getGroupId()); + removeUserFromGroupWithAnyMembership(username, space.getGroupId()); spaceLifeCycle.memberLeft(space, username); } } finally { @@ -443,106 +426,6 @@ public void setIgnored(String spaceId, String username) { } } - @Override - public void restoreSpacePageLayout(String spaceId, - String appId, - org.exoplatform.services.security.Identity identity) throws IllegalAccessException, - SpaceException { - if (identity == null || !isSuperManager(identity.getUserId())) { - throw new IllegalAccessException("User is not allowed to change page layout of spaces"); - } - Space space = getSpaceById(spaceId); - SpaceApplicationHandler appHandler = getSpaceApplicationHandler(space); - try { - appHandler.restoreApplicationLayout(space, appId); - } catch (SpaceException e) { - throw e; - } catch (Exception e) { - throw new SpaceException(Code.UNABLE_TO_RESTORE_APPLICATION_LAYOUT, e); - } - } - - @Override - public void moveApplication(String spaceId, String appId, int transition) throws SpaceException { - Space space = getSpaceById(spaceId); - SpaceApplicationHandler appHandler = getSpaceApplicationHandler(space); - try { - appHandler.moveApplication(space, appId, transition); - } catch (Exception e) { - throw new SpaceException(Code.UNABLE_TO_MOVE_APPLICATION, e); - } - } - - @Override - public void installApplication(Space space, String appId) { - spaceLifeCycle.setCurrentEvent(Type.APP_ADDED); - try { - spaceLifeCycle.addApplication(space, getPortletId(appId)); - } finally { - spaceLifeCycle.resetCurrentEvent(Type.APP_ADDED); - } - } - - @Override - public void activateApplication(Space space, String appId) throws SpaceException { - spaceLifeCycle.setCurrentEvent(Type.APP_ACTIVATED); - try { - String appName = null; - if (SpaceUtils.isInstalledApp(space, appId)) { - appName = appId + System.currentTimeMillis(); - } else { - appName = appId; - } - SpaceApplicationHandler appHandler = getSpaceApplicationHandler(space); - appHandler.activateApplication(space, appId, appName); - // Default is removable, or must be added by configuration or support - // setting for applications. - spaceTemplateService.setApp(space, appId, appName, true, Space.ACTIVE_STATUS); - spaceStorage.saveSpace(space, false); - // Use portletId instead of appId for fixing SOC-1633. - spaceLifeCycle.activateApplication(space, getPortletId(appId)); - } finally { - spaceLifeCycle.resetCurrentEvent(Type.APP_ACTIVATED); - } - } - - @Override - public void deactivateApplication(Space space, String appId) throws SpaceException { - String appStatus = SpaceUtils.getAppStatus(space, appId); - if (appStatus == null) { - return; - } - if (appStatus.equals(Space.DEACTIVE_STATUS)) - return; - - spaceLifeCycle.setCurrentEvent(Type.APP_DEACTIVATED); - try { - SpaceApplicationHandler appHandler = getSpaceApplicationHandler(space); - appHandler.deactiveApplication(space, appId); - spaceTemplateService.setApp(space, appId, appId, SpaceUtils.isRemovableApp(space, appId), Space.DEACTIVE_STATUS); - spaceStorage.saveSpace(space, false); - spaceLifeCycle.deactivateApplication(space, getPortletId(appId)); - } finally { - spaceLifeCycle.resetCurrentEvent(Type.APP_DEACTIVATED); - } - } - - @Override - public void removeApplication(Space space, String appId, String appName) throws SpaceException { - String appStatus = SpaceUtils.getAppStatus(space, appId); - if (appStatus == null) - return; - spaceLifeCycle.setCurrentEvent(Type.APP_REMOVED); - try { - SpaceApplicationHandler appHandler = getSpaceApplicationHandler(space); - appHandler.removeApplication(space, appId, appName); - removeApp(space, appName); - spaceLifeCycle.removeApplication(space, getPortletId(appId)); - } finally { - spaceLifeCycle.resetCurrentEvent(Type.APP_REMOVED); - } - } - @Override public void registerSpaceLifeCycleListener(SpaceLifeCycleListener listener) { spaceLifeCycle.addListener(listener); @@ -566,7 +449,7 @@ public void addInvitedUser(Space space, String username) { } else { addInvited(space, username); } - this.updateSpace(space); + spaceStorage.saveSpace(space, false); spaceLifeCycle.addInvitedUser(space, username); } @@ -583,9 +466,9 @@ public void addPendingUser(Space space, String username) { } if (ArrayUtils.contains(space.getInvitedUsers(), username)) { - this.addMember(space, username); + addMember(space, username); removeInvited(space, username); - this.updateSpace(space); + spaceStorage.saveSpace(space, false); return; } @@ -692,38 +575,34 @@ public boolean hasSettingPermission(Space space, String username) { return canManageSpace(space, username); } + @Override + public boolean canDeleteSpace(Space space, String username) { + return CollectionUtils.isEmpty(space.getDeletePermissions()) ? canManageSpace(space, username) : + hasDeletePermission(space, username); + } + @Override public boolean canAccessSpacePublicSite(Space space, String username) { if (space == null || space.getPublicSiteId() == 0 || StringUtils.isBlank(space.getPublicSiteVisibility())) { return false; - } else if (StringUtils.equals(space.getPublicSiteVisibility(), SpaceUtils.EVERYONE)) { + } else if (StringUtils.equals(space.getPublicSiteVisibility(), EVERYONE)) { return true; - } else if (userACL.isAnonymousUser(username)) { + } else if (userAcl.isAnonymousUser(username)) { return false; - } else if (StringUtils.equals(space.getPublicSiteVisibility(), SpaceUtils.AUTHENTICATED)) { + } else if (StringUtils.equals(space.getPublicSiteVisibility(), AUTHENTICATED)) { return true; - } else if (StringUtils.equals(space.getPublicSiteVisibility(), SpaceUtils.INTERNAL)) { - return userACL.getUserIdentity(username).isMemberOf(SpaceUtils.PLATFORM_USERS_GROUP); - } else if (StringUtils.equals(space.getPublicSiteVisibility(), SpaceUtils.MEMBER)) { + } else if (StringUtils.equals(space.getPublicSiteVisibility(), INTERNAL)) { + return userAcl.getUserIdentity(username).isMemberOf(PLATFORM_USERS_GROUP); + } else if (StringUtils.equals(space.getPublicSiteVisibility(), MEMBER)) { return canViewSpace(space, username); - } else if (StringUtils.equals(space.getPublicSiteVisibility(), SpaceUtils.MANAGER)) { + } else if (StringUtils.equals(space.getPublicSiteVisibility(), MANAGER)) { return canManageSpace(space, username); } return false; } - @Override - public String getSpacePublicSiteName(Space space) { - if (space == null || space.getPublicSiteId() == 0) { - return null; - } else { - PortalConfig portalConfig = layoutService.getPortalConfig(space.getPublicSiteId()); - return portalConfig == null ? null : portalConfig.getName(); - } - } - @Override public boolean isInvitedUser(Space space, String username) { return space != null && ArrayUtils.contains(space.getInvitedUsers(), username); @@ -771,8 +650,8 @@ public void removeInvitedUser(Space space, String username) { if (ArrayUtils.contains(space.getInvitedUsers(), username)) { spaceLifeCycle.setCurrentEvent(Type.DENY_INVITED_USER); try { - space = this.removeInvited(space, username); - this.updateSpace(space); + space = removeInvited(space, username); + spaceStorage.saveSpace(space, false); spaceLifeCycle.removeInvitedUser(space, username); } finally { spaceLifeCycle.resetCurrentEvent(Type.DENY_INVITED_USER); @@ -783,8 +662,8 @@ public void removeInvitedUser(Space space, String username) { @Override public void removePendingUser(Space space, String username) { if (ArrayUtils.contains(space.getPendingUsers(), username)) { - this.removePending(space, username); - space = this.updateSpace(space); + removePending(space, username); + spaceStorage.saveSpace(space, false); spaceLifeCycle.removePendingUser(space, username); } } @@ -793,10 +672,18 @@ public void removePendingUser(Space space, String username) { public void addRedactor(Space space, String username) { String[] redactors = space.getRedactors(); if (!ArrayUtils.contains(redactors, username)) { - redactors = ArrayUtils.add(redactors, username); - space.setRedactors(redactors); - this.updateSpace(space); - SpaceUtils.addUserToGroupWithRedactorMembership(username, space.getGroupId()); + spaceLifeCycle.setCurrentEvent(Type.ADD_REDACTOR_USER); + try { + redactors = ArrayUtils.add(redactors, username); + space.setRedactors(redactors); + spaceStorage.saveSpace(space, false); + // Add User to Group after adding member to space to not + // invoke twice the membership change + addUserToGroupWithRedactorMembership(username, space.getGroupId()); + spaceLifeCycle.addRedactorUser(space, username); + } finally { + spaceLifeCycle.resetCurrentEvent(Type.ADD_REDACTOR_USER); + } } } @@ -804,10 +691,16 @@ public void addRedactor(Space space, String username) { public void removeRedactor(Space space, String username) { String[] redactors = space.getRedactors(); if (ArrayUtils.contains(redactors, username)) { - redactors = ArrayUtils.removeAllOccurrences(redactors, username); - space.setRedactors(redactors); - this.updateSpace(space); - SpaceUtils.removeUserFromGroupWithRedactorMembership(username, space.getGroupId()); + spaceLifeCycle.setCurrentEvent(Type.REMOVE_REDACTOR_USER); + try { + redactors = ArrayUtils.removeAllOccurrences(redactors, username); + space.setRedactors(redactors); + spaceStorage.saveSpace(space, false); + removeUserFromGroupWithRedactorMembership(username, space.getGroupId()); + spaceLifeCycle.removeRedactorUser(space, username); + } finally { + spaceLifeCycle.resetCurrentEvent(Type.REMOVE_REDACTOR_USER); + } } } @@ -815,10 +708,18 @@ public void removeRedactor(Space space, String username) { public void addPublisher(Space space, String username) { String[] publishers = space.getPublishers(); if (!ArrayUtils.contains(publishers, username)) { - publishers = ArrayUtils.add(publishers, username); - space.setPublishers(publishers); - this.updateSpace(space); - SpaceUtils.addUserToGroupWithPublisherMembership(username, space.getGroupId()); + spaceLifeCycle.setCurrentEvent(Type.ADD_PUBLISHER_USER); + try { + publishers = ArrayUtils.add(publishers, username); + space.setPublishers(publishers); + spaceStorage.saveSpace(space, false); + // Add User to Group after adding member to space to not + // invoke twice the membership change + addUserToGroupWithPublisherMembership(username, space.getGroupId()); + spaceLifeCycle.addPublisherUser(space, username); + } finally { + spaceLifeCycle.resetCurrentEvent(Type.ADD_PUBLISHER_USER); + } } } @@ -826,10 +727,16 @@ public void addPublisher(Space space, String username) { public void removePublisher(Space space, String username) { String[] publishers = space.getPublishers(); if (ArrayUtils.contains(publishers, username)) { - publishers = ArrayUtils.removeAllOccurrences(publishers, username); - space.setPublishers(publishers); - this.updateSpace(space); - SpaceUtils.removeUserFromGroupWithPublisherMembership(username, space.getGroupId()); + spaceLifeCycle.setCurrentEvent(Type.REMOVE_PUBLISHER_USER); + try { + publishers = ArrayUtils.removeAllOccurrences(publishers, username); + space.setPublishers(publishers); + spaceStorage.saveSpace(space, false); + removeUserFromGroupWithPublisherMembership(username, space.getGroupId()); + spaceLifeCycle.removePublisherUser(space, username); + } finally { + spaceLifeCycle.resetCurrentEvent(Type.REMOVE_PUBLISHER_USER); + } } } @@ -842,8 +749,10 @@ public void setManager(Space space, String username, boolean isManager) { try { managers = ArrayUtils.add(managers, username); space.setManagers(managers); - this.updateSpace(space); - SpaceUtils.addUserToGroupWithManagerMembership(username, space.getGroupId()); + spaceStorage.saveSpace(space, false); + // Add User to Group after adding member to space to not + // invoke twice the membership change + addUserToGroupWithManagerMembership(username, space.getGroupId()); spaceLifeCycle.grantedLead(space, username); } finally { spaceLifeCycle.resetCurrentEvent(Type.GRANTED_LEAD); @@ -853,10 +762,10 @@ public void setManager(Space space, String username, boolean isManager) { if (ArrayUtils.contains(managers, username)) { spaceLifeCycle.setCurrentEvent(Type.REVOKED_LEAD); try { + removeUserFromGroupWithManagerMembership(username, space.getGroupId()); managers = ArrayUtils.removeAllOccurrences(managers, username); space.setManagers(managers); - this.updateSpace(space); - SpaceUtils.removeUserFromGroupWithManagerMembership(username, space.getGroupId()); + spaceStorage.saveSpace(space, false); Space updatedSpace = getSpaceById(space.getId()); if (isMember(updatedSpace, username)) { spaceLifeCycle.revokedLead(space, username); @@ -873,6 +782,11 @@ public void unregisterSpaceListenerPlugin(SpaceListenerPlugin spaceListenerPlugi spaceLifeCycle.removeListener(spaceListenerPlugin); } + @Override + public Space updateSpace(Space existingSpace) { + return updateSpace(existingSpace, null); + } + @Override public Space updateSpace(Space space, List identitiesToInvite) { Space storedSpace = spaceStorage.getSpaceById(space.getId()); @@ -880,15 +794,9 @@ public Space updateSpace(Space space, List identitiesToInvite) { triggerSpaceUpdate(space, storedSpace); inviteIdentities(space, identitiesToInvite); - return getSpaceById(space.getId()); } - @Override - public Space updateSpace(Space existingSpace) { - return this.updateSpace(existingSpace, null); - } - @Override public Space updateSpaceAvatar(Space existingSpace, String username) { existingSpace.setEditor(username); @@ -928,7 +836,7 @@ public Space updateSpaceBanner(Space existingSpace, String username) { identityManager.updateProfile(profile); existingSpace = spaceStorage.getSpaceById(existingSpace.getId()); - existingSpace.setAvatarLastUpdated(System.currentTimeMillis()); + existingSpace.setBannerLastUpdated(System.currentTimeMillis()); spaceStorage.saveSpace(existingSpace, false); spaceLifeCycle.spaceBannerEdited(existingSpace, existingSpace.getEditor()); @@ -981,26 +889,6 @@ public void saveSpaceExternalInvitation(String spaceId, String email, String tok spaceStorage.saveSpaceExternalInvitation(spaceId, email, tokenId); } - @Override - public void saveSpacePublicSite(String spaceId, - String publicSiteVisibility, - String authenticatedUser) throws ObjectNotFoundException, IllegalAccessException { - Space space = getSpaceById(spaceId); - if (space == null) { - throw new ObjectNotFoundException("Space not found"); - } else if (!canManageSpace(space, authenticatedUser)) { - throw new IllegalAccessException("User isn't manager of the space"); - } - space.setEditor(authenticatedUser); - - saveSpacePublicSite(space, publicSiteVisibility, authenticatedUser); - } - - @Override - public void saveSpacePublicSite(Space space, String publicSiteVisibility) { - saveSpacePublicSite(space, publicSiteVisibility, null); - } - @Override public SpaceExternalInvitation getSpaceExternalInvitationById(String invitationId) { return spaceStorage.findSpaceExternalInvitationById(invitationId); @@ -1030,42 +918,29 @@ public void deleteExternalUserInvitations(String email) { @Override public boolean isSuperManager(String username) { - if (StringUtils.isBlank(username) - || IdentityConstants.ANONIM.equals(username) - || IdentityConstants.SYSTEM.equals(username)) { - return false; - } else if (username.equals(getUserACL().getSuperUser())) { - return true; - } - org.exoplatform.services.security.Identity identity = getIdentity(username); - return identity != null && (identity.isMemberOf(userACL.getAdminGroups()) - || spacesAdministrationService.getSpacesAdministratorsMemberships() - .stream() - .anyMatch(identity::isMemberOf)); + return spacesAdministrationService.isSuperManager(username); } @Override public boolean isContentManager(String username) { - if (StringUtils.isBlank(username) || IdentityConstants.ANONIM.equals(username) || IdentityConstants.SYSTEM.equals(username)) { + if (userAcl.isAnonymousUser(username)) { return false; - } else if (username.equals(getUserACL().getSuperUser())) { + } else if (isSuperManager(username)) { return true; } - org.exoplatform.services.security.Identity identity = getIdentity(username); - return identity != null && identity.isMemberOf(SpaceUtils.PLATFORM_PUBLISHER_GROUP, SpaceUtils.MANAGER); + org.exoplatform.services.security.Identity identity = userAcl.getUserIdentity(username); + return identity != null && identity.isMemberOf(PLATFORM_PUBLISHER_GROUP, MANAGER); } @Override public boolean isContentPublisher(String username) { - if (StringUtils.isBlank(username) - || IdentityConstants.ANONIM.equals(username) - || IdentityConstants.SYSTEM.equals(username)) { + if (userAcl.isAnonymousUser(username)) { return false; - } else if (username.equals(getUserACL().getSuperUser())) { + } else if (isSuperManager(username)) { return true; } - org.exoplatform.services.security.Identity identity = getIdentity(username); - return identity != null && identity.isMemberOf(SpaceUtils.PLATFORM_PUBLISHER_GROUP, SpaceUtils.PUBLISHER); + org.exoplatform.services.security.Identity identity = userAcl.getUserIdentity(username); + return identity != null && identity.isMemberOf(PLATFORM_PUBLISHER_GROUP, PUBLISHER); } @Override @@ -1073,10 +948,115 @@ public ListAccess getCommonSpaces(String username, String otherUserId) { return new SpaceListAccess(spaceStorage, spaceSearchConnector, SpaceListAccessType.COMMON, username, otherUserId); } + @Override + public Map countSpacesByTemplate() { + return spaceStorage.countSpacesByTemplate(); + } + public void addSpaceListener(SpaceListenerPlugin plugin) { registerSpaceLifeCycleListener(plugin); } + private void setSpaceProperties(Space space, Space spaceToSave) { + spaceToSave.setDisplayName(space.getDisplayName()); + spaceToSave.setDescription(space.getDescription()); + spaceToSave.setRegistration(space.getRegistration()); + spaceToSave.setVisibility(space.getVisibility()); + spaceToSave.setTemplateId(space.getTemplateId()); + } + + private void copySpaceTemplateProperties(Space space, + SpaceTemplate spaceTemplate, + String username, + List invitees) throws SpaceException { + setSpaceAccess(space, spaceTemplate); + setSpaceDisplayName(space, spaceTemplate, invitees); + // Creates the associated group to the space + String groupId = createSpaceGroup(space, username); + setDeletePermissions(space, spaceTemplate, groupId); + setLayoutPermissions(space, spaceTemplate, groupId); + setSpaceDefaultRedactors(space, spaceTemplate, username, groupId); + } + + private void setSpaceDefaultRedactors(Space space, SpaceTemplate spaceTemplate, String username, String groupId) { + if (spaceTemplate.isSpaceAllowContentCreation()) { + space.setRedactors(new String[] { username }); + addUserToGroupWithRedactorMembership(username, groupId); + } else { + space.setRedactors(new String[0]); + } + } + + private void setSpaceAccess(Space space, SpaceTemplate spaceTemplate) { + if (!spaceTemplate.getSpaceFields().contains("access")) { + if (StringUtils.isEmpty(space.getRegistration())) { + space.setRegistration(spaceTemplate.getSpaceDefaultRegistration().name().toLowerCase()); + } + if (StringUtils.isEmpty(space.getVisibility())) { + space.setVisibility(spaceTemplate.getSpaceDefaultVisibility().name().toLowerCase()); + } + } + } + + private void setSpaceDisplayName(Space space, SpaceTemplate spaceTemplate, List invitees) throws SpaceException { + if (!spaceTemplate.getSpaceFields().contains("name") + && StringUtils.isBlank(space.getDisplayName())) { + if (CollectionUtils.isNotEmpty(invitees)) { + invitees = new ArrayList<>(invitees); + invitees.removeAll(Arrays.asList(space.getMembers())); + } + String[] users = ArrayUtils.addAll(space.getMembers(), + CollectionUtils.isEmpty(invitees) ? new String[0] : + invitees.toArray(new String[invitees.size()])); + List userFullNames = Arrays.stream(users) + .map(u -> { + Profile profile = identityManager.getOrCreateUserIdentity(u).getProfile(); + return StringUtils.firstNonBlank(profile.getFullName()); + }) + .limit(2) + .toList(); + String displayName = StringUtils.join(userFullNames, ", "); + if (users.length > 2) { + String moreLabel = resourceBundleService.getSharedString("space.name.more", + localeConfigService.getDefaultLocaleConfig().getLocale()); + displayName += " " + StringUtils.firstNonBlank(moreLabel, "and {0} more").replace("{0}", String.valueOf(users.length - 2)); + if (displayName.length() > MAX_SPACE_NAME_LENGTH) { + displayName = displayName.substring(0, MAX_SPACE_NAME_LENGTH); + } + } + space.setDisplayName(displayName); + } else if (space.getDisplayName() == null + || space.getDisplayName().length() < 3 + || space.getDisplayName().length() > MAX_SPACE_NAME_LENGTH) { + throw new SpaceException(Code.INVALID_SPACE_NAME); + } + } + + private String createSpaceGroup(Space space, String username) throws SpaceException { + String groupId = createGroup(space.getDisplayName(), space.getPrettyName(), username); + space.setGroupId(groupId); + space.setPrettyName(groupId.replace("/spaces/", "")); + return groupId; + } + + private void setLayoutPermissions(Space space, SpaceTemplate spaceTemplate, String groupId) { + if (CollectionUtils.isEmpty(spaceTemplate.getSpaceLayoutPermissions()) + || SPACE_ADMIN_REFERENCE_NAME.equals(spaceTemplate.getSpaceLayoutPermissions().getFirst())) { + space.setLayoutPermissions(Collections.singletonList(MANAGER + ":" + groupId)); + } else { + space.setLayoutPermissions(spaceTemplate.getSpaceLayoutPermissions()); + } + } + + private void setDeletePermissions(Space space, SpaceTemplate spaceTemplate, String groupId) { + if (CollectionUtils.isEmpty(spaceTemplate.getSpaceDeletePermissions()) + || SPACE_ADMIN_REFERENCE_NAME.equals(spaceTemplate.getSpaceDeletePermissions().getFirst())) { + space.setDeletePermissions(Collections.singletonList(MANAGER + ":" + groupId)); + } else { + space.setDeletePermissions(spaceTemplate.getSpaceDeletePermissions()); + } + } + private String checkSpaceEditorPermissions(Space space) { String editor = space.getEditor(); if (StringUtils.isBlank(editor) || !canManageSpace(space, editor)) { @@ -1085,27 +1065,29 @@ private String checkSpaceEditorPermissions(Space space) { return editor; } - private String getPortletId(String appId) { - final char SEPARATOR = '.'; - - if (appId.indexOf(SEPARATOR) != -1) { - int beginIndex = appId.lastIndexOf(SEPARATOR) + 1; - int endIndex = appId.length(); - - return appId.substring(beginIndex, endIndex); - } - - return appId; + private boolean hasDeletePermission(Space space, String username) { + org.exoplatform.services.security.Identity userIdentity = userAcl.getUserIdentity(username); + return space.getDeletePermissions().stream().anyMatch(permission -> userIdentity.isMemberOf(getMembershipEntry(permission))); } private void triggerSpaceUpdate(Space newSpace, Space oldSpace) { if (oldSpace != null) { + if (StringUtils.isBlank(newSpace.getEditor()) + && ArrayUtils.isNotEmpty(oldSpace.getManagers())) { + newSpace.setEditor(oldSpace.getManagers()[0]); + } if (!StringUtils.equals(oldSpace.getDescription(), newSpace.getDescription())) { spaceLifeCycle.spaceDescriptionEdited(newSpace, newSpace.getEditor()); } if (!oldSpace.getVisibility().equals(newSpace.getVisibility())) { spaceLifeCycle.spaceAccessEdited(newSpace, newSpace.getEditor()); } + if (oldSpace.getPublicSiteId() == 0 && newSpace.getPublicSiteId() != oldSpace.getPublicSiteId()) { + spaceLifeCycle.spacePublicSiteCreated(newSpace, newSpace.getEditor()); + } else if (newSpace.getPublicSiteId() != oldSpace.getPublicSiteId() + || !StringUtils.equals(newSpace.getPublicSiteVisibility(), oldSpace.getPublicSiteVisibility())) { + spaceLifeCycle.spacePublicSiteUpdated(newSpace, newSpace.getEditor()); + } String oldRegistration = oldSpace.getRegistration(); String registration = newSpace.getRegistration(); if ((oldRegistration == null && registration != null) @@ -1115,11 +1097,6 @@ private void triggerSpaceUpdate(Space newSpace, Space oldSpace) { } } - /** - * Gets OrganizationService - * - * @return organizationService - */ private OrganizationService getOrgService() { if (organizationService == null) { organizationService = ExoContainerContext.getService(OrganizationService.class); @@ -1127,57 +1104,10 @@ private OrganizationService getOrgService() { return organizationService; } - /** - * Gets UserACL - * - * @return userACL - */ - private UserACL getUserACL() { - return userACL; - } - - /** - * Gets space application handler - * - * @param space - * @return - * @throws SpaceException - */ - private SpaceApplicationHandler getSpaceApplicationHandler(Space space) throws SpaceException { - String spaceTemplate = space.getTemplate(); - SpaceApplicationHandler appHandler = spaceTemplateService.getSpaceApplicationHandlers().get(spaceTemplate); - if (appHandler == null) { - LOG.debug("No space application handler was defined for template with name {}. Default will be used.", spaceTemplate); - String defaultTemplate = spaceTemplateService.getDefaultSpaceTemplate(); - appHandler = spaceTemplateService.getSpaceApplicationHandlers().get(defaultTemplate); - if (appHandler == null) { - throw new SpaceException(SpaceException.Code.UNKNOWN_SPACE_TEMPLATE); - } - } - return appHandler; - } - - private void removeApp(Space space, String appName) { - String apps = space.getApp(); - StringBuilder remainApp = new StringBuilder(); - String[] listApp = apps.split(","); - String[] appPart; - String app; - for (int idx = 0; idx < listApp.length; idx++) { - app = listApp[idx]; - appPart = app.split(":"); - if (!appPart[1].equals(appName)) { - if (remainApp.length() != 0) - remainApp.append(","); - remainApp.append(app); - } + private List getUsersToInvite(List identities) { + if (identities == null) { + return Collections.emptyList(); } - - space.setApp(remainApp.toString()); - spaceStorage.saveSpace(space, false); - } - - private Set getUsersToInvite(List identities) { return identities.stream() .filter(identity -> identity != null && StringUtils.isNotBlank(identity.getRemoteId()) @@ -1199,8 +1129,8 @@ private Set getUsersToInvite(List identities) { return Stream.empty(); } }) - .collect(Collectors.toSet()); - + .distinct() + .toList(); } @SneakyThrows @@ -1215,6 +1145,18 @@ private boolean isMandatory(GroupHandler groupHandler, Group group, List return false; } + @SneakyThrows + private void duplicateBannerById(Space space, long bannerId, String username) { + FileItem file = fileService.getFile(bannerId); + BannerAttachment attachment = new BannerAttachment(null, + file.getFileInfo().getName(), + file.getFileInfo().getMimetype(), + file.getAsStream(), + System.currentTimeMillis()); + space.setBannerAttachment(attachment); + updateSpaceBanner(space, username); + } + private Space addPending(Space space, String username) { String[] pendingUsers = space.getPendingUsers(); if (!ArrayUtils.contains(pendingUsers, username)) { @@ -1242,6 +1184,10 @@ private Space addInvited(Space space, String username) { return space; } + private MembershipEntry getMembershipEntry(String expression) { + return expression.contains(":") ? MembershipEntry.parse(expression) : new MembershipEntry(expression); + } + private Space removeInvited(Space space, String username) { String[] invitedUsers = space.getInvitedUsers(); if (ArrayUtils.contains(invitedUsers, username)) { @@ -1251,86 +1197,10 @@ private Space removeInvited(Space space, String username) { return space; } - private org.exoplatform.services.security.Identity getIdentity(String username) { - org.exoplatform.services.security.Identity identity = identityRegistry.getIdentity(username); - if (identity == null) { - try { - identity = authenticator.createIdentity(username); - identityRegistry.register(identity); - return identity; - } catch (Exception e) { - LOG.warn("Error while retrieving user {} ACL identity", username, e); - return null; - } - } else { - return identity; - } - } - - private SpaceTemplate getSpaceTemplateOrDefault(String templaceName) { - SpaceTemplate spaceTemplate = spaceTemplateService.getSpaceTemplateByName(templaceName); - if (spaceTemplate == null) { - LOG.warn("could not find space template of type {}, will use Default template", templaceName); - String defaultTemplate = spaceTemplateService.getDefaultSpaceTemplate(); - spaceTemplate = spaceTemplateService.getSpaceTemplateByName(defaultTemplate); - } - return spaceTemplate; - } - - private void saveSpacePublicSite(Space space, String publicSiteVisibility, String authenticatedUser) { - boolean visibilityChanged = StringUtils.isNotBlank(publicSiteVisibility) - && !StringUtils.equals(space.getPublicSiteVisibility(), publicSiteVisibility); - - if (space.getPublicSiteId() == 0 - || layoutService.getPortalConfig(space.getPublicSiteId()) == null) { - long siteId = spaceTemplateService.createSpacePublicSite(space, - space.getPrettyName(), - space.getDisplayName(), - getPublicSitePermissions(publicSiteVisibility, - space.getGroupId())); - space.setPublicSiteId(siteId); - space.setPublicSiteVisibility(publicSiteVisibility); - spaceStorage.saveSpace(space, false); - spaceLifeCycle.spacePublicSiteCreated(space, authenticatedUser); - } else { - PortalConfig portalConfig = layoutService.getPortalConfig(space.getPublicSiteId()); - if (visibilityChanged) { - String[] publicSitePermissions = getPublicSitePermissions(publicSiteVisibility, space.getGroupId()); - portalConfig.setAccessPermissions(publicSitePermissions); - portalConfig.setDefaultSite(false); - layoutService.save(portalConfig); - - space.setPublicSiteVisibility(publicSiteVisibility); - spaceStorage.saveSpace(space, false); - spaceLifeCycle.spacePublicSiteUpdated(space, authenticatedUser); - } - } - } - - private String[] getPublicSitePermissions(String publicSiteVisibility, String spaceGroupId) { - if (StringUtils.isBlank(publicSiteVisibility)) { - return null; // NOSONAR - } - switch (publicSiteVisibility) { - case SpaceUtils.MANAGER: { - return new String[] { SpaceUtils.MANAGER + ":" + spaceGroupId }; - } - case SpaceUtils.MEMBER: { - return new String[] { SpaceUtils.MEMBER + ":" + spaceGroupId }; - } - case SpaceUtils.INTERNAL: { - return new String[] { SpaceUtils.MEMBER + ":" + SpaceUtils.PLATFORM_USERS_GROUP }; - } - case SpaceUtils.AUTHENTICATED: { - return new String[] { SpaceUtils.MEMBER + ":" + SpaceUtils.PLATFORM_USERS_GROUP, - SpaceUtils.MEMBER + ":" + SpaceUtils.PLATFORM_EXTERNALS_GROUP }; - } - case SpaceUtils.EVERYONE: { - return new String[] { UserACL.EVERYONE }; - } - default: - throw new IllegalArgumentException("Unexpected value: " + publicSiteVisibility); + public SpaceTemplateService getSpaceTemplateService() { + if (spaceTemplateService == null) { + spaceTemplateService = ExoContainerContext.getService(SpaceTemplateService.class); } + return spaceTemplateService; } - } diff --git a/component/core/src/main/java/io/meeds/social/link/dao/LinkDAO.java b/component/core/src/main/java/io/meeds/social/link/dao/LinkDAO.java index bb45f911452..f83eb5a4c0f 100644 --- a/component/core/src/main/java/io/meeds/social/link/dao/LinkDAO.java +++ b/component/core/src/main/java/io/meeds/social/link/dao/LinkDAO.java @@ -22,15 +22,15 @@ import java.util.Collections; import java.util.List; -import jakarta.persistence.NoResultException; -import jakarta.persistence.TypedQuery; - import org.apache.commons.collections.CollectionUtils; import org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl; import io.meeds.social.link.entity.LinkEntity; +import jakarta.persistence.NoResultException; +import jakarta.persistence.TypedQuery; + public class LinkDAO extends GenericDAOJPAImpl { public List getLinks(String name) { diff --git a/component/core/src/main/java/io/meeds/social/link/dao/LinkSettingDAO.java b/component/core/src/main/java/io/meeds/social/link/dao/LinkSettingDAO.java index 70aaa2aae97..95585493cb4 100644 --- a/component/core/src/main/java/io/meeds/social/link/dao/LinkSettingDAO.java +++ b/component/core/src/main/java/io/meeds/social/link/dao/LinkSettingDAO.java @@ -19,13 +19,13 @@ package io.meeds.social.link.dao; -import jakarta.persistence.NoResultException; -import jakarta.persistence.TypedQuery; - import org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl; import io.meeds.social.link.entity.LinkSettingEntity; +import jakarta.persistence.NoResultException; +import jakarta.persistence.TypedQuery; + public class LinkSettingDAO extends GenericDAOJPAImpl { public LinkSettingEntity findByName(String name) { diff --git a/component/core/src/main/java/io/meeds/social/link/entity/LinkEntity.java b/component/core/src/main/java/io/meeds/social/link/entity/LinkEntity.java index d2325d93a8d..5cecef6b594 100644 --- a/component/core/src/main/java/io/meeds/social/link/entity/LinkEntity.java +++ b/component/core/src/main/java/io/meeds/social/link/entity/LinkEntity.java @@ -32,7 +32,6 @@ import jakarta.persistence.NamedQuery; import jakarta.persistence.SequenceGenerator; import jakarta.persistence.Table; - import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/component/core/src/main/java/io/meeds/social/link/entity/LinkSettingEntity.java b/component/core/src/main/java/io/meeds/social/link/entity/LinkSettingEntity.java index dec20d40da5..3562218fe5a 100644 --- a/component/core/src/main/java/io/meeds/social/link/entity/LinkSettingEntity.java +++ b/component/core/src/main/java/io/meeds/social/link/entity/LinkSettingEntity.java @@ -22,6 +22,8 @@ import java.time.Instant; import java.util.Set; +import io.meeds.social.link.constant.LinkDisplayType; + import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.EnumType; @@ -34,9 +36,6 @@ import jakarta.persistence.OneToMany; import jakarta.persistence.SequenceGenerator; import jakarta.persistence.Table; - -import io.meeds.social.link.constant.LinkDisplayType; - import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/component/core/src/main/java/io/meeds/social/link/storage/LinkStorage.java b/component/core/src/main/java/io/meeds/social/link/storage/LinkStorage.java index 001ad710cb0..8fa2665986a 100644 --- a/component/core/src/main/java/io/meeds/social/link/storage/LinkStorage.java +++ b/component/core/src/main/java/io/meeds/social/link/storage/LinkStorage.java @@ -18,7 +18,8 @@ */ package io.meeds.social.link.storage; -import static io.meeds.social.link.storage.util.EntityMapper.*; +import static io.meeds.social.link.storage.util.EntityMapper.fromModel; +import static io.meeds.social.link.storage.util.EntityMapper.toModel; import java.time.Instant; import java.util.List; diff --git a/component/core/src/main/java/io/meeds/social/permlink/plugin/SpacePermanentLinkPlugin.java b/component/core/src/main/java/io/meeds/social/permlink/plugin/SpacePermanentLinkPlugin.java index f24cd3d4aab..9f5af61eb61 100644 --- a/component/core/src/main/java/io/meeds/social/permlink/plugin/SpacePermanentLinkPlugin.java +++ b/component/core/src/main/java/io/meeds/social/permlink/plugin/SpacePermanentLinkPlugin.java @@ -77,7 +77,7 @@ public String getDirectAccessUrl(PermanentLinkObject object) throws ObjectNotFou StringBuilder spaceUrl = new StringBuilder("/portal/g/"); spaceUrl.append(space.getGroupId().replace("/", ":")) .append("/") - .append(space.getPrettyName()) + .append(space.getUrl()) .append("/"); if (object.getParameters() != null) { if (object.getParameters().containsKey(APPLICATION_URI)) { diff --git a/component/core/src/main/java/io/meeds/social/space/template/dao/SpaceTemplateDAO.java b/component/core/src/main/java/io/meeds/social/space/template/dao/SpaceTemplateDAO.java new file mode 100644 index 00000000000..314be208462 --- /dev/null +++ b/component/core/src/main/java/io/meeds/social/space/template/dao/SpaceTemplateDAO.java @@ -0,0 +1,36 @@ +/** + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package io.meeds.social.space.template.dao; + +import java.util.List; + +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import io.meeds.social.space.template.entity.SpaceTemplateEntity; + +@Repository +public interface SpaceTemplateDAO extends JpaRepository { + + List findByDeletedFalse(Pageable pageable); + + List findByDeletedFalseAndEnabledTrue(Pageable pageable); + +} diff --git a/component/core/src/main/java/io/meeds/social/space/template/entity/SpaceTemplateEntity.java b/component/core/src/main/java/io/meeds/social/space/template/entity/SpaceTemplateEntity.java new file mode 100644 index 00000000000..7a7dbc8224e --- /dev/null +++ b/component/core/src/main/java/io/meeds/social/space/template/entity/SpaceTemplateEntity.java @@ -0,0 +1,93 @@ +/** + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package io.meeds.social.space.template.entity; + +import java.util.List; + +import org.exoplatform.commons.utils.StringListConverter; + +import io.meeds.social.core.space.constant.Registration; +import io.meeds.social.core.space.constant.Visibility; + +import jakarta.persistence.Column; +import jakarta.persistence.Convert; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.SequenceGenerator; +import jakarta.persistence.Table; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Entity(name = "SpaceTemplate") +@Table(name = "SOC_SPACE_TEMPLATES") +@Data +@NoArgsConstructor +@AllArgsConstructor +public class SpaceTemplateEntity { + + @Id + @SequenceGenerator(name = "SEQ_SOC_SPACE_TEMPLATE_ID", sequenceName = "SEQ_SOC_SPACE_TEMPLATE_ID", allocationSize = 1) + @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ_SOC_SPACE_TEMPLATE_ID") + @Column(name = "ID") + private Long id; + + @Column(name = "ICON") + private String icon; + + @Column(name = "ENABLED") + private boolean enabled; + + @Column(name = "DELETED") + private boolean deleted; + + @Column(name = "IS_SYSTEM") + private boolean system; + + @Column(name = "LAYOUT") + private String layout; + + @Convert(converter = StringListConverter.class) + @Column(name = "PERMISSIONS") + private List permissions; + + @Convert(converter = StringListConverter.class) + @Column(name = "SPACE_LAYOUT_PERMISSIONS") + private List spaceLayoutPermissions; + + @Convert(converter = StringListConverter.class) + @Column(name = "SPACE_DELETE_PERMISSIONS") + private List spaceDeletePermissions; + + @Convert(converter = StringListConverter.class) + @Column(name = "SPACE_FIELDS") + private List spaceFields; + + @Column(name = "SPACE_DEFAULT_VISIBILITY") + private Visibility spaceDefaultVisibility; + + @Column(name = "SPACE_DEFAULT_ACCESS") + private Registration spaceDefaultRegistration; + + @Column(name = "SPACE_ALLOW_CONTENT_CREATION") + private boolean spaceAllowContentCreation; + +} diff --git a/component/core/src/main/java/io/meeds/social/space/template/model/SpaceTemplate.java b/component/core/src/main/java/io/meeds/social/space/template/model/SpaceTemplate.java new file mode 100644 index 00000000000..b2c54f86866 --- /dev/null +++ b/component/core/src/main/java/io/meeds/social/space/template/model/SpaceTemplate.java @@ -0,0 +1,67 @@ +/** + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package io.meeds.social.space.template.model; + +import java.util.List; + +import io.meeds.social.core.space.constant.Registration; +import io.meeds.social.core.space.constant.Visibility; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class SpaceTemplate { + + private long id; + + private String name; + + private String description; + + private long bannerFileId; + + private String icon; + + private boolean enabled; + + private boolean deleted; + + private boolean system; + + private String layout; + + private List permissions; + + private List spaceLayoutPermissions; + + private List spaceDeletePermissions; + + private List spaceFields; + + private Visibility spaceDefaultVisibility; + + private Registration spaceDefaultRegistration; + + private boolean spaceAllowContentCreation; + +} diff --git a/component/core/src/main/java/io/meeds/social/space/template/model/SpaceTemplateFilter.java b/component/core/src/main/java/io/meeds/social/space/template/model/SpaceTemplateFilter.java new file mode 100644 index 00000000000..5d7bd2c8ebd --- /dev/null +++ b/component/core/src/main/java/io/meeds/social/space/template/model/SpaceTemplateFilter.java @@ -0,0 +1,38 @@ +/** + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package io.meeds.social.space.template.model; + +import java.util.Locale; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class SpaceTemplateFilter { + + private String username; + + private Locale locale; + + private boolean includeDisabled; + +} diff --git a/component/core/src/main/java/io/meeds/social/space/template/plugin/attachment/SpaceTemplateBannerAttachmentPlugin.java b/component/core/src/main/java/io/meeds/social/space/template/plugin/attachment/SpaceTemplateBannerAttachmentPlugin.java new file mode 100644 index 00000000000..de551ab63b1 --- /dev/null +++ b/component/core/src/main/java/io/meeds/social/space/template/plugin/attachment/SpaceTemplateBannerAttachmentPlugin.java @@ -0,0 +1,88 @@ +/** + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package io.meeds.social.space.template.plugin.attachment; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.Ordered; +import org.springframework.core.annotation.Order; +import org.springframework.stereotype.Component; + +import org.exoplatform.commons.exception.ObjectNotFoundException; +import org.exoplatform.services.security.Identity; +import org.exoplatform.social.attachment.AttachmentPlugin; +import org.exoplatform.social.attachment.AttachmentService; + +import io.meeds.social.space.template.service.SpaceTemplateService; + +import jakarta.annotation.PostConstruct; + +@Component +@Order(Ordered.HIGHEST_PRECEDENCE) +public class SpaceTemplateBannerAttachmentPlugin extends AttachmentPlugin { + + public static final String OBJECT_TYPE = "spaceTemplateBanner"; + + @Autowired + protected SpaceTemplateService spaceTemplateService; + + @Autowired + protected AttachmentService attachmentService; + + @PostConstruct + public void init() { + attachmentService.addPlugin(this); + } + + @Override + public String getObjectType() { + return OBJECT_TYPE; + } + + @Override + public boolean hasEditPermission(Identity userIdentity, String entityId) throws ObjectNotFoundException { + if (userIdentity == null) { + return false; + } + return spaceTemplateService.canManageTemplates(userIdentity.getUserId()); + } + + @Override + public boolean hasAccessPermission(Identity userIdentity, String entityId) throws ObjectNotFoundException { + if (entityId == null || userIdentity == null) { + return false; + } + long templateId = Long.parseLong(entityId); + String username = userIdentity.getUserId(); + if (spaceTemplateService.getSpaceTemplate(templateId) == null) { + throw new ObjectNotFoundException(String.format("Space Template with id %s not found", templateId)); + } + return spaceTemplateService.canViewTemplate(templateId, username); + } + + @Override + public long getAudienceId(String objectId) throws ObjectNotFoundException { + return 0; + } + + @Override + public long getSpaceId(String objectId) throws ObjectNotFoundException { + return 0; + } + +} diff --git a/component/core/src/main/java/io/meeds/social/space/template/plugin/translation/SpaceTemplateTranslationPlugin.java b/component/core/src/main/java/io/meeds/social/space/template/plugin/translation/SpaceTemplateTranslationPlugin.java new file mode 100644 index 00000000000..6b673a18de1 --- /dev/null +++ b/component/core/src/main/java/io/meeds/social/space/template/plugin/translation/SpaceTemplateTranslationPlugin.java @@ -0,0 +1,83 @@ +/** + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package io.meeds.social.space.template.plugin.translation; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.Ordered; +import org.springframework.core.annotation.Order; +import org.springframework.stereotype.Component; + +import org.exoplatform.commons.exception.ObjectNotFoundException; + +import io.meeds.social.space.template.service.SpaceTemplateService; +import io.meeds.social.translation.plugin.TranslationPlugin; +import io.meeds.social.translation.service.TranslationService; + +import jakarta.annotation.PostConstruct; + +@Component +@Order(Ordered.HIGHEST_PRECEDENCE) +public class SpaceTemplateTranslationPlugin extends TranslationPlugin { + + public static final String OBJECT_TYPE = "spaceTemplate"; + + public static final String NAME_FIELD_NAME = "name"; + + public static final String DESCRIPTION_FIELD_NAME = "description"; + + @Autowired + protected SpaceTemplateService spaceTemplateService; + + @Autowired + protected TranslationService translationService; + + @PostConstruct + public void init() { + translationService.addPlugin(this); + } + + @Override + public String getObjectType() { + return OBJECT_TYPE; + } + + @Override + public boolean hasEditPermission(long templateId, String username) throws ObjectNotFoundException { + return spaceTemplateService.canManageTemplates(username); + } + + @Override + public boolean hasAccessPermission(long templateId, String username) throws ObjectNotFoundException { + if (spaceTemplateService.getSpaceTemplate(templateId) == null) { + throw new ObjectNotFoundException(String.format("Space Template with id %s not found", templateId)); + } + return spaceTemplateService.canViewTemplate(templateId, username); + } + + @Override + public long getAudienceId(long templateId) { + return 0; + } + + @Override + public long getSpaceId(long templateId) { + return 0; + } + +} diff --git a/component/core/src/main/java/io/meeds/social/space/template/service/SpaceTemplateService.java b/component/core/src/main/java/io/meeds/social/space/template/service/SpaceTemplateService.java new file mode 100644 index 00000000000..e430176ba4e --- /dev/null +++ b/component/core/src/main/java/io/meeds/social/space/template/service/SpaceTemplateService.java @@ -0,0 +1,252 @@ +/** + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package io.meeds.social.space.template.service; + +import java.util.Collections; +import java.util.List; +import java.util.Locale; +import java.util.Objects; + +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import org.exoplatform.commons.exception.ObjectNotFoundException; +import org.exoplatform.portal.config.UserACL; +import org.exoplatform.services.log.ExoLogger; +import org.exoplatform.services.log.Log; +import org.exoplatform.services.security.Identity; +import org.exoplatform.services.security.MembershipEntry; +import org.exoplatform.social.attachment.AttachmentService; +import org.exoplatform.social.core.space.SpacesAdministrationService; + +import io.meeds.social.space.template.model.SpaceTemplate; +import io.meeds.social.space.template.model.SpaceTemplateFilter; +import io.meeds.social.space.template.plugin.attachment.SpaceTemplateBannerAttachmentPlugin; +import io.meeds.social.space.template.plugin.translation.SpaceTemplateTranslationPlugin; +import io.meeds.social.space.template.storage.SpaceTemplateStorage; +import io.meeds.social.translation.service.TranslationService; + +@Service +public class SpaceTemplateService { + + private static final Log LOG = ExoLogger.getLogger(SpaceTemplateService.class); + + private TranslationService translationService; + + private AttachmentService attachmentService; + + private SpacesAdministrationService spacesAdministrationService; + + private UserACL userAcl; + + private SpaceTemplateStorage spaceTemplateStorage; + + public SpaceTemplateService(TranslationService translationService, + AttachmentService attachmentService, + UserACL userAcl, + SpacesAdministrationService spacesAdministrationService, + SpaceTemplateStorage spaceTemplateStorage) { + this.translationService = translationService; + this.attachmentService = attachmentService; + this.userAcl = userAcl; + this.spacesAdministrationService = spacesAdministrationService; + this.spaceTemplateStorage = spaceTemplateStorage; + } + + public List getSpaceTemplates() { + return getSpaceTemplates(null, Pageable.unpaged(), false); + } + + public List getSpaceTemplates(SpaceTemplateFilter spaceTemplateFilter, Pageable pageable, boolean expand) { + if (spaceTemplateFilter != null + && StringUtils.isBlank(spaceTemplateFilter.getUsername())) { + return Collections.emptyList(); + } else { + boolean includeDisabled = spaceTemplateFilter == null || spaceTemplateFilter.isIncludeDisabled(); + List spaceTemplates = includeDisabled ? spaceTemplateStorage.getSpaceTemplates(pageable) : + spaceTemplateStorage.getEnabledSpaceTemplates(pageable); + return spaceTemplates.stream() + .map(spaceTemplate -> { + if (spaceTemplateFilter != null + && !canViewTemplate(spaceTemplate.getId(), spaceTemplateFilter.getUsername())) { + return null; + } else if (expand) { + computeSpaceTemplateAttributes(spaceTemplate, + spaceTemplateFilter == null ? null : + spaceTemplateFilter.getLocale()); + } + return spaceTemplate; + }) + .filter(Objects::nonNull) + .toList(); + } + } + + public SpaceTemplate getSpaceTemplate(long templateId) { + return spaceTemplateStorage.getSpaceTemplate(templateId); + } + + public SpaceTemplate getSpaceTemplate(long templateId, + String username, + Locale locale, + boolean expand) throws IllegalAccessException { + SpaceTemplate spaceTemplate = spaceTemplateStorage.getSpaceTemplate(templateId); + if (spaceTemplate == null) { + return null; + } + if (!canViewTemplate(spaceTemplate, username)) { + throw new IllegalAccessException(); + } + if (expand) { + computeSpaceTemplateAttributes(spaceTemplate, locale); + } + return spaceTemplate; + } + + public long getSpaceTemplateBannerId(long templateId) { + List attachmentFileIds = attachmentService.getAttachmentFileIds(SpaceTemplateBannerAttachmentPlugin.OBJECT_TYPE, + String.valueOf(templateId)); + if (CollectionUtils.isNotEmpty(attachmentFileIds)) { + return Long.parseLong(attachmentFileIds.get(0)); + } else { + return 0l; + } + } + + public boolean canManageTemplates(String username) { + return spacesAdministrationService.isSuperManager(username); + } + + public boolean canViewTemplate(long templateId, String username) { + SpaceTemplate spaceTemplate = getSpaceTemplate(templateId); + return canViewTemplate(spaceTemplate, username); + } + + public boolean canCreateSpace(long templateId, String username) { + SpaceTemplate spaceTemplate = getSpaceTemplate(templateId); + return canViewTemplate(spaceTemplate, username) && spaceTemplate.isEnabled(); + } + + public boolean canCreateSpace(String username) { + return spaceTemplateStorage.getEnabledSpaceTemplates(Pageable.unpaged()) + .stream() + .anyMatch(t -> canViewTemplate(t, username)); + } + + public SpaceTemplate createSpaceTemplate(SpaceTemplate spaceTemplate, String username) throws IllegalAccessException { + if (!canManageTemplates(username)) { + throw new IllegalAccessException("User isn't authorized to create a space template"); + } + return createSpaceTemplate(spaceTemplate); + } + + public SpaceTemplate createSpaceTemplate(SpaceTemplate spaceTemplate) { + if (spaceTemplate.getId() != 0) { + throw new IllegalArgumentException("Space template to create shouldn't have an id"); + } + return spaceTemplateStorage.createSpaceTemplate(spaceTemplate); + } + + public SpaceTemplate updateSpaceTemplate(SpaceTemplate spaceTemplate, String username) throws ObjectNotFoundException, + IllegalAccessException { + if (!canManageTemplates(username)) { + throw new IllegalAccessException("User isn't authorized to update a space template"); + } else if (spaceTemplate.isDeleted()) { + throw new IllegalArgumentException("Can't mark space template as deleted through update method"); + } + return updateSpaceTemplate(spaceTemplate); + } + + public SpaceTemplate updateSpaceTemplate(SpaceTemplate spaceTemplate) throws ObjectNotFoundException { + SpaceTemplate storedSpaceTemplate = spaceTemplateStorage.getSpaceTemplate(spaceTemplate.getId()); + if (storedSpaceTemplate == null || storedSpaceTemplate.isDeleted()) { + throw new ObjectNotFoundException("Space Template doesn't exist"); + } + return spaceTemplateStorage.updateSpaceTemplate(spaceTemplate); + } + + public void deleteSpaceTemplate(long templateId, String username) throws IllegalAccessException, ObjectNotFoundException { + if (!canManageTemplates(username)) { + throw new IllegalAccessException("User isn't authorized to create a space template"); + } + SpaceTemplate spaceTemplate = getSpaceTemplate(templateId); + if (spaceTemplate != null && spaceTemplate.isSystem()) { + throw new IllegalAccessException("Can't delete a system space template"); + } + deleteSpaceTemplate(templateId); + } + + public void deleteSpaceTemplate(long templateId) throws ObjectNotFoundException { + SpaceTemplate spaceTemplate = spaceTemplateStorage.getSpaceTemplate(templateId); + if (spaceTemplate == null || spaceTemplate.isDeleted()) { + throw new ObjectNotFoundException(String.format("Space template with id %s doesn't exist", templateId)); + } + spaceTemplate.setDeleted(true); + spaceTemplateStorage.updateSpaceTemplate(spaceTemplate); + + try { + attachmentService.deleteAttachments(SpaceTemplateBannerAttachmentPlugin.OBJECT_TYPE, String.valueOf(templateId)); + } catch (Exception e) { + LOG.debug("Error while deleting attachments of deleted Page Template", e); + } + try { + translationService.deleteTranslationLabels(SpaceTemplateTranslationPlugin.OBJECT_TYPE, templateId); + } catch (ObjectNotFoundException e) { + LOG.debug("Error while deleting translation labels of deleted Page Template", e); + } + } + + private void computeSpaceTemplateAttributes(SpaceTemplate spaceTemplate, Locale locale) { + spaceTemplate.setName(translationService.getTranslationLabelOrDefault(SpaceTemplateTranslationPlugin.OBJECT_TYPE, + spaceTemplate.getId(), + SpaceTemplateTranslationPlugin.NAME_FIELD_NAME, + locale)); + spaceTemplate.setDescription(translationService.getTranslationLabelOrDefault(SpaceTemplateTranslationPlugin.OBJECT_TYPE, + spaceTemplate.getId(), + SpaceTemplateTranslationPlugin.DESCRIPTION_FIELD_NAME, + locale)); + spaceTemplate.setBannerFileId(getSpaceTemplateBannerId(spaceTemplate.getId())); + } + + private boolean canViewTemplate(SpaceTemplate spaceTemplate, String username) { + if (spaceTemplate == null + || spaceTemplate.isDeleted() + || userAcl.isAnonymousUser(username)) { + return false; + } else if (canManageTemplates(username)) { + return true; + } else if (!spaceTemplate.isEnabled()) { + // Only when not manager, + // checked in previous step + return false; + } + Identity aclIdentity = userAcl.getUserIdentity(username); + return aclIdentity != null + && spaceTemplate.getPermissions() + .stream() + .anyMatch(expression -> aclIdentity.isMemberOf(getMembershipEntry(expression))); + } + + private MembershipEntry getMembershipEntry(String expression) { + return expression.contains(":") ? MembershipEntry.parse(expression) : new MembershipEntry(expression); + } + +} diff --git a/component/core/src/main/java/io/meeds/social/space/template/service/injection/SpaceTemplateImportService.java b/component/core/src/main/java/io/meeds/social/space/template/service/injection/SpaceTemplateImportService.java new file mode 100644 index 00000000000..9e3e6f6624f --- /dev/null +++ b/component/core/src/main/java/io/meeds/social/space/template/service/injection/SpaceTemplateImportService.java @@ -0,0 +1,286 @@ +/** + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package io.meeds.social.space.template.service.injection; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.util.Collections; +import java.util.Enumeration; +import java.util.List; +import java.util.Random; +import java.util.concurrent.CompletableFuture; + +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.IOUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.core.Ordered; +import org.springframework.core.annotation.Order; +import org.springframework.stereotype.Component; + +import org.exoplatform.commons.api.settings.SettingService; +import org.exoplatform.commons.api.settings.SettingValue; +import org.exoplatform.commons.api.settings.data.Context; +import org.exoplatform.commons.api.settings.data.Scope; +import org.exoplatform.container.PortalContainer; +import org.exoplatform.container.configuration.ConfigurationManager; +import org.exoplatform.portal.config.model.Container; +import org.exoplatform.portal.config.model.ModelUnmarshaller; +import org.exoplatform.portal.config.model.UnmarshalledObject; +import org.exoplatform.services.log.ExoLogger; +import org.exoplatform.services.log.Log; +import org.exoplatform.social.attachment.AttachmentService; +import org.exoplatform.social.attachment.model.UploadedAttachmentDetail; +import org.exoplatform.upload.UploadResource; + +import io.meeds.common.ContainerTransactional; +import io.meeds.social.core.space.constant.Registration; +import io.meeds.social.core.space.constant.Visibility; +import io.meeds.social.space.template.model.SpaceTemplate; +import io.meeds.social.space.template.plugin.attachment.SpaceTemplateBannerAttachmentPlugin; +import io.meeds.social.space.template.plugin.translation.SpaceTemplateTranslationPlugin; +import io.meeds.social.space.template.service.SpaceTemplateService; +import io.meeds.social.space.template.service.injection.model.SpaceTemplateDescriptor; +import io.meeds.social.space.template.service.injection.model.SpaceTemplateDescriptorList; +import io.meeds.social.util.JsonUtils; + +import jakarta.annotation.PostConstruct; +import lombok.SneakyThrows; + +@Component +@Order(Ordered.LOWEST_PRECEDENCE) +public class SpaceTemplateImportService { + + private static final Scope SPACE_TEMPLATE_IMPORT_SCOPE = Scope.APPLICATION.id("SPACE_TEMPLATE_IMPORT"); + + private static final Context SPACE_TEMPLATE_CONTEXT = Context.GLOBAL.id("SPACE_TEMPLATE"); + + private static final String SPACE_TEMPLATE_VERSION = "version"; + + private static final Log LOG = + ExoLogger.getLogger(SpaceTemplateImportService.class); + + private static final Random RANDOM = new Random(); + + @Autowired + private SpaceTemplateTranslationImportService layoutTranslationService; + + @Autowired + private AttachmentService attachmentService; + + @Autowired + private SpaceTemplateService spaceTemplateService; + + @Autowired + private SettingService settingService; + + @Autowired + private ConfigurationManager configurationManager; + + @Value("${meeds.space.template.import.override:false}") + private boolean forceReimportTemplates; + + @Value("${meeds.space.template.import.version:1}") + private long version; + + @PostConstruct + public void init() { + CompletableFuture.runAsync(this::importSpaceTemplates); + } + + @ContainerTransactional + public void importSpaceTemplates() { + LOG.info("Importing Space Templates"); + if (!forceReimportTemplates + && getSettingValue(SPACE_TEMPLATE_VERSION) != version) { + forceReimportTemplates = true; + } + + try { + Enumeration templateFiles = PortalContainer.getInstance() + .getPortalClassLoader() + .getResources("space-templates.json"); + Collections.list(templateFiles) + .stream() + .map(this::parseDescriptors) + .flatMap(List::stream) + .forEach(this::importDescriptor); + LOG.info("Importing Space Templates finished successfully"); + + LOG.info("Processing Post Space Templates import"); + layoutTranslationService.postImport(SpaceTemplateTranslationPlugin.OBJECT_TYPE); + LOG.info("Processing Post Space Templates import finished"); + + setSettingValue(SPACE_TEMPLATE_VERSION, version); + } catch (Exception e) { + LOG.warn("An error occurred while importing space templates", e); + } + } + + protected List parseDescriptors(URL url) { + try (InputStream inputStream = url.openStream()) { + String content = IOUtils.toString(inputStream, StandardCharsets.UTF_8); + SpaceTemplateDescriptorList list = JsonUtils.fromJsonString(content, SpaceTemplateDescriptorList.class); + return list.getDescriptors(); + } catch (IOException e) { + LOG.warn("An unkown error happened while parsing space templates from url {}", url, e); + return Collections.emptyList(); + } + } + + protected void importDescriptor(SpaceTemplateDescriptor descriptor) { + String descriptorId = descriptor.getId(); + long existingTemplateId = getSettingValue(descriptorId); + if (forceReimportTemplates || existingTemplateId == 0) { + importSpaceTemplate(descriptor, existingTemplateId); + } else { + LOG.debug("Ignore re-importing Space Template {}", descriptorId); + } + } + + protected void importSpaceTemplate(SpaceTemplateDescriptor d, long oldTemplateId) { + LOG.info("Importing Space Template {}", d.getId()); + try { + SpaceTemplate spaceTemplate = createSpaceTemplate(d, oldTemplateId); + if (forceReimportTemplates || oldTemplateId == 0 || spaceTemplate.getId() != oldTemplateId) { + LOG.info("Importing Space Template {} title translations", d.getId()); + saveNames(d, spaceTemplate); + LOG.info("Importing Space Template {} description translations", d.getId()); + saveDescriptions(d, spaceTemplate); + LOG.info("Importing Space Template {} illustration", d.getId()); + saveBanner(spaceTemplate.getId(), d.getBannerPath()); + // Mark as imported + setSettingValue(d.getId(), spaceTemplate.getId()); + } + LOG.info("Importing Space Template {} finished successfully", d.getId()); + } catch (Exception e) { + LOG.warn("An error occurred while importing Space template {}", d.getId(), e); + } + } + + protected void saveNames(SpaceTemplateDescriptor d, SpaceTemplate spaceTemplate) { + layoutTranslationService.saveTranslationLabels(SpaceTemplateTranslationPlugin.OBJECT_TYPE, + spaceTemplate.getId(), + SpaceTemplateTranslationPlugin.NAME_FIELD_NAME, + d.getNames()); + } + + protected void saveDescriptions(SpaceTemplateDescriptor d, SpaceTemplate spaceTemplate) { + layoutTranslationService.saveTranslationLabels(SpaceTemplateTranslationPlugin.OBJECT_TYPE, + spaceTemplate.getId(), + SpaceTemplateTranslationPlugin.DESCRIPTION_FIELD_NAME, + d.getDescriptions()); + } + + @SneakyThrows + protected SpaceTemplate createSpaceTemplate(SpaceTemplateDescriptor d, long oldTemplateId) { + SpaceTemplate spaceTemplate = null; + if (oldTemplateId > 0) { + spaceTemplate = spaceTemplateService.getSpaceTemplate(oldTemplateId); + } + boolean isNew = spaceTemplate == null; + if (isNew) { + spaceTemplate = new SpaceTemplate(); + } + spaceTemplate.setSystem(d.isSystem()); + spaceTemplate.setIcon(d.getIcon()); + spaceTemplate.setEnabled(d.isEnabled()); + spaceTemplate.setLayout(d.getLayout()); + spaceTemplate.setSpaceFields(d.getSpaceFields()); + spaceTemplate.setPermissions(d.getPermissions()); + spaceTemplate.setSpaceLayoutPermissions(d.getSpaceLayoutPermissions()); + spaceTemplate.setSpaceDeletePermissions(d.getSpaceDeletePermissions()); + spaceTemplate.setSpaceDefaultRegistration(Registration.valueOf(d.getSpaceDefaultRegistration().toUpperCase())); + spaceTemplate.setSpaceDefaultVisibility(Visibility.valueOf(d.getSpaceDefaultVisibility().toUpperCase())); + spaceTemplate.setSpaceAllowContentCreation(d.isSpaceAllowContentCreation()); + if (isNew) { + return spaceTemplateService.createSpaceTemplate(spaceTemplate); + } else { + return spaceTemplateService.updateSpaceTemplate(spaceTemplate); + } + } + + protected void saveBanner(long templateId, String imagePath) { + File tempFile = null; + try { + tempFile = getIllustrationFile(imagePath); + String uploadId = "SpaceTemplateBanner" + RANDOM.nextLong(); + UploadResource uploadResource = new UploadResource(uploadId); + uploadResource.setFileName(tempFile.getName()); + uploadResource.setMimeType("image/png"); + uploadResource.setStatus(UploadResource.UPLOADED_STATUS); + uploadResource.setStoreLocation(tempFile.getPath()); + UploadedAttachmentDetail uploadedAttachmentDetail = new UploadedAttachmentDetail(uploadResource); + attachmentService.deleteAttachments(SpaceTemplateBannerAttachmentPlugin.OBJECT_TYPE, String.valueOf(templateId)); + attachmentService.saveAttachment(uploadedAttachmentDetail, + SpaceTemplateBannerAttachmentPlugin.OBJECT_TYPE, + String.valueOf(templateId), + null, + 1l); + } catch (Exception e) { + throw new IllegalStateException(String.format("Error while saving Image '%s' as attachment for template '%s'", + imagePath, + templateId), + e); + } finally { + if (tempFile != null) { + try { + Files.delete(tempFile.toPath()); + } catch (IOException e) { + tempFile.deleteOnExit(); + } + } + } + } + + @SneakyThrows + protected Container fromXML(String xml) { + UnmarshalledObject obj = ModelUnmarshaller.unmarshall(Container.class, xml.getBytes(StandardCharsets.UTF_8)); + return obj.getObject(); + } + + protected void setSettingValue(String name, long value) { + settingService.set(SPACE_TEMPLATE_CONTEXT, + SPACE_TEMPLATE_IMPORT_SCOPE, + name, + SettingValue.create(String.valueOf(value))); + } + + protected long getSettingValue(String name) { + try { + SettingValue settingValue = settingService.get(SPACE_TEMPLATE_CONTEXT, SPACE_TEMPLATE_IMPORT_SCOPE, name); + return settingValue == null || settingValue.getValue() == null ? 0l : Long.parseLong(settingValue.getValue().toString()); + } catch (NumberFormatException e) { + return 0l; + } + } + + private File getIllustrationFile(String imagePath) throws Exception { + try (InputStream inputStream = configurationManager.getInputStream(imagePath)) { + File tempFile = File.createTempFile("temp", ".png"); + FileUtils.copyInputStreamToFile(inputStream, tempFile); + return tempFile; + } + } + +} diff --git a/component/core/src/main/java/io/meeds/social/space/template/service/injection/SpaceTemplateTranslationImportService.java b/component/core/src/main/java/io/meeds/social/space/template/service/injection/SpaceTemplateTranslationImportService.java new file mode 100644 index 00000000000..85ab3c6736b --- /dev/null +++ b/component/core/src/main/java/io/meeds/social/space/template/service/injection/SpaceTemplateTranslationImportService.java @@ -0,0 +1,139 @@ +/** + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package io.meeds.social.space.template.service.injection; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.ResourceBundle; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import org.exoplatform.container.PortalContainer; +import org.exoplatform.services.log.ExoLogger; +import org.exoplatform.services.log.Log; +import org.exoplatform.services.resources.LocaleConfigService; +import org.exoplatform.services.resources.ResourceBundleService; + +import io.meeds.common.ContainerTransactional; +import io.meeds.social.translation.service.TranslationService; + +import jakarta.annotation.PreDestroy; +import lombok.SneakyThrows; + +@Component +public class SpaceTemplateTranslationImportService { + + private static final Log LOG = ExoLogger.getLogger(SpaceTemplateTranslationImportService.class); + + @Autowired + private TranslationService translationService; + + @Autowired + private LocaleConfigService localeConfigService; + + @Autowired + private ResourceBundleService resourceBundleService; + + private Map> postImportProcessors = new ConcurrentHashMap<>(); + + private Map bundles = new ConcurrentHashMap<>(); + + private ExecutorService executorService = Executors.newFixedThreadPool(1); + + @PreDestroy + protected void destroy() { + executorService.shutdownNow(); + } + + public void saveTranslationLabels(String objectType, + long objectId, + String fieldName, + Map labels) { + // Make Heavy processing made at the end or import process + postImportProcessors.computeIfAbsent(objectType, k -> new ArrayList<>()) + .add(() -> saveTranslationLabelsForAllLanguages(objectType, + objectId, + fieldName, + labels, + getI18NLabel(labels.get("en"), Locale.ENGLISH))); + } + + public void postImport(String objectType) { + postImportProcessors.computeIfAbsent(objectType, k -> new ArrayList<>()).forEach(executorService::execute); + postImportProcessors.remove(objectType); + bundles.clear(); + } + + @SneakyThrows + @ContainerTransactional + private void saveTranslationLabelsForAllLanguages(String objectType, + long objectId, + String fieldName, + Map labels, + String defaultLabel) { + String i18nKey = labels.get("en"); + Map translations = new HashMap<>(); + localeConfigService.getLocalConfigs() + .stream() + .filter(config -> !StringUtils.equals(config.getLocale().toLanguageTag(), "ma")) + .forEach(config -> translations.put(config.getLocale(), + getI18NLabel(i18nKey, + config.getLocale(), + defaultLabel))); + translationService.saveTranslationLabels(objectType, + objectId, + fieldName, + translations); + } + + private String getI18NLabel(String label, Locale locale) { + return getI18NLabel(label, locale, null); + } + + private String getI18NLabel(String label, Locale locale, String defaultLabel) { + try { + ResourceBundle resourceBundle = getResourceBundle(locale); + if (resourceBundle != null + && resourceBundle.containsKey(label)) { + return resourceBundle.getString(label); + } + } catch (Exception e) { + LOG.debug("Resource Bundle not found with locale {}", locale, e); + } + return defaultLabel == null ? label : defaultLabel; + } + + private ResourceBundle getResourceBundle(Locale locale) { + return bundles.computeIfAbsent(locale, + l -> resourceBundleService.getResourceBundle(new String[] { "locale.portlet.Portlets", + "locale.social.Core" }, + l, + PortalContainer.getInstance() + .getPortalClassLoader())); + } + +} diff --git a/component/core/src/main/java/io/meeds/social/space/template/service/injection/model/SpaceTemplateDescriptor.java b/component/core/src/main/java/io/meeds/social/space/template/service/injection/model/SpaceTemplateDescriptor.java new file mode 100644 index 00000000000..a7cc09964a9 --- /dev/null +++ b/component/core/src/main/java/io/meeds/social/space/template/service/injection/model/SpaceTemplateDescriptor.java @@ -0,0 +1,63 @@ +/** + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package io.meeds.social.space.template.service.injection.model; + +import java.util.List; +import java.util.Map; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class SpaceTemplateDescriptor { + + private String id; + + private Map names; + + private Map descriptions; + + private String bannerPath; + + private String icon; + + private boolean enabled; + + private boolean system; + + private String layout; + + private List spaceFields; + + private List permissions; + + private List spaceLayoutPermissions; + + private List spaceDeletePermissions; + + private String spaceDefaultRegistration; + + private String spaceDefaultVisibility; + + private boolean spaceAllowContentCreation; + +} diff --git a/component/core/src/main/java/io/meeds/social/space/template/service/injection/model/SpaceTemplateDescriptorList.java b/component/core/src/main/java/io/meeds/social/space/template/service/injection/model/SpaceTemplateDescriptorList.java new file mode 100644 index 00000000000..545d458d5ca --- /dev/null +++ b/component/core/src/main/java/io/meeds/social/space/template/service/injection/model/SpaceTemplateDescriptorList.java @@ -0,0 +1,34 @@ +/** + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package io.meeds.social.space.template.service.injection.model; + +import java.util.List; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class SpaceTemplateDescriptorList { + + private List descriptors; + +} diff --git a/component/core/src/main/java/io/meeds/social/space/template/storage/SpaceTemplateStorage.java b/component/core/src/main/java/io/meeds/social/space/template/storage/SpaceTemplateStorage.java new file mode 100644 index 00000000000..c81e223b571 --- /dev/null +++ b/component/core/src/main/java/io/meeds/social/space/template/storage/SpaceTemplateStorage.java @@ -0,0 +1,89 @@ +/** + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package io.meeds.social.space.template.storage; + +import java.util.List; + +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Component; + +import org.exoplatform.commons.exception.ObjectNotFoundException; + +import io.meeds.social.space.template.dao.SpaceTemplateDAO; +import io.meeds.social.space.template.entity.SpaceTemplateEntity; +import io.meeds.social.space.template.model.SpaceTemplate; +import io.meeds.social.space.template.utils.EntityMapper; + +@Component +public class SpaceTemplateStorage { + + private SpaceTemplateDAO spaceTemplateDAO; + + public SpaceTemplateStorage(SpaceTemplateDAO spaceTemplateDAO) { + this.spaceTemplateDAO = spaceTemplateDAO; + } + + @Cacheable(cacheNames = "social.spaceTemplates") + public List getSpaceTemplates(Pageable pageable) { + return spaceTemplateDAO.findByDeletedFalse(pageable) + .stream() + .map(EntityMapper::fromEntity) + .toList(); + } + + @Cacheable(cacheNames = "social.enabledSpaceTemplates") + public List getEnabledSpaceTemplates(Pageable pageable) { + return spaceTemplateDAO.findByDeletedFalseAndEnabledTrue(pageable) + .stream() + .map(EntityMapper::fromEntity) + .toList(); + } + + @Cacheable(cacheNames = "social.spaceTemplates") + public SpaceTemplate getSpaceTemplate(long id) { + return spaceTemplateDAO.findById(id) + .map(EntityMapper::fromEntity) + .orElse(null); + } + + @CacheEvict(cacheNames = { "social.spaceTemplates", "social.enabledSpaceTemplates" }, allEntries = true) + public SpaceTemplate createSpaceTemplate(SpaceTemplate spaceTemplate) { + SpaceTemplateEntity spaceTemplateEntity = EntityMapper.toEntity(spaceTemplate); + spaceTemplateEntity = spaceTemplateDAO.save(spaceTemplateEntity); + return EntityMapper.fromEntity(spaceTemplateEntity); + } + + @CacheEvict(cacheNames = { "social.spaceTemplates", "social.enabledSpaceTemplates" }, allEntries = true) + public SpaceTemplate updateSpaceTemplate(SpaceTemplate spaceTemplate) throws ObjectNotFoundException { + if (!spaceTemplateDAO.existsById(spaceTemplate.getId())) { + throw new ObjectNotFoundException("Space template doesn't exist"); + } + SpaceTemplateEntity spaceTemplateEntity = EntityMapper.toEntity(spaceTemplate); + spaceTemplateEntity = spaceTemplateDAO.save(spaceTemplateEntity); + return EntityMapper.fromEntity(spaceTemplateEntity); + } + + @CacheEvict(cacheNames = { "social.spaceTemplates", "social.enabledSpaceTemplates" }, allEntries = true) + public void deleteSpaceTemplate(long id) { + spaceTemplateDAO.deleteById(id); + } + +} diff --git a/component/core/src/main/java/io/meeds/social/space/template/utils/EntityMapper.java b/component/core/src/main/java/io/meeds/social/space/template/utils/EntityMapper.java new file mode 100644 index 00000000000..d3e4507f744 --- /dev/null +++ b/component/core/src/main/java/io/meeds/social/space/template/utils/EntityMapper.java @@ -0,0 +1,79 @@ +/** + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package io.meeds.social.space.template.utils; + +import java.util.Collections; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; + +import io.meeds.social.space.template.entity.SpaceTemplateEntity; +import io.meeds.social.space.template.model.SpaceTemplate; + +public class EntityMapper { + + private EntityMapper() { + // Utils Class + } + + public static SpaceTemplate fromEntity(SpaceTemplateEntity entity) { + return new SpaceTemplate(entity.getId() == null ? 0 : entity.getId().longValue(), + null, + null, + 0l, + entity.getIcon(), + entity.isEnabled(), + entity.isDeleted(), + entity.isSystem(), + entity.getLayout(), + getNonEmptyValueList(entity.getPermissions()), + getNonEmptyValueList(entity.getSpaceLayoutPermissions()), + getNonEmptyValueList(entity.getSpaceDeletePermissions()), + getNonEmptyValueList(entity.getSpaceFields()), + entity.getSpaceDefaultVisibility(), + entity.getSpaceDefaultRegistration(), + entity.isSpaceAllowContentCreation()); + } + + public static SpaceTemplateEntity toEntity(SpaceTemplate model) { + return new SpaceTemplateEntity(model.getId() == 0 ? null : model.getId(), + model.getIcon(), + model.isEnabled(), + model.isDeleted(), + model.isSystem(), + model.getLayout(), + getNonEmptyValueList(model.getPermissions()), + getNonEmptyValueList(model.getSpaceLayoutPermissions()), + getNonEmptyValueList(model.getSpaceDeletePermissions()), + getNonEmptyValueList(model.getSpaceFields()), + model.getSpaceDefaultVisibility(), + model.getSpaceDefaultRegistration(), + model.isSpaceAllowContentCreation()); + } + + private static List getNonEmptyValueList(List list) { + if (list == null) { + return Collections.emptyList(); + } else { + return list.stream().filter(StringUtils::isNotBlank).toList(); + } + } + +} diff --git a/component/core/src/main/java/io/meeds/social/translation/service/TranslationServiceImpl.java b/component/core/src/main/java/io/meeds/social/translation/service/TranslationServiceImpl.java index aab739a778c..4288dbecec5 100644 --- a/component/core/src/main/java/io/meeds/social/translation/service/TranslationServiceImpl.java +++ b/component/core/src/main/java/io/meeds/social/translation/service/TranslationServiceImpl.java @@ -28,6 +28,7 @@ import org.exoplatform.services.listener.ListenerService; import org.exoplatform.services.log.ExoLogger; import org.exoplatform.services.log.Log; +import org.exoplatform.services.resources.LocaleConfigService; import io.meeds.social.translation.model.TranslationEvent; import io.meeds.social.translation.model.TranslationField; @@ -47,13 +48,18 @@ public class TranslationServiceImpl implements TranslationService { private static final String NO_PERMISSION_TO_DELETE_MESSAGE = "User %s doesn't have enough permissions to delete translations of object of type %s identified by %s"; + private LocaleConfigService localeConfigService; + private ListenerService listenerService; private TranslationStorage translationStorage; private Map translationPlugins = new HashMap<>(); - public TranslationServiceImpl(TranslationStorage translationStorage, ListenerService listenerService) { + public TranslationServiceImpl(TranslationStorage translationStorage, + LocaleConfigService localeConfigService, + ListenerService listenerService) { + this.localeConfigService = localeConfigService; this.translationStorage = translationStorage; this.listenerService = listenerService; } @@ -70,9 +76,9 @@ public void removePlugin(String objectType) { @Override public TranslationField getTranslationField(String objectType, - long objectId, - String fieldName, - String username) throws IllegalAccessException, ObjectNotFoundException { + long objectId, + String fieldName, + String username) throws IllegalAccessException, ObjectNotFoundException { checkParameters(objectType, objectId, fieldName); checkAccessPermission(objectType, objectId, username); @@ -81,8 +87,8 @@ public TranslationField getTranslationField(String objectType, @Override public TranslationField getTranslationField(String objectType, - long objectId, - String fieldName) { + long objectId, + String fieldName) { return translationStorage.getTranslationField(objectType, objectId, fieldName); } @@ -94,6 +100,32 @@ public String getTranslationLabel(String objectType, return translationStorage.getTranslationLabel(objectType, objectId, fieldName, locale); } + @Override + public String getTranslationLabelOrDefault(String objectType, + long objectId, + String fieldName, + Locale locale) { + if (locale == null) { + locale = localeConfigService.getDefaultLocaleConfig().getLocale(); + } + TranslationField translationField = getTranslationField(objectType, + objectId, + fieldName); + if (translationField != null && MapUtils.isNotEmpty(translationField.getLabels())) { + String label = translationField.getLabels().get(locale); + if (label == null) { + Locale defaultLocale = localeConfigService.getDefaultLocaleConfig().getLocale(); + label = translationField.getLabels().get(defaultLocale); + } + if (label == null) { + label = translationField.getLabels().values().iterator().next(); + } + return label; + } else { + return null; + } + } + @Override public void saveTranslationLabels(String objectType, long objectId, @@ -198,7 +230,9 @@ private void checkAccessPermission(String objectType, long objectId, String user } } - private void checkEditPermission(String objectType, long objectId, String username, + private void checkEditPermission(String objectType, + long objectId, + String username, String message) throws ObjectNotFoundException, IllegalAccessException { TranslationPlugin translationPlugin = translationPlugins.get(objectType); if (!translationPlugin.hasEditPermission(objectId, username)) { diff --git a/component/core/src/main/java/io/meeds/social/translation/storage/TranslationStorage.java b/component/core/src/main/java/io/meeds/social/translation/storage/TranslationStorage.java index bef88afe831..78ab7fac5f2 100644 --- a/component/core/src/main/java/io/meeds/social/translation/storage/TranslationStorage.java +++ b/component/core/src/main/java/io/meeds/social/translation/storage/TranslationStorage.java @@ -23,7 +23,7 @@ import java.util.Map; import java.util.stream.Collectors; -import org.apache.commons.codec.binary.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.MapUtils; diff --git a/component/core/src/main/java/io/meeds/social/translation/storage/cache/CachedTranslationStorage.java b/component/core/src/main/java/io/meeds/social/translation/storage/cache/CachedTranslationStorage.java index 233a6e690b3..897cc66b1a3 100644 --- a/component/core/src/main/java/io/meeds/social/translation/storage/cache/CachedTranslationStorage.java +++ b/component/core/src/main/java/io/meeds/social/translation/storage/cache/CachedTranslationStorage.java @@ -20,7 +20,7 @@ import java.util.Locale; import java.util.Map; -import org.apache.commons.codec.binary.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.exoplatform.commons.cache.future.FutureExoCache; import org.exoplatform.commons.cache.future.Loader; diff --git a/component/core/src/main/java/io/meeds/social/upgrade/SpaceNavigationIconUpgradePlugin.java b/component/core/src/main/java/io/meeds/social/upgrade/SpaceNavigationIconUpgradePlugin.java index 22edac31efe..c5ca968ff87 100644 --- a/component/core/src/main/java/io/meeds/social/upgrade/SpaceNavigationIconUpgradePlugin.java +++ b/component/core/src/main/java/io/meeds/social/upgrade/SpaceNavigationIconUpgradePlugin.java @@ -22,9 +22,6 @@ import java.util.Set; import java.util.stream.Collectors; -import jakarta.persistence.EntityManager; -import jakarta.persistence.Query; - import org.exoplatform.commons.api.persistence.ExoTransactional; import org.exoplatform.commons.persistence.impl.EntityManagerService; import org.exoplatform.commons.upgrade.UpgradeProductPlugin; @@ -32,6 +29,9 @@ import org.exoplatform.services.log.ExoLogger; import org.exoplatform.services.log.Log; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Query; + public class SpaceNavigationIconUpgradePlugin extends UpgradeProductPlugin { private static final Log LOG = ExoLogger.getExoLogger(SpaceNavigationIconUpgradePlugin.class); diff --git a/component/core/src/main/java/org/exoplatform/social/core/activity/ActivitiesRealtimeListAccess.java b/component/core/src/main/java/org/exoplatform/social/core/activity/ActivitiesRealtimeListAccess.java index df6c2ac0e4c..e626a20c266 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/activity/ActivitiesRealtimeListAccess.java +++ b/component/core/src/main/java/org/exoplatform/social/core/activity/ActivitiesRealtimeListAccess.java @@ -16,13 +16,13 @@ */ package org.exoplatform.social.core.activity; -import java.util.*; +import java.util.Collections; +import java.util.List; import org.exoplatform.social.common.RealtimeListAccess; import org.exoplatform.social.core.activity.model.ExoSocialActivity; import org.exoplatform.social.core.identity.model.Identity; import org.exoplatform.social.core.storage.api.ActivityStorage; -import org.exoplatform.social.core.storage.impl.StorageUtils; /** * The real time list access for activities. @@ -32,7 +32,7 @@ */ public class ActivitiesRealtimeListAccess implements RealtimeListAccess { - public static enum ActivityType { + public enum ActivityType { ACTIVITY_FEED, USER_ACTIVITIES, VIEW_USER_ACTIVITIES, @@ -162,7 +162,10 @@ public List loadIdsAsList(int index, int limit) { return activityStorage.getUserIdsActivities(ownerIdentity, index, limit); } case VIEW_USER_ACTIVITIES: { - return StorageUtils.getIds(activityStorage.getActivities(ownerIdentity, viewerIdentity, index, limit)); + return activityStorage.getActivities(ownerIdentity, viewerIdentity, index, limit) + .stream() + .map(ExoSocialActivity::getId) + .toList(); } case CONNECTIONS_ACTIVITIES: { return activityStorage.getActivityIdsOfConnections(ownerIdentity, index, limit); diff --git a/component/core/src/main/java/org/exoplatform/social/core/activity/filter/ActivityCounter.java b/component/core/src/main/java/org/exoplatform/social/core/activity/filter/ActivityCounter.java index 457873b4246..eabff966347 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/activity/filter/ActivityCounter.java +++ b/component/core/src/main/java/org/exoplatform/social/core/activity/filter/ActivityCounter.java @@ -22,6 +22,7 @@ import java.util.List; import org.apache.commons.lang3.ArrayUtils; + import org.exoplatform.social.core.activity.model.ExoSocialActivity; public class ActivityCounter implements Collection { diff --git a/component/core/src/main/java/org/exoplatform/social/core/activity/filter/ActivityIterator.java b/component/core/src/main/java/org/exoplatform/social/core/activity/filter/ActivityIterator.java index 8d82058ac5c..9c3a8854d23 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/activity/filter/ActivityIterator.java +++ b/component/core/src/main/java/org/exoplatform/social/core/activity/filter/ActivityIterator.java @@ -22,6 +22,7 @@ import java.util.List; import org.apache.commons.lang3.ArrayUtils; + import org.exoplatform.social.core.activity.model.ExoSocialActivity; public class ActivityIterator implements Collection { diff --git a/component/core/src/main/java/org/exoplatform/social/core/application/ProfileUpdatesPublisher.java b/component/core/src/main/java/org/exoplatform/social/core/application/ProfileUpdatesPublisher.java index 3a044e6cf05..2d9f5ade1d6 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/application/ProfileUpdatesPublisher.java +++ b/component/core/src/main/java/org/exoplatform/social/core/application/ProfileUpdatesPublisher.java @@ -16,10 +16,13 @@ */ package org.exoplatform.social.core.application; -import org.apache.commons.text.StringEscapeUtils; +import java.util.LinkedHashMap; +import java.util.Map; + import org.apache.commons.lang3.StringUtils; +import org.apache.commons.text.StringEscapeUtils; + import org.exoplatform.container.PortalContainer; -import org.exoplatform.container.xml.InitParams; import org.exoplatform.services.log.ExoLogger; import org.exoplatform.services.log.Log; import org.exoplatform.social.core.BaseActivityProcessorPlugin; @@ -34,9 +37,6 @@ import org.exoplatform.social.core.profile.ProfileListenerPlugin; import org.exoplatform.social.core.storage.api.IdentityStorage; -import java.util.LinkedHashMap; -import java.util.Map; - /** * Publish updates onto the user's activity stream when his profile is updated. @@ -97,7 +97,7 @@ public static String getActivityMessage(UpdateType key) { } } - public ProfileUpdatesPublisher(InitParams params, ActivityManager activityManager, IdentityManager identityManager) { + public ProfileUpdatesPublisher(ActivityManager activityManager, IdentityManager identityManager) { this.activityManager = activityManager; this.identityManager = identityManager; } @@ -128,7 +128,7 @@ private ExoSocialActivity createComment(String title, String titleId, Identity i comment.setUserId(identity.getId()); comment.setType(PEOPLE_APP_ID); comment.setTitleId(titleId); - Map templateParams = new LinkedHashMap(); + Map templateParams = new LinkedHashMap<>(); if (POSITION_TITLE_ID.equals(titleId)) { templateParams.put(USER_POSITION_PARAM, StringEscapeUtils.unescapeHtml4(position)); templateParams.put(BaseActivityProcessorPlugin.TEMPLATE_PARAM_TO_PROCESS, USER_POSITION_PARAM); @@ -163,7 +163,7 @@ private void publishActivity(ProfileLifeCycleEvent event, String titleId) { activity.setTitleId(newTitleId); hasUpdated = true; } - hasUpdated |= newActivityTitle.replaceAll(BREAKLINE_STR, "").length() > 0 && !newActivityTitle.equals(existingActivityTitle); + hasUpdated |= newActivityTitle.replace(BREAKLINE_STR, "").length() > 0 && !newActivityTitle.equals(existingActivityTitle); if (activityId != null && hasUpdated) { activityManager.updateActivity(activity); } @@ -174,7 +174,7 @@ private void publish(ProfileLifeCycleEvent event, ExoSocialActivity activity, St Profile profile = event.getProfile(); Identity identity = profile.getIdentity(); try { - reloadIfNeeded(identity); + identity = reloadIfNeeded(identity); if (activityId == null) { activityManager.saveActivityNoReturn(identity, activity); getStorage().updateProfileActivityId(identity, activity.getId(), Profile.AttachedActivityType.USER); @@ -187,18 +187,15 @@ private void publish(ProfileLifeCycleEvent event, ExoSocialActivity activity, St } } - private void reloadIfNeeded(Identity id1) throws Exception { + private Identity reloadIfNeeded(Identity id1) { if (id1.getId() == null || id1.getProfile().getFullName().length() == 0) { - id1 = identityManager.getIdentity(id1.getGlobalId().toString(), true); + id1 = identityManager.getOrCreateIdentity(id1.getProviderId(), id1.getRemoteId()); } - } - - private IdentityStorage getStorage() { - return (IdentityStorage) PortalContainer.getInstance().getComponentInstanceOfType(IdentityStorage.class); + return id1; } - @Override - public void createProfile(ProfileLifeCycleEvent event) { + private IdentityStorage getStorage() { + return PortalContainer.getInstance().getComponentInstanceOfType(IdentityStorage.class); } @Override diff --git a/component/core/src/main/java/org/exoplatform/social/core/application/RelationshipPublisher.java b/component/core/src/main/java/org/exoplatform/social/core/application/RelationshipPublisher.java index 57446cc2de4..263b28458a1 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/application/RelationshipPublisher.java +++ b/component/core/src/main/java/org/exoplatform/social/core/application/RelationshipPublisher.java @@ -20,14 +20,12 @@ import java.util.Map; import org.exoplatform.container.PortalContainer; -import org.exoplatform.container.xml.InitParams; import org.exoplatform.services.log.ExoLogger; import org.exoplatform.services.log.Log; import org.exoplatform.social.core.activity.model.ExoSocialActivity; import org.exoplatform.social.core.activity.model.ExoSocialActivityImpl; import org.exoplatform.social.core.identity.model.Identity; import org.exoplatform.social.core.identity.model.Profile; -import org.exoplatform.social.core.identity.provider.OrganizationIdentityProvider; import org.exoplatform.social.core.manager.ActivityManager; import org.exoplatform.social.core.manager.IdentityManager; import org.exoplatform.social.core.manager.RelationshipManager; @@ -35,7 +33,6 @@ import org.exoplatform.social.core.relationship.RelationshipEvent; import org.exoplatform.social.core.relationship.RelationshipListenerPlugin; import org.exoplatform.social.core.relationship.model.Relationship; -import org.exoplatform.social.core.space.SpaceUtils; import org.exoplatform.social.core.storage.api.IdentityStorage; /** @@ -45,7 +42,7 @@ */ public class RelationshipPublisher extends RelationshipListenerPlugin { - public static enum TitleId { + public enum TitleId { CONNECTION_REQUESTED, CONNECTION_CONFIRMED } @@ -66,18 +63,11 @@ public static enum TitleId { private IdentityManager identityManager; - public RelationshipPublisher(InitParams params, ActivityManager activityManager, IdentityManager identityManager) { + public RelationshipPublisher(ActivityManager activityManager, IdentityManager identityManager) { this.activityManager = activityManager; this.identityManager = identityManager; } - private ExoSocialActivity createNewActivity(Identity identity, int nbOfConnections) { - ExoSocialActivity activity = new ExoSocialActivityImpl(); - activity.setType(USER_ACTIVITIES_FOR_RELATIONSHIP); - updateActivity(activity, nbOfConnections); - return activity; - } - private ExoSocialActivity createNewComment(Identity userIdenity, String fullName) { ExoSocialActivityImpl comment = new ExoSocialActivityImpl(); comment.setType(USER_COMMENTS_ACTIVITY_FOR_RELATIONSHIP); @@ -93,7 +83,7 @@ private ExoSocialActivity createNewComment(Identity userIdenity, String fullName private void updateActivity(ExoSocialActivity activity, int numberOfConnections) { String title = String.format("I'm now connected with %s user(s)", numberOfConnections); String titleId = "user_relations"; - Map params = new HashMap(); + Map params = new HashMap<>(); activity.setTitle(title); activity.setTitleId(null); activity.setTemplateParams(params); @@ -103,12 +93,13 @@ private void updateActivity(ExoSocialActivity activity, int numberOfConnections) /** * Publish an activity on both user's stream to indicate their new connection */ + @Override public void confirmed(RelationshipEvent event) { Relationship relationship = event.getPayload(); try { - Identity sender = identityManager.getOrCreateIdentity(OrganizationIdentityProvider.NAME, relationship.getSender().getRemoteId(), true); - Identity receiver = identityManager.getOrCreateIdentity(OrganizationIdentityProvider.NAME, relationship.getReceiver().getRemoteId(), true); - + Identity sender = identityManager.getOrCreateUserIdentity(relationship.getSender().getRemoteId()); + Identity receiver = identityManager.getOrCreateUserIdentity(relationship.getReceiver().getRemoteId()); + String activityIdSender = getIdentityStorage().getProfileActivityId(sender.getProfile(), Profile.AttachedActivityType.RELATIONSHIP); int nbOfSenderConnections = getRelationShipManager().getConnections(sender).getSize(); String activityIdReceiver = getIdentityStorage().getProfileActivityId(receiver.getProfile(), Profile.AttachedActivityType.RELATIONSHIP); @@ -130,10 +121,9 @@ public void confirmed(RelationshipEvent event) { } } if (activityIdSender == null) { - ExoSocialActivity newActivitySender = createNewActivity(sender, nbOfSenderConnections); + ExoSocialActivity newActivitySender = createNewActivity(nbOfSenderConnections); activityManager.saveActivityNoReturn(sender, newActivitySender); getIdentityStorage().updateProfileActivityId(sender, newActivitySender.getId(), Profile.AttachedActivityType.RELATIONSHIP); - SpaceUtils.restartRequest(); activityManager.saveComment(newActivitySender, senderComment); } @@ -148,10 +138,9 @@ public void confirmed(RelationshipEvent event) { } } if (activityIdReceiver == null) { - ExoSocialActivity newActivityReceiver = createNewActivity(receiver, nbOfReceiverConnections); + ExoSocialActivity newActivityReceiver = createNewActivity(nbOfReceiverConnections); activityManager.saveActivityNoReturn(receiver, newActivityReceiver); getIdentityStorage().updateProfileActivityId(receiver, newActivityReceiver.getId(), Profile.AttachedActivityType.RELATIONSHIP); - SpaceUtils.restartRequest(); activityManager.saveComment(newActivityReceiver, receiverComment); } } catch (Exception e) { @@ -159,24 +148,13 @@ public void confirmed(RelationshipEvent event) { } } - private void reloadIfNeeded(Identity identity) throws Exception { - if (identity.getId() == null || identity.getProfile().getFullName().length() == 0) { - identity = identityManager.getIdentity(identity.getGlobalId().toString(), true); - } - } - - @Override - public void ignored(RelationshipEvent event) { - ;// void on purpose - } - @Override public void removed(RelationshipEvent event) { Relationship relationship = event.getPayload(); try { - Identity sender = identityManager.getOrCreateIdentity(OrganizationIdentityProvider.NAME, relationship.getSender().getRemoteId(), true); - Identity receiver = identityManager.getOrCreateIdentity(OrganizationIdentityProvider.NAME, relationship.getReceiver().getRemoteId(), true); - + Identity sender = identityManager.getOrCreateUserIdentity(relationship.getSender().getRemoteId()); + Identity receiver = identityManager.getOrCreateUserIdentity(relationship.getReceiver().getRemoteId()); + String activityIdSender = getIdentityStorage().getProfileActivityId(sender.getProfile(), Profile.AttachedActivityType.RELATIONSHIP); int nbOfSenderConnections = getRelationShipManager().getConnections(sender).getSize(); String activityIdReceiver = getIdentityStorage().getProfileActivityId(receiver.getProfile(), Profile.AttachedActivityType.RELATIONSHIP); @@ -203,66 +181,18 @@ public void removed(RelationshipEvent event) { } } - public void denied(RelationshipEvent event) { - ;// void on purpose - - } - - /** - * Publish an activity on invited member to show the invitation to connect - */ - public void requested(RelationshipEvent event) { -// Relationship relationship = event.getPayload(); -// try { -// Map params = this.getParams(relationship); -// ExoSocialActivity activity1 = new ExoSocialActivityImpl(relationship.getSender().getId(), -// RELATIONSHIP_ACTIVITY_TYPE, -// relationship.getSender().getProfile().getFullName() + " has invited " -// + relationship.getReceiver().getProfile().getFullName() + " to connect", null); -// activity1.setTitleId(TitleId.CONNECTION_REQUESTED.toString()); -// activity1.setTemplateParams(params); -// activityManager.saveActivityNoReturn(relationship.getSender(), activity1); -// -// //TODO hoatle a quick fix for activities gadget to allow deleting this activity -// ExoSocialActivity activity2 = new ExoSocialActivityImpl(relationship.getReceiver().getId(), -// RELATIONSHIP_ACTIVITY_TYPE, -// relationship.getSender().getProfile().getFullName() + " has invited " -// + relationship.getReceiver().getProfile().getFullName() + " to connect", null); -// activity2.setTitleId(TitleId.CONNECTION_REQUESTED.toString()); -// activity2.setTemplateParams(params); -// activityManager.saveActivityNoReturn(relationship.getReceiver(), activity2); -// -// } catch (Exception e) { -// LOG.warn("Failed to publish event " + event + ": " + e.getMessage()); -// } + private ExoSocialActivity createNewActivity(int nbOfConnections) { + ExoSocialActivity activity = new ExoSocialActivityImpl(); + activity.setType(USER_ACTIVITIES_FOR_RELATIONSHIP); + updateActivity(activity, nbOfConnections); + return activity; } - /** - * Gets params (sender, receiver, relationship uuid) from a provided relationship. - * - * @param relationship - * @return - * @since 1.2.0-GA - */ - private Map getParams(Relationship relationship) throws Exception { - Identity sender = relationship.getSender(); - reloadIfNeeded(sender); - Identity receiver = relationship.getReceiver(); - reloadIfNeeded(receiver); - String senderRemoteId = sender.getRemoteId(); - String receiverRemoteId = receiver.getRemoteId(); - Map params = new HashMap(); - params.put(SENDER_PARAM, senderRemoteId); - params.put(RECEIVER_PARAM, receiverRemoteId); - params.put(RELATIONSHIP_UUID_PARAM, relationship.getId()); - return params; - } - private IdentityStorage getIdentityStorage() { - return (IdentityStorage) PortalContainer.getInstance().getComponentInstanceOfType(IdentityStorage.class); + return PortalContainer.getInstance().getComponentInstanceOfType(IdentityStorage.class); } private RelationshipManager getRelationShipManager() { - return (RelationshipManager) PortalContainer.getInstance().getComponentInstanceOfType(RelationshipManager.class); + return PortalContainer.getInstance().getComponentInstanceOfType(RelationshipManager.class); } } \ No newline at end of file diff --git a/component/core/src/main/java/org/exoplatform/social/core/application/SpaceActivityPublisher.java b/component/core/src/main/java/org/exoplatform/social/core/application/SpaceActivityPublisher.java deleted file mode 100644 index cc96c9cc9db..00000000000 --- a/component/core/src/main/java/org/exoplatform/social/core/application/SpaceActivityPublisher.java +++ /dev/null @@ -1,408 +0,0 @@ -/* - * Copyright (C) 2003-2010 eXo Platform SAS. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License - * as published by the Free Software Foundation; either version 3 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see. - */ -package org.exoplatform.social.core.application; - -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; - -import org.apache.commons.text.StringEscapeUtils; - -import org.exoplatform.container.PortalContainer; -import org.exoplatform.container.xml.InitParams; -import org.exoplatform.services.log.ExoLogger; -import org.exoplatform.services.log.Log; -import org.exoplatform.social.core.BaseActivityProcessorPlugin; -import org.exoplatform.social.core.activity.model.ExoSocialActivity; -import org.exoplatform.social.core.activity.model.ExoSocialActivityImpl; -import org.exoplatform.social.core.identity.model.Identity; -import org.exoplatform.social.core.identity.model.Profile; -import org.exoplatform.social.core.manager.ActivityManager; -import org.exoplatform.social.core.manager.IdentityManager; -import org.exoplatform.social.core.processor.I18NActivityUtils; -import org.exoplatform.social.core.space.SpaceListenerPlugin; -import org.exoplatform.social.core.space.model.Space; -import org.exoplatform.social.core.space.model.Space.UpdatedField; -import org.exoplatform.social.core.space.spi.SpaceLifeCycleEvent; -import org.exoplatform.social.core.space.spi.SpaceLifeCycleEvent.Type; -import org.exoplatform.social.core.storage.api.IdentityStorage; -import org.exoplatform.social.core.storage.api.SpaceStorage; - -/** - * This listener is responsible for initializing and notifying activity stream for the space. We create a special - * opensocial user (with a group provider) ready to receive new activities. - * - * @author Patrice Lamarque - * @version $Revision$ - */ -public class SpaceActivityPublisher extends SpaceListenerPlugin { - - /** - * The SPACE_DISPLAY_NAME_PARAM template param key - * @since 1.2.8 - */ - public static final String SPACE_DISPLAY_NAME_PARAM = "SPACE_DISPLAY_NAME_PARAM"; - - public static final String NUMBER_OF_PUBLIC_SPACE = "NUMBER_OF_PUBLIC_SPACE"; - - public static final String USER_JOINED_PUBLIC_SPACE_TITLE_ID = "user_joined_public_space"; - - public static final String USER_JOINED_PUBLIC_SPACES_TITLE_ID = "user_joined_public_spaces"; - - /** - * The USER_NAME_PARAM template param key - * @since 1.2.8 - */ - public static final String USER_NAME_PARAM = "USER_NAME_PARAM"; - - public static final String SPACE_DESCRIPTION_PARAM = "SPACE_DESCRIPTION_PARAM"; - - public static final String SPACE_APP_ID = "exosocial:spaces"; - - public static final String SPACE_PROFILE_ACTIVITY = "SPACE_ACTIVITY"; - - public static final String USER_ACTIVITIES_FOR_SPACE = "USER_ACTIVITIES_FOR_SPACE"; - - public static final String SPACE_CREATED_TITLE_ID = "space_created"; - - public static final String MANAGER_GRANTED_TITLE_ID = "manager_role_granted"; - - public static final String USER_JOINED_TITLE_ID = "has_joined"; - - public static final String USER_SPACE_JOINED_TITLE_ID = "user_space_joined"; - - public static final String MEMBER_LEFT_TITLE_ID = "has_left"; - - public static final String MANAGER_REVOKED_TITLE_ID = "manager_role_revoked"; - - public static final String SPACE_RENAMED_TITLE_ID = "space_renamed"; - - public static final String SPACE_DESCRIPTION_EDITED_TITLE_ID = "space_description_edited"; - - public static final String SPACE_AVATAR_EDITED_TITLE_ID = "space_avatar_edited"; - - /** - * The Logger. - */ - private static final Log LOG = ExoLogger.getExoLogger(SpaceActivityPublisher.class); - - /** - * activity manager for posting activities. - */ - private ActivityManager activityManager; - - /** - * identity manager for getting identities. - */ - private IdentityManager identityManager; - - /** - * Constructor. - * - * @param params the initial params - * @param activityManager the activity manager - * @param identityManager the identity manager - */ - public SpaceActivityPublisher(final InitParams params, - final ActivityManager activityManager, - final IdentityManager identityManager) { - this.activityManager = activityManager; - this.identityManager = identityManager; - } - - @Override - public void spaceCreated(SpaceLifeCycleEvent event) { - Space space = event.getSpace(); - final String activityMessage = "Has joined the space."; - Map templateParams = new LinkedHashMap<>(); - templateParams.put(SPACE_DISPLAY_NAME_PARAM, space.getDisplayName()); - recordActivity(event, activityMessage, SPACE_CREATED_TITLE_ID, templateParams); - } - - @Override - public void spaceRemoved(SpaceLifeCycleEvent event) { - LOG.debug("space " + event.getSpace().getDisplayName() + " was removed!"); - } - - @Override - public void applicationActivated(SpaceLifeCycleEvent event) { - LOG.debug("application " + event.getTarget() + " was activated in space " - + event.getSpace().getDisplayName()); - } - - @Override - public void applicationAdded(SpaceLifeCycleEvent event) { - LOG.debug("application " + event.getTarget() + " was added in space " - + event.getSpace().getDisplayName()); - } - - @Override - public void applicationDeactivated(SpaceLifeCycleEvent event) { - LOG.debug("application " + event.getTarget() + " was deactivated in space " - + event.getSpace().getDisplayName()); - - } - - @Override - public void applicationRemoved(SpaceLifeCycleEvent event) { - LOG.debug("application " + event.getTarget() + " was removed in space " - + event.getSpace().getDisplayName()); - } - - @Override - public void grantedLead(SpaceLifeCycleEvent event) { - Space space = event.getSpace(); - final String activityMessage = "@" + event.getTarget() + " has been promoted as space's manager."; - Map templateParams = new LinkedHashMap<>(); - templateParams.put(USER_NAME_PARAM, "@" + event.getTarget()); - templateParams.put(BaseActivityProcessorPlugin.TEMPLATE_PARAM_TO_PROCESS, USER_NAME_PARAM); - recordActivity(new SpaceLifeCycleEvent(space, space.getEditor(), Type.GRANTED_LEAD), activityMessage, MANAGER_GRANTED_TITLE_ID, templateParams); - LOG.debug("user {} has been promoted as space's manager {}", event.getTarget(), space.getDisplayName()); - } - - @Override - public void joined(SpaceLifeCycleEvent event) { - final String activityMessage ="Has joined the space."; - Map templateParams = new LinkedHashMap<>(); - recordActivity(event, activityMessage, USER_JOINED_TITLE_ID, templateParams); - LOG.debug("user {} has joined the space {}", event.getTarget(), event.getSpace().getDisplayName()); - } - - @Override - public void left(SpaceLifeCycleEvent event) { - Space space = event.getSpace(); - Identity spaceIdentity = identityManager.getOrCreateSpaceIdentity(space.getPrettyName()); - - String activityId = getStorage().getProfileActivityId(spaceIdentity.getProfile(), Profile.AttachedActivityType.SPACE); - if (activityId != null) { - try { - ExoSocialActivity activity = activityManager.getActivity(activityId); - updateActivity(activity, space.getPrettyName()); - activityManager.updateActivity(activity); - } catch (Exception e) { - LOG.debug("Cannot update space activity."); - } - } - - LOG.debug("user " + event.getTarget() + " has left of space " + event.getSpace().getDisplayName()); - } - - /** - * {@inheritDoc} - */ - @Override - public void revokedLead(SpaceLifeCycleEvent event) { - Space space = event.getSpace(); - final String activityMessage = "@" + event.getTarget() + " has been revoked as space's manager."; - Map templateParams = new LinkedHashMap<>(); - templateParams.put(USER_NAME_PARAM, "@" + event.getTarget()); - templateParams.put(BaseActivityProcessorPlugin.TEMPLATE_PARAM_TO_PROCESS, USER_NAME_PARAM); - recordActivity(new SpaceLifeCycleEvent(space, space.getEditor(), Type.REVOKED_LEAD), activityMessage, MANAGER_REVOKED_TITLE_ID, templateParams); - LOG.debug("user " + event.getTarget() + " has been revoked as space's manage " - + event.getSpace().getDisplayName()); - } - - /** - * {@inheritDoc} - */ - @Override - public void spaceRenamed(SpaceLifeCycleEvent event) { - final String activityMessage = "Name has been updated to: "+event.getSpace().getDisplayName(); - Map templateParams = new LinkedHashMap<>(); - templateParams.put(SPACE_DISPLAY_NAME_PARAM, event.getSpace().getDisplayName()); - templateParams.put(BaseActivityProcessorPlugin.TEMPLATE_PARAM_TO_PROCESS, SPACE_DISPLAY_NAME_PARAM); - recordActivity(event, activityMessage, SPACE_RENAMED_TITLE_ID, templateParams); - LOG.debug("Name has been updated "); - - // Update description at the same time of rename space - if (UpdatedField.DESCRIPTION.equals(event.getSpace().getField())) { - spaceDescriptionEdited(event); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void spaceDescriptionEdited(SpaceLifeCycleEvent event) { - String spaceDescription = StringEscapeUtils.unescapeHtml4(event.getSpace().getDescription()); - final String activityMessage = "Description has been updated to: "+ spaceDescription; - Map templateParams = new LinkedHashMap<>(); - templateParams.put(SPACE_DESCRIPTION_PARAM, spaceDescription); - templateParams.put(BaseActivityProcessorPlugin.TEMPLATE_PARAM_TO_PROCESS, SPACE_DESCRIPTION_PARAM); - recordActivity(event, activityMessage, SPACE_DESCRIPTION_EDITED_TITLE_ID, templateParams); - LOG.debug("Description has been updated "); - } - - /** - * {@inheritDoc} - */ - @Override - public void spaceAvatarEdited(SpaceLifeCycleEvent event) { - final String activityMessage = "Space has a new avatar."; - Map templateParams = new LinkedHashMap<>(); - recordActivity(event, activityMessage, SPACE_AVATAR_EDITED_TITLE_ID, templateParams); - LOG.debug("Space has a new avatar."); - } - - /** - * {@inheritDoc} - */ - @Override - public void spaceAccessEdited(SpaceLifeCycleEvent event) { - Space space = event.getSpace(); - - //Update space's activity - Identity spaceIdentity = identityManager.getOrCreateSpaceIdentity(space.getPrettyName()); - String spaceActivityId = getStorage().getProfileActivityId(spaceIdentity.getProfile(), Profile.AttachedActivityType.SPACE); - if (spaceActivityId != null) { - ExoSocialActivity activity = activityManager.getActivity(spaceActivityId); - if (activity != null) { - if (Space.HIDDEN.equals(space.getVisibility())) { - activity.isHidden(true); - } - if (Space.PRIVATE.equals(space.getVisibility())) { - activity.isHidden(false); - } - activityManager.updateActivity(activity); - } - } - - //Update user space activity of all member of space - String[] members = space.getMembers(); - for (String member : members) { - Identity identity = identityManager.getOrCreateUserIdentity(member); - String userSpaceActivityId = getStorage().getProfileActivityId(identity.getProfile(), Profile.AttachedActivityType.RELATION); - if (userSpaceActivityId != null) { - ExoSocialActivity activity = activityManager.getActivity(userSpaceActivityId); - if (activity != null) { - int numberOfSpacesOfMember = getSpaceStorage().getNumberOfMemberPublicSpaces(identity.getRemoteId()); - Map templateParams = activity.getTemplateParams(); - templateParams.put(NUMBER_OF_PUBLIC_SPACE, String.valueOf(numberOfSpacesOfMember)); - templateParams.put(BaseActivityProcessorPlugin.TEMPLATE_PARAM_TO_PROCESS, NUMBER_OF_PUBLIC_SPACE); - activity.setTemplateParams(templateParams); - - if (numberOfSpacesOfMember > 1) { - activity.setTitle("I now member of " + numberOfSpacesOfMember + " spaces"); - activity.setTitleId(USER_JOINED_PUBLIC_SPACES_TITLE_ID); - } else { - activity.setTitle("I now member of " + numberOfSpacesOfMember + " space"); - activity.setTitleId(USER_JOINED_PUBLIC_SPACE_TITLE_ID); - } - activityManager.updateActivity(activity); - } - } - } - } - - /** - * Records an activity based on space lifecyle event and the activity object. - * - * @param event the space lifecyle event - * @param activityMessage the message of activity object - * @param titleId the title of activity (comment) - * @param templateParams - */ - private void recordActivity(SpaceLifeCycleEvent event, String activityMessage, String titleId, - Map templateParams) { - Space space = event.getSpace(); - Identity spaceIdentity = identityManager.getOrCreateSpaceIdentity(space.getPrettyName()); - - Identity identity = identityManager.getOrCreateUserIdentity(event.getTarget()); - String activityId = getStorage().getProfileActivityId(spaceIdentity.getProfile(), Profile.AttachedActivityType.SPACE); - if (activityId != null) { - try { - ExoSocialActivity comment = createComment(activityMessage, titleId, null, SPACE_APP_ID, identity, templateParams); - if (comment == null) { - return; - } - ExoSocialActivity activity = activityManager.getActivity(activityId); - - // When update number of members in case of join and left space ==> update the activity's title - if (USER_JOINED_TITLE_ID.equals(titleId)) { - updateActivity(activity, space.getPrettyName()); - activityManager.updateActivity(activity); - } - activityManager.saveComment(activity, comment); - } catch (Exception e) { - LOG.debug("Run in case of activity deleted and reupdate"); - activityId = null; - } - } - if (activityId == null) { - ExoSocialActivity activity = new ExoSocialActivityImpl(); - activity.setType(SPACE_PROFILE_ACTIVITY); - updateActivity(activity, space.getPrettyName()); - if (Space.HIDDEN.equals(space.getVisibility())) { - activity.isHidden(true); - } - activity.getTemplateParams().put(Space.CREATOR, event.getTarget()); - - activityManager.saveActivityNoReturn(spaceIdentity, activity); - getStorage().updateProfileActivityId(spaceIdentity, activity.getId(), Profile.AttachedActivityType.SPACE); - if (SPACE_CREATED_TITLE_ID.equals(titleId)) - titleId = USER_JOINED_TITLE_ID; - ExoSocialActivity comment = createComment(activityMessage, titleId, null, SPACE_APP_ID, identity, templateParams); - if (comment != null) { - activityManager.saveComment(activity, comment); - } - } - } - - private void updateActivity(ExoSocialActivity activity, String spacePrettyName) { - Space sp = getSpaceStorage().getSpaceByPrettyName(spacePrettyName); - //The value of the title is not used at the end and it is replaced by the translation from the resource bundle, but is is necessary to avoid null check when saving the activity - String title = " "; - String titleId; - if ((sp.getMembers().length) > 1) { - titleId = "space_members"; - } else { - titleId = "space_member"; - } - Map params = new HashMap<>(); - activity.setTitle(title); - activity.setTitleId(null); - activity.setTemplateParams(params); - I18NActivityUtils.addResourceKey(activity, titleId, "" + sp.getMembers().length); - } - - private ExoSocialActivity createComment(String title, String titleId, String spacePrettyName, String type, Identity identity, Map templateParams) { - if (identity == null) { - return null; - } - ExoSocialActivityImpl comment = new ExoSocialActivityImpl(); - comment.setTitle(title); - comment.setTitleId(titleId); - comment.setUserId(identity.getId()); - comment.setType(type); - if (spacePrettyName != null) { - templateParams.put(SPACE_DISPLAY_NAME_PARAM, spacePrettyName); - templateParams.put(BaseActivityProcessorPlugin.TEMPLATE_PARAM_TO_PROCESS, SPACE_DISPLAY_NAME_PARAM); - } - comment.setTemplateParams(templateParams); - return comment; - } - - private IdentityStorage getStorage() { - return PortalContainer.getInstance().getComponentInstanceOfType(IdentityStorage.class); - } - - private SpaceStorage getSpaceStorage() { - return PortalContainer.getInstance().getComponentInstanceOfType(SpaceStorage.class); - } - -} diff --git a/component/core/src/main/java/org/exoplatform/social/core/attachment/AttachmentServiceImpl.java b/component/core/src/main/java/org/exoplatform/social/core/attachment/AttachmentServiceImpl.java index 5016b7d3e67..3e06c3c9657 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/attachment/AttachmentServiceImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/attachment/AttachmentServiceImpl.java @@ -40,7 +40,13 @@ import org.exoplatform.services.security.IdentityConstants; import org.exoplatform.social.attachment.AttachmentPlugin; import org.exoplatform.social.attachment.AttachmentService; -import org.exoplatform.social.attachment.model.*; +import org.exoplatform.social.attachment.model.FileAttachmentObject; +import org.exoplatform.social.attachment.model.FileAttachmentResourceList; +import org.exoplatform.social.attachment.model.ObjectAttachmentDetail; +import org.exoplatform.social.attachment.model.ObjectAttachmentId; +import org.exoplatform.social.attachment.model.ObjectAttachmentList; +import org.exoplatform.social.attachment.model.ObjectAttachmentOperationReport; +import org.exoplatform.social.attachment.model.UploadedAttachmentDetail; import org.exoplatform.social.common.ObjectAlreadyExistsException; import org.exoplatform.social.core.attachment.storage.FileAttachmentStorage; import org.exoplatform.social.core.manager.IdentityManager; diff --git a/component/core/src/main/java/org/exoplatform/social/core/binding/impl/GroupSpaceBindingServiceImpl.java b/component/core/src/main/java/org/exoplatform/social/core/binding/impl/GroupSpaceBindingServiceImpl.java index b5b78ecc21a..3eb563b3dc9 100755 --- a/component/core/src/main/java/org/exoplatform/social/core/binding/impl/GroupSpaceBindingServiceImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/binding/impl/GroupSpaceBindingServiceImpl.java @@ -32,7 +32,12 @@ import org.exoplatform.services.log.Log; import org.exoplatform.services.organization.OrganizationService; import org.exoplatform.services.organization.User; -import org.exoplatform.social.core.binding.model.*; +import org.exoplatform.social.core.binding.model.GroupSpaceBinding; +import org.exoplatform.social.core.binding.model.GroupSpaceBindingOperationReport; +import org.exoplatform.social.core.binding.model.GroupSpaceBindingQueue; +import org.exoplatform.social.core.binding.model.GroupSpaceBindingReportAction; +import org.exoplatform.social.core.binding.model.GroupSpaceBindingReportUser; +import org.exoplatform.social.core.binding.model.UserSpaceBinding; import org.exoplatform.social.core.binding.spi.GroupSpaceBindingService; import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.core.space.spi.SpaceService; diff --git a/component/core/src/main/java/org/exoplatform/social/core/binding/job/QueueGroupSpaceBindingJob.java b/component/core/src/main/java/org/exoplatform/social/core/binding/job/QueueGroupSpaceBindingJob.java index 6a7549b953c..b1468b725a5 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/binding/job/QueueGroupSpaceBindingJob.java +++ b/component/core/src/main/java/org/exoplatform/social/core/binding/job/QueueGroupSpaceBindingJob.java @@ -16,17 +16,17 @@ */ package org.exoplatform.social.core.binding.job; -import org.exoplatform.commons.utils.CommonsUtils; -import org.exoplatform.social.core.binding.model.GroupSpaceBinding; -import org.exoplatform.social.core.binding.model.GroupSpaceBindingQueue; -import org.exoplatform.social.core.binding.spi.GroupSpaceBindingService; import org.quartz.DisallowConcurrentExecution; import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; +import org.exoplatform.commons.utils.CommonsUtils; import org.exoplatform.services.log.ExoLogger; import org.exoplatform.services.log.Log; +import org.exoplatform.social.core.binding.model.GroupSpaceBinding; +import org.exoplatform.social.core.binding.model.GroupSpaceBindingQueue; +import org.exoplatform.social.core.binding.spi.GroupSpaceBindingService; @DisallowConcurrentExecution public class QueueGroupSpaceBindingJob implements Job { diff --git a/component/core/src/main/java/org/exoplatform/social/core/binding/spi/GroupSpaceBindingService.java b/component/core/src/main/java/org/exoplatform/social/core/binding/spi/GroupSpaceBindingService.java index 37a0352bd8d..3a34ca37526 100755 --- a/component/core/src/main/java/org/exoplatform/social/core/binding/spi/GroupSpaceBindingService.java +++ b/component/core/src/main/java/org/exoplatform/social/core/binding/spi/GroupSpaceBindingService.java @@ -19,7 +19,12 @@ import java.util.List; -import org.exoplatform.social.core.binding.model.*; +import org.exoplatform.social.core.binding.model.GroupSpaceBinding; +import org.exoplatform.social.core.binding.model.GroupSpaceBindingOperationReport; +import org.exoplatform.social.core.binding.model.GroupSpaceBindingQueue; +import org.exoplatform.social.core.binding.model.GroupSpaceBindingReportAction; +import org.exoplatform.social.core.binding.model.GroupSpaceBindingReportUser; +import org.exoplatform.social.core.binding.model.UserSpaceBinding; import org.exoplatform.social.core.space.model.Space; /** diff --git a/component/core/src/main/java/org/exoplatform/social/core/identity/ProfileFilterListAccess.java b/component/core/src/main/java/org/exoplatform/social/core/identity/ProfileFilterListAccess.java index 6143f496e0c..d6223ec77b7 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/identity/ProfileFilterListAccess.java +++ b/component/core/src/main/java/org/exoplatform/social/core/identity/ProfileFilterListAccess.java @@ -170,6 +170,7 @@ public Identity[] load(int offset, int limit) throws Exception, IllegalArgumentE identities = identityStorage.getIdentitiesForMentions(providerId, profileFilter, null, offset, usedLimit, forceLoadProfile); } if (profileFilter != null && profileFilter.getViewerIdentity() != null) { + identities = new ArrayList<>(identities); Iterator iterator = identities.iterator(); while (iterator.hasNext()) { Identity identity = iterator.next(); diff --git a/component/core/src/main/java/org/exoplatform/social/core/identity/SocialUserSearchServiceImpl.java b/component/core/src/main/java/org/exoplatform/social/core/identity/SocialUserSearchServiceImpl.java index 196961afd0b..6d6f8791b81 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/identity/SocialUserSearchServiceImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/identity/SocialUserSearchServiceImpl.java @@ -17,7 +17,9 @@ package org.exoplatform.social.core.identity; import org.exoplatform.commons.utils.ListAccess; -import org.exoplatform.services.organization.*; +import org.exoplatform.services.organization.OrganizationService; +import org.exoplatform.services.organization.User; +import org.exoplatform.services.organization.UserStatus; import org.exoplatform.services.organization.search.UserSearchServiceImpl; import org.exoplatform.social.core.profile.ProfileFilter; import org.exoplatform.social.core.search.Sorting; diff --git a/component/core/src/main/java/org/exoplatform/social/core/identity/provider/OrganizationIdentityProvider.java b/component/core/src/main/java/org/exoplatform/social/core/identity/provider/OrganizationIdentityProvider.java index 5e5afcdcd5c..c99490478e6 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/identity/provider/OrganizationIdentityProvider.java +++ b/component/core/src/main/java/org/exoplatform/social/core/identity/provider/OrganizationIdentityProvider.java @@ -16,10 +16,14 @@ */ package org.exoplatform.social.core.identity.provider; -import java.util.*; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; import java.util.Map.Entry; +import java.util.Set; import org.apache.commons.lang3.StringUtils; + import org.exoplatform.commons.utils.ListAccess; import org.exoplatform.container.component.ComponentRequestLifecycle; import org.exoplatform.container.component.RequestLifeCycle; diff --git a/component/core/src/main/java/org/exoplatform/social/core/image/ImageUtils.java b/component/core/src/main/java/org/exoplatform/social/core/image/ImageUtils.java index 3b71e12f7e5..f8e3ac72b53 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/image/ImageUtils.java +++ b/component/core/src/main/java/org/exoplatform/social/core/image/ImageUtils.java @@ -17,17 +17,28 @@ */ package org.exoplatform.social.core.image; +import java.awt.AlphaComposite; +import java.awt.Color; +import java.awt.Font; +import java.awt.FontMetrics; +import java.awt.Graphics2D; +import java.awt.RenderingHints; +import java.awt.image.BufferedImage; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.List; + +import javax.imageio.ImageIO; + import org.exoplatform.commons.utils.MimeTypeResolver; import org.exoplatform.services.log.ExoLogger; import org.exoplatform.services.log.Log; import org.exoplatform.social.core.model.AvatarAttachment; -import javax.imageio.ImageIO; -import java.awt.*; -import java.awt.image.BufferedImage; -import java.io.*; -import java.util.List; - /** * @author tuan_nguyenxuan Oct 29, 2010 */ diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ActivityIndexingServiceConnector.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ActivityIndexingServiceConnector.java index e1487649351..c9cee4ebdf7 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ActivityIndexingServiceConnector.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ActivityIndexingServiceConnector.java @@ -16,11 +16,16 @@ */ package org.exoplatform.social.core.jpa.search; -import java.util.*; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.text.StringEscapeUtils; import org.jsoup.Jsoup; -import org.apache.commons.lang3.StringUtils; import org.exoplatform.commons.search.domain.Document; import org.exoplatform.commons.search.index.impl.ElasticIndexingServiceConnector; diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ActivitySearchConnector.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ActivitySearchConnector.java index 66f6d4d0918..3b83b5f87b7 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ActivitySearchConnector.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ActivitySearchConnector.java @@ -13,6 +13,11 @@ import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; +import org.json.simple.parser.JSONParser; +import org.json.simple.parser.ParseException; + import org.exoplatform.commons.search.es.ElasticSearchException; import org.exoplatform.commons.search.es.client.ElasticSearchingClient; import org.exoplatform.commons.utils.IOUtil; @@ -31,10 +36,6 @@ import org.exoplatform.social.core.storage.api.ActivityStorage; import org.exoplatform.social.metadata.favorite.FavoriteService; import org.exoplatform.social.metadata.tag.TagService; -import org.json.simple.JSONArray; -import org.json.simple.JSONObject; -import org.json.simple.parser.JSONParser; -import org.json.simple.parser.ParseException; public class ActivitySearchConnector { diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ComplementaryFilterSearchConnector.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ComplementaryFilterSearchConnector.java index 0316f892974..ad105b81ccd 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ComplementaryFilterSearchConnector.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ComplementaryFilterSearchConnector.java @@ -20,14 +20,17 @@ package org.exoplatform.social.core.jpa.search; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; + import org.exoplatform.commons.search.es.client.ElasticSearchingClient; import org.exoplatform.services.log.ExoLogger; import org.exoplatform.services.log.Log; -import java.util.*; - public class ComplementaryFilterSearchConnector { private static final Log LOG = ExoLogger.getLogger(ComplementaryFilterSearchConnector.class); diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ExtendProfileFilter.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ExtendProfileFilter.java index 95fec312a2c..e925a40a5d1 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ExtendProfileFilter.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ExtendProfileFilter.java @@ -19,13 +19,13 @@ package org.exoplatform.social.core.jpa.search; +import java.util.List; + import org.exoplatform.social.core.identity.model.Identity; import org.exoplatform.social.core.profile.ProfileFilter; import org.exoplatform.social.core.relationship.model.Relationship; import org.exoplatform.social.core.search.Sorting; -import java.util.List; - /** * @author Tuyen Nguyen The. */ diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ProfileIndexDocument.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ProfileIndexDocument.java index dcc625ce479..b8047f6b5b4 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ProfileIndexDocument.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ProfileIndexDocument.java @@ -1,6 +1,8 @@ package org.exoplatform.social.core.jpa.search; -import java.util.*; +import java.util.Date; +import java.util.Map; +import java.util.Set; import org.exoplatform.commons.search.domain.Document; diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ProfileIndexingServiceConnector.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ProfileIndexingServiceConnector.java index 7ff23c24e2b..7f825b44896 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ProfileIndexingServiceConnector.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ProfileIndexingServiceConnector.java @@ -17,7 +17,12 @@ package org.exoplatform.social.core.jpa.search; import java.text.Normalizer; -import java.util.*; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.stream.Collectors; import org.apache.commons.collections.CollectionUtils; diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ProfileSearchConnector.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ProfileSearchConnector.java index f5d0bd104d8..ee19769ab82 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ProfileSearchConnector.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/search/ProfileSearchConnector.java @@ -25,9 +25,6 @@ import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; -import org.exoplatform.social.core.profileproperty.ProfileProperty; -import org.exoplatform.social.core.profileproperty.ProfilePropertyService; -import org.exoplatform.social.core.profileproperty.model.ProfilePropertySetting; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; @@ -41,6 +38,8 @@ import org.exoplatform.services.log.Log; import org.exoplatform.social.core.identity.model.Identity; import org.exoplatform.social.core.profile.ProfileFilter; +import org.exoplatform.social.core.profileproperty.ProfilePropertyService; +import org.exoplatform.social.core.profileproperty.model.ProfilePropertySetting; import org.exoplatform.social.core.relationship.model.Relationship.Type; import org.exoplatform.social.core.search.Sorting; import org.exoplatform.social.core.storage.impl.StorageUtils; diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/SpaceIndexingServiceConnector.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/search/SpaceIndexingServiceConnector.java index 81c3573a0e5..24d08c2e8fc 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/SpaceIndexingServiceConnector.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/search/SpaceIndexingServiceConnector.java @@ -16,7 +16,13 @@ */ package org.exoplatform.social.core.jpa.search; -import java.util.*; +import java.util.Arrays; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; import org.apache.commons.lang3.StringUtils; import org.jsoup.Jsoup; @@ -26,10 +32,10 @@ import org.exoplatform.container.xml.InitParams; import org.exoplatform.services.log.ExoLogger; import org.exoplatform.services.log.Log; +import org.exoplatform.social.core.jpa.storage.SpaceStorage; import org.exoplatform.social.core.search.DocumentWithMetadata; import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.core.space.spi.SpaceService; -import org.exoplatform.social.core.storage.api.SpaceStorage; import org.exoplatform.social.metadata.MetadataService; import org.exoplatform.social.metadata.model.MetadataItem; import org.exoplatform.social.metadata.model.MetadataObject; @@ -83,6 +89,7 @@ public Document create(String id) { fields.put("description", htmlToText(space.getDescription())); fields.put("visibility", space.getVisibility()); fields.put("registration", space.getRegistration()); + fields.put("templateId", String.valueOf(space.getTemplateId())); Date createdDate = new Date(space.getCreatedTime()); @@ -147,6 +154,8 @@ public String getMapping() { .append(" \"prettyName\" : {\"type\" : \"keyword\"},\n") .append(" \"displayName\" : {") .append(" \"type\" : \"text\",") + .append(" \"analyzer\": \"ngram_analyzer\",") + .append(" \"search_analyzer\": \"ngram_analyzer_search\",") .append(" \"index_options\": \"offsets\",") .append(" \"fields\": {") .append(" \"raw\": {") diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/XSpaceFilter.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/search/XSpaceFilter.java index 3c400c05d52..cecc29595be 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/XSpaceFilter.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/search/XSpaceFilter.java @@ -43,6 +43,7 @@ public XSpaceFilter setSpaceFilter(SpaceFilter spaceFilter) { this.setRemoteId(spaceFilter.getRemoteId()); this.setSorting(spaceFilter.getSorting()); this.setFavorite(spaceFilter.isFavorite()); + this.setTemplateId(spaceFilter.getTemplateId()); if (spaceFilter.getSpaceNameSearchCondition() != null) { this.setSpaceNameSearchCondition(spaceFilter.getSpaceNameSearchCondition()); } diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/listener/IDMUserESListenerImpl.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/search/listener/IDMUserESListenerImpl.java index a56d85f82a8..3a6519d9520 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/listener/IDMUserESListenerImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/search/listener/IDMUserESListenerImpl.java @@ -16,6 +16,8 @@ */ package org.exoplatform.social.core.jpa.search.listener; +import java.util.List; + import org.exoplatform.commons.search.index.IndexingService; import org.exoplatform.commons.utils.CommonsUtils; import org.exoplatform.container.PortalContainer; @@ -24,15 +26,13 @@ import org.exoplatform.services.log.Log; import org.exoplatform.services.organization.User; import org.exoplatform.services.organization.UserEventListener; -import org.exoplatform.social.core.jpa.search.ProfileIndexingServiceConnector; -import org.exoplatform.social.core.jpa.storage.dao.ConnectionDAO; import org.exoplatform.social.core.identity.model.Identity; import org.exoplatform.social.core.identity.provider.OrganizationIdentityProvider; +import org.exoplatform.social.core.jpa.search.ProfileIndexingServiceConnector; +import org.exoplatform.social.core.jpa.storage.dao.ConnectionDAO; import org.exoplatform.social.core.manager.IdentityManager; import org.exoplatform.social.core.relationship.model.Relationship; -import java.util.List; - /** * Created by The eXo Platform SAS Author : eXoPlatform exo@exoplatform.com Oct * 1, 2015 diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/listener/SpaceESListenerImpl.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/search/listener/SpaceESListenerImpl.java deleted file mode 100644 index 94856f8537f..00000000000 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/listener/SpaceESListenerImpl.java +++ /dev/null @@ -1,124 +0,0 @@ -package org.exoplatform.social.core.jpa.search.listener; - -import org.exoplatform.commons.search.index.IndexingService; -import org.exoplatform.commons.utils.CommonsUtils; -import org.exoplatform.services.log.ExoLogger; -import org.exoplatform.services.log.Log; -import org.exoplatform.social.core.jpa.search.SpaceIndexingServiceConnector; -import org.exoplatform.social.core.space.SpaceListenerPlugin; -import org.exoplatform.social.core.space.spi.SpaceLifeCycleEvent; - -public class SpaceESListenerImpl extends SpaceListenerPlugin { - - private static final Log LOG = ExoLogger.getExoLogger(SpaceESListenerImpl.class); - - @Override - public void spaceCreated(SpaceLifeCycleEvent event) { - IndexingService indexingService = CommonsUtils.getService(IndexingService.class); - String id = event.getSpace().getId(); - - LOG.info("Notifying indexing service for space creation id={}", id); - - indexingService.index(SpaceIndexingServiceConnector.TYPE, id); - } - - @Override - public void spaceDescriptionEdited(SpaceLifeCycleEvent event) { - reindex(event, "space description"); - } - - @Override - public void spaceRemoved(SpaceLifeCycleEvent event) { - IndexingService indexingService = CommonsUtils.getService(IndexingService.class); - String id = event.getSpace().getId(); - - LOG.debug("Notifying indexing service for space removal id={}", id); - - indexingService.unindex(SpaceIndexingServiceConnector.TYPE, id); - } - - @Override - public void spaceRenamed(SpaceLifeCycleEvent event) { - reindex(event, "space renaming"); - } - - @Override - public void spaceAccessEdited(SpaceLifeCycleEvent event) { - reindex(event, "space access edited"); - } - - @Override - public void spaceRegistrationEdited(SpaceLifeCycleEvent event) { - reindex(event, "space registration edited"); - } - - @Override - public void spaceBannerEdited(SpaceLifeCycleEvent event) { - // Banner not indexed - } - - @Override - public void applicationActivated(SpaceLifeCycleEvent event) { - reindex(event, "space application activated"); - } - - @Override - public void applicationAdded(SpaceLifeCycleEvent event) { - reindex(event, "space application added"); - } - - @Override - public void applicationDeactivated(SpaceLifeCycleEvent event) { - reindex(event, "space application disabled"); - } - - @Override - public void applicationRemoved(SpaceLifeCycleEvent event) { - reindex(event, "space application removed"); - } - - @Override - public void grantedLead(SpaceLifeCycleEvent event) { - reindex(event, "space member granted as manager"); - } - - @Override - public void joined(SpaceLifeCycleEvent event) { - reindex(event, "space member joined"); - } - - @Override - public void left(SpaceLifeCycleEvent event) { - reindex(event, "space member left"); - } - - @Override - public void revokedLead(SpaceLifeCycleEvent event) { - reindex(event, "space member revoked as manager"); - } - - @Override - public void spaceAvatarEdited(SpaceLifeCycleEvent event) { - reindex(event, "space avatar updated"); - } - - @Override - public void addInvitedUser(SpaceLifeCycleEvent event) { - reindex(event, "user invited to space"); - } - - @Override - public void addPendingUser(SpaceLifeCycleEvent event) { - reindex(event, "user requested access to space"); - } - - private void reindex(SpaceLifeCycleEvent event, String cause) { - IndexingService indexingService = CommonsUtils.getService(IndexingService.class); - String id = event.getSpace().getId(); - - LOG.debug("Notifying indexing service for {} id={}", cause, id); - - indexingService.reindex(SpaceIndexingServiceConnector.TYPE, id); - } - -} diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/EntityConverterUtils.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/EntityConverterUtils.java index 866bd35497f..dd1202e997c 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/EntityConverterUtils.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/EntityConverterUtils.java @@ -28,20 +28,18 @@ import org.exoplatform.social.core.identity.model.IdentityWithRelationship; import org.exoplatform.social.core.identity.model.Profile; import org.exoplatform.social.core.identity.provider.OrganizationIdentityProvider; -import org.exoplatform.social.core.jpa.storage.entity.AppEntity; import org.exoplatform.social.core.jpa.storage.entity.ConnectionEntity; import org.exoplatform.social.core.jpa.storage.entity.IdentityEntity; import org.exoplatform.social.core.jpa.storage.entity.ProfileExperienceEntity; import org.exoplatform.social.core.jpa.storage.entity.SpaceEntity; -import org.exoplatform.social.core.jpa.storage.entity.SpaceEntity.PRIORITY; -import org.exoplatform.social.core.jpa.storage.entity.SpaceEntity.PublicSiteVisibility; -import org.exoplatform.social.core.jpa.storage.entity.SpaceEntity.REGISTRATION; -import org.exoplatform.social.core.jpa.storage.entity.SpaceEntity.VISIBILITY; import org.exoplatform.social.core.jpa.storage.entity.SpaceMemberEntity; import org.exoplatform.social.core.relationship.model.Relationship; import org.exoplatform.social.core.service.LinkProvider; import org.exoplatform.social.core.space.model.Space; +import io.meeds.social.core.space.constant.PublicSiteVisibility; +import io.meeds.social.core.space.constant.Registration; +import io.meeds.social.core.space.constant.Visibility; import io.meeds.social.space.constant.SpaceMembershipStatus; public class EntityConverterUtils { @@ -96,6 +94,7 @@ public static void mapToProfile(IdentityEntity entity, Profile p) { // Allow to generate new default avatar file // for user or space avatarLastUpdated = System.currentTimeMillis(); + p.setDefaultAvatar(true); } Long bannerLastUpdated = null; if (entity.getBannerFileId() != null && entity.getBannerFileId() > 0) { @@ -268,7 +267,6 @@ public static List convertToIdentities(IdentityEntity[] entities) { } public static SpaceEntity buildFrom(Space space, SpaceEntity spaceEntity) { - spaceEntity.setApp(AppEntity.parse(space.getApp())); if (space.getAvatarLastUpdated() != null) { spaceEntity.setAvatarLastUpdated(space.getAvatarLastUpdated() > 0 ? new Date(space.getAvatarLastUpdated()) : null); } else { @@ -281,28 +279,21 @@ public static SpaceEntity buildFrom(Space space, SpaceEntity spaceEntity) { } spaceEntity.setCreatedDate(space.getCreatedTime() > 0 ? new Date(space.getCreatedTime()) : new Date()); spaceEntity.setDescription(space.getDescription()); - spaceEntity.setTemplate(space.getTemplate()); + spaceEntity.setTemplateId(space.getTemplateId() == 0 ? null : space.getTemplateId()); spaceEntity.setDisplayName(space.getDisplayName()); spaceEntity.setGroupId(space.getGroupId()); spaceEntity.setPrettyName(space.getPrettyName()); spaceEntity.setPublicSiteId(space.getPublicSiteId()); spaceEntity.setPublicSiteVisibility(space.getPublicSiteVisibility() == null ? PublicSiteVisibility.MANAGER : PublicSiteVisibility.valueOf(space.getPublicSiteVisibility().toUpperCase())); - PRIORITY priority = null; - if (Space.HIGH_PRIORITY.equals(space.getPriority())) { - priority = PRIORITY.HIGH; - } else if (Space.INTERMEDIATE_PRIORITY.equals(space.getPriority())) { - priority = PRIORITY.INTERMEDIATE; - } else if (Space.LOW_PRIORITY.equals(space.getPriority())) { - priority = PRIORITY.LOW; - } - spaceEntity.setPriority(priority); + spaceEntity.setDeletePermissions(space.getDeletePermissions()); + spaceEntity.setLayoutPermissions(space.getLayoutPermissions()); if (space.getRegistration() != null) { - spaceEntity.setRegistration(REGISTRATION.valueOf(space.getRegistration().toUpperCase())); + spaceEntity.setRegistration(Registration.valueOf(space.getRegistration().toUpperCase())); } spaceEntity.setUrl(space.getUrl()); - VISIBILITY visibility = null; + Visibility visibility = null; if (space.getVisibility() != null) { - visibility = VISIBILITY.valueOf(space.getVisibility().toUpperCase()); + visibility = Visibility.valueOf(space.getVisibility().toUpperCase()); } spaceEntity.setVisibility(visibility); buildMembers(space, spaceEntity); diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/RDBMSActivityStorageImpl.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/RDBMSActivityStorageImpl.java index 8a0554b82ef..e54e6dd44a4 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/RDBMSActivityStorageImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/RDBMSActivityStorageImpl.java @@ -72,7 +72,6 @@ import org.exoplatform.social.core.storage.ActivityStorageException.Type; import org.exoplatform.social.core.storage.api.ActivityStorage; import org.exoplatform.social.core.storage.api.IdentityStorage; -import org.exoplatform.social.core.storage.api.SpaceStorage; import org.exoplatform.social.core.storage.impl.StorageUtils; import org.exoplatform.social.core.utils.MentionUtils; import org.exoplatform.social.metadata.favorite.FavoriteService; @@ -1827,7 +1826,7 @@ private ActivityEntity processActivityStreamUpdatedTime(ActivityEntity activityE .stream() .filter(item -> item.getStreamType() == StreamType.POSTER || item.getStreamType() == StreamType.SPACE) - .collect(Collectors.toList()); + .toList(); if (!items.isEmpty()) { Date now = new Date(); items.stream().forEach(item -> item.setUpdatedDate(now)); @@ -1843,7 +1842,7 @@ private ActivityEntity processActivityStreamUpdatedTime(ActivityEntity activityE * @return */ private List memberOfSpaceIds(Identity ownerIdentity) { - return spaceStorage.getMemberSpaceIds(ownerIdentity.getId(), 0, -1); + return spaceStorage.getMemberRoleSpaceIdentityIds(ownerIdentity.getId(), 0, -1); } diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/RDBMSGroupSpaceBindingStorageImpl.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/RDBMSGroupSpaceBindingStorageImpl.java index ea695c1dcc2..d8a3ae6f1d0 100755 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/RDBMSGroupSpaceBindingStorageImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/RDBMSGroupSpaceBindingStorageImpl.java @@ -25,9 +25,24 @@ import org.exoplatform.commons.api.persistence.ExoTransactional; import org.exoplatform.services.log.ExoLogger; import org.exoplatform.services.log.Log; -import org.exoplatform.social.core.binding.model.*; -import org.exoplatform.social.core.jpa.storage.dao.*; -import org.exoplatform.social.core.jpa.storage.entity.*; +import org.exoplatform.social.core.binding.model.GroupSpaceBinding; +import org.exoplatform.social.core.binding.model.GroupSpaceBindingOperationReport; +import org.exoplatform.social.core.binding.model.GroupSpaceBindingQueue; +import org.exoplatform.social.core.binding.model.GroupSpaceBindingReportAction; +import org.exoplatform.social.core.binding.model.GroupSpaceBindingReportUser; +import org.exoplatform.social.core.binding.model.UserSpaceBinding; +import org.exoplatform.social.core.jpa.storage.dao.GroupSpaceBindingDAO; +import org.exoplatform.social.core.jpa.storage.dao.GroupSpaceBindingQueueDAO; +import org.exoplatform.social.core.jpa.storage.dao.GroupSpaceBindingReportActionDAO; +import org.exoplatform.social.core.jpa.storage.dao.GroupSpaceBindingReportUserDAO; +import org.exoplatform.social.core.jpa.storage.dao.SpaceDAO; +import org.exoplatform.social.core.jpa.storage.dao.UserSpaceBindingDAO; +import org.exoplatform.social.core.jpa.storage.entity.GroupSpaceBindingEntity; +import org.exoplatform.social.core.jpa.storage.entity.GroupSpaceBindingQueueEntity; +import org.exoplatform.social.core.jpa.storage.entity.GroupSpaceBindingReportActionEntity; +import org.exoplatform.social.core.jpa.storage.entity.GroupSpaceBindingReportUserEntity; +import org.exoplatform.social.core.jpa.storage.entity.SpaceEntity; +import org.exoplatform.social.core.jpa.storage.entity.UserSpaceBindingEntity; import org.exoplatform.social.core.storage.GroupSpaceBindingStorageException; import org.exoplatform.social.core.storage.api.GroupSpaceBindingStorage; diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/RDBMSIdentityStorageImpl.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/RDBMSIdentityStorageImpl.java index 691bb98fb9a..2e6336b8d2b 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/RDBMSIdentityStorageImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/RDBMSIdentityStorageImpl.java @@ -80,7 +80,6 @@ import org.exoplatform.social.core.storage.IdentityStorageException; import org.exoplatform.social.core.storage.api.ActivityStorage; import org.exoplatform.social.core.storage.api.IdentityStorage; -import org.exoplatform.social.core.storage.api.SpaceStorage; import io.meeds.social.space.constant.SpaceMembershipStatus; @@ -96,13 +95,13 @@ */ public class RDBMSIdentityStorageImpl implements IdentityStorage { - private static final Log LOG = ExoLogger.getLogger(RDBMSIdentityStorageImpl.class); + private static final Log LOG = ExoLogger.getLogger(RDBMSIdentityStorageImpl.class); - private static final int BATCH_SIZE = 100; + private static final int BATCH_SIZE = 100; - private static final long MEGABYTE = 1024L * 1024L; + private static final long MEGABYTE = 1024L * 1024L; - private static final String socialNameSpace = "social"; + private static final String SOCIAL_NAME_SPACE = "social"; private final IdentityDAO identityDAO; @@ -120,9 +119,9 @@ public class RDBMSIdentityStorageImpl implements IdentityStorage { private SpaceStorage spaceStorage; - private Map> identityProviders = null; + private Map> identityProviders = null; - private int imageUploadLimit = DEFAULT_UPLOAD_IMAGE_LIMIT; + private int imageUploadLimit = DEFAULT_UPLOAD_IMAGE_LIMIT; public RDBMSIdentityStorageImpl(IdentityDAO identityDAO, SpaceMemberDAO spaceMemberDAO, @@ -193,7 +192,7 @@ private void mapToProfileEntity(Profile profile, IdentityEntity identityEntity) fileItem = new FileItem(avatarId, fileName, attachment.getMimeType(), - socialNameSpace, + SOCIAL_NAME_SPACE, bytes.length, new Date(), identityEntity.getRemoteId(), @@ -205,7 +204,7 @@ private void mapToProfileEntity(Profile profile, IdentityEntity identityEntity) fileItem = new FileItem(null, fileName, attachment.getMimeType(), - socialNameSpace, + SOCIAL_NAME_SPACE, bytes.length, new Date(), identityEntity.getRemoteId(), @@ -243,7 +242,7 @@ private void mapToProfileEntity(Profile profile, IdentityEntity identityEntity) fileItem = new FileItem(bannerId, fileName, attachment.getMimeType(), - socialNameSpace, + SOCIAL_NAME_SPACE, bytes.length, new Date(), identityEntity.getRemoteId(), @@ -255,7 +254,7 @@ private void mapToProfileEntity(Profile profile, IdentityEntity identityEntity) fileItem = new FileItem(null, fileName, attachment.getMimeType(), - socialNameSpace, + SOCIAL_NAME_SPACE, bytes.length, new Date(), identityEntity.getRemoteId(), @@ -625,7 +624,7 @@ public void updateProfileActivityId(Identity identity, String activityId, Profil * @since 4.0.0.Alpha1 */ public String getProfileActivityId(Profile profile, Profile.AttachedActivityType type) { - String t = "SPACE_ACTIVITY"; + String t = null; if (type == Profile.AttachedActivityType.USER) { t = "USER_PROFILE_ACTIVITY"; } else if (type == Profile.AttachedActivityType.RELATIONSHIP) { @@ -649,7 +648,7 @@ public String getProfileActivityId(Profile profile, Profile.AttachedActivityType * @since 4.1.0 */ public Set getActiveUsers(ActiveIdentityFilter filter) { - Set activeUsers = new HashSet(); + Set activeUsers = new HashSet<>(); //by userGroups if (filter.getUserGroups() != null) { StringTokenizer stringToken = new StringTokenizer(filter.getUserGroups(), ActiveIdentityFilter.COMMA_SEPARATOR); @@ -979,6 +978,7 @@ public List getIdentityIds(String providerId, .toList(); } + @Override public List getIdentities(final String providerId, long offset, long limit) throws IdentityStorageException { return this.getIdentities(providerId, null, null, true, null, null, null, offset, limit); } @@ -1083,7 +1083,7 @@ public FileItem getAvatarFile(Identity identity) { file = new FileItem(null, EntityConverterUtils.DEFAULT_AVATAR, avatar.getMimeType(), - socialNameSpace, + SOCIAL_NAME_SPACE, bytes.length, new Date(), identity.getRemoteId(), diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/RDBMSRelationshipStorageImpl.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/RDBMSRelationshipStorageImpl.java index 2136fd3a90f..54448ffd115 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/RDBMSRelationshipStorageImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/RDBMSRelationshipStorageImpl.java @@ -16,7 +16,20 @@ */ package org.exoplatform.social.core.jpa.storage; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.NavigableMap; +import java.util.Random; +import java.util.Set; +import java.util.TreeMap; import org.exoplatform.commons.api.persistence.ExoTransactional; import org.exoplatform.commons.utils.ListAccess; diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/RDBMSSpaceStorageImpl.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/SpaceStorage.java similarity index 87% rename from component/core/src/main/java/org/exoplatform/social/core/jpa/storage/RDBMSSpaceStorageImpl.java rename to component/core/src/main/java/org/exoplatform/social/core/jpa/storage/SpaceStorage.java index 833a15a0d0f..c10d9e8d365 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/RDBMSSpaceStorageImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/SpaceStorage.java @@ -26,6 +26,7 @@ import java.util.HashSet; import java.util.LinkedList; import java.util.List; +import java.util.Map; import java.util.Set; import java.util.stream.Collectors; @@ -57,7 +58,6 @@ import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.core.storage.SpaceStorageException; import org.exoplatform.social.core.storage.api.IdentityStorage; -import org.exoplatform.social.core.storage.api.SpaceStorage; import org.exoplatform.social.metadata.favorite.FavoriteService; import org.exoplatform.social.metadata.model.MetadataItem; import org.exoplatform.web.security.Token; @@ -68,10 +68,12 @@ import jakarta.persistence.Tuple; -public class RDBMSSpaceStorageImpl implements SpaceStorage { +public class SpaceStorage { + + private static final String DEFAULT_BANNER_URL = "/social/images/defaultSpaceBanner.webp"; /** Logger */ - private static final Log LOG = ExoLogger.getLogger(RDBMSSpaceStorageImpl.class); + private static final Log LOG = ExoLogger.getLogger(SpaceStorage.class); private static final int BATCH_SIZE = 100; @@ -93,14 +95,14 @@ public class RDBMSSpaceStorageImpl implements SpaceStorage { private RemindPasswordTokenService remindPasswordTokenService; - public RDBMSSpaceStorageImpl(SpaceDAO spaceDAO, // NOSONAR - SpaceMemberDAO spaceMemberDAO, - IdentityStorage identityStorage, - IdentityDAO identityDAO, - ActivityDAO activityDAO, - SpaceExternalInvitationDAO spaceExternalInvitationDAO, - FavoriteService favoriteService, - RemindPasswordTokenService remindPasswordTokenService) { + public SpaceStorage(SpaceDAO spaceDAO, // NOSONAR + SpaceMemberDAO spaceMemberDAO, + IdentityStorage identityStorage, + IdentityDAO identityDAO, + ActivityDAO activityDAO, + SpaceExternalInvitationDAO spaceExternalInvitationDAO, + FavoriteService favoriteService, + RemindPasswordTokenService remindPasswordTokenService) { this.spaceDAO = spaceDAO; this.identityStorage = identityStorage; this.spaceMemberDAO = spaceMemberDAO; @@ -111,7 +113,6 @@ public RDBMSSpaceStorageImpl(SpaceDAO spaceDAO, // NOSONAR this.remindPasswordTokenService = remindPasswordTokenService; } - @Override @ExoTransactional public void deleteSpace(String id) throws SpaceStorageException { SpaceEntity entity = spaceDAO.find(Long.parseLong(id)); @@ -128,17 +129,14 @@ public void deleteSpace(String id) throws SpaceStorageException { } } - @Override public List getAccessibleSpaces(String userId) throws SpaceStorageException { return getAccessibleSpaces(userId, 0, -1); } - @Override public List getAccessibleSpaces(String userId, long offset, long limit) throws SpaceStorageException { return getAccessibleSpacesByFilter(userId, null, offset, limit); } - @Override public List getAccessibleSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit) { return getSpaces(userId, SpaceMembershipStatus.MEMBER, @@ -147,82 +145,66 @@ public List getAccessibleSpacesByFilter(String userId, SpaceFilter spaceF limit); } - @Override public int getAccessibleSpacesByFilterCount(String userId, SpaceFilter spaceFilter) { return getSpacesCount(userId, SpaceMembershipStatus.MEMBER, spaceFilter); } - @Override public int getAccessibleSpacesCount(String userId) throws SpaceStorageException { return getAccessibleSpacesByFilterCount(userId, null); } - @Override public List getAllSpaces() throws SpaceStorageException { return getSpaces(0, -1); } - @Override public int getAllSpacesByFilterCount(SpaceFilter spaceFilter) { return getSpacesCount(null, null, spaceFilter); } - @Override public int getAllSpacesCount() throws SpaceStorageException { return getAllSpacesByFilterCount(null); } - @Override public List getEditableSpaces(String userId) throws SpaceStorageException { return getEditableSpaces(userId, 0, -1); } - @Override public List getEditableSpaces(String userId, long offset, long limit) throws SpaceStorageException { return getEditableSpacesByFilter(userId, null, offset, limit); } - @Override public List getEditableSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit) { return getSpaces(userId, SpaceMembershipStatus.MANAGER, spaceFilter, offset, limit); } - @Override public int getEditableSpacesByFilterCount(String userId, SpaceFilter spaceFilter) { return getSpacesCount(userId, SpaceMembershipStatus.MANAGER, spaceFilter); } - @Override public int getEditableSpacesCount(String userId) throws SpaceStorageException { return getEditableSpacesByFilterCount(userId, null); } - @Override public List getInvitedSpaces(String userId) throws SpaceStorageException { return getInvitedSpaces(userId, 0, -1); } - @Override public List getInvitedSpaces(String userId, long offset, long limit) throws SpaceStorageException { return getInvitedSpacesByFilter(userId, null, offset, limit); } - @Override public List getInvitedSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit) { return getSpaces(userId, SpaceMembershipStatus.INVITED, spaceFilter, offset, limit); } - @Override public int getInvitedSpacesByFilterCount(String userId, SpaceFilter spaceFilter) { return getSpacesCount(userId, SpaceMembershipStatus.INVITED, spaceFilter); } - @Override public int getInvitedSpacesCount(String userId) throws SpaceStorageException { return getInvitedSpacesByFilterCount(userId, null); } - @Override public List getLastAccessedSpace(SpaceFilter spaceFilter, int offset, int limit) throws SpaceStorageException { XSpaceFilter xFilter = new XSpaceFilter(); xFilter.setSpaceFilter(spaceFilter); @@ -230,38 +212,31 @@ public List getLastAccessedSpace(SpaceFilter spaceFilter, int offset, int return getSpaces(spaceFilter.getRemoteId(), SpaceMembershipStatus.MEMBER, xFilter, offset, limit); } - @Override public int getLastAccessedSpaceCount(SpaceFilter spaceFilter) throws SpaceStorageException { return getMemberSpacesByFilterCount(spaceFilter.getRemoteId(), spaceFilter); } - @Override public List getLastSpaces(int limit) { List ids = spaceDAO.getLastSpaces(limit); return buildList(ids); } - @Override public List getManagerSpaces(String userId, long offset, long limit) { return getManagerSpacesByFilter(userId, null, offset, limit); } - @Override public List getManagerSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit) { return getSpaces(userId, SpaceMembershipStatus.MANAGER, spaceFilter, offset, limit); } - @Override public int getManagerSpacesCount(String userId) { return getManagerSpacesByFilterCount(userId, null); } - @Override public int getManagerSpacesByFilterCount(String userId, SpaceFilter spaceFilter) { return getSpacesCount(userId, SpaceMembershipStatus.MANAGER, spaceFilter); } - @Override public List getSpaceIdentityIdsByUserRole(String remoteId, String status, int offset, int limit) { SpaceMembershipStatus spaceMemberStatus = SpaceMembershipStatus.valueOf(status.toUpperCase()); List spaceIdentityIds = spaceMemberDAO.getSpaceIdentityIdsByUserRole(remoteId, spaceMemberStatus, offset, limit); @@ -275,7 +250,6 @@ public List getSpaceIdentityIdsByUserRole(String remoteId, String status return ids; } - @Override public List getFavoriteSpaceIdentityIds(String userIdentityId, SpaceFilter spaceFilter, int offset, int limit) { List spaces = getFavoriteSpacesByFilter(userIdentityId, spaceFilter, offset, limit); @@ -291,7 +265,6 @@ public List getFavoriteSpaceIdentityIds(String userIdentityId, SpaceFilt return ids; } - @Override public List getMemberRoleSpaceIdentityIds(String identityId, int offset, int limit) throws SpaceStorageException { Identity identity = identityStorage.findIdentityById(identityId); List spaceIds = spaceMemberDAO.getSpacesIdsByUserName(identity.getRemoteId(), offset, limit); @@ -305,7 +278,6 @@ public List getMemberRoleSpaceIdentityIds(String identityId, int offset, return ids; } - @Override public List getMemberRoleSpaceIds(String identityId, int offset, int limit) throws SpaceStorageException { Identity identity = identityStorage.findIdentityById(identityId); List spaceIds = spaceMemberDAO.getSpaceIdByMemberId(identity.getRemoteId(), offset, limit); @@ -319,7 +291,6 @@ public List getMemberRoleSpaceIds(String identityId, int offset, int lim return ids; } - @Override public List getManagerRoleSpaceIds(String identityId, int offset, int limit) throws SpaceStorageException { @@ -338,121 +309,63 @@ public List getManagerRoleSpaceIds(String identityId, return ids; } - @Override public List getMemberSpaces(String userId) throws SpaceStorageException { return getMemberSpaces(userId, 0, -1); } - @Override public List getMemberSpaces(String userId, long offset, long limit) throws SpaceStorageException { return getMemberSpacesByFilter(userId, null, offset, limit); } - @Override public List getMemberSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit) { return getSpaces(userId, SpaceMembershipStatus.MEMBER, spaceFilter, offset, limit); } - @Override public List getFavoriteSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit) { SpaceFilter favoriteSpaceFilter = spaceFilter.clone(); favoriteSpaceFilter.setFavorite(true); return getSpaces(userId, null, favoriteSpaceFilter, offset, limit); } - @Override public int getFavoriteSpacesByFilterCount(String userId, SpaceFilter spaceFilter) { SpaceFilter favoriteSpaceFilter = spaceFilter.clone(); favoriteSpaceFilter.setFavorite(true); return getSpacesCount(userId, null, favoriteSpaceFilter); } - @Override public int getMemberSpacesByFilterCount(String userId, SpaceFilter spaceFilter) { return getSpacesCount(userId, SpaceMembershipStatus.MEMBER, spaceFilter); } - @Override public int getMemberSpacesCount(String userId) throws SpaceStorageException { return getMemberSpacesByFilterCount(userId, null); } - @Override - public int getNumberOfMemberPublicSpaces(String userId) { - XSpaceFilter filter = new XSpaceFilter(); - filter.setNotHidden(true); - return getSpacesCount(userId, SpaceMembershipStatus.MEMBER, filter); - } - - @Override public List getPendingSpaces(String userId) throws SpaceStorageException { return getPendingSpaces(userId, 0, -1); } - @Override public List getPendingSpaces(String userId, long offset, long limit) throws SpaceStorageException { return getPendingSpacesByFilter(userId, null, offset, limit); } - @Override public List getPendingSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit) { return getSpaces(userId, SpaceMembershipStatus.PENDING, spaceFilter, offset, limit); } - @Override public int getPendingSpacesByFilterCount(String userId, SpaceFilter spaceFilter) { return getSpacesCount(userId, SpaceMembershipStatus.PENDING, spaceFilter); } - @Override public int getPendingSpacesCount(String userId) throws SpaceStorageException { return getPendingSpacesByFilterCount(userId, null); } - @Override - public List getPublicSpaces(String userId) throws SpaceStorageException { - return getPublicSpaces(userId, 0, -1); - } - - @Override - public List getPublicSpaces(String userId, long offset, long limit) throws SpaceStorageException { - return getPublicSpacesByFilter(userId, null, offset, limit); - } - - @Override - public List getPublicSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit) { - XSpaceFilter filter = new XSpaceFilter(); - filter.setSpaceFilter(spaceFilter); - filter.setPublic(userId); - return getSpacesByFilter(filter, offset, limit); - } - - @Override - public int getPublicSpacesByFilterCount(String userId, SpaceFilter spaceFilter) { - XSpaceFilter filter = new XSpaceFilter(); - filter.setSpaceFilter(spaceFilter); - filter.setPublic(userId); - return getSpacesCount(null, null, filter); - } - - @Override - public int getPublicSpacesCount(String userId) throws SpaceStorageException { - return getPublicSpacesByFilterCount(userId, null); - } - - @Override - public Space getSpaceByDisplayName(String spaceDisplayName) throws SpaceStorageException { - SpaceEntity entity = spaceDAO.getSpaceByDisplayName(spaceDisplayName); - return fillSpaceFromEntity(entity); - } - - @Override public Space getSpaceByGroupId(String groupId) throws SpaceStorageException { SpaceEntity entity = spaceDAO.getSpaceByGroupId(groupId); return fillSpaceFromEntity(entity); } - @Override public Space getSpaceById(String id) throws SpaceStorageException { Long spaceId; try { @@ -464,47 +377,23 @@ public Space getSpaceById(String id) throws SpaceStorageException { return fillSpaceFromEntity(entity); } - @Override public Space getSpaceByPrettyName(String spacePrettyName) throws SpaceStorageException { SpaceEntity entity = spaceDAO.getSpaceByPrettyName(spacePrettyName); return fillSpaceFromEntity(entity); } - @Override - public Space getSpaceByUrl(String url) throws SpaceStorageException { - SpaceEntity entity = spaceDAO.getSpaceByURL(url); - return fillSpaceFromEntity(entity); - } - - @Override - public Space getSpaceSimpleById(String id) throws SpaceStorageException { - Long spaceId; - try { - spaceId = Long.parseLong(id); - } catch (Exception ex) { - return null; - } - SpaceEntity entity = spaceDAO.find(spaceId); - Space space = new Space(); - return fillSpaceSimpleFromEntity(entity, space); - } - - @Override public List getSpaces(long offset, long limit) throws SpaceStorageException { return getSpacesByFilter(null, offset, limit); } - @Override public List getSpacesByFilter(SpaceFilter spaceFilter, long offset, long limit) { return getSpaces(null, null, spaceFilter, offset, limit); } - @Override public List getVisibleSpaces(String userId, SpaceFilter spaceFilter) throws SpaceStorageException { return getVisibleSpaces(userId, spaceFilter, 0, -1); } - @Override public List getVisibleSpaces(String userId, SpaceFilter spaceFilter, long offset, @@ -518,7 +407,6 @@ public List getVisibleSpaces(String userId, return getSpacesByFilter(xFilter, offset, limit); } - @Override public int getVisibleSpacesCount(String userId, SpaceFilter spaceFilter) throws SpaceStorageException { XSpaceFilter xFilter = new XSpaceFilter(); xFilter.setSpaceFilter(spaceFilter); @@ -528,7 +416,6 @@ public int getVisibleSpacesCount(String userId, SpaceFilter spaceFilter) throws return getSpacesCount(userId, null, xFilter); } - @Override public List getVisitedSpaces(SpaceFilter spaceFilter, int offset, int limit) throws SpaceStorageException { XSpaceFilter xFilter = new XSpaceFilter(); xFilter.setSpaceFilter(spaceFilter); @@ -536,18 +423,24 @@ public List getVisitedSpaces(SpaceFilter spaceFilter, int offset, int lim return getSpaces(spaceFilter.getRemoteId(), SpaceMembershipStatus.MEMBER, xFilter, offset, limit); } - @Override public Instant getSpaceMembershipDate(long spaceId, String username) { return spaceMemberDAO.getSpaceMembershipDate(spaceId, username); } - @Override public void renameSpace(Space space, String newDisplayName) throws SpaceStorageException { String oldPrettyName = space.getPrettyName(); + // Ensure unicity of new pretty name + String newPrettyName = buildPrettyName(newDisplayName); space.setDisplayName(newDisplayName); - space.setPrettyName(newDisplayName); - space.setUrl(Utils.cleanString(newDisplayName)); + space.setPrettyName(newPrettyName); + if (oldPrettyName.equals(space.getUrl())) { + // Update URL only if legacy + // navigation tree which uses pretty name + space.setUrl(newPrettyName); + } else if (StringUtils.isBlank(space.getUrl())) { + space.setUrl(Space.HOME_URL); + } SpaceEntity entity = spaceDAO.find(Long.parseLong(space.getId())); // Retrieve identity before saving @@ -569,7 +462,6 @@ public void renameSpace(Space space, String newDisplayName) throws SpaceStorageE LOG.debug("Space {} ({}) saved", space.getPrettyName(), space.getId()); } - @Override public void ignoreSpace(String spaceId, String userId) { SpaceMemberEntity entity = spaceMemberDAO.getSpaceMemberShip(userId, Long.parseLong(spaceId), null); SpaceEntity spaceEntity = spaceDAO.find(Long.parseLong(spaceId)); @@ -585,17 +477,18 @@ public void ignoreSpace(String spaceId, String userId) { } } - @Override public boolean isSpaceIgnored(String spaceId, String userId) { SpaceMemberEntity entity = spaceMemberDAO.getSpaceMemberShip(userId, Long.parseLong(spaceId), SpaceMembershipStatus.IGNORED); return entity != null; } - @Override @ExoTransactional - public void saveSpace(Space space, boolean isNew) throws SpaceStorageException { + public Space saveSpace(Space space, boolean isNew) throws SpaceStorageException { + SpaceEntity entity; if (isNew) { - SpaceEntity entity = new SpaceEntity(); + entity = new SpaceEntity(); + // Ensure unicity of pretty name + space.setPrettyName(buildPrettyName(space.getDisplayName())); EntityConverterUtils.buildFrom(space, entity); // @@ -604,22 +497,20 @@ public void saveSpace(Space space, boolean isNew) throws SpaceStorageException { space.setId(String.valueOf(entity.getId())); } else { Long id = Long.parseLong(space.getId()); - SpaceEntity entity = spaceDAO.find(id); + entity = spaceDAO.find(id); if (entity != null) { EntityConverterUtils.buildFrom(space, entity); // entity.setUpdatedDate(new Date()); - spaceDAO.update(entity); + entity = spaceDAO.update(entity); } else { throw new SpaceStorageException(SpaceStorageException.Type.FAILED_TO_SAVE_SPACE); } } - - LOG.debug("Space {} ({}) saved", space.getPrettyName(), space.getId()); + return getSpaceById(String.valueOf(entity.getId())); } - @Override @ExoTransactional public void updateSpaceAccessed(String remoteId, Space space) { SpaceMemberEntity member = spaceMemberDAO.getSpaceMemberShip(remoteId, @@ -632,7 +523,6 @@ public void updateSpaceAccessed(String remoteId, Space space) { spaceMemberDAO.update(member); } - @Override public List getPendingSpaceRequestsToManage(String username, int offset, int limit) { List spaceRequestsToManage = spaceMemberDAO.getPendingSpaceRequestsToManage(username, offset, limit); if (spaceRequestsToManage == null || spaceRequestsToManage.isEmpty()) { @@ -648,7 +538,6 @@ public List getPendingSpaceRequestsToManage(String username, int offset, return spaces; } - @Override public int countPendingSpaceRequestsToManage(String username) { return spaceMemberDAO.countPendingSpaceRequestsToManage(username); } @@ -688,6 +577,25 @@ public void deleteExternalUserInvitations(String email) { spaceExternalInvitationDAO.deleteExternalUserInvitations(email); } + public int countExternalMembers(Long spaceId) { + return spaceMemberDAO.countExternalMembers(spaceId); + } + + public List getCommonSpaces(String userId, String otherUserId, int offset, int limit) { + List commonSpaces = spaceDAO.getCommonSpaces(userId, otherUserId, offset, limit); + return commonSpaces.stream() + .map(this::fillSpaceFromEntity) + .toList(); + } + + public int countCommonSpaces(String userId, String otherUserId) { + return spaceDAO.countCommonSpaces(userId, otherUserId); + } + + public Map countSpacesByTemplate() { + return spaceDAO.countSpacesByTemplate(); + } + private String[] getSpaceMembers(long spaceId, SpaceMembershipStatus status) { int countSpaceMembers = spaceMemberDAO.countSpaceMembers(spaceId, status); if (countSpaceMembers == 0) { @@ -854,7 +762,6 @@ private List buildList(List ids) { * @param space the space pojo for services */ private Space fillSpaceSimpleFromEntity(SpaceEntity entity, Space space) { - space.setApp(StringUtils.join(entity.getApp(), ",")); space.setId(String.valueOf(entity.getId())); space.setDisplayName(entity.getDisplayName()); space.setPrettyName(entity.getPrettyName()); @@ -862,25 +769,10 @@ private Space fillSpaceSimpleFromEntity(SpaceEntity entity, Space space) { space.setRegistration(entity.getRegistration().name().toLowerCase()); } space.setDescription(entity.getDescription()); - space.setTemplate(entity.getTemplate()); + space.setTemplateId(entity.getTemplateId() == null ? 0 : entity.getTemplateId().longValue()); if (entity.getVisibility() != null) { space.setVisibility(entity.getVisibility().name().toLowerCase()); } - if (entity.getPriority() != null) { - switch (entity.getPriority()) { - case HIGH: - space.setPriority(Space.HIGH_PRIORITY); - break; - case INTERMEDIATE: - space.setPriority(Space.INTERMEDIATE_PRIORITY); - break; - case LOW: - space.setPriority(Space.LOW_PRIORITY); - break; - default: - space.setPriority(null); - } - } space.setGroupId(entity.getGroupId()); space.setPublicSiteId(entity.getPublicSiteId()); space.setPublicSiteVisibility(entity.getPublicSiteVisibility() == null ? null : @@ -888,6 +780,8 @@ private Space fillSpaceSimpleFromEntity(SpaceEntity entity, Space space) { space.setUrl(entity.getUrl()); space.setCreatedTime(entity.getCreatedDate().getTime()); space.setLastUpdatedTime(entity.getUpdatedDate().getTime()); + space.setDeletePermissions(entity.getDeletePermissions()); + space.setLayoutPermissions(entity.getLayoutPermissions()); Date lastUpdated = ObjectUtils.getFirstNonNull(entity::getAvatarLastUpdated, () -> new Date(System.currentTimeMillis())); space.setAvatarLastUpdated(lastUpdated.getTime()); @@ -896,10 +790,10 @@ private Space fillSpaceSimpleFromEntity(SpaceEntity entity, Space space) { true, lastUpdated.getTime())); lastUpdated = entity.getBannerLastUpdated(); - if (lastUpdated == null && !StringUtils.isBlank(space.getTemplate())) { - space.setBannerUrl(LinkProvider.buildBannerURL("spaceTemplates", space.getTemplate(), null)); + if (lastUpdated == null) { + space.setBannerUrl(DEFAULT_BANNER_URL); } else { - Long bannerLastUpdated = lastUpdated == null ? null : lastUpdated.getTime(); + Long bannerLastUpdated = lastUpdated.getTime(); space.setBannerLastUpdated(bannerLastUpdated); space.setBannerUrl(LinkProvider.buildBannerURL(SpaceIdentityProvider.NAME, space.getId(), true, bannerLastUpdated)); } @@ -929,28 +823,21 @@ public void setIdentityStorage(IdentityStorage identityStorage) { this.identityStorage = identityStorage; } - @Override - public int countExternalMembers(Long spaceId) { - return spaceMemberDAO.countExternalMembers(spaceId); - } - - @Override - public List getCommonSpaces(String userId, String otherUserId, int offset, int limit) { - List commonSpaces = spaceDAO.getCommonSpaces(userId, otherUserId, offset, limit); - return commonSpaces.stream() - .map(this::fillSpaceFromEntity) - .toList(); - } - - @Override - public int countCommonSpaces(String userId, String otherUserId) { - return spaceDAO.countCommonSpaces(userId, otherUserId); - } - private Instant computeCreatedDate(Token token) { return token == null ? null : Instant.ofEpochMilli(token.getExpirationTimeMillis()) .minusSeconds(remindPasswordTokenService.getValidityTime()); } + private String buildPrettyName(String displayName) { + String prettyName = Utils.cleanString(displayName); + int index = 0; + while (spaceDAO.getSpaceByPrettyName(prettyName) != null) { + // Use sapme algorithm to compte new pretty name as for creation + // used in SpaceUtils.buildGroupId + prettyName = Utils.cleanString(displayName + " " + ++index); + } + return prettyName; + } + } diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/ActivityDAO.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/ActivityDAO.java index 88861e72511..380fd510866 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/ActivityDAO.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/ActivityDAO.java @@ -21,8 +21,8 @@ import org.exoplatform.commons.api.persistence.GenericDAO; import org.exoplatform.social.core.activity.ActivityFilter; -import org.exoplatform.social.core.jpa.storage.entity.ActivityEntity; import org.exoplatform.social.core.identity.model.Identity; +import org.exoplatform.social.core.jpa.storage.entity.ActivityEntity; import org.exoplatform.social.core.storage.ActivityStorageException; /** diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/ActivityShareActionDAO.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/ActivityShareActionDAO.java index 3f80bd3731c..877a1e31877 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/ActivityShareActionDAO.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/ActivityShareActionDAO.java @@ -2,11 +2,11 @@ import java.util.List; -import jakarta.persistence.TypedQuery; - import org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl; import org.exoplatform.social.core.jpa.storage.entity.ActivityShareActionEntity; +import jakarta.persistence.TypedQuery; + public class ActivityShareActionDAO extends GenericDAOJPAImpl { public List getShareActionsByActivityId(Long activityId) { diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/ConnectionDAO.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/ConnectionDAO.java index b5fd3d58abb..f9b52a25847 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/ConnectionDAO.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/ConnectionDAO.java @@ -20,8 +20,8 @@ import java.util.Set; import org.exoplatform.commons.api.persistence.GenericDAO; -import org.exoplatform.social.core.jpa.storage.entity.ConnectionEntity; import org.exoplatform.social.core.identity.model.Identity; +import org.exoplatform.social.core.jpa.storage.entity.ConnectionEntity; import org.exoplatform.social.core.profile.ProfileFilter; import org.exoplatform.social.core.relationship.model.Relationship; import org.exoplatform.social.core.relationship.model.Relationship.Type; diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/GroupSpaceBindingReportUserDAO.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/GroupSpaceBindingReportUserDAO.java index 9900843af30..d8f89b75974 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/GroupSpaceBindingReportUserDAO.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/GroupSpaceBindingReportUserDAO.java @@ -3,7 +3,6 @@ import java.util.List; import org.exoplatform.commons.api.persistence.GenericDAO; -import org.exoplatform.social.core.jpa.storage.entity.GroupSpaceBindingReportActionEntity; import org.exoplatform.social.core.jpa.storage.entity.GroupSpaceBindingReportUserEntity; public interface GroupSpaceBindingReportUserDAO extends GenericDAO { diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/IdentityDAO.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/IdentityDAO.java index d3911fd09c0..5da35d61ee1 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/IdentityDAO.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/IdentityDAO.java @@ -19,17 +19,17 @@ package org.exoplatform.social.core.jpa.storage.dao; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Objects; + import org.exoplatform.commons.api.persistence.GenericDAO; import org.exoplatform.commons.utils.ListAccess; import org.exoplatform.social.core.jpa.search.ExtendProfileFilter; import org.exoplatform.social.core.jpa.storage.entity.ConnectionEntity; import org.exoplatform.social.core.jpa.storage.entity.IdentityEntity; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Objects; - /** * @author Tuyen Nguyen The. */ diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/SpaceDAO.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/SpaceDAO.java index a5edb974b17..47b1dc617c5 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/SpaceDAO.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/SpaceDAO.java @@ -17,6 +17,7 @@ package org.exoplatform.social.core.jpa.storage.dao; import java.util.List; +import java.util.Map; import org.exoplatform.commons.api.persistence.GenericDAO; import org.exoplatform.social.core.jpa.storage.entity.SpaceEntity; @@ -27,10 +28,6 @@ public interface SpaceDAO extends GenericDAO { SpaceEntity getSpaceByGroupId(String groupId); - SpaceEntity getSpaceByURL(String url); - - SpaceEntity getSpaceByDisplayName(String spaceDisplayName); - SpaceEntity getSpaceByPrettyName(String spacePrettyName); @@ -57,4 +54,12 @@ default List getCommonSpaces(String userId,String otherUserId, int default int countCommonSpaces(String userId,String otherUserId) { throw new UnsupportedOperationException(); } + + /** + * @return the count of spaces by Space Template identifier + */ + default Map countSpacesByTemplate() { + throw new UnsupportedOperationException(); + } + } diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/SpaceExternalInvitationDAO.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/SpaceExternalInvitationDAO.java index d06829638e2..cc0d8a05f6a 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/SpaceExternalInvitationDAO.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/SpaceExternalInvitationDAO.java @@ -1,10 +1,10 @@ package org.exoplatform.social.core.jpa.storage.dao; +import java.util.List; + import org.exoplatform.commons.api.persistence.GenericDAO; import org.exoplatform.social.core.jpa.storage.entity.SpaceExternalInvitationEntity; -import java.util.List; - public interface SpaceExternalInvitationDAO extends GenericDAO { /** diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/ActivityDAOImpl.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/ActivityDAOImpl.java index b170ab3ea1f..3b814cc7ca5 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/ActivityDAOImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/ActivityDAOImpl.java @@ -20,21 +20,17 @@ import java.util.Arrays; import java.util.Collections; import java.util.Date; +import java.util.HashMap; import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; -import java.util.Set; import java.util.Map; -import java.util.HashMap; +import java.util.Set; import java.util.stream.Collectors; -import jakarta.persistence.NoResultException; -import jakarta.persistence.Query; -import jakarta.persistence.Tuple; -import jakarta.persistence.TypedQuery; - import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; + import org.exoplatform.commons.api.persistence.ExoTransactional; import org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl; import org.exoplatform.social.core.activity.ActivityFilter; @@ -47,6 +43,11 @@ import org.exoplatform.social.core.relationship.model.Relationship.Type; import org.exoplatform.social.core.storage.ActivityStorageException; +import jakarta.persistence.NoResultException; +import jakarta.persistence.Query; +import jakarta.persistence.Tuple; +import jakarta.persistence.TypedQuery; + /** * Created by The eXo Platform SAS * Author : eXoPlatform diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/GroupSpaceBindingDAOImpl.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/GroupSpaceBindingDAOImpl.java index 249c29290df..29958263353 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/GroupSpaceBindingDAOImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/GroupSpaceBindingDAOImpl.java @@ -17,12 +17,13 @@ package org.exoplatform.social.core.jpa.storage.dao.jpa; +import java.util.List; + import org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl; import org.exoplatform.social.core.jpa.storage.dao.GroupSpaceBindingDAO; import org.exoplatform.social.core.jpa.storage.entity.GroupSpaceBindingEntity; import jakarta.persistence.TypedQuery; -import java.util.List; public class GroupSpaceBindingDAOImpl extends GenericDAOJPAImpl implements GroupSpaceBindingDAO { diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/GroupSpaceBindingQueueDAOImpl.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/GroupSpaceBindingQueueDAOImpl.java index f1fe5d36e4d..fbb7e71b137 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/GroupSpaceBindingQueueDAOImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/GroupSpaceBindingQueueDAOImpl.java @@ -19,14 +19,14 @@ import java.util.List; -import jakarta.persistence.NoResultException; -import jakarta.persistence.TypedQuery; - import org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl; import org.exoplatform.social.core.jpa.storage.dao.GroupSpaceBindingQueueDAO; import org.exoplatform.social.core.jpa.storage.entity.GroupSpaceBindingEntity; import org.exoplatform.social.core.jpa.storage.entity.GroupSpaceBindingQueueEntity; +import jakarta.persistence.NoResultException; +import jakarta.persistence.TypedQuery; + public class GroupSpaceBindingQueueDAOImpl extends GenericDAOJPAImpl implements GroupSpaceBindingQueueDAO { diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/GroupSpaceBindingReportActionDAOImpl.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/GroupSpaceBindingReportActionDAOImpl.java index dc79b49b241..9b26351fbf8 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/GroupSpaceBindingReportActionDAOImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/GroupSpaceBindingReportActionDAOImpl.java @@ -19,14 +19,14 @@ import java.util.List; -import jakarta.persistence.NoResultException; -import jakarta.persistence.TypedQuery; - import org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl; import org.exoplatform.social.core.binding.model.GroupSpaceBindingOperationReport; import org.exoplatform.social.core.jpa.storage.dao.GroupSpaceBindingReportActionDAO; import org.exoplatform.social.core.jpa.storage.entity.GroupSpaceBindingReportActionEntity; +import jakarta.persistence.NoResultException; +import jakarta.persistence.TypedQuery; + public class GroupSpaceBindingReportActionDAOImpl extends GenericDAOJPAImpl implements GroupSpaceBindingReportActionDAO { diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/GroupSpaceBindingReportUserDAOImpl.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/GroupSpaceBindingReportUserDAOImpl.java index 99363d93cd8..bb095f99463 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/GroupSpaceBindingReportUserDAOImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/GroupSpaceBindingReportUserDAOImpl.java @@ -2,14 +2,12 @@ import java.util.List; -import jakarta.persistence.TypedQuery; - import org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl; -import org.exoplatform.social.core.binding.model.GroupSpaceBindingReportUser; import org.exoplatform.social.core.jpa.storage.dao.GroupSpaceBindingReportUserDAO; -import org.exoplatform.social.core.jpa.storage.entity.GroupSpaceBindingReportActionEntity; import org.exoplatform.social.core.jpa.storage.entity.GroupSpaceBindingReportUserEntity; +import jakarta.persistence.TypedQuery; + public class GroupSpaceBindingReportUserDAOImpl extends GenericDAOJPAImpl implements GroupSpaceBindingReportUserDAO { @Override diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/IdentityDAOImpl.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/IdentityDAOImpl.java index 6b43efda48b..be4dc06246b 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/IdentityDAOImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/IdentityDAOImpl.java @@ -20,14 +20,14 @@ package org.exoplatform.social.core.jpa.storage.dao.jpa; import java.lang.reflect.Array; -import java.util.*; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; import java.util.Map.Entry; import java.util.function.Function; import java.util.stream.Collectors; -import jakarta.persistence.EntityExistsException; -import jakarta.persistence.NoResultException; -import jakarta.persistence.Query; -import jakarta.persistence.TypedQuery; import org.apache.commons.lang3.StringUtils; @@ -45,6 +45,11 @@ import org.exoplatform.social.core.jpa.storage.entity.IdentityEntity; import org.exoplatform.social.core.relationship.model.Relationship.Type; +import jakarta.persistence.EntityExistsException; +import jakarta.persistence.NoResultException; +import jakarta.persistence.Query; +import jakarta.persistence.TypedQuery; + /** * @author Tuyen Nguyen The. */ diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/MetadataDAO.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/MetadataDAO.java index 22452294a57..ccd19638ece 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/MetadataDAO.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/MetadataDAO.java @@ -18,19 +18,22 @@ */ package org.exoplatform.social.core.jpa.storage.dao.jpa; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Set; import java.util.stream.Collectors; -import jakarta.persistence.NoResultException; -import jakarta.persistence.Query; -import jakarta.persistence.TypedQuery; - import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl; import org.exoplatform.social.core.jpa.storage.entity.MetadataEntity; +import jakarta.persistence.NoResultException; +import jakarta.persistence.Query; +import jakarta.persistence.TypedQuery; + public class MetadataDAO extends GenericDAOJPAImpl { private static final String AUDIENCE_IDS = "audienceIds"; diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/MetadataItemDAO.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/MetadataItemDAO.java index cd39bc01ae4..5792d0a0e23 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/MetadataItemDAO.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/MetadataItemDAO.java @@ -15,13 +15,19 @@ */ package org.exoplatform.social.core.jpa.storage.dao.jpa; -import java.util.*; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.stream.Collectors; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.MapUtils; - import org.apache.commons.lang3.StringUtils; + import org.exoplatform.commons.api.persistence.ExoTransactional; import org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl; import org.exoplatform.social.core.jpa.storage.entity.MetadataItemEntity; diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/ProfileLabelDAO.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/ProfileLabelDAO.java index 1b8278a5265..b5cea9d7056 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/ProfileLabelDAO.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/ProfileLabelDAO.java @@ -22,12 +22,12 @@ import java.util.List; -import jakarta.persistence.NoResultException; -import jakarta.persistence.TypedQuery; - import org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl; import org.exoplatform.social.core.jpa.storage.entity.ProfileLabelEntity; +import jakarta.persistence.NoResultException; +import jakarta.persistence.TypedQuery; + public class ProfileLabelDAO extends GenericDAOJPAImpl { public ProfileLabelEntity findLabelByObjectTypeAndObjectIdAndLang(String objectType, String objectId, String language) { TypedQuery query = getEntityManager() diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/ProfilePropertySettingDAO.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/ProfilePropertySettingDAO.java index 5dfe3849d39..8d683ebb062 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/ProfilePropertySettingDAO.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/ProfilePropertySettingDAO.java @@ -22,12 +22,12 @@ import java.util.List; -import jakarta.persistence.NoResultException; -import jakarta.persistence.TypedQuery; - import org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl; import org.exoplatform.social.core.jpa.storage.entity.ProfilePropertySettingEntity; +import jakarta.persistence.NoResultException; +import jakarta.persistence.TypedQuery; + public class ProfilePropertySettingDAO extends GenericDAOJPAImpl { public ProfilePropertySettingEntity findProfileSettingByName(String name) { TypedQuery query = diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/SpaceDAOImpl.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/SpaceDAOImpl.java index a7b483bc35a..30e3a0c318c 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/SpaceDAOImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/SpaceDAOImpl.java @@ -19,14 +19,19 @@ import java.util.Collections; import java.util.List; +import java.util.Map; import java.util.stream.Collectors; -import jakarta.persistence.*; +import org.apache.commons.collections4.CollectionUtils; import org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl; import org.exoplatform.social.core.jpa.storage.dao.SpaceDAO; import org.exoplatform.social.core.jpa.storage.entity.SpaceEntity; +import jakarta.persistence.NoResultException; +import jakarta.persistence.Tuple; +import jakarta.persistence.TypedQuery; + public class SpaceDAOImpl extends GenericDAOJPAImpl implements SpaceDAO { @Override @@ -39,7 +44,7 @@ public List getLastSpaces(int limit) { } else { return resultList.stream() .map(tuple -> tuple.get(0, Long.class)) - .collect(Collectors.toList()); + .toList(); } } @@ -48,29 +53,7 @@ public SpaceEntity getSpaceByGroupId(String groupId) { TypedQuery query = getEntityManager().createNamedQuery("SpaceEntity.getSpaceByGroupId", SpaceEntity.class); query.setParameter("groupId", groupId); try { - return query.getSingleResult(); - } catch (NoResultException ex) { - return null; - } - } - - @Override - public SpaceEntity getSpaceByURL(String url) { - TypedQuery query = getEntityManager().createNamedQuery("SpaceEntity.getSpaceByURL", SpaceEntity.class); - query.setParameter("url", url); - try { - return query.getSingleResult(); - } catch (NoResultException ex) { - return null; - } - } - - @Override - public SpaceEntity getSpaceByDisplayName(String spaceDisplayName) { - TypedQuery query = getEntityManager().createNamedQuery("SpaceEntity.getSpaceByDisplayName", SpaceEntity.class); - query.setParameter("displayName", spaceDisplayName); - try { - return query.getSingleResult(); + return query.getSingleResult(); } catch (NoResultException ex) { return null; } @@ -82,7 +65,7 @@ public SpaceEntity getSpaceByPrettyName(String spacePrettyName) { query.setParameter("prettyName", spacePrettyName); query.setMaxResults(1); try { - return query.getSingleResult(); + return query.getSingleResult(); } catch (NoResultException ex) { return null; } @@ -103,7 +86,7 @@ public List getCommonSpaces(String userId, String otherUserId, int throw new IllegalArgumentException("limit must be > 0"); } TypedQuery query = getEntityManager().createNamedQuery("SpaceEntity.getCommonSpacesBetweenTwoUsers", - SpaceEntity.class); + SpaceEntity.class); query.setParameter("userId", userId); query.setParameter("otherUserId", otherUserId); query.setFirstResult(offset); @@ -122,10 +105,24 @@ public int countCommonSpaces(String userId, String otherUserId) { } TypedQuery query = getEntityManager().createNamedQuery("SpaceEntity.countCommonSpacesBetweenTwoUsers", - Long.class); + Long.class); query.setParameter("userId", userId); query.setParameter("otherUserId", otherUserId); return query.getSingleResult().intValue(); } + + @Override + public Map countSpacesByTemplate() { + TypedQuery query = getEntityManager().createNamedQuery("SpaceEntity.countSpacesByTemplate", + Tuple.class); + List resultList = query.getResultList(); + if (CollectionUtils.isEmpty(resultList)) { + return Collections.emptyMap(); + } else { + return resultList.stream() + .collect(Collectors.toMap(t -> t.get(0, Long.class), t -> t.get(1, Long.class))); + } + } + } diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/SpaceExternalInvitationDAOImpl.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/SpaceExternalInvitationDAOImpl.java index 790099cb66e..337862c6990 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/SpaceExternalInvitationDAOImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/SpaceExternalInvitationDAOImpl.java @@ -1,12 +1,13 @@ package org.exoplatform.social.core.jpa.storage.dao.jpa; +import java.util.List; + import org.exoplatform.commons.api.persistence.ExoTransactional; import org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl; import org.exoplatform.social.core.jpa.storage.dao.SpaceExternalInvitationDAO; import org.exoplatform.social.core.jpa.storage.entity.SpaceExternalInvitationEntity; import jakarta.persistence.TypedQuery; -import java.util.List; public class SpaceExternalInvitationDAOImpl extends GenericDAOJPAImpl implements SpaceExternalInvitationDAO { @Override diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/UserSpaceBindingDAOImpl.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/UserSpaceBindingDAOImpl.java index c1cdc102061..8d1524f9f54 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/UserSpaceBindingDAOImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/UserSpaceBindingDAOImpl.java @@ -19,13 +19,13 @@ import java.util.List; -import jakarta.persistence.Query; -import jakarta.persistence.TypedQuery; - import org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl; import org.exoplatform.social.core.jpa.storage.dao.UserSpaceBindingDAO; import org.exoplatform.social.core.jpa.storage.entity.UserSpaceBindingEntity; +import jakarta.persistence.Query; +import jakarta.persistence.TypedQuery; + public class UserSpaceBindingDAOImpl extends GenericDAOJPAImpl implements UserSpaceBindingDAO { @Override diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/query/ProfileQueryBuilder.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/query/ProfileQueryBuilder.java index 531157b01f7..d897cc61f90 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/query/ProfileQueryBuilder.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/query/ProfileQueryBuilder.java @@ -23,20 +23,25 @@ import java.util.Arrays; import java.util.List; -import jakarta.persistence.EntityManager; -import jakarta.persistence.TypedQuery; -import jakarta.persistence.criteria.*; +import org.apache.commons.collections4.CollectionUtils; +import org.exoplatform.social.core.identity.model.Identity; +import org.exoplatform.social.core.identity.model.Profile; import org.exoplatform.social.core.jpa.search.ExtendProfileFilter; import org.exoplatform.social.core.jpa.storage.entity.IdentityEntity; import org.exoplatform.social.core.jpa.storage.entity.IdentityEntity_; import org.exoplatform.social.core.jpa.storage.entity.ProfileExperienceEntity; import org.exoplatform.social.core.jpa.storage.entity.ProfileExperienceEntity_; -import org.apache.commons.collections4.CollectionUtils; - -import org.exoplatform.social.core.identity.model.Identity; -import org.exoplatform.social.core.identity.model.Profile; +import jakarta.persistence.EntityManager; +import jakarta.persistence.TypedQuery; +import jakarta.persistence.criteria.CriteriaBuilder; +import jakarta.persistence.criteria.CriteriaQuery; +import jakarta.persistence.criteria.JoinType; +import jakarta.persistence.criteria.MapJoin; +import jakarta.persistence.criteria.Predicate; +import jakarta.persistence.criteria.Root; +import jakarta.persistence.criteria.SetJoin; /** * @author Tuyen Nguyen The. diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/query/RelationshipQueryBuilder.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/query/RelationshipQueryBuilder.java index 86ae711faa6..5e30de78483 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/query/RelationshipQueryBuilder.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/query/RelationshipQueryBuilder.java @@ -22,6 +22,15 @@ import java.util.Date; import java.util.List; +import org.exoplatform.commons.persistence.impl.EntityManagerHolder; +import org.exoplatform.social.core.identity.model.Identity; +import org.exoplatform.social.core.jpa.storage.entity.ConnectionEntity; +import org.exoplatform.social.core.jpa.storage.entity.ConnectionEntity_; +import org.exoplatform.social.core.jpa.storage.entity.IdentityEntity_; +import org.exoplatform.social.core.profile.ProfileFilter; +import org.exoplatform.social.core.relationship.model.Relationship; +import org.exoplatform.social.core.relationship.model.Relationship.Type; + import jakarta.persistence.EntityManager; import jakarta.persistence.TypedQuery; import jakarta.persistence.criteria.CriteriaBuilder; @@ -31,15 +40,6 @@ import jakarta.persistence.criteria.Predicate; import jakarta.persistence.criteria.Root; -import org.exoplatform.commons.persistence.impl.EntityManagerHolder; -import org.exoplatform.social.core.jpa.storage.entity.ConnectionEntity; -import org.exoplatform.social.core.jpa.storage.entity.ConnectionEntity_; -import org.exoplatform.social.core.jpa.storage.entity.IdentityEntity_; -import org.exoplatform.social.core.identity.model.Identity; -import org.exoplatform.social.core.profile.ProfileFilter; -import org.exoplatform.social.core.relationship.model.Relationship; -import org.exoplatform.social.core.relationship.model.Relationship.Type; - /** * Created by The eXo Platform SAS * Author : eXoPlatform diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/query/SpaceQueryBuilder.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/query/SpaceQueryBuilder.java index 24e53f75eb1..845da618049 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/query/SpaceQueryBuilder.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/dao/jpa/query/SpaceQueryBuilder.java @@ -34,6 +34,7 @@ import org.exoplatform.social.core.search.Sorting.SortBy; import org.exoplatform.social.core.space.model.Space; +import io.meeds.social.core.space.constant.Visibility; import io.meeds.social.space.constant.SpaceMembershipStatus; import jakarta.persistence.EntityManager; @@ -130,7 +131,12 @@ private Predicate buildPredicateFilter(Root root, CriteriaQuery .toList())); } - //status + // Space Template + if (spaceFilter.getTemplateId() > 0) { + predicates.add(root.get(SpaceEntity_.templateId).in(spaceFilter.getTemplateId())); + } + + // status if (CollectionUtils.isNotEmpty(spaceFilter.getStatusList())) { Path join = getMembersJoin(root, JoinType.INNER); @@ -145,7 +151,7 @@ private Predicate buildPredicateFilter(Root root, CriteriaQuery spaceFilter.getRemoteId())); boolean includePrivate = spaceFilter.isIncludePrivate(); if (includePrivate) { - predicates.add(cb.or(cb.equal(root.get(SpaceEntity_.visibility), SpaceEntity.VISIBILITY.PRIVATE), tmp)); + predicates.add(cb.or(cb.equal(root.get(SpaceEntity_.visibility), Visibility.PRIVATE), tmp)); } else { predicates.add(tmp); } @@ -175,7 +181,7 @@ private Predicate buildPredicateFilter(Root root, CriteriaQuery //not hidden boolean notHidden = spaceFilter.isNotHidden(); if (notHidden) { - predicates.add(cb.notEqual(root.get(SpaceEntity_.visibility), SpaceEntity.VISIBILITY.HIDDEN)); + predicates.add(cb.notEqual(root.get(SpaceEntity_.visibility), Visibility.HIDDEN)); } // diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/ActivityEntity.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/ActivityEntity.java index b11acc682c9..76482c3fa55 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/ActivityEntity.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/ActivityEntity.java @@ -18,13 +18,39 @@ package org.exoplatform.social.core.jpa.storage.entity; import java.io.Serializable; -import java.util.*; - -import jakarta.persistence.*; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import org.hibernate.annotations.DynamicUpdate; import org.json.JSONObject; +import jakarta.persistence.CascadeType; +import jakarta.persistence.CollectionTable; +import jakarta.persistence.Column; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.NamedQueries; +import jakarta.persistence.NamedQuery; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderBy; +import jakarta.persistence.SequenceGenerator; +import jakarta.persistence.Table; + /** * Created by bdechateauvieux on 3/24/15. */ diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/ActivityShareActionEntity.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/ActivityShareActionEntity.java index ee15aaff536..7ed4ef9ac4c 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/ActivityShareActionEntity.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/ActivityShareActionEntity.java @@ -1,9 +1,22 @@ package org.exoplatform.social.core.jpa.storage.entity; import java.io.Serializable; -import java.util.*; - -import jakarta.persistence.*; +import java.util.Date; +import java.util.HashSet; +import java.util.Set; + +import jakarta.persistence.CollectionTable; +import jakarta.persistence.Column; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.NamedQueries; +import jakarta.persistence.NamedQuery; +import jakarta.persistence.SequenceGenerator; +import jakarta.persistence.Table; @Entity(name = "SocActivityShareAction") @Table(name = "SOC_ACTIVITY_SHARE_ACTIONS") diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/AppEntity.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/AppEntity.java deleted file mode 100644 index e8782ff8f5b..00000000000 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/AppEntity.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (C) 2003-2016 eXo Platform SAS. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -package org.exoplatform.social.core.jpa.storage.entity; - -import java.io.Serializable; -import java.util.Collections; -import java.util.HashSet; -import java.util.Set; - -import jakarta.persistence.Column; -import jakarta.persistence.Embeddable; - -import org.exoplatform.services.log.ExoLogger; -import org.exoplatform.services.log.Log; - -@Embeddable -public class AppEntity implements Serializable { - - private static final long serialVersionUID = -8893364434133832686L; - - private static final Log LOG = ExoLogger.getLogger(AppEntity.class); - - @Column(name = "APP_ID", nullable = false) - private String appId; - - @Column(name = "APP_NAME", nullable = false) - private String appName; - - @Column(name = "REMOVABLE", nullable = false) - private boolean isRemovable; - - @Column(name = "STATUS", nullable = false) - private Status status; - - public String getAppId() { - return appId; - } - - public void setAppId(String appId) { - this.appId = appId; - } - - public String getAppName() { - return appName; - } - - public void setAppName(String appName) { - this.appName = appName; - } - - public boolean isRemovable() { - return isRemovable; - } - - public void setRemovable(boolean isRemovable) { - this.isRemovable = isRemovable; - } - - public Status getStatus() { - return status; - } - - public void setStatus(Status status) { - this.status = status; - } - - public static Set parse(String apps) { - if (apps == null) { - return Collections.emptySet(); - } - - Set entities = new HashSet<>(); - for (String app : apps.split(",")) { - String[] appPart = app.split(":"); - - // an application status is composed with the form of - // [appId:appName:isRemovableString:status] - if (appPart.length == 4) { - AppEntity entity = new AppEntity(); - entity.setAppId(appPart[0]); - entity.setAppName(appPart[1]); - entity.setRemovable(Boolean.parseBoolean(appPart[2])); - entity.setStatus(Status.valueOf(appPart[3].toUpperCase())); - - entities.add(entity); - } else { - LOG.warn("Bad format for space application {}", app); - } - } - return entities; - } - - @Override - public String toString() { - StringBuilder builder = new StringBuilder(getAppId()); - builder.append(":").append(getAppName()); - builder.append(":").append(isRemovable()); - builder.append(":").append(getStatus().name().toLowerCase()); - return builder.toString(); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((appId == null) ? 0 : appId.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - AppEntity other = (AppEntity) obj; - if (appId == null) { - if (other.appId != null) - return false; - } else if (!appId.equals(other.appId)) - return false; - return true; - } - - public static enum Status { - ACTIVE, DEACTIVE, INSTALLED - } -} diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/ConnectionEntity.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/ConnectionEntity.java index 4d3e5a00011..54b35139530 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/ConnectionEntity.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/ConnectionEntity.java @@ -19,10 +19,25 @@ import java.util.Date; -import jakarta.persistence.*; - import org.exoplatform.social.core.relationship.model.Relationship.Type; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Enumerated; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.NamedQueries; +import jakarta.persistence.NamedQuery; +import jakarta.persistence.SequenceGenerator; +import jakarta.persistence.Table; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; +import jakarta.persistence.UniqueConstraint; + @Entity(name = "SocConnection") @Table(name = "SOC_CONNECTIONS", uniqueConstraints=@UniqueConstraint(columnNames = {"SENDER_ID", "RECEIVER_ID"})) diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/GroupSpaceBindingEntity.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/GroupSpaceBindingEntity.java index b30eabbeab9..ae57ffd7c3e 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/GroupSpaceBindingEntity.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/GroupSpaceBindingEntity.java @@ -21,7 +21,19 @@ import java.util.ArrayList; import java.util.List; -import jakarta.persistence.*; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.NamedQueries; +import jakarta.persistence.NamedQuery; +import jakarta.persistence.OneToMany; +import jakarta.persistence.SequenceGenerator; +import jakarta.persistence.Table; @Entity(name = "SocGroupSpaceBinding") @Table(name = "SOC_GROUP_SPACE_BINDING") diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/GroupSpaceBindingQueueEntity.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/GroupSpaceBindingQueueEntity.java index 95b9bfcd33d..7a69e7ff671 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/GroupSpaceBindingQueueEntity.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/GroupSpaceBindingQueueEntity.java @@ -19,7 +19,17 @@ import java.io.Serializable; -import jakarta.persistence.*; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.NamedQueries; +import jakarta.persistence.NamedQuery; +import jakarta.persistence.SequenceGenerator; +import jakarta.persistence.Table; @Entity(name = "SocGroupSpaceBindingQueue") @Table(name = "SOC_GROUP_SPACE_BINDING_QUEUE") diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/GroupSpaceBindingReportActionEntity.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/GroupSpaceBindingReportActionEntity.java index 4b603e7087a..095348d00d4 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/GroupSpaceBindingReportActionEntity.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/GroupSpaceBindingReportActionEntity.java @@ -22,10 +22,24 @@ import java.util.Date; import java.util.List; -import jakarta.persistence.*; - import org.exoplatform.social.core.binding.model.GroupSpaceBindingReportUser; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.NamedQueries; +import jakarta.persistence.NamedQuery; +import jakarta.persistence.OneToMany; +import jakarta.persistence.SequenceGenerator; +import jakarta.persistence.Table; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; + @Entity(name = "SocGroupSpaceBindingReportAction") @Table(name = "SOC_GROUP_SPACE_BINDING_REPORT_ACTION") @NamedQueries({ diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/GroupSpaceBindingReportUserEntity.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/GroupSpaceBindingReportUserEntity.java index 6603c47166e..e92e95436ab 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/GroupSpaceBindingReportUserEntity.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/GroupSpaceBindingReportUserEntity.java @@ -20,7 +20,19 @@ import java.io.Serializable; import java.util.Date; -import jakarta.persistence.*; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.NamedQueries; +import jakarta.persistence.NamedQuery; +import jakarta.persistence.SequenceGenerator; +import jakarta.persistence.Table; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; @Entity(name = "SocGroupSpaceBindingReportUser") @Table(name = "SOC_GROUP_SPACE_BINDING_REPORT_USER") diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/IdentityEntity.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/IdentityEntity.java index 77224330e7b..559e1afa9d6 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/IdentityEntity.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/IdentityEntity.java @@ -19,9 +19,30 @@ package org.exoplatform.social.core.jpa.storage.entity; -import java.util.*; - -import jakarta.persistence.*; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import jakarta.persistence.CascadeType; +import jakarta.persistence.CollectionTable; +import jakarta.persistence.Column; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.NamedQueries; +import jakarta.persistence.NamedQuery; +import jakarta.persistence.OneToMany; +import jakarta.persistence.SequenceGenerator; +import jakarta.persistence.Table; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; /** * @author Tuyen Nguyen The. diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/MentionEntity.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/MentionEntity.java index e67d694ff99..c933bf6c283 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/MentionEntity.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/MentionEntity.java @@ -17,7 +17,18 @@ package org.exoplatform.social.core.jpa.storage.entity; -import jakarta.persistence.*; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.NamedQueries; +import jakarta.persistence.NamedQuery; +import jakarta.persistence.SequenceGenerator; +import jakarta.persistence.Table; /** * Created by bdechateauvieux on 7/7/15. diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/MetadataEntity.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/MetadataEntity.java index 3f68d2af7ee..90c66a4bb3f 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/MetadataEntity.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/MetadataEntity.java @@ -22,7 +22,20 @@ import java.util.Date; import java.util.Map; -import jakarta.persistence.*; +import jakarta.persistence.CollectionTable; +import jakarta.persistence.Column; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.MapKeyColumn; +import jakarta.persistence.NamedQueries; +import jakarta.persistence.NamedQuery; +import jakarta.persistence.SequenceGenerator; +import jakarta.persistence.Table; @Entity(name = "SocMetadataEntity") @Table(name = "SOC_METADATAS") diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/ProfileLabelEntity.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/ProfileLabelEntity.java index be2ef720e3c..6a42c076f95 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/ProfileLabelEntity.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/ProfileLabelEntity.java @@ -19,9 +19,17 @@ */ package org.exoplatform.social.core.jpa.storage.entity; -import jakarta.persistence.*; import java.io.Serializable; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.NamedQuery; +import jakarta.persistence.SequenceGenerator; +import jakarta.persistence.Table; + @Entity(name = "SocProfileLabelEntity") @Table(name = "SOC_LABELS ") diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/ProfilePropertySettingEntity.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/ProfilePropertySettingEntity.java index 5f19d00101c..746605cdfa6 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/ProfilePropertySettingEntity.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/ProfilePropertySettingEntity.java @@ -20,10 +20,20 @@ package org.exoplatform.social.core.jpa.storage.entity; -import jakarta.persistence.*; import java.io.Serializable; import java.util.Date; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.NamedQuery; +import jakarta.persistence.SequenceGenerator; +import jakarta.persistence.Table; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; + @Entity(name = "SocProfileSettingEntity") @Table(name = "SOC_PROFILE_PROPERTY_SETTING ") diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/SpaceEntity.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/SpaceEntity.java index 4f4b752db5b..b69c1bedef6 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/SpaceEntity.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/SpaceEntity.java @@ -14,118 +14,121 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ - package org.exoplatform.social.core.jpa.storage.entity; import java.io.Serializable; import java.util.Date; import java.util.HashSet; +import java.util.List; import java.util.Set; -import jakarta.persistence.*; +import org.exoplatform.commons.utils.StringListConverter; + +import io.meeds.social.core.space.constant.PublicSiteVisibility; +import io.meeds.social.core.space.constant.Registration; +import io.meeds.social.core.space.constant.Visibility; + +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Convert; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.NamedQuery; +import jakarta.persistence.OneToMany; +import jakarta.persistence.SequenceGenerator; +import jakarta.persistence.Table; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; import lombok.Getter; import lombok.Setter; @Entity(name = "SocSpaceEntity") @Table(name = "SOC_SPACES") -@NamedQueries({ - @NamedQuery(name = "SpaceEntity.getLastSpaces", query = "SELECT sp.id, sp.createdDate FROM SocSpaceEntity sp ORDER BY sp.createdDate DESC"), - @NamedQuery(name = "SpaceEntity.getSpaceByGroupId", query = "SELECT sp FROM SocSpaceEntity sp WHERE sp.groupId = :groupId"), - @NamedQuery(name = "SpaceEntity.getSpaceByPrettyName", query = "SELECT sp FROM SocSpaceEntity sp WHERE sp.prettyName = :prettyName"), - @NamedQuery(name = "SpaceEntity.getSpaceByDisplayName", query = "SELECT sp FROM SocSpaceEntity sp WHERE sp.displayName = :displayName"), - @NamedQuery(name = "SpaceEntity.getSpaceByURL", query = "SELECT sp FROM SocSpaceEntity sp WHERE sp.url = :url"), - @NamedQuery( - name = "SpaceEntity.getCommonSpacesBetweenTwoUsers", - query = - "SELECT spaces FROM SocSpaceEntity spaces " - + "WHERE spaces.id IN ( " - + "SELECT distinct (t1.space.id) FROM SocSpaceMember t1, SocSpaceMember t2 " - + " WHERE t1.userId = :userId " - + " AND t2.userId = :otherUserId " - + " AND t1.space.id = t2.space.id" - + " )" - ), - @NamedQuery( - name = "SpaceEntity.countCommonSpacesBetweenTwoUsers", - query = - "SELECT COUNT(*) FROM SocSpaceEntity spaces " - + "WHERE spaces.id IN ( " - + "SELECT distinct (t1.space.id) FROM SocSpaceMember t1, SocSpaceMember t2 " - + " WHERE t1.userId = :userId " - + " AND t2.userId = :otherUserId " - + " AND t1.space.id = t2.space.id" - + " )" - ), -}) +@NamedQuery(name = "SpaceEntity.getLastSpaces", + query = "SELECT sp.id, sp.createdDate FROM SocSpaceEntity sp ORDER BY sp.createdDate DESC") +@NamedQuery(name = "SpaceEntity.getSpaceByGroupId", query = "SELECT sp FROM SocSpaceEntity sp WHERE sp.groupId = :groupId") +@NamedQuery(name = "SpaceEntity.getSpaceByPrettyName", + query = "SELECT sp FROM SocSpaceEntity sp WHERE sp.prettyName = :prettyName") +@NamedQuery( + name = "SpaceEntity.getCommonSpacesBetweenTwoUsers", + query = "SELECT spaces FROM SocSpaceEntity spaces " + "WHERE spaces.id IN ( " + + "SELECT distinct (t1.space.id) FROM SocSpaceMember t1, SocSpaceMember t2 " + " WHERE t1.userId = :userId " + + " AND t2.userId = :otherUserId " + " AND t1.space.id = t2.space.id" + " )") +@NamedQuery( + name = "SpaceEntity.countCommonSpacesBetweenTwoUsers", + query = "SELECT COUNT(*) FROM SocSpaceEntity spaces " + "WHERE spaces.id IN ( " + + "SELECT distinct (t1.space.id) FROM SocSpaceMember t1, SocSpaceMember t2 " + " WHERE t1.userId = :userId " + + " AND t2.userId = :otherUserId " + " AND t1.space.id = t2.space.id" + " )") +@NamedQuery( + name = "SpaceEntity.countSpacesByTemplate", + query = """ + SELECT s.templateId, COUNT(s.id) FROM SocSpaceEntity s + WHERE s.templateId > 0 + GROUP BY s.templateId + """) public class SpaceEntity implements Serializable { - private static final long serialVersionUID = 3223615477747436986L; + private static final long serialVersionUID = 3223615477747436986L; @Id @SequenceGenerator(name = "SEQ_SOC_SPACES_ID", sequenceName = "SEQ_SOC_SPACES_ID", allocationSize = 1) @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ_SOC_SPACES_ID") @Column(name = "SPACE_ID") - private Long id; + private Long id; @OneToMany(fetch = FetchType.LAZY, mappedBy = "space", cascade = CascadeType.ALL, orphanRemoval = true) - private Set members = new HashSet<>(); + private Set members = new HashSet<>(); @OneToMany(fetch = FetchType.LAZY, mappedBy = "space", cascade = CascadeType.ALL, orphanRemoval = true) - private Set spaceBindingEntities = new HashSet<>(); - - @OneToMany(fetch = FetchType.LAZY, mappedBy = "space", cascade = CascadeType.ALL, orphanRemoval = true) - private Set spaceBindingReportEntities = new HashSet<>(); + private Set spaceBindingEntities = new HashSet<>(); - /** - * The list of applications with portlet Id, application name, and its state - * (installed, activated, deactivated). - */ - @ElementCollection - @CollectionTable(name = "SOC_APPS", joinColumns = @JoinColumn(name = "SPACE_ID") ) - private Set app = new HashSet<>(); + @OneToMany(fetch = FetchType.LAZY, mappedBy = "space", cascade = CascadeType.ALL, orphanRemoval = true) + private Set spaceBindingReportEntities = new HashSet<>(); @Column(name = "PRETTY_NAME") - private String prettyName; + private String prettyName; @Column(name = "DISPLAY_NAME") - private String displayName; + private String displayName; @Column(name = "REGISTRATION") - private REGISTRATION registration; + private Registration registration; @Column(name = "DESCRIPTION") - private String description; + private String description; @Temporal(TemporalType.TIMESTAMP) @Column(name = "AVATAR_LAST_UPDATED") - private Date avatarLastUpdated; + private Date avatarLastUpdated; @Temporal(TemporalType.TIMESTAMP) @Column(name = "BANNER_LAST_UPDATED") - private Date bannerLastUpdated; + private Date bannerLastUpdated; @Column(name = "VISIBILITY") - public VISIBILITY visibility; - - @Column(name = "PRIORITY") - public PRIORITY priority; + public Visibility visibility; @Column(name = "GROUP_ID") - public String groupId; + public String groupId; @Column(name = "URL") - public String url; + public String url; - @Column(name = "TEMPLATE") - private String template; + @Getter + @Setter + @Column(name = "TEMPLATE_ID") + private Long templateId; @Temporal(TemporalType.TIMESTAMP) @Column(name = "CREATED_DATE", nullable = false) - private Date createdDate = new Date(); + private Date createdDate = new Date(); @Temporal(TemporalType.TIMESTAMP) @Column(name = "UPDATED_DATE", nullable = false) - private Date updatedDate = new Date(); + private Date updatedDate = new Date(); @Getter @Setter @@ -137,6 +140,18 @@ public class SpaceEntity implements Serializable { @Column(name = "PUBLIC_SITE_VISIBILITY", nullable = false) private PublicSiteVisibility publicSiteVisibility = PublicSiteVisibility.MANAGER; + @Getter + @Setter + @Convert(converter = StringListConverter.class) + @Column(name = "LAYOUT_PERMISSIONS") + private List layoutPermissions; + + @Getter + @Setter + @Convert(converter = StringListConverter.class) + @Column(name = "DELETE_PERMISSIONS") + private List deletePermissions; + public Long getId() { return id; } @@ -145,14 +160,6 @@ public void setId(Long id) { this.id = id; } - public Set getApp() { - return app; - } - - public void setApp(Set app) { - this.app = app; - } - public String getPrettyName() { return prettyName; } @@ -169,11 +176,11 @@ public void setDisplayName(String displayName) { this.displayName = displayName; } - public REGISTRATION getRegistration() { + public Registration getRegistration() { return registration; } - public void setRegistration(REGISTRATION registration) { + public void setRegistration(Registration registration) { this.registration = registration; } @@ -201,22 +208,14 @@ public void setBannerLastUpdated(Date bannerLastUpdated) { this.bannerLastUpdated = bannerLastUpdated; } - public VISIBILITY getVisibility() { + public Visibility getVisibility() { return visibility; } - public void setVisibility(VISIBILITY visibility) { + public void setVisibility(Visibility visibility) { this.visibility = visibility; } - public PRIORITY getPriority() { - return priority; - } - - public void setPriority(PRIORITY priority) { - this.priority = priority; - } - public String getGroupId() { return groupId; } @@ -249,14 +248,6 @@ public void setUpdatedDate(Date updatedDate) { this.updatedDate = updatedDate; } - public String getTemplate() { - return template; - } - - public void setTemplate(String template) { - this.template = template; - } - public Set getMembers() { return members; } @@ -264,23 +255,23 @@ public Set getMembers() { public void setMembers(Set members) { this.members = members; } - + public Set getSpaceBindingEntities() { return spaceBindingEntities; } - + public void setSpaceBindingEntities(Set spaceBindingEntities) { this.spaceBindingEntities = spaceBindingEntities; } - + public Set getSpaceBindingReportEntities() { return spaceBindingReportEntities; } - + public void setSpaceBindingReportEntities(Set spaceBindingReportEntities) { this.spaceBindingReportEntities = spaceBindingReportEntities; } - + @Override public boolean equals(Object o) { if (this == o) { @@ -292,25 +283,10 @@ public boolean equals(Object o) { SpaceEntity that = (SpaceEntity) o; return id.equals(that.id); } - + @Override public int hashCode() { return id == null ? 0 : id.intValue(); } - - public enum VISIBILITY { - PUBLIC, PRIVATE, HIDDEN - } - public enum PRIORITY { - HIGH, INTERMEDIATE, LOW - } - - public enum REGISTRATION { - OPEN, VALIDATION, CLOSED - } - - public static enum PublicSiteVisibility { - MANAGER, MEMBER, INTERNAL, AUTHENTICATED, EVERYONE; - } } diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/StreamItemEntity.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/StreamItemEntity.java index 0ba803e05df..94d779e2f8b 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/StreamItemEntity.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/StreamItemEntity.java @@ -19,7 +19,17 @@ import java.util.Date; -import jakarta.persistence.*; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Enumerated; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.NamedQuery; +import jakarta.persistence.SequenceGenerator; +import jakarta.persistence.Table; /** * Created by bdechateauvieux on 3/26/15. diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/UserSpaceBindingEntity.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/UserSpaceBindingEntity.java index fdd68e74083..385913fd72b 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/UserSpaceBindingEntity.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/storage/entity/UserSpaceBindingEntity.java @@ -19,7 +19,17 @@ import java.io.Serializable; -import jakarta.persistence.*; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.NamedQueries; +import jakarta.persistence.NamedQuery; +import jakarta.persistence.SequenceGenerator; +import jakarta.persistence.Table; @Entity(name = "SocUserSpaceBinding") @Table(name = "SOC_USER_SPACE_BINDING") diff --git a/component/core/src/main/java/org/exoplatform/social/core/listeners/AbstractMetadataItemListener.java b/component/core/src/main/java/org/exoplatform/social/core/listeners/AbstractMetadataItemListener.java index bac71a5e059..5976aff6da1 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/listeners/AbstractMetadataItemListener.java +++ b/component/core/src/main/java/org/exoplatform/social/core/listeners/AbstractMetadataItemListener.java @@ -27,9 +27,9 @@ import org.exoplatform.social.core.activity.model.ExoSocialActivityImpl; import org.exoplatform.social.core.jpa.search.ActivityIndexingServiceConnector; import org.exoplatform.social.core.jpa.search.SpaceIndexingServiceConnector; +import org.exoplatform.social.core.jpa.storage.SpaceStorage; import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.core.storage.api.ActivityStorage; -import org.exoplatform.social.core.storage.api.SpaceStorage; import org.exoplatform.social.core.storage.cache.CachedActivityStorage; import org.exoplatform.social.core.storage.cache.CachedSpaceStorage; import org.exoplatform.social.metadata.MetadataService; diff --git a/component/core/src/main/java/org/exoplatform/social/core/listeners/ActivityMetadataListener.java b/component/core/src/main/java/org/exoplatform/social/core/listeners/ActivityMetadataListener.java index c7d9ec24aa7..56f05f3cef4 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/listeners/ActivityMetadataListener.java +++ b/component/core/src/main/java/org/exoplatform/social/core/listeners/ActivityMetadataListener.java @@ -16,6 +16,7 @@ package org.exoplatform.social.core.listeners; import org.apache.commons.lang3.StringUtils; + import org.exoplatform.social.core.activity.ActivityLifeCycleEvent; import org.exoplatform.social.core.activity.ActivityListenerPlugin; import org.exoplatform.social.core.activity.model.ExoSocialActivity; diff --git a/component/core/src/main/java/org/exoplatform/social/core/listeners/ActivityTagMetadataListener.java b/component/core/src/main/java/org/exoplatform/social/core/listeners/ActivityTagMetadataListener.java index 89f9930c0f8..bdac672c10d 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/listeners/ActivityTagMetadataListener.java +++ b/component/core/src/main/java/org/exoplatform/social/core/listeners/ActivityTagMetadataListener.java @@ -19,6 +19,7 @@ import org.apache.commons.collections.MapUtils; import org.apache.commons.lang3.StringUtils; + import org.exoplatform.social.core.activity.ActivityLifeCycleEvent; import org.exoplatform.social.core.activity.ActivityListenerPlugin; import org.exoplatform.social.core.activity.model.ExoSocialActivity; diff --git a/component/core/src/main/java/org/exoplatform/social/core/listeners/GroupSynchronizationSocialProfileListener.java b/component/core/src/main/java/org/exoplatform/social/core/listeners/GroupSynchronizationSocialProfileListener.java index 2583077f327..798a4aacc45 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/listeners/GroupSynchronizationSocialProfileListener.java +++ b/component/core/src/main/java/org/exoplatform/social/core/listeners/GroupSynchronizationSocialProfileListener.java @@ -20,7 +20,12 @@ package org.exoplatform.social.core.listeners; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; @@ -28,7 +33,13 @@ import org.exoplatform.services.listener.Asynchronous; import org.exoplatform.services.log.ExoLogger; import org.exoplatform.services.log.Log; -import org.exoplatform.services.organization.*; +import org.exoplatform.services.organization.Group; +import org.exoplatform.services.organization.GroupHandler; +import org.exoplatform.services.organization.Membership; +import org.exoplatform.services.organization.MembershipHandler; +import org.exoplatform.services.organization.MembershipType; +import org.exoplatform.services.organization.OrganizationService; +import org.exoplatform.services.organization.User; import org.exoplatform.social.common.Utils; import org.exoplatform.social.core.identity.model.Profile; import org.exoplatform.social.core.profile.ProfileLifeCycleEvent; diff --git a/component/core/src/main/java/org/exoplatform/social/core/listeners/ManagerPropertySettingUpdatedListener.java b/component/core/src/main/java/org/exoplatform/social/core/listeners/ManagerPropertySettingUpdatedListener.java index e9038dc4a50..f8ab64c4bb2 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/listeners/ManagerPropertySettingUpdatedListener.java +++ b/component/core/src/main/java/org/exoplatform/social/core/listeners/ManagerPropertySettingUpdatedListener.java @@ -15,11 +15,11 @@ */ package org.exoplatform.social.core.listeners; -import io.meeds.common.ContainerTransactional; +import java.util.List; + import org.exoplatform.portal.config.UserACL; import org.exoplatform.portal.mop.page.PageContext; import org.exoplatform.portal.mop.page.PageKey; - import org.exoplatform.portal.mop.page.PageState; import org.exoplatform.portal.mop.storage.PageStorage; import org.exoplatform.services.listener.Event; @@ -27,7 +27,7 @@ import org.exoplatform.social.core.profileproperty.ProfilePropertyService; import org.exoplatform.social.core.profileproperty.model.ProfilePropertySetting; -import java.util.List; +import io.meeds.common.ContainerTransactional; public class ManagerPropertySettingUpdatedListener extends Listener { diff --git a/component/core/src/main/java/org/exoplatform/social/core/listeners/MetadataItemAdded.java b/component/core/src/main/java/org/exoplatform/social/core/listeners/MetadataItemAdded.java index 93968673abc..9a994ca739b 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/listeners/MetadataItemAdded.java +++ b/component/core/src/main/java/org/exoplatform/social/core/listeners/MetadataItemAdded.java @@ -17,8 +17,8 @@ import org.exoplatform.commons.search.index.IndexingService; import org.exoplatform.services.listener.Event; +import org.exoplatform.social.core.jpa.storage.SpaceStorage; import org.exoplatform.social.core.storage.api.ActivityStorage; -import org.exoplatform.social.core.storage.api.SpaceStorage; import org.exoplatform.social.metadata.MetadataService; import org.exoplatform.social.metadata.model.MetadataItem; diff --git a/component/core/src/main/java/org/exoplatform/social/core/listeners/MetadataItemDeleted.java b/component/core/src/main/java/org/exoplatform/social/core/listeners/MetadataItemDeleted.java index b634c4785c3..b1466706a08 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/listeners/MetadataItemDeleted.java +++ b/component/core/src/main/java/org/exoplatform/social/core/listeners/MetadataItemDeleted.java @@ -17,8 +17,8 @@ import org.exoplatform.commons.search.index.IndexingService; import org.exoplatform.services.listener.Event; +import org.exoplatform.social.core.jpa.storage.SpaceStorage; import org.exoplatform.social.core.storage.api.ActivityStorage; -import org.exoplatform.social.core.storage.api.SpaceStorage; import org.exoplatform.social.metadata.MetadataService; import org.exoplatform.social.metadata.model.MetadataItem; diff --git a/component/core/src/main/java/org/exoplatform/social/core/listeners/MetadataItemModified.java b/component/core/src/main/java/org/exoplatform/social/core/listeners/MetadataItemModified.java index 881c36761e0..49c95a54de5 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/listeners/MetadataItemModified.java +++ b/component/core/src/main/java/org/exoplatform/social/core/listeners/MetadataItemModified.java @@ -17,8 +17,8 @@ import org.exoplatform.commons.search.index.IndexingService; import org.exoplatform.services.listener.Event; +import org.exoplatform.social.core.jpa.storage.SpaceStorage; import org.exoplatform.social.core.storage.api.ActivityStorage; -import org.exoplatform.social.core.storage.api.SpaceStorage; import org.exoplatform.social.metadata.MetadataService; import org.exoplatform.social.metadata.model.MetadataItem; diff --git a/component/core/src/main/java/org/exoplatform/social/core/listeners/MetadataItemShared.java b/component/core/src/main/java/org/exoplatform/social/core/listeners/MetadataItemShared.java index abc002f9f1f..781782f84d9 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/listeners/MetadataItemShared.java +++ b/component/core/src/main/java/org/exoplatform/social/core/listeners/MetadataItemShared.java @@ -17,8 +17,8 @@ import org.exoplatform.commons.search.index.IndexingService; import org.exoplatform.services.listener.Event; +import org.exoplatform.social.core.jpa.storage.SpaceStorage; import org.exoplatform.social.core.storage.api.ActivityStorage; -import org.exoplatform.social.core.storage.api.SpaceStorage; import org.exoplatform.social.metadata.MetadataService; import org.exoplatform.social.metadata.model.MetadataObject; diff --git a/component/core/src/main/java/org/exoplatform/social/core/listeners/SocialMembershipListenerImpl.java b/component/core/src/main/java/org/exoplatform/social/core/listeners/SocialMembershipListenerImpl.java index 138769d5499..2d72143bc57 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/listeners/SocialMembershipListenerImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/listeners/SocialMembershipListenerImpl.java @@ -21,7 +21,14 @@ import org.exoplatform.commons.utils.CommonsUtils; import org.exoplatform.container.ExoContainer; import org.exoplatform.container.ExoContainerContext; +import org.exoplatform.portal.application.PortalRequestContext; import org.exoplatform.portal.config.UserACL; +import org.exoplatform.portal.config.UserPortalConfig; +import org.exoplatform.portal.config.UserPortalConfigService; +import org.exoplatform.portal.mop.user.UserPortal; +import org.exoplatform.portal.webui.util.Util; +import org.exoplatform.services.log.ExoLogger; +import org.exoplatform.services.log.Log; import org.exoplatform.services.organization.Membership; import org.exoplatform.services.organization.MembershipEventListener; import org.exoplatform.services.organization.MembershipTypeHandler; @@ -48,6 +55,8 @@ */ public class SocialMembershipListenerImpl extends MembershipEventListener { + private static final Log LOG = ExoLogger.getLogger(SocialMembershipListenerImpl.class); + private static final String PLATFORM_EXTERNALS_GROUP = "/platform/externals"; @Override @@ -65,7 +74,7 @@ public void preDelete(Membership m) throws Exception { } @Override - public void postDelete(Membership m) throws Exception { + public void postDelete(Membership m) throws Exception { // NOSONAR if (m.getGroupId().startsWith(SpaceUtils.SPACE_GROUP)) { UserACL acl = CommonsUtils.getService(UserACL.class); @@ -114,7 +123,7 @@ public void postDelete(Membership m) throws Exception { if (!hasPublisherMembership) { spaceService.removePublisher(space, m.getUserName()); } - SpaceUtils.refreshNavigation(); + refreshNavigation(); clearOwnerGlobalStreamCache(m.getUserName()); } } else if (m.getGroupId().startsWith(SpaceUtils.PLATFORM_USERS_GROUP)) { @@ -128,14 +137,11 @@ public void postSave(Membership m, boolean isNew) throws Exception { // existing SpaceGroup if (m.getGroupId().startsWith(SpaceUtils.SPACE_GROUP)) { - ExoContainer container = ExoContainerContext.getCurrentContainer(); - UserACL acl = (UserACL) container.getComponentInstanceOfType(UserACL.class); + UserACL acl = ExoContainerContext.getService(UserACL.class); // only handles these memberships have types likes 'manager' and 'member' // , except 'validator', ...so on. - SpaceService spaceService = (SpaceService) container.getComponentInstanceOfType(SpaceService.class); + SpaceService spaceService = ExoContainerContext.getService(SpaceService.class); Space space = spaceService.getSpaceByGroupId(m.getGroupId()); - // TODO A case to confirm: will we create a new space here when a new - // group is created via organization portlet if (space != null) { ConversationState state = ConversationState.getCurrent(); if (state != null && state.getIdentity() != null && space.getEditor() == null) { @@ -172,7 +178,7 @@ public void postSave(Membership m, boolean isNew) throws Exception { } // Refresh GroupNavigation - SpaceUtils.refreshNavigation(); + refreshNavigation(); } } @@ -195,6 +201,54 @@ else if (m.getGroupId().equals(PLATFORM_EXTERNALS_GROUP)) { } } + private void refreshNavigation() { + try { + UserPortal userPortal = getUserPortal(); + + if (userPortal != null) { + userPortal.refresh(); + } + } catch (Exception e) { + if (LOG.isDebugEnabled()) { + LOG.debug("It seem that we don't have a WebUI context, ignoring.", e); + } else { + LOG.warn("It seem that we don't have a WebUI context, error message: {}. Ignoring.", e.getMessage()); + } + } + } + + private UserPortal getUserPortal() { + try { + PortalRequestContext prc = Util.getPortalRequestContext(); + return prc.getUserPortalConfig().getUserPortal(); + } catch (Exception e) { + // Makes sure that in the RestService still gets the UserPortal. + try { + return getUserPortalForRest(); + } catch (Exception e1) { + return null; + } + } + } + + private UserPortal getUserPortalForRest() { + return getUserPortalConfig().getUserPortal(); + } + + private UserPortalConfig getUserPortalConfig() { + ExoContainer container = ExoContainerContext.getCurrentContainer(); + UserPortalConfigService userPortalConfigSer = container.getComponentInstanceOfType(UserPortalConfigService.class); + + ConversationState conversationState = ConversationState.getCurrent(); + String remoteId; + if (conversationState == null) { + remoteId = null; + } else { + remoteId = conversationState.getIdentity().getUserId(); + } + return userPortalConfigSer.getUserPortalConfig(userPortalConfigSer.getMetaPortal(), remoteId); + } + private void clearIdentityCaching() { IdentityStorage storage = ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(IdentityStorage.class); diff --git a/component/core/src/main/java/org/exoplatform/social/core/listeners/SynchronizedUserProfileListener.java b/component/core/src/main/java/org/exoplatform/social/core/listeners/SynchronizedUserProfileListener.java index 21a84b8b0f7..3d71d8d5c61 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/listeners/SynchronizedUserProfileListener.java +++ b/component/core/src/main/java/org/exoplatform/social/core/listeners/SynchronizedUserProfileListener.java @@ -19,9 +19,17 @@ */ package org.exoplatform.social.core.listeners; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; import org.apache.commons.lang3.StringUtils; + import org.exoplatform.commons.utils.CommonsUtils; import org.exoplatform.services.listener.Event; import org.exoplatform.services.listener.Listener; diff --git a/component/core/src/main/java/org/exoplatform/social/core/listeners/SynchronizedUsersListenerImpl.java b/component/core/src/main/java/org/exoplatform/social/core/listeners/SynchronizedUsersListenerImpl.java index 056064336f1..39abc689ecd 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/listeners/SynchronizedUsersListenerImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/listeners/SynchronizedUsersListenerImpl.java @@ -1,5 +1,7 @@ package org.exoplatform.social.core.listeners; +import java.util.Calendar; + import org.exoplatform.commons.utils.CommonsUtils; import org.exoplatform.services.listener.Event; import org.exoplatform.services.listener.Listener; @@ -10,8 +12,6 @@ import org.exoplatform.social.core.identity.provider.OrganizationIdentityProvider; import org.exoplatform.social.core.manager.IdentityManager; -import java.util.Calendar; - public class SynchronizedUsersListenerImpl extends Listener { public void onEvent(Event event) throws Exception { diff --git a/component/core/src/main/java/org/exoplatform/social/core/listeners/UpdateLoginTimeListenerImpl.java b/component/core/src/main/java/org/exoplatform/social/core/listeners/UpdateLoginTimeListenerImpl.java index 5305dd26da9..2689b2e6d50 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/listeners/UpdateLoginTimeListenerImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/listeners/UpdateLoginTimeListenerImpl.java @@ -4,7 +4,9 @@ import org.exoplatform.commons.search.index.IndexingService; import org.exoplatform.commons.utils.CommonsUtils; -import org.exoplatform.services.listener.*; +import org.exoplatform.services.listener.Asynchronous; +import org.exoplatform.services.listener.Event; +import org.exoplatform.services.listener.Listener; import org.exoplatform.services.organization.User; import org.exoplatform.services.security.ConversationRegistry; import org.exoplatform.services.security.ConversationState; diff --git a/component/core/src/main/java/org/exoplatform/social/core/manager/ActivityManagerImpl.java b/component/core/src/main/java/org/exoplatform/social/core/manager/ActivityManagerImpl.java index 0f296f5afdd..c5229d13200 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/manager/ActivityManagerImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/manager/ActivityManagerImpl.java @@ -16,13 +16,20 @@ */ package org.exoplatform.social.core.manager; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.Set; import java.util.stream.Collectors; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.ArrayUtils; -import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.Validate; import org.exoplatform.commons.exception.ObjectNotFoundException; import org.exoplatform.commons.utils.PropertyManager; @@ -34,9 +41,18 @@ import org.exoplatform.social.core.ActivityProcessor; import org.exoplatform.social.core.ActivityTypePlugin; import org.exoplatform.social.core.BaseActivityProcessorPlugin; -import org.exoplatform.social.core.activity.*; +import org.exoplatform.social.core.activity.ActivitiesRealtimeListAccess; import org.exoplatform.social.core.activity.ActivitiesRealtimeListAccess.ActivityType; -import org.exoplatform.social.core.activity.model.*; +import org.exoplatform.social.core.activity.ActivityFilter; +import org.exoplatform.social.core.activity.ActivityLifeCycle; +import org.exoplatform.social.core.activity.ActivityListener; +import org.exoplatform.social.core.activity.ActivityListenerPlugin; +import org.exoplatform.social.core.activity.ActivitySystemTypePlugin; +import org.exoplatform.social.core.activity.CommentsRealtimeListAccess; +import org.exoplatform.social.core.activity.model.ActivityShareAction; +import org.exoplatform.social.core.activity.model.ActivityStream; +import org.exoplatform.social.core.activity.model.ExoSocialActivity; +import org.exoplatform.social.core.activity.model.ExoSocialActivityImpl; import org.exoplatform.social.core.identity.model.Identity; import org.exoplatform.social.core.relationship.model.Relationship; import org.exoplatform.social.core.relationship.model.Relationship.Type; diff --git a/component/core/src/main/java/org/exoplatform/social/core/manager/IdentityManagerImpl.java b/component/core/src/main/java/org/exoplatform/social/core/manager/IdentityManagerImpl.java index e8a5dde6d38..67881519c45 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/manager/IdentityManagerImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/manager/IdentityManagerImpl.java @@ -18,7 +18,11 @@ import java.io.IOException; import java.io.InputStream; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import org.apache.commons.lang3.StringUtils; @@ -36,7 +40,11 @@ import org.exoplatform.social.core.identity.model.Profile; import org.exoplatform.social.core.identity.model.Profile.UpdateType; import org.exoplatform.social.core.identity.provider.OrganizationIdentityProvider; -import org.exoplatform.social.core.profile.*; +import org.exoplatform.social.core.profile.ProfileFilter; +import org.exoplatform.social.core.profile.ProfileLifeCycle; +import org.exoplatform.social.core.profile.ProfileListener; +import org.exoplatform.social.core.profile.ProfileListenerPlugin; +import org.exoplatform.social.core.profile.UserProfileComparator; import org.exoplatform.social.core.profileproperty.ProfilePropertyService; import org.exoplatform.social.core.search.Sorting; import org.exoplatform.social.core.space.model.Space; diff --git a/component/core/src/main/java/org/exoplatform/social/core/metadata/MetadataServiceImpl.java b/component/core/src/main/java/org/exoplatform/social/core/metadata/MetadataServiceImpl.java index 20de21edf9b..528a4761532 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/metadata/MetadataServiceImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/metadata/MetadataServiceImpl.java @@ -24,6 +24,8 @@ import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import org.picocontainer.Startable; + import org.exoplatform.commons.api.persistence.ExoTransactional; import org.exoplatform.commons.exception.ObjectNotFoundException; import org.exoplatform.services.listener.ListenerService; @@ -40,7 +42,6 @@ import org.exoplatform.social.metadata.model.MetadataKey; import org.exoplatform.social.metadata.model.MetadataObject; import org.exoplatform.social.metadata.model.MetadataType; -import org.picocontainer.Startable; @SuppressWarnings("removal") public class MetadataServiceImpl implements MetadataService, Startable { diff --git a/component/core/src/main/java/org/exoplatform/social/core/metadata/favorite/FavoriteServiceImpl.java b/component/core/src/main/java/org/exoplatform/social/core/metadata/favorite/FavoriteServiceImpl.java index efc9b3aa6eb..34dae12c8f4 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/metadata/favorite/FavoriteServiceImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/metadata/favorite/FavoriteServiceImpl.java @@ -32,7 +32,8 @@ import org.exoplatform.social.metadata.favorite.FavoriteService; import org.exoplatform.social.metadata.favorite.model.Favorite; import org.exoplatform.social.metadata.favorite.model.FavoriteObject; -import org.exoplatform.social.metadata.model.*; +import org.exoplatform.social.metadata.model.MetadataItem; +import org.exoplatform.social.metadata.model.MetadataKey; public class FavoriteServiceImpl implements FavoriteService { diff --git a/component/core/src/main/java/org/exoplatform/social/core/metadata/storage/MetadataStorage.java b/component/core/src/main/java/org/exoplatform/social/core/metadata/storage/MetadataStorage.java index 918dfbb7194..63503b93b48 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/metadata/storage/MetadataStorage.java +++ b/component/core/src/main/java/org/exoplatform/social/core/metadata/storage/MetadataStorage.java @@ -23,8 +23,6 @@ import java.util.Map; import java.util.Set; -import jakarta.persistence.Tuple; - import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -41,6 +39,8 @@ import org.exoplatform.social.metadata.model.MetadataObject; import org.exoplatform.social.metadata.model.MetadataType; +import jakarta.persistence.Tuple; + public class MetadataStorage { private static final Log LOG = ExoLogger.getLogger(MetadataStorage.class); diff --git a/component/core/src/main/java/org/exoplatform/social/core/metadata/tag/TagServiceImpl.java b/component/core/src/main/java/org/exoplatform/social/core/metadata/tag/TagServiceImpl.java index 1a265d565a6..7cbf32dde88 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/metadata/tag/TagServiceImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/metadata/tag/TagServiceImpl.java @@ -27,8 +27,9 @@ import java.util.stream.Collectors; import org.apache.commons.lang3.ArrayUtils; -import org.apache.commons.text.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.text.StringEscapeUtils; + import org.exoplatform.commons.exception.ObjectNotFoundException; import org.exoplatform.commons.utils.ListAccess; import org.exoplatform.services.listener.ListenerService; diff --git a/component/core/src/main/java/org/exoplatform/social/core/plugin/SiteTranslationPlugin.java b/component/core/src/main/java/org/exoplatform/social/core/plugin/SiteTranslationPlugin.java index ae7818dc8be..5ef3bf93b50 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/plugin/SiteTranslationPlugin.java +++ b/component/core/src/main/java/org/exoplatform/social/core/plugin/SiteTranslationPlugin.java @@ -19,12 +19,13 @@ */ package org.exoplatform.social.core.plugin; -import io.meeds.social.translation.plugin.TranslationPlugin; import org.exoplatform.commons.exception.ObjectNotFoundException; import org.exoplatform.portal.config.UserACL; import org.exoplatform.portal.config.model.PortalConfig; import org.exoplatform.portal.mop.service.LayoutService; +import io.meeds.social.translation.plugin.TranslationPlugin; + public class SiteTranslationPlugin extends TranslationPlugin { public static final String SITE_OBJECT_TYPE = "site"; diff --git a/component/core/src/main/java/org/exoplatform/social/core/plugin/SpaceCreationInvitationGroupVisibilityPlugin.java b/component/core/src/main/java/org/exoplatform/social/core/plugin/SpaceCreationInvitationGroupVisibilityPlugin.java index be0c91f9880..5cf329f61a3 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/plugin/SpaceCreationInvitationGroupVisibilityPlugin.java +++ b/component/core/src/main/java/org/exoplatform/social/core/plugin/SpaceCreationInvitationGroupVisibilityPlugin.java @@ -19,6 +19,10 @@ package org.exoplatform.social.core.plugin; +import java.util.Collection; +import java.util.List; +import java.util.stream.Collectors; + import org.exoplatform.portal.config.GroupVisibilityPlugin; import org.exoplatform.portal.config.UserACL; import org.exoplatform.services.organization.Group; @@ -26,10 +30,6 @@ import org.exoplatform.services.security.MembershipEntry; import org.exoplatform.social.core.space.SpacesAdministrationService; -import java.util.Collection; -import java.util.List; -import java.util.stream.Collectors; - /** * Implementation of GroupVisibilityPlugin for space creation which allows to * see a group if any of these conditions is fulfilled: diff --git a/component/core/src/main/java/org/exoplatform/social/core/plugin/SpaceFavoriteACLPlugin.java b/component/core/src/main/java/org/exoplatform/social/core/plugin/SpaceFavoriteACLPlugin.java index c2f43551761..eea21d8be92 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/plugin/SpaceFavoriteACLPlugin.java +++ b/component/core/src/main/java/org/exoplatform/social/core/plugin/SpaceFavoriteACLPlugin.java @@ -20,9 +20,9 @@ import org.exoplatform.social.core.identity.model.Identity; import org.exoplatform.social.core.manager.IdentityManager; -import org.exoplatform.social.metadata.FavoriteACLPlugin; import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.core.space.spi.SpaceService; +import org.exoplatform.social.metadata.FavoriteACLPlugin; public class SpaceFavoriteACLPlugin extends FavoriteACLPlugin { diff --git a/component/core/src/main/java/org/exoplatform/social/core/processor/ActivityResourceBundlePlugin.java b/component/core/src/main/java/org/exoplatform/social/core/processor/ActivityResourceBundlePlugin.java index a74181df4c0..abc9a6de32e 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/processor/ActivityResourceBundlePlugin.java +++ b/component/core/src/main/java/org/exoplatform/social/core/processor/ActivityResourceBundlePlugin.java @@ -48,7 +48,7 @@ * <map type="java.util.HashMap"> * <entry> * <key><string>space_created</string></key> - * <value><string>SpaceActivityPublisher.space_created</string></value> + * <value><string>ProfileUpdatesPublisher.avatar_updated</string></value> * </entry> * </map> * </field> diff --git a/component/core/src/main/java/org/exoplatform/social/core/profile/UserProfileComparator.java b/component/core/src/main/java/org/exoplatform/social/core/profile/UserProfileComparator.java index db3f011ed07..39571f72b03 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/profile/UserProfileComparator.java +++ b/component/core/src/main/java/org/exoplatform/social/core/profile/UserProfileComparator.java @@ -16,8 +16,11 @@ */ package org.exoplatform.social.core.profile; -import java.util.*; +import java.util.Date; +import java.util.List; +import java.util.Map; import java.util.Map.Entry; +import java.util.Set; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; diff --git a/component/core/src/main/java/org/exoplatform/social/core/profileproperty/ProfilePropertyServiceImpl.java b/component/core/src/main/java/org/exoplatform/social/core/profileproperty/ProfilePropertyServiceImpl.java index 75571903eb7..cc09d856e84 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/profileproperty/ProfilePropertyServiceImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/profileproperty/ProfilePropertyServiceImpl.java @@ -24,24 +24,24 @@ import java.util.Arrays; import java.util.List; +import org.apache.commons.lang3.StringUtils; +import org.picocontainer.Startable; + import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.commons.lang3.StringUtils; + +import org.exoplatform.commons.ObjectAlreadyExistsException; import org.exoplatform.commons.api.settings.SettingService; import org.exoplatform.commons.api.settings.SettingValue; import org.exoplatform.commons.api.settings.data.Context; import org.exoplatform.commons.api.settings.data.Scope; - import org.exoplatform.commons.search.index.IndexingService; -import org.exoplatform.services.listener.ListenerService; -import org.exoplatform.social.core.jpa.search.ProfileIndexingServiceConnector; -import org.picocontainer.Startable; - -import org.exoplatform.commons.ObjectAlreadyExistsException; import org.exoplatform.container.component.ComponentPlugin; import org.exoplatform.container.xml.InitParams; +import org.exoplatform.services.listener.ListenerService; import org.exoplatform.services.log.ExoLogger; import org.exoplatform.services.log.Log; +import org.exoplatform.social.core.jpa.search.ProfileIndexingServiceConnector; import org.exoplatform.social.core.profileproperty.model.ProfilePropertySetting; import org.exoplatform.social.core.profileproperty.storage.ProfileSettingStorage; diff --git a/component/core/src/main/java/org/exoplatform/social/core/search/impl/SearchServiceImpl.java b/component/core/src/main/java/org/exoplatform/social/core/search/impl/SearchServiceImpl.java index 4ac56012100..4c19d0d8119 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/search/impl/SearchServiceImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/search/impl/SearchServiceImpl.java @@ -16,19 +16,25 @@ */ package org.exoplatform.social.core.search.impl; -import java.util.*; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; -import org.exoplatform.commons.utils.CommonsUtils; -import org.exoplatform.portal.config.UserACL; import org.picocontainer.Startable; import org.exoplatform.commons.api.settings.SettingService; import org.exoplatform.commons.api.settings.SettingValue; import org.exoplatform.commons.api.settings.data.Context; import org.exoplatform.commons.api.settings.data.Scope; -import org.exoplatform.social.core.search.*; +import org.exoplatform.commons.utils.CommonsUtils; +import org.exoplatform.portal.config.UserACL; +import org.exoplatform.social.core.search.SearchConnector; +import org.exoplatform.social.core.search.SearchConnectorPlugin; +import org.exoplatform.social.core.search.SearchService; /** * Service to manage Search connectors diff --git a/component/core/src/main/java/org/exoplatform/social/core/service/GettingStartedService.java b/component/core/src/main/java/org/exoplatform/social/core/service/GettingStartedService.java index f0f9bd00d71..70b2d2b5ca2 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/service/GettingStartedService.java +++ b/component/core/src/main/java/org/exoplatform/social/core/service/GettingStartedService.java @@ -1,6 +1,8 @@ package org.exoplatform.social.core.service; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; import org.apache.commons.lang3.StringUtils; diff --git a/component/core/src/main/java/org/exoplatform/social/core/service/LinkProvider.java b/component/core/src/main/java/org/exoplatform/social/core/service/LinkProvider.java index de618046821..82a4a7673c3 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/service/LinkProvider.java +++ b/component/core/src/main/java/org/exoplatform/social/core/service/LinkProvider.java @@ -21,9 +21,9 @@ import java.util.Locale; import java.util.MissingResourceException; -import org.apache.commons.text.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; +import org.apache.commons.text.StringEscapeUtils; import org.exoplatform.commons.utils.CommonsUtils; import org.exoplatform.container.ExoContainerContext; @@ -63,6 +63,7 @@ * In case something is wrong when building, the default links will be returned. */ public class LinkProvider { + private static final String LAST_MODIFIED_PARAM_PREFIX = "?lastModified="; public static final String RESOURCE_URL = "/social-resources"; public static final String JAVASCRIPT_RESOURCE_URL = RESOURCE_URL + "/javascript/"; @@ -350,17 +351,10 @@ private static String getBaseUri(final String portalName, String portalOwner) { return "/" + getPortalName(portalName) + "/" + getPortalOwner(portalOwner); } - private static String getSpaceBaseUri(final String portalName, String portalOwner) { - return "/" + getPortalName(portalName); - } - /** - * Gets the link of notification settings page - * - * @param remoteId - * @return + * @return the link of notification settings page */ - public static String getUserNotificationSettingUri(final String remoteId) { + public static String getUserNotificationSettingUri() { return getBaseUri(null, null) + "/settings"; } @@ -376,13 +370,6 @@ public static String getRedirectUri(String type) { return getBaseUri(null, null) + "/" + type; } - public static String getRedirectSpaceUri(String type) { - if (type.isEmpty()) { - return getSpaceBaseUri(null, null); - } - return getSpaceBaseUri(null, null) + "/" + type; - } - /** * Gets an IdentityManager instance. * @@ -396,20 +383,6 @@ public static SpaceService getSpaceService() { return ExoContainerContext.getService(SpaceService.class); } - /** - * Builds the avatar URL for a given profile - * - * @param providerId - * @param remoteId - * @return - * @deprecated user {@link LinkProvider#buildAvatarURL(String, String, boolean, Long)} - * to use browser cache - */ - @Deprecated - public static String buildAvatarURL(String providerId, String remoteId) { - return buildAttachmentUrl(providerId, remoteId, false, null, AvatarAttachment.TYPE); - } - /** * Builds the avatar URL for a given profile * @param providerId @@ -425,19 +398,6 @@ public static String buildAvatarURL(String providerId, String id, boolean byId, return buildAttachmentUrl(providerId, id, byId, lastModifiedDate, AvatarAttachment.TYPE); } - /** - * Builds the banner URL for a given profile - * @param providerId - * @param id - * @return - * @deprecated user {@link LinkProvider#buildBannerURL(String, String, boolean, Long)} - * to use browser cache - */ - @Deprecated - public static String buildBannerURL(String providerId, String id) { - return buildAttachmentUrl(providerId, id, false, null, BannerAttachment.TYPE); - } - /** * Builds the banner URL for a given profile * @param providerId @@ -468,7 +428,7 @@ private static String buildAttachmentUrl(String providerId, .append(id) .append("/") .append(type) - .append("?lastModified=") + .append(LAST_MODIFIED_PARAM_PREFIX) .append(DEFAULT_IMAGES_LAST_MODIFED) .toString(); } @@ -501,7 +461,7 @@ private static String buildAttachmentUrl(String providerId, .append(id) .append("/") .append(type) - .append("?lastModified=") + .append(LAST_MODIFIED_PARAM_PREFIX) .append(lastModifiedString) .append("&r=") .append(token); @@ -515,7 +475,7 @@ private static String buildAttachmentUrl(String providerId, .append(id) .append("/") .append(type) - .append("?lastModified=") + .append(LAST_MODIFIED_PARAM_PREFIX) .append(lastModifiedString) .append("&r=") .append(token); diff --git a/component/core/src/main/java/org/exoplatform/social/core/space/SpaceListAccess.java b/component/core/src/main/java/org/exoplatform/social/core/space/SpaceListAccess.java index 7cf3d7995db..9baedf1009c 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/space/SpaceListAccess.java +++ b/component/core/src/main/java/org/exoplatform/social/core/space/SpaceListAccess.java @@ -31,8 +31,8 @@ import org.apache.commons.lang3.StringUtils; import org.exoplatform.commons.utils.ListAccess; +import org.exoplatform.social.core.jpa.storage.SpaceStorage; import org.exoplatform.social.core.space.model.Space; -import org.exoplatform.social.core.storage.api.SpaceStorage; import io.meeds.social.core.search.SpaceSearchConnector; import io.meeds.social.core.search.model.SpaceSearchFilter; diff --git a/component/core/src/main/java/org/exoplatform/social/core/space/SpaceUtils.java b/component/core/src/main/java/org/exoplatform/social/core/space/SpaceUtils.java index fb623f64a30..0592a7a27f1 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/space/SpaceUtils.java +++ b/component/core/src/main/java/org/exoplatform/social/core/space/SpaceUtils.java @@ -16,71 +16,22 @@ */ package org.exoplatform.social.core.space; -import java.util.ArrayList; import java.util.Collection; -import java.util.Comparator; import java.util.Iterator; -import java.util.List; -import java.util.Locale; import java.util.Objects; -import java.util.ResourceBundle; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; - -import javax.portlet.RenderRequest; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; -import org.gatein.common.i18n.LocalizedString; -import org.gatein.pc.api.Portlet; -import org.gatein.pc.api.PortletInvoker; -import org.gatein.pc.api.info.MetaInfo; -import org.gatein.pc.api.info.PortletInfo; - -import org.exoplatform.commons.file.model.FileItem; -import org.exoplatform.commons.file.services.FileService; -import org.exoplatform.commons.utils.CommonsUtils; -import org.exoplatform.commons.utils.ExpressionUtil; + import org.exoplatform.container.ExoContainer; import org.exoplatform.container.ExoContainerContext; import org.exoplatform.container.PortalContainer; -import org.exoplatform.container.component.RequestLifeCycle; import org.exoplatform.portal.application.PortalRequestContext; -import org.exoplatform.portal.application.RequestNavigationData; -import org.exoplatform.portal.config.UserACL; -import org.exoplatform.portal.config.UserPortalConfig; -import org.exoplatform.portal.config.UserPortalConfigService; -import org.exoplatform.portal.config.model.ApplicationState; -import org.exoplatform.portal.config.model.ApplicationType; -import org.exoplatform.portal.config.model.Container; -import org.exoplatform.portal.config.model.ModelObject; -import org.exoplatform.portal.config.model.Page; import org.exoplatform.portal.mop.SiteKey; import org.exoplatform.portal.mop.SiteType; -import org.exoplatform.portal.mop.State; -import org.exoplatform.portal.mop.Visibility; -import org.exoplatform.portal.mop.navigation.GenericScope; import org.exoplatform.portal.mop.navigation.NavigationContext; -import org.exoplatform.portal.mop.navigation.NavigationServiceException; -import org.exoplatform.portal.mop.navigation.NavigationState; -import org.exoplatform.portal.mop.navigation.NodeContext; -import org.exoplatform.portal.mop.navigation.NodeModel; -import org.exoplatform.portal.mop.navigation.Scope; -import org.exoplatform.portal.mop.page.PageContext; -import org.exoplatform.portal.mop.page.PageKey; -import org.exoplatform.portal.mop.service.LayoutService; import org.exoplatform.portal.mop.service.NavigationService; -import org.exoplatform.portal.mop.storage.DescriptionStorage; -import org.exoplatform.portal.mop.storage.PageStorage; -import org.exoplatform.portal.mop.user.UserNavigation; -import org.exoplatform.portal.mop.user.UserNode; -import org.exoplatform.portal.mop.user.UserNodeFilterConfig; -import org.exoplatform.portal.mop.user.UserPortal; -import org.exoplatform.portal.webui.portal.UIPortal; -import org.exoplatform.portal.webui.util.NavigationURLUtils; import org.exoplatform.portal.webui.util.Util; -import org.exoplatform.portal.webui.workspace.UIPortalApplication; -import org.exoplatform.portal.webui.workspace.UIWorkingWorkspace; import org.exoplatform.services.log.ExoLogger; import org.exoplatform.services.log.Log; import org.exoplatform.services.organization.Group; @@ -92,128 +43,74 @@ import org.exoplatform.services.organization.OrganizationService; import org.exoplatform.services.organization.User; import org.exoplatform.services.organization.UserHandler; -import org.exoplatform.services.resources.ResourceBundleService; -import org.exoplatform.services.security.ConversationState; import org.exoplatform.social.common.Utils; -import org.exoplatform.social.common.router.ExoRouter; -import org.exoplatform.social.common.router.ExoRouter.Route; import org.exoplatform.social.core.identity.model.Identity; -import org.exoplatform.social.core.identity.model.Profile; import org.exoplatform.social.core.identity.provider.OrganizationIdentityProvider; import org.exoplatform.social.core.identity.provider.SpaceIdentityProvider; -import org.exoplatform.social.core.jpa.storage.EntityConverterUtils; import org.exoplatform.social.core.manager.IdentityManager; import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.core.space.spi.SpaceService; import org.exoplatform.social.core.storage.cache.CachedIdentityStorage; import org.exoplatform.social.core.storage.cache.CachedSpaceStorage; -import org.exoplatform.web.application.RequestContext; -import org.exoplatform.webui.application.WebuiRequestContext; - -import jakarta.servlet.http.HttpServletRequest; -import lombok.SneakyThrows; /** * SpaceUtils Utility for working with space */ public class SpaceUtils { - private static final Log LOG = ExoLogger.getLogger(SpaceUtils.class); - - public static final String SPACE_GROUP = "/spaces"; + private static final Log LOG = ExoLogger.getLogger(SpaceUtils.class); - public static final String PLATFORM_USERS_GROUP = "/platform/users"; + public static final String SPACE_GROUP = "/spaces"; - public static final String PLATFORM_EXTERNALS_GROUP = "/platform/externals"; + public static final String SPACE_GROUP_PREFIX = SPACE_GROUP + "/"; - public static final String PLATFORM_PUBLISHER_GROUP = "/platform/web-contributors"; + public static final String PLATFORM_USERS_GROUP = "/platform/users"; - public static final String MANAGER = "manager"; + public static final String PLATFORM_EXTERNALS_GROUP = "/platform/externals"; - public static final String MEMBER = "member"; + public static final String PLATFORM_PUBLISHER_GROUP = "/platform/web-contributors"; - public static final String INTERNAL = "internal"; + public static final String SPACE_ADMIN_REFERENCE_NAME = "spaceAdmin"; - public static final String AUTHENTICATED = "authenticated"; + public static final String MANAGER = "manager"; - public static final String EVERYONE = "everyone"; + public static final String MEMBER = "member"; - public static final String REDACTOR = "redactor"; + public static final String INTERNAL = "internal"; - public static final String PUBLISHER = "publisher"; + public static final String AUTHENTICATED = "authenticated"; - public static final String PENDING = "pending"; + public static final String EVERYONE = "everyone"; - public static final String INVITED = "invited"; + public static final String REDACTOR = "redactor"; - public static final String IGNORED = "ignored"; + public static final String PUBLISHER = "publisher"; - public static final String MENU_CONTAINER = "Menu"; + public static final String PENDING = "pending"; - public static final String APPLICATION_CONTAINER = "Application"; + public static final String INVITED = "invited"; - public static final String SPACE_URL = "SPACE_URL"; + public static final String IGNORED = "ignored"; - public static final String SPACE_SETTINGS_PAGE = "settings"; + public static final String MENU_CONTAINER = "Menu"; - public static final String PUBLIC_SITE_SPACE_ID = "SPACE_ID"; + public static final String APPLICATION_CONTAINER = "Application"; - public static final String IS_PUBLIC_SITE_SPACE = "IS_SPACE_PUBLIC_SITE"; + public static final String SPACE_URL = "SPACE_URL"; - public static final String CURRENT_SPACE = "CurrentSpace"; + public static final String SPACE_SETTINGS_PAGE = "settings"; - private static final ConcurrentHashMap APP_LIST_CACHE = new ConcurrentHashMap<>(); + public static final String PUBLIC_SITE_SPACE_ID = "SPACE_ID"; - private static final String PORTAL_PAGE_TITLE = "portal:requestTitle"; + public static final String IS_PUBLIC_SITE_SPACE = "IS_SPACE_PUBLIC_SITE"; - private static final String NUMBER_REG_PATTERN = "\\d"; + public static final String CURRENT_SPACE = "CurrentSpace"; - private static final String UNDER_SCORE_STR = "_"; + private static final String NUMBER_REG_PATTERN = "\\d"; - private static final String SPACE_STR = " "; - - private static Set portletsCache = null; - - /** - * Gets application from portal container - * - * @param appId - * @return An application has name match input appId. - */ - public static Application getApplication(String appId) { - return APP_LIST_CACHE.computeIfAbsent(appId, key -> { - Portlet portlet = getPortlets().stream() - .filter(p -> appId.equals(p.getInfo().getName()) - || appId.equals(p.getInfo().getApplicationName() + "/" + p.getInfo().getName())) - .findFirst() - .orElse(null); - if (portlet == null) { - return null; - } - PortletInfo info = portlet.getInfo(); - MetaInfo meta = info.getMeta(); - LocalizedString descriptionLS = meta.getMetaValue(MetaInfo.DESCRIPTION); - LocalizedString displayNameLS = meta.getMetaValue(MetaInfo.DISPLAY_NAME); - String portletName = info.getName(); - String archiveName = info.getApplicationName(); - - Application app = new Application(); - app.setContentId(archiveName + "/" + portletName); - app.setApplicationName(portletName); - app.setDisplayName(getLocalizedStringValue(displayNameLS, portletName)); - app.setDescription(getLocalizedStringValue(descriptionLS, portletName)); - return app; - }); - } + private static final String UNDER_SCORE_STR = "_"; - /** - * PortletComparator - */ - static class PortletComparator implements Comparator { - public int compare(Application p1, Application p2) { - return p1.getDisplayName().compareTo(p2.getDisplayName()); - } - } + private static final String SPACE_STR = " "; /** * Utility for cleaning space name @@ -225,112 +122,6 @@ public static String cleanString(String str) { return org.exoplatform.social.common.Utils.cleanString(str); } - /** - * Rename label group - * - * @param space - */ - public static void renameGroupLabel(Space space) { - try { - RequestLifeCycle.begin(PortalContainer.getInstance()); - OrganizationService organizationService = CommonsUtils.getService(OrganizationService.class); - GroupHandler groupHandler = organizationService.getGroupHandler(); - Group group = groupHandler.findGroupById(space.getGroupId()); - group.setLabel(space.getDisplayName()); - groupHandler.saveGroup(group, true); - } catch (Exception e) { - LOG.error(e.getMessage(), e); - } finally { - RequestLifeCycle.end(); - } - } - - /** - * update space default avatar when renaming the space - * - * @param space - */ - public static void updateDefaultSpaceAvatar(Space space) { - IdentityManager identityManager = CommonsUtils.getService(IdentityManager.class); - Identity spaceIdentity = identityManager.getOrCreateSpaceIdentity(space.getPrettyName()); - FileItem spaceAvatar = identityManager.getAvatarFile(spaceIdentity); - if (spaceAvatar != null && spaceAvatar.getFileInfo().getId() != null - && EntityConverterUtils.DEFAULT_AVATAR.equals(spaceAvatar.getFileInfo().getName())) { - Profile profile = spaceIdentity.getProfile(); - profile.removeProperty(Profile.AVATAR); - profile.setAvatarUrl(null); - profile.setAvatarLastUpdated(null); - profile.setProperty(Profile.FULL_NAME, space.getDisplayName()); - space.setAvatarAttachment(null); - space.setAvatarLastUpdated(System.currentTimeMillis()); - identityManager.updateProfile(profile); - FileService fileService = CommonsUtils.getService(FileService.class); - fileService.deleteFile(spaceAvatar.getFileInfo().getId()); - } - } - - /** - * Rename page node. - * - * @param space - * @return UserNode - */ - public static UserNode renamePageNode(Space space) { - - try { - - LayoutService layoutService = CommonsUtils.getService(LayoutService.class); - UserNode renamedNode = SpaceUtils.getSpaceUserNode(space); - UserNode parentNode = renamedNode.getParent(); - String newNodeLabel = space.getDisplayName(); - String newNodeName = Utils.cleanString(newNodeLabel); - renamedNode.setName(newNodeName); - - Page page = layoutService.getPage(renamedNode.getPageRef().format()); - if (page != null) { - page.setTitle(newNodeLabel); - layoutService.save(page); - } - - SpaceUtils.getUserPortal().saveNode(parentNode, null); - - space.setUrl(newNodeName); - SpaceUtils.changeAppPageTitle(renamedNode, newNodeLabel); - - List userNodes = new ArrayList<>(renamedNode.getChildren()); - for (UserNode childNode : userNodes) { - SpaceUtils.changeAppPageTitle(childNode, newNodeLabel); - } - return renamedNode; - } catch (Exception e) { - LOG.warn(e.getMessage(), e); - return null; - } - } - - /** - * Gets spaceName by portletPreference. - * - * @return - * @deprecated Use {@link #getSpaceUrlByContext()} instead. - */ - public static String getSpaceUrl() { - // - PortalRequestContext pcontext = Util.getPortalRequestContext(); - String requestPath = pcontext.getControllerContext().getParameter(RequestNavigationData.REQUEST_PATH); - Route route = ExoRouter.route(requestPath); - if (route == null) - return null; - - // - String spacePrettyName = route.localArgs.get("spacePrettyName"); - SpaceService spaceService = (SpaceService) ExoContainerContext.getCurrentContainer() - .getComponentInstanceOfType(SpaceService.class); - Space space = spaceService.getSpaceByPrettyName(spacePrettyName); - - return (space != null ? space.getUrl() : null); - } - /** * Check whether is being in a space context or not. * @@ -370,8 +161,7 @@ public static Space getSpaceByContext() { } // - SpaceService spaceService = ExoContainerContext.getService(SpaceService.class); - Space currentSpace = spaceService.getSpaceByGroupId(pcontext.getSiteName()); + Space currentSpace = getSpaceService().getSpaceByGroupId(pcontext.getSiteName()); setSpaceByContext(pcontext, currentSpace); return currentSpace; } @@ -389,222 +179,6 @@ public static Identity getSpaceIdentityByContext() { return null; } - /** - * Remove pages and group navigation of space when delete space. - * - * @param space - * @throws SpaceException - * @since 1.2.8 - */ - public static void removePagesAndGroupNavigation(Space space) throws SpaceException { - // remove pages - LayoutService layoutService = getLayoutService(); - String groupId = space.getGroupId(); - NavigationContext spaceNavCtx = SpaceUtils.getGroupNavigationContext(groupId); - // return in case group navigation was removed by portal SOC-548 - if (spaceNavCtx == null) { - return; - } - NodeContext> homeNodeCtx = SpaceUtils.getHomeNodeWithChildren(spaceNavCtx, groupId); - - for (NodeContext child : homeNodeCtx.getNodes()) { - @SuppressWarnings("unchecked") - NodeContext> childNode = (NodeContext>) child; - Page page = layoutService.getPage(childNode.getState().getPageRef().format()); - layoutService.remove(page); - } - - // remove group navigation - SpaceUtils.removeGroupNavigation(groupId); - } - - /** - * Change the page title of the application referring to the current - * spacePageNode - * - * @param spacePageNode - * @param newSpaceName - * @throws Exception - */ - - public static void changeAppPageTitle(UserNode spacePageNode, String newSpaceName) throws Exception { - if (spacePageNode == null || spacePageNode.getPageRef() == null) { - return; - } - LayoutService layoutService = getLayoutService(); - Page page = layoutService.getPage(spacePageNode.getPageRef().format()); - - ExoContainer container = ExoContainerContext.getCurrentContainer(); - PageStorage pageStorage = container.getComponentInstanceOfType(PageStorage.class); - PageContext pageContext = pageStorage.loadPage(page.getPageKey()); - if (pageContext != null && pageContext.getState() != null) { - String dispalyname = pageContext.getState().getDisplayName(); - if (dispalyname != null && !dispalyname.isEmpty() && dispalyname.indexOf("-") != -1) { - String newPageTitle = newSpaceName + " -" + dispalyname.split("-")[1]; - pageContext.setState(pageContext.getState().builder().displayName(newPageTitle).build()); - pageStorage.savePage(pageContext); - } - } - } - - /** - * Change menu portlet preference. - * - * @param menuContainer - * @param layoutService - * @param space - * @since 1.2.8 - */ - public static void changeMenuPortletPreference(Container menuContainer, LayoutService layoutService, Space space) { - org.exoplatform.portal.config.model.Application menuPortlet = - (org.exoplatform.portal.config.model.Application) menuContainer - .getChildren() - .get(0); - - ApplicationState menuState = menuPortlet.getState(); - org.exoplatform.portal.pom.spi.portlet.Portlet menuPortletPreference; - try { - menuPortletPreference = layoutService.load(menuState, ApplicationType.PORTLET); - menuPortletPreference.setValue(SPACE_URL, space.getUrl()); - layoutService.save(menuState, menuPortletPreference); - } catch (Exception e) { - LOG.warn("Can not save menu portlet preference!", e); - } - } - - /** - * Change application portlet preference. - * - * @param applicationContainer - * @param layoutService - * @param space - * @since 1.2.8 - */ - public static void changeAppPortletPreference(Container applicationContainer, LayoutService layoutService, Space space) { - try { - org.exoplatform.portal.config.model.Application applicationPortlet = - (org.exoplatform.portal.config.model.Application) applicationContainer - .getChildren() - .get(0); - ApplicationState appState = applicationPortlet.getState(); - org.exoplatform.portal.pom.spi.portlet.Portlet appPortletPreference; - try { - appPortletPreference = layoutService.load(appState, ApplicationType.PORTLET); - if (appPortletPreference == null || appPortletPreference.getPreference(SPACE_URL) == null) { - return; - } else { - appPortletPreference.setValue(SPACE_URL, space.getUrl()); - } - layoutService.save(appState, appPortletPreference); - } catch (Exception e) { - LOG.warn("Can not save application portlet preference!", e); - } - } catch (Exception e) { - LOG.warn("Error when change application porltet preference!", e); - // ignore it? exception will happen when this is gadgetApplicationType - } - } - - /** - * commit transaction and restart a new one. - */ - public static void restartRequest() { - RequestLifeCycle.end(); - // SOC-2124 too long wait for executing these handlers which handles when - // space created. - ExoContainer container = ExoContainerContext.getCurrentContainer(); - // Need to begin here for RequestLifeCycle.end(); if is not existing, an - // exception will be appeared. - RequestLifeCycle.begin(container); - } - - /** - * Finds container by id - * - * @param children - * @param id - * @return - */ - public static Container findContainerById(ArrayList children, String id) { - Container found = null; - for (Object obj : children) { - if (org.exoplatform.portal.config.model.Application.class.isInstance(obj)) { - continue; - } - Container child = (Container) obj; - if (child.getId() == null) { - found = findContainerById(child.getChildren(), id); - if (found != null) { - return found; - } - } else { - if (child.getId().equals(id)) { - return child; - } else { - found = findContainerById(child.getChildren(), id); - } - if (found != null) { - return found; - } - } - } - return found; - } - - /** - * Utility for setting navigation. Set pageNavigation, if existed in portal - * navigations, reset; if not, added to portal navigations. - * - * @param nav TODO This method which uses to cache the Navigation. Maybe - * remove this method because it uses to cache for UI - */ - public static void setNavigation(UserNavigation nav) { - if (nav == null) { - return; - } - WebuiRequestContext context = WebuiRequestContext.getCurrentInstance(); - if (context == null) { - return; - } - try { - UserNode selectedNav = Util.getUIPortal().getSelectedUserNode(); - if (selectedNav.getId() == nav.getKey().getName()) { - Util.getUIPortal().setNavPath(selectedNav); - } - } catch (Exception e) { - LOG.warn(e.getMessage(), e); - } - } - - /** - * Utility for removing portal navigation. - * - * @param nav - * @throws Exception - */ - public static void removeNavigation(UserNavigation nav) throws Exception { - ExoContainer container = ExoContainerContext.getCurrentContainer(); - NavigationService navService = container.getComponentInstanceOfType(NavigationService.class); - try { - navService.destroyNavigation(new NavigationContext(nav.getKey(), new NavigationState(1))); - } catch (NavigationServiceException nex) { - LOG.warn("Failed to remove navigations", nex); - } catch (Exception e) { - LOG.warn("Failed to remove navigations", e); - } - } - - /** - * Updates working work space - */ - public static void updateWorkingWorkSpace() { - UIPortalApplication uiPortalApplication = Util.getUIPortalApplication(); - UIWorkingWorkspace uiWorkingWS = uiPortalApplication.getChildById(UIPortalApplication.UI_WORKING_WS_ID); - PortalRequestContext pContext = Util.getPortalRequestContext(); - pContext.addUIComponentToUpdateByAjax(uiWorkingWS); - pContext.setFullRender(true); - } - /** * Creates new group in /Spaces node and return groupId * @@ -637,11 +211,10 @@ public static String createGroup(String groupLabel, String spaceName, String cre parentGroup = groupHandler.findGroupById(SPACE_GROUP); // Creates new group newGroup = groupHandler.createGroupInstance(); - shortName = Utils.cleanString(spaceName); + shortName = Utils.cleanString(StringUtils.firstNonBlank(groupLabel, spaceName)); groupId = parentGroup.getId() + "/" + shortName; - SpaceService spaceService = ExoContainerContext.getService(SpaceService.class); - if (spaceService.getSpaceByGroupId(groupId) != null) { + if (getSpaceService().getSpaceByGroupId(groupId) != null) { shortName = buildGroupId(shortName, parentGroup.getId()); groupId = parentGroup.getId() + "/" + shortName; } @@ -736,16 +309,9 @@ public static void removeMembershipFromGroup(Space space) { * * @param spaceName * @return boolean if existed return true, else return false - * @throws SpaceException with code INTERNAL_SERVER_ERROR */ - public static boolean isSpaceNameExisted(String spaceName) throws SpaceException { - PortalContainer portalContainer = PortalContainer.getInstance(); - SpaceService spaceService = (SpaceService) portalContainer.getComponentInstanceOfType(SpaceService.class); - // Checks whether spaceName has existed yet - if (spaceService.getSpaceByPrettyName(Utils.cleanString(spaceName)) != null) { - return true; - } - return false; + public static boolean isSpaceNameExisted(String spaceName) { + return getSpaceService().getSpaceByPrettyName(Utils.cleanString(spaceName)) != null; } /** @@ -771,7 +337,6 @@ public static void addCreatorToGroup(String creator, String groupId) { private static void addUserToGroupWithMembership(String remoteId, String groupId, String membership) { OrganizationService organizationService = getOrganizationService(); try { - // TODO: checks whether user is already manager? MembershipHandler membershipHandler = organizationService.getMembershipHandler(); Membership found = membershipHandler.findMembershipByUserGroupAndType(remoteId, groupId, membership); if (found == null && !MembershipTypeHandler.ANY_MEMBERSHIP_TYPE.equalsIgnoreCase(membership)) { @@ -788,8 +353,7 @@ private static void addUserToGroupWithMembership(String remoteId, String groupId membershipHandler.linkMembership(user, existingGroup, membershipType, true); } catch (Exception e) { throw new IllegalStateException("Unable to add user: " + remoteId + " to group: " + groupId + " with membership: " + - membership, - e); + membership, e); } finally { clearIdentityCaching(OrganizationIdentityProvider.NAME, remoteId); if (groupId.startsWith(SpaceUtils.SPACE_GROUP)) { @@ -841,7 +405,7 @@ public static void addUserToGroupWithPublisherMembership(String remoteId, String * @since 1.2.0-GA */ public static void addUserToGroupWithManagerMembership(String remoteId, String groupId) { - addUserToGroupWithMembership(remoteId, groupId, getUserACL().getAdminMSType()); + addUserToGroupWithMembership(remoteId, groupId, MANAGER); } /** @@ -942,7 +506,7 @@ public static void removeUserFromGroupWithPublisherMembership(String remoteId, S * @since 1.2.0-GA */ public static void removeUserFromGroupWithManagerMembership(String remoteId, String groupId) { - removeUserFromGroupWithMembership(remoteId, groupId, getUserACL().getAdminMSType()); + removeUserFromGroupWithMembership(remoteId, groupId, MANAGER); } /** @@ -955,150 +519,6 @@ public static void removeUserFromGroupWithAnyMembership(String remoteId, String removeUserFromGroupWithMembership(remoteId, groupId, MembershipTypeHandler.ANY_MEMBERSHIP_TYPE); } - /** - * Creates group navigation if not existed or return existing group navigation - * based on groupId - * - * @param groupId String - * @return spaceNav PageNavigation - * @throws SpaceException - */ - public static NavigationContext createGroupNavigation(String groupId) throws SpaceException { - ExoContainer container = ExoContainerContext.getCurrentContainer(); - NavigationService navService = (NavigationService) container.getComponentInstance(NavigationService.class); - // 14-june-2011 Apply UserNavigation - // PageNavigation spaceNav; - NavigationContext navContext = navService.loadNavigation(SiteKey.group(groupId)); - try { - if (navContext == null) { - // creates new space navigation - navContext = new NavigationContext(SiteKey.group(groupId), new NavigationState(1)); - navService.saveNavigation(navContext); - } - - return navContext; - } catch (Exception e) { - // TODO:should rollback what has to be rollback here - throw new SpaceException(SpaceException.Code.UNABLE_TO_CREAT_NAV, e); - } - } - - /** - * Refreshes the current user portal (navigation caching refresh). - * - * @since 1.2.8 - */ - public static void refreshNavigation() { - try { - UserPortal userPortal = getUserPortal(); - - if (userPortal != null) { - userPortal.refresh(); - } - } catch (Exception e) { - if (LOG.isDebugEnabled()) { - LOG.debug("It seem that we don't have a WebUI context, ignoring.", e); - } else { - LOG.warn("It seem that we don't have a WebUI context, error message: {}. Ignoring.", e.getMessage()); - } - } - } - - /** - * Using this method to get the UserPortal make sure that the data is latest. - * It's will remove the caching. - * - * @return - */ - public static UserPortal getUserPortal() { - try { - PortalRequestContext prc = Util.getPortalRequestContext(); - return prc.getUserPortalConfig().getUserPortal(); - } catch (Exception e) { - // Makes sure that in the RestService still gets the UserPortal. - try { - return getUserPortalForRest(); - } catch (Exception e1) { - return null; - } - } - } - - /** - * Get parent node of the current space. - * - * @return - * @throws Exception - * @since 1.2.8 - */ - public static UserNode getParentNode() throws Exception { - UIPortal uiPortal = Util.getUIPortal(); - UserPortal userPortal = getUserPortal(); - UserNode selectedNode = uiPortal.getSelectedUserNode(); - UserNode currParent = selectedNode.getParent(); - if (currParent != null) { - try { - userPortal.updateNode(currParent, Scope.CHILDREN, null); - } catch (NavigationServiceException e) { - currParent = null; - } - } - return currParent; - } - - /** - * Gets the UserPortal when uses the RestService. - * - * @return - * @throws Exception - */ - public static UserPortal getUserPortalForRest() throws Exception { - return getUserPortalConfig().getUserPortal(); - } - - /** - * Get user portal config. - * - * @return - * @throws Exception - * @since 1.2.9 - */ - public static UserPortalConfig getUserPortalConfig() throws Exception { - ExoContainer container = ExoContainerContext.getCurrentContainer(); - UserPortalConfigService userPortalConfigSer = container.getComponentInstanceOfType(UserPortalConfigService.class); - - ConversationState conversationState = ConversationState.getCurrent(); - String remoteId; - if (conversationState == null) { - remoteId = null; - } else { - remoteId = conversationState.getIdentity().getUserId(); - } - return userPortalConfigSer.getUserPortalConfig(userPortalConfigSer.getMetaPortal(), remoteId); - } - - /** - * Removes group navigations. - * - * @param groupId - * @throws SpaceException - */ - public static void removeGroupNavigation(String groupId) throws SpaceException { - ExoContainer container = ExoContainerContext.getCurrentContainer(); - NavigationService navService = (NavigationService) container.getComponentInstanceOfType(NavigationService.class); - try { - NavigationContext nav = navService.loadNavigation(SiteKey.group(groupId)); - if (nav != null) { - navService.destroyNavigation(nav); - } else { - throw new Exception("spaceNav is null"); - } - } catch (Exception e) { - throw new SpaceException(SpaceException.Code.UNABLE_TO_REMOVE_NAV, e); - } - - } - /** * Gets NavigationContext by a space's groupId * @@ -1110,322 +530,6 @@ public static NavigationContext getGroupNavigationContext(String groupId) { return navService.loadNavigation(SiteKey.group(groupId)); } - /** - * Gets userNavigation by a space's groupId - * - * @param groupId - */ - public static UserNavigation getGroupNavigation(String groupId) { - UserPortal userPortal = getUserPortal(); - return userPortal == null ? null : userPortal.getNavigation(SiteKey.group(groupId)); - } - - /** - * This related to a bug from portal. When this bug is resolved, use - * userNavigation.getNode(space.getUrl()); - * - * @param userNavigation - * @param spaceUrl - * @return - */ - public static UserNode getHomeNode(UserNavigation userNavigation, String spaceUrl) { - // Need to get usernode base on resolvePath - return getUserPortal().resolvePath(userNavigation, null, spaceUrl); - } - - /** - * Retrieving the UserNode base on the UserNavigation - * - * @param userNavigation - * @return - */ - public static UserNode getHomeNode(UserNavigation userNavigation) { - return getUserPortal().getNode(userNavigation, Scope.SINGLE, null, null); - } - - /** - * @param spaceNavCtx - * @param spaceUrl - * @return - */ - public static NodeContext> getHomeNodeWithChildren(NavigationContext spaceNavCtx, String spaceUrl) { - // Need to get usernode base on resolvePath - ExoContainer container = ExoContainerContext.getCurrentContainer(); - NavigationService navService = (NavigationService) container.getComponentInstance(NavigationService.class); - return loadNode(navService, spaceNavCtx, spaceUrl); - } - - /** - * Retrieving the UserNode with Children base on the spaceUrl and - * UserNavigation. When user can use this method to get homeNode, you can not - * call the update node to getChildren() - * - * @param userNavigation - * @param spaceUrl - * @return - */ - public static UserNode getHomeNodeWithChildren(UserNavigation userNavigation, String spaceUrl) { - // Need to get usernode base on resolvePath - UserNode homeNode = getUserPortal().resolvePath(userNavigation, null, spaceUrl); - getUserPortal().updateNode(homeNode, Scope.CHILDREN, null); - return homeNode; - - } - - /** - * Retrieving the UserNode of Space when is given Space instance - * - * @param space space - * @return - */ - public static UserNode getSpaceUserNode(Space space) throws Exception { - return getSpaceUserNode(space, null); - } - - public static UserNode getSpaceUserNode(Space space, UserNodeFilterConfig filter) throws Exception { - NavigationContext spaceNavCtx = getGroupNavigationContext(space.getGroupId()); - - UserNode spaceUserNode = null; - UserPortal userPortal = SpaceUtils.getUserPortal(); - if (userPortal != null) { - UserNavigation userNavigation = userPortal.getNavigation(spaceNavCtx.getKey()); - UserNode parentUserNode = userPortal.getNode(userNavigation, Scope.CHILDREN, filter, null); - spaceUserNode = parentUserNode.getChildrenSize() > 0 ? parentUserNode.getChild(0) : null; - } - if (spaceUserNode == null) { - LOG.warn("Failed to get spaceUserNode of group {}", space.getGroupId()); - } else { - userPortal.updateNode(spaceUserNode, Scope.CHILDREN, null); - } - return spaceUserNode; - } - - public static List getSpaceUserNodeChildren(Space space) throws Exception { - return new ArrayList(getSpaceUserNode(space).getChildren()); - } - - /** - * Sorts spaces list by priority and alphabet order - * - * @param spaces - * @return ordered spaces list - */ - public static List getOrderedSpaces(List spaces) { - Iterator itr = spaces.iterator(); - List orderedSpaces = new ArrayList(); - List middleSpaces = new ArrayList(); - List lowSpaces = new ArrayList(); - Space space = null; - while (itr.hasNext()) { - space = itr.next(); - String priority = space.getPriority(); - if (priority.equals(Space.HIGH_PRIORITY)) { - orderedSpaces.add(space); - } else if (priority.equals(Space.INTERMEDIATE_PRIORITY)) { - middleSpaces.add(space); - } else if (priority.equals(Space.LOW_PRIORITY)) { - lowSpaces.add(space); - } - } - for (Space sp : middleSpaces) { - orderedSpaces.add(sp); - } - for (Space sp : lowSpaces) { - orderedSpaces.add(sp); - } - return orderedSpaces; - } - - /** - * Utility for counting the number of members in a space - * - * @param space - * @return the number of members - * @throws SpaceException - */ - public static int countMembers(Space space) throws SpaceException { - if (space.getMembers() != null) { - return space.getMembers().length; - } - return 0; - } - - /** - * Gets app status in a space - * - * @param space - * @param appId - * @return appStatus - */ - public static String getAppStatus(Space space, String appId) { - String installedApps = space.getApp(); - if (installedApps == null) { - return null; - } - if (installedApps.contains(appId)) { - String appStatusPattern = getAppStatusPattern(installedApps, appId); - return appStatusPattern.split(":")[3]; - } - return null; - } - - /** - * Gets appNodeName in a space by its appId - * - * @param space - * @param appId - * @return - */ - public static String getAppNodeName(Space space, String appId) { - String installedApps = space.getApp(); - if (installedApps == null) { - return null; - } - if (installedApps.contains(appId)) { - String appStatusPatern = getAppStatusPattern(installedApps, appId); - return appStatusPatern.split(":")[1]; - } - return null; - } - - /** - * Checks if an application is removable or not. Default will return true. - * - * @param space - * @param appId - */ - public static boolean isRemovableApp(Space space, String appId) { - String installedApps = space.getApp(); - if (installedApps.contains(appId)) { - String appStatus = getAppStatusPattern(installedApps, appId); - String[] spliter = appStatus.split(":"); - if (spliter[2].equals("false")) { - return false; - } - } - return true; - } - - /** - * Gets all application id from a space - * - * @param space - * @return - */ - public static List getAppIdList(Space space) { - List appIdList = new ArrayList(); - String installedApps = space.getApp(); - if (installedApps != null) { - if (installedApps.contains(",")) { - String[] appStatuses = installedApps.split(","); - for (String appStatus : appStatuses) { - appIdList.add((appStatus.split(":"))[0]); - } - } else { - appIdList.add((installedApps.split(":"))[0]); - } - } - return appIdList; - } - - /** - * Utility for getting absolute url - * - * @return absolute url - * @throws SpaceException - */ - public static String getAbsoluteUrl() throws SpaceException { - PortalRequestContext portalRequestContext = Util.getPortalRequestContext(); - HttpServletRequest request = portalRequestContext.getRequest(); - String str = request.getRequestURL().toString(); - return str.substring(0, str.indexOf(portalRequestContext.getRequestContextPath())); - } - - /** - * Checks if a user is removed or not.
- * - * @param userName User name for checking. - * @throws SpaceException if user is removed. - */ - public static void checkUserExisting(String userName) throws SpaceException { - OrganizationService orgService = getOrganizationService(); - User user = null; - try { - user = orgService.getUserHandler().findUserByName(userName); - } catch (Exception e) { - throw new SpaceException(SpaceException.Code.ERROR_RETRIEVING_USER, e); - } - - if (user == null) { - throw new SpaceException(SpaceException.Code.ERROR_RETRIEVING_USER); - } - } - - /** - * Check an application is installed or not yet. - * - * @param space - * @param appId - * @return - */ - public static boolean isInstalledApp(Space space, String appId) { - String installedApps = space.getApp(); - if (installedApps == null) { - return false; - } - String[] apps = installedApps.split(","); - String[] appPart; - for (int idx = 0; idx < apps.length; idx++) { - appPart = apps[idx].split(":"); - if (appPart[0].equals(appId) || (appPart.length > 1 && appPart[1].equals(appId))) { - return true; - } - } - return false; - } - - /** - * Get display application name in formal. - * - * @param appDisplayName - * @return - */ - public static String getDisplayAppName(String appDisplayName) { - int length = appDisplayName.length(); - if (appDisplayName.toLowerCase().endsWith("portlet")) { - return appDisplayName.substring(0, length - 7).trim(); - } - return appDisplayName; - } - - /** - * Gets appStatusPattern: [appId:appNodeName:isRemovableString:status] - * - * @param installedApps - * @param appId - * @return - */ - private static String getAppStatusPattern(String installedApps, String appId) { - if (installedApps == null) { - return null; - } - if (installedApps.contains(appId)) { - String[] apps = installedApps.split(","); - for (String app : apps) { - if (app.contains(appId)) { - String[] splited = app.split(":"); - if (splited.length != 4) { - LOG.warn("appStatus is not in correct form of [appId:appNodeName:isRemovableString:status] : " + app); - return null; - } - - return app; - } - } - } - return null; - } - /** * Gets Organization Service * @@ -1433,55 +537,7 @@ private static String getAppStatusPattern(String installedApps, String appId) { */ public static OrganizationService getOrganizationService() { PortalContainer portalContainer = PortalContainer.getInstance(); - return (OrganizationService) portalContainer.getComponentInstanceOfType(OrganizationService.class); - } - - /** - * Gets dataStorage - * - * @return - */ - public static LayoutService getLayoutService() { - PortalContainer portalContainer = PortalContainer.getInstance(); - return portalContainer.getComponentInstanceOfType(LayoutService.class); - } - - /** - * Checks view permission - * - * @param expPerm - * @param groupId - * @return - * @throws Exception - */ - private static boolean hasViewPermission(String expPerm, String groupId) throws Exception { - if (UserACL.EVERYONE.equals(expPerm)) { - return true; - } - String[] temp = expPerm.split(":"); - if (temp.length < 2) { - return false; - } - String tempExp = temp[1].trim(); - if (tempExp.equals(groupId) || tempExp.equals(PLATFORM_USERS_GROUP)) { - return true; - } - return false; - } - - /** - * Gets localized string value - * - * @param localizedString - * @param portletName - * @return - */ - private static String getLocalizedStringValue(LocalizedString localizedString, String portletName) { - if (localizedString == null || localizedString.getDefaultString() == null) { - return portletName; - } else { - return localizedString.getDefaultString(); - } + return portalContainer.getComponentInstanceOfType(OrganizationService.class); } /** @@ -1511,13 +567,12 @@ public static String buildGroupId(String prettyName, String parentGroupId) { checkedGroupId = Utils.cleanString(mainPatternGroupId + SPACE_STR + extendPattern); ExoContainer container = ExoContainerContext.getCurrentContainer(); - SpaceService spaceService = (SpaceService) container.getComponentInstanceOfType(SpaceService.class); - if (spaceService.getSpaceByGroupId(parentGroupId + "/" + checkedGroupId) != null) { + if (getSpaceService().getSpaceByGroupId(parentGroupId + "/" + checkedGroupId) != null) { continue; } - IdentityManager idm = (IdentityManager) container.getComponentInstanceOfType(IdentityManager.class); - Identity identity = idm.getOrCreateIdentity(SpaceIdentityProvider.NAME, checkedGroupId, true); + IdentityManager idm = container.getComponentInstanceOfType(IdentityManager.class); + Identity identity = idm.getOrCreateSpaceIdentity(checkedGroupId); if (identity == null) { hasNext = false; } @@ -1526,222 +581,10 @@ public static String buildGroupId(String prettyName, String parentGroupId) { return checkedGroupId; } - /** - * Builds pretty name base on the basic name in case create more than one - * space with the same name. - * - * @param space - * @return - */ - public static String buildPrettyName(Space space) { - String checkedPrettyName = space.getPrettyName(); - String mainPatternPrettyName = null; - String numberPattern = NUMBER_REG_PATTERN; - if (checkedPrettyName.substring(checkedPrettyName.lastIndexOf(UNDER_SCORE_STR) + 1).matches(numberPattern)) { - mainPatternPrettyName = checkedPrettyName.substring(0, checkedPrettyName.lastIndexOf(UNDER_SCORE_STR)); - } else { - mainPatternPrettyName = checkedPrettyName; - } - - boolean hasNext = true; - int extendPattern = 0; - - while (hasNext) { - ++extendPattern; - checkedPrettyName = Utils.cleanString(mainPatternPrettyName + SPACE_STR + extendPattern); - ExoContainer container = ExoContainerContext.getCurrentContainer(); - IdentityManager idm = (IdentityManager) container.getComponentInstanceOfType(IdentityManager.class); - Identity identity = idm.getOrCreateIdentity(SpaceIdentityProvider.NAME, checkedPrettyName, true); - if (identity == null) { - hasNext = false; - } - } - - return checkedPrettyName; - } - - /** - * Gets the UserACL which helps to get Membership role to avoid hard code. - * - * @return UserACL object - */ - public static UserACL getUserACL() { - ExoContainer container = ExoContainerContext.getCurrentContainer(); - return (UserACL) container.getComponentInstanceOfType(UserACL.class); - } - - public static NodeContext> loadNode(NavigationService navigationService, - NavigationContext navigation, - String navUri) { - if (navigation == null) - return null; - - if (navUri != null) { - String[] path = trim(navUri.split("/")); - NodeContext> node = navigationService.loadNode(NodeModel.SELF_MODEL, - navigation, - GenericScope.branchShape(path, Scope.ALL), - null); - for (String name : path) { - node = node.get(name); - if (node == null) - break; - } - - return node; - } else { - return navigationService.loadNode(NodeModel.SELF_MODEL, navigation, Scope.ALL, null); - } - } - - public static List getSpaceNavigations(Space space, Locale locale, String currentuser) { - List navigations = new ArrayList<>(); - try { - UserNodeFilterConfig.Builder filterConfigBuilder = UserNodeFilterConfig.builder(); - filterConfigBuilder.withVisibility(Visibility.DISPLAYED, Visibility.TEMPORAL); - filterConfigBuilder.withTemporalCheck(); - UserNodeFilterConfig filter = filterConfigBuilder.build(); - UserNode parentNavigation = SpaceUtils.getSpaceUserNode(space, filter); - UserNode settingNavigation = parentNavigation.getChild(SPACE_SETTINGS_PAGE); - if (!hasSettingPermission(space, currentuser) && (settingNavigation != null)) { - parentNavigation.removeChild(settingNavigation.getName()); - } - - navigations.add(parentNavigation); - navigations.addAll(parentNavigation.getChildren()); - filterUnreachablePages(navigations); - computeNavigationLabels(navigations, locale); - } catch (Exception e) { - LOG.error("Get UserNode of Space failed.", e); - } - return navigations; - } - - public static String getUri(UserNode userNode) { - String uri = userNode.getURI(); - if (!uri.startsWith("/" + PortalContainer.getCurrentPortalContainerName())) { - uri = NavigationURLUtils.getURL(userNode); - } - return uri; - } - - public static void computeNavigationLabels(List navigations, Locale locale) { - ResourceBundle resourceBundle = getSharedResourceBundle(locale); - for (UserNode node : navigations) { - if (node == null) { - continue; - } - String nodeTitle = getResolvedAppLabel(node, resourceBundle, locale); - node.setLabel(null); - node.setResolvedLabel(nodeTitle); - } - } - - public static boolean hasSettingPermission(Space space, String username) { - return getSpaceService().canManageSpace(space, username); - } - - public static boolean isHomeNavigation(UserNode node) { - return node.getParent() == null || StringUtils.equals(node.getParent().getName(), "default") - || node.getParent().getParent() == null; - } - - public static String getResolvedAppLabel(UserNode userNode, ResourceBundle resourceBundle, Locale locale) { - if (userNode == null) { - return null; - } - String id = userNode.getId(); - String nodeLabel = userNode.getLabel(); - if (nodeLabel != null) { - return ExpressionUtil.getExpressionValue(resourceBundle, nodeLabel); - } else if (id != null) { - DescriptionStorage descriptionStorage = getUserPortalConfigService().getDescriptionService(); - State description = descriptionStorage.resolveDescription(id, locale); - if (description != null && !StringUtils.equals(description.getName(), userNode.getName())) { - return description.getName(); - } - } - String labelKey = userNode.getPageRef().getName() + ".label.name"; - if (resourceBundle.containsKey(labelKey)) { - return resourceBundle.getString(labelKey); - } - return userNode.getName(); - } - - public static void filterUnreachablePages(List nodes) { - List nonePageNodes = new ArrayList<>(); - UserACL userACL = SpaceUtils.getUserACL(); - for (UserNode node : nodes) { - PageKey currentPage = node.getPageRef(); - if (currentPage == null) { - nonePageNodes.add(node); - } else { - PageContext currentPageContext = getPageStorage().loadPage(currentPage); - if (currentPageContext == null || !userACL.hasAccessPermission(currentPageContext, ConversationState.getCurrent().getIdentity())) { - nonePageNodes.add(node); - } - } - } - - nodes.removeAll(nonePageNodes); - } - - public static void setPageTitle(List navigations, - RenderRequest request, - Space space, - Locale locale) throws Exception { - UserNode selectedUserNode = Util.getUIPortal().getSelectedUserNode(); - String selectedUserNodeId = selectedUserNode.getId(); - String selectedUserNodeLabel = navigations.stream() - .filter(node -> StringUtils.equals(node.getId(), selectedUserNodeId)) - .map(UserNode::getResolvedLabel) - .findFirst() - .orElse(null); - if (selectedUserNodeLabel == null) { - ResourceBundle resourceBundle = SpaceUtils.getSharedResourceBundle(locale); - selectedUserNodeLabel = SpaceUtils.getResolvedAppLabel(selectedUserNode, resourceBundle, locale); - } - ((PortalRequestContext) RequestContext.getCurrentInstance()).getRequest() - .setAttribute(PORTAL_PAGE_TITLE, - space.getDisplayName() + " - " + - selectedUserNodeLabel); - } - - public static UserPortalConfigService getUserPortalConfigService() { - return ExoContainerContext.getService(UserPortalConfigService.class); - } - - public static PageStorage getPageStorage() { - return ExoContainerContext.getService(PageStorage.class); - } - public static SpaceService getSpaceService() { return ExoContainerContext.getService(SpaceService.class); } - public static ResourceBundle getSharedResourceBundle(Locale locale) { - return getResourceBundleService().getResourceBundle(getSharedResources(), locale); - } - - public static ResourceBundleService getResourceBundleService() { - return ExoContainerContext.getService(ResourceBundleService.class); - } - - public static String[] getSharedResources() { - return getResourceBundleService().getSharedResourceBundleNames(); - } - - private static String[] trim(String[] array) { - List trimmed = new ArrayList(array.length); - for (String s : array) { - if (s != null && !"".equals(s)) { - trimmed.add(s); - } - } - - return trimmed.toArray(new String[trimmed.size()]); - } - private static void clearIdentityCaching(String providerId, String remoteId) { ExoContainer container = ExoContainerContext.getCurrentContainer(); CachedIdentityStorage cachedIdentityStorage = container.getComponentInstanceOfType(CachedIdentityStorage.class); @@ -1756,12 +599,4 @@ private static void clearSpaceCache(String spaceId) { cachedSpaceStorage.clearSpaceCached(spaceId); } - @SneakyThrows - private static Set getPortlets() { - if (portletsCache == null) { - portletsCache = ExoContainerContext.getService(PortletInvoker.class).getPortlets(); - } - return portletsCache; - } - } diff --git a/component/core/src/main/java/org/exoplatform/social/core/space/impl/DefaultSpaceApplicationHandler.java b/component/core/src/main/java/org/exoplatform/social/core/space/impl/DefaultSpaceApplicationHandler.java deleted file mode 100644 index abb262310f2..00000000000 --- a/component/core/src/main/java/org/exoplatform/social/core/space/impl/DefaultSpaceApplicationHandler.java +++ /dev/null @@ -1,824 +0,0 @@ -/* - * Copyright (C) 2003-2007 eXo Platform SAS. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License - * as published by the Free Software Foundation; either version 3 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see. - */ -package org.exoplatform.social.core.space.impl; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; - -import org.exoplatform.commons.utils.CommonsUtils; -import org.exoplatform.container.ExoContainerContext; -import org.exoplatform.container.xml.InitParams; -import org.exoplatform.portal.config.UserACL; -import org.exoplatform.portal.config.UserPortalConfigService; -import org.exoplatform.portal.config.model.Container; -import org.exoplatform.portal.config.model.ModelObject; -import org.exoplatform.portal.config.model.Page; -import org.exoplatform.portal.config.model.PortalConfig; -import org.exoplatform.portal.config.model.TransientApplicationState; -import org.exoplatform.portal.module.ModuleRegistry; -import org.exoplatform.portal.mop.PageType; -import org.exoplatform.portal.mop.SiteKey; -import org.exoplatform.portal.mop.navigation.NavigationContext; -import org.exoplatform.portal.mop.navigation.NodeContext; -import org.exoplatform.portal.mop.navigation.NodeModel; -import org.exoplatform.portal.mop.navigation.NodeState; -import org.exoplatform.portal.mop.navigation.NodeState.Builder; -import org.exoplatform.portal.mop.navigation.Scope; -import org.exoplatform.portal.mop.page.PageContext; -import org.exoplatform.portal.mop.page.PageKey; -import org.exoplatform.portal.mop.page.PageState; -import org.exoplatform.portal.mop.service.LayoutService; -import org.exoplatform.portal.mop.service.NavigationService; -import org.exoplatform.portal.mop.storage.PageStorage; -import org.exoplatform.portal.mop.user.UserNode; -import org.exoplatform.portal.pom.config.Utils; -import org.exoplatform.portal.pom.spi.portlet.Portlet; -import org.exoplatform.portal.pom.spi.portlet.PortletBuilder; -import org.exoplatform.portal.webui.portal.UIPortal; -import org.exoplatform.portal.webui.util.Util; -import org.exoplatform.services.log.ExoLogger; -import org.exoplatform.services.log.Log; -import org.exoplatform.social.core.space.Application; -import org.exoplatform.social.core.space.SpaceApplication; -import org.exoplatform.social.core.space.SpaceException; -import org.exoplatform.social.core.space.SpaceTemplate; -import org.exoplatform.social.core.space.SpaceUtils; -import org.exoplatform.social.core.space.model.Space; -import org.exoplatform.social.core.space.spi.SpaceApplicationHandler; -import org.exoplatform.social.core.space.spi.SpaceService; -import org.exoplatform.social.core.space.spi.SpaceTemplateService; -import org.exoplatform.webui.application.WebuiRequestContext; - -/** - * Default implementation for working with space applications. - * - * @author dang.tung - * @author hoatle (hoatlevan at gmail dot com) - * @since OCt 17, 2008 - */ - -public class DefaultSpaceApplicationHandler implements SpaceApplicationHandler { - protected static final Log LOG = ExoLogger.getLogger(DefaultSpaceApplicationHandler.class); - - public static final String NAME = "classic"; - - protected static final String TEMPLATE_NAME_PARAM = "templateName"; - - public static final String SPACE_TEMPLATE_PAGE_ID = "portal::classic::spacetemplate"; - - public static final String APPLICATION_CONTAINER = "Application"; - - /** - * The {groupId} preference value pattern - * - * @since 1.2.0-GA - */ - protected static final String GROUP_ID_PREFERENCE = "{groupId}"; - - /** - * The {modifiedGroupId} preference value pattern - * - * @since 1.2.0-GA - */ - protected static final String MODIFIED_GROUP_ID_PREFERENCE = "{modifiedGroupId}"; - - /** - * The {pageName} preference value pattern - * - * @since 1.2.0-GA - */ - protected static final String PAGE_NAME_PREFERENCE = "{pageName}"; - - /** - * The {pageUrl} preference value pattern - * - * @since 1.2.0-GA - */ - protected static final String PAGE_URL_PREFERENCE = "{pageUrl}"; - - protected LayoutService layoutService; - - protected NavigationService navigationService; - - protected PageStorage pageStorage; - - protected SpaceService spaceService; - - protected ModuleRegistry moduleRegistry; - - protected SpaceTemplateService spaceTemplateService; - - protected String templateName; - - public DefaultSpaceApplicationHandler(InitParams params, - LayoutService layoutService, - NavigationService navigationService, - PageStorage pageService, - SpaceTemplateService spaceTemplateService) { - this.layoutService = layoutService; - this.navigationService = navigationService; - this.pageStorage = pageService; - this.spaceTemplateService = spaceTemplateService; - if (params == null) { - templateName = NAME; - } else { - templateName = params.getValueParam(TEMPLATE_NAME_PARAM).getValue(); - } - } - - /** - * {@inheritDoc} - */ - public void initApps(Space space, SpaceTemplate spaceTemplate) throws SpaceException { - try { - NavigationContext navContext = SpaceUtils.createGroupNavigation(space.getGroupId()); - NodeContext> parentNodeCtx = navigationService.loadNode(NodeModel.SELF_MODEL, - navContext, - Scope.CHILDREN, - null); - - // - SpaceApplication homeApplication = spaceTemplate.getSpaceHomeApplication(); - if (homeApplication == null) { - throw new IllegalStateException(String.format("Could not find space home application for template %s. Could not init space apps", - spaceTemplate.getName())); - } - NodeContext> homeNodeCtx = createPageNodeFromApplication(navContext, - parentNodeCtx, - space, - homeApplication, - null, - true); - List spaceApplications = spaceTemplate.getSpaceApplicationList(); - if (spaceApplications != null) { - for (SpaceApplication spaceApplication : spaceApplications) { - try { - createPageNodeFromApplication(navContext, homeNodeCtx, space, spaceApplication, null, false); - getSpaceService().installApplication(space, spaceApplication.getPortletName()); - } catch (Exception e) { - LOG.warn("Can't install application {} for space {}, ignore adding dedicated page", - spaceApplication.getPortletName(), - space.getDisplayName()); - } - } - } - navigationService.saveNode(parentNodeCtx, null); - } catch (Exception e) { - throw new SpaceException(SpaceException.Code.UNABLE_TO_INIT_APP, e); - } - } - - /** - * {@inheritDoc} - */ - public void deInitApp(Space space) throws SpaceException { - try { - String groupId = space.getGroupId(); - NavigationContext spaceNavCtx = SpaceUtils.getGroupNavigationContext(groupId); - // return in case group navigation was removed by portal SOC-548 - if (spaceNavCtx == null) { - return; - } - NodeContext> homeNodeCtx = SpaceUtils.getHomeNodeWithChildren(spaceNavCtx, groupId); - - for (NodeContext child : homeNodeCtx.getNodes()) { - @SuppressWarnings("unchecked") - NodeContext> childNode = (NodeContext>) child; - Page page = layoutService.getPage(childNode.getState().getPageRef().format()); - layoutService.remove(page); - } - - SpaceUtils.removeGroupNavigation(groupId); - } catch (Exception e) { - throw new SpaceException(SpaceException.Code.UNABLE_TO_DEINIT_APP, e); - } - } - - /** - * {@inheritDoc} - */ - public void activateApplication(Space space, String appId, String appName) { - NavigationService navService = ExoContainerContext.getService(NavigationService.class); - NavigationContext navContext; - NodeContext> homeNodeCtx = null; - - try { - navContext = SpaceUtils.getGroupNavigationContext(space.getGroupId()); - homeNodeCtx = SpaceUtils.getHomeNodeWithChildren(navContext, null); - homeNodeCtx = homeNodeCtx.get(0); - } catch (Exception e) { - LOG.warn("space navigation not found.", e); - return; - } - SpaceApplication spaceApplication = null; - - for (SpaceTemplate spaceTemplate : spaceTemplateService.getSpaceTemplates()) { - for (SpaceApplication application : spaceTemplate.getSpaceApplicationList()) { - if (appId.equals(application.getPortletName()) && !SpaceUtils.isInstalledApp(space, appId)) { - spaceApplication = application; - break; - } - } - } - - if (spaceApplication == null) { - spaceApplication = new SpaceApplication(); - spaceApplication.setPortletName(appId); - } - createPageNodeFromApplication(navContext, homeNodeCtx, space, spaceApplication, appName, false); - navService.saveNode(homeNodeCtx, null); - } - - /** - * {@inheritDoc} - */ - public void deactiveApplication(Space space, String appId) throws SpaceException { - deactivateApplicationClassic(space, appId); - } - - /** - * {@inheritDoc} - */ - public void installApplication(Space space, String appId) throws SpaceException { - - } - - /** - * {@inheritDoc} - */ - public void removeApplication(Space space, String appId, String appName) throws SpaceException { - removeApplicationClassic(space, appId, appName); - } - - /** - * {@inheritDoc} - */ - public void removeApplications(Space space) throws SpaceException { - try { - String[] apps = space.getApp().split(","); - String[] appPart = null; - for (int i = 0; i < apps.length; i++) { - appPart = apps[i].split(":"); - removeApplication(space, appPart[0], appPart[1]); - } - } catch (Exception e) { - throw new SpaceException(SpaceException.Code.UNABLE_TO_REMOVE_APPLICATIONS, e); - } - } - - @Override - @SuppressWarnings("unchecked") - public void moveApplication(Space space, String appId, int transition) throws Exception { - String apps = space.getApp(); - if (transition == 0 || apps == null || !StringUtils.contains(apps, appId)) { - return; - } - List appPartsList = new ArrayList<>(Arrays.asList(apps.split(","))); - String appPartToChange = appPartsList.stream() - .filter(appPart -> appPart != null && StringUtils.startsWith(appPart, appId + ":")) - .findFirst() - .orElse(null); - if (StringUtils.isBlank(appPartToChange)) { - return; - } - String[] appParts = appPartToChange.split(":"); - NodeContext> spaceUserNode = getSpaceUserNode(space).get(0); - NodeContext> toMoveNode = null; - Iterator> nodes = spaceUserNode.getNodes().iterator(); - int nodeIndex = 0; - while (toMoveNode == null && nodes.hasNext()) { - NodeContext> userNode = (NodeContext>) nodes.next(); - String appName = appParts[1]; - if (StringUtils.equals(userNode.getName(), appId) - || StringUtils.equals(userNode.getName(), appName) - || (userNode.getState().getPageRef() != null - && (StringUtils.equals(userNode.getState().getPageRef().getName(), appId) - || StringUtils.equals(userNode.getState().getPageRef().getName(), appName)))) { - toMoveNode = userNode; - break; - } - nodeIndex++; - } - if (toMoveNode != null) { - if (transition < 0) { - if (nodeIndex > 0) { - NodeContext> previousNode = spaceUserNode.get(nodeIndex - 1); - spaceUserNode.removeNode(previousNode.getName()); - spaceUserNode.add(nodeIndex, previousNode); - } - } else if (transition > 0) { - int newIndex = nodeIndex + 1; - if (newIndex < spaceUserNode.getNodeCount()) { - spaceUserNode.removeNode(toMoveNode.getName()); - spaceUserNode.add(newIndex, toMoveNode); - } - } - } - - ExoContainerContext.getService(NavigationService.class).saveNode(spaceUserNode, null); - } - - @Override - public void restoreApplicationLayout(Space space, String appId) throws Exception { - NavigationService navService = ExoContainerContext.getService(NavigationService.class); - NavigationContext navContext = SpaceUtils.getGroupNavigationContext(space.getGroupId()); - - NodeContext> parentNodeCtx = navService.loadNode(NodeModel.SELF_MODEL, navContext, Scope.CHILDREN, null); - - String spaceTemplateName = space.getTemplate(); - SpaceTemplate spaceTemplate = spaceTemplateService.getSpaceTemplateByName(spaceTemplateName); - if (spaceTemplate == null) { - throw new IllegalStateException("Space template with name " + spaceTemplateName + " wasn't found"); - } - - if (StringUtils.equalsIgnoreCase(appId, "home")) { - SpaceApplication homeApplication = spaceTemplate.getSpaceHomeApplication(); - if (homeApplication == null) { - throw new IllegalStateException("Could not find space home application for template " + spaceTemplate.getName() + - ". Could not init space apps"); - } - - String originalHomePageName = parentNodeCtx.get(0).getState().getPageRef().getName(); - createPageNodeFromApplication(navContext, parentNodeCtx, space, homeApplication, originalHomePageName, true); - } else { - SpaceApplication spaceApplication = getSpaceApplication(spaceTemplate, appId); - NodeContext> homeNodeCtx = parentNodeCtx.get(0); - createPageNodeFromApplication(navContext, homeNodeCtx, space, spaceApplication, null, false); - } - } - - /** - * {@inheritDoc} - */ - public String getName() { - return templateName; - } - - @Override - public void setName(String s) { - - } - - @Override - public String getDescription() { - return null; - } - - @Override - public void setDescription(String s) { - - } - - /** - * Deactivates an application in a space - * - * @param space - * @param appId - */ - protected void deactivateApplicationClassic(Space space, String appId) { - - } - - /** - * Removes an classic-type application from a space - * - * @param space - * @param appId - * @throws SpaceException - */ - protected void removeApplicationClassic(Space space, String appId, String appName) throws SpaceException { - try { - - UserNode spaceUserNode = SpaceUtils.getSpaceUserNode(space); - UserNode removedNode = spaceUserNode.getChild(appName); - if (removedNode == null) { - // Try to get the node by the pageRef name and the appId - for (UserNode node : spaceUserNode.getChildren()) { - if (appId.equals(node.getPageRef().getName())) { - removedNode = spaceUserNode.getChild(node.getName()); - break; - } - } - } - if (removedNode == null) { - // In case of cannot find the removed node, try one more time - String spaceTemplateName = space.getTemplate(); - SpaceTemplate spaceTemplate = spaceTemplateService.getSpaceTemplateByName(spaceTemplateName); - if (spaceTemplate == null) { - throw new IllegalStateException("Space template with name " + spaceTemplateName + " wasn't found"); - } - List spaceApplications = spaceTemplate.getSpaceApplicationList(); - for (SpaceApplication spaceApplication : spaceApplications) { - if (appId.equals(spaceApplication.getPortletName())) { - removedNode = spaceUserNode.getChild(spaceApplication.getUri()); - } - } - } - - if (removedNode != null) { - spaceUserNode.removeChild(removedNode.getName()); - } else { - return; - } - - // remove page - if (removedNode != null) { - PageKey pageRef = removedNode.getPageRef(); - if (pageRef.format() != null && pageRef.format().length() > 0) { - // only clear UI caching when it's in UI context - if (WebuiRequestContext.getCurrentInstance() != null) { - UIPortal uiPortal = Util.getUIPortal(); - // Remove from cache - uiPortal.setUIPage(pageRef.format(), null); - } - layoutService.remove(pageRef); - } - } - - SpaceUtils.getUserPortal().saveNode(spaceUserNode, null); - - } catch (Exception e) { - throw new SpaceException(SpaceException.Code.UNABLE_TO_REMOVE_APPLICATION, e); - } - - } - - /** - * Creates page node from application. - Creates Application instance from - * appId.
- * - Creates Page instance and set the newly-created application for that - * page; adds application to container.
- * - Creates PageNode instance and returns that pageNode. - * - * @param space - * @param spaceApplication - * @param isRoot - * @return - * @since 1.2.0-GA - */ - protected NodeContext> createPageNodeFromApplication(NavigationContext navContext, - NodeContext> nodeCtx, - Space space, - SpaceApplication spaceApplication, - String appName, - boolean isRoot) { - String appId = spaceApplication.getPortletName(); - String potletFullId = spaceApplication.getPortletApp() + "/" + spaceApplication.getPortletName(); - if (!isPortletActive(potletFullId)) { - return null; - } - - Application app; - try { - app = getApplication(appId); - } catch (Exception e) { - if (StringUtils.isBlank(spaceApplication.getPortletApp())) { - throw new IllegalStateException("An error occurred while getting application " + appId + " from registry." + - " In fact, the application isn't configured with its application name (WAR webapp name)." + - " This may be the cause of the problem", e); - } else { - throw new IllegalStateException("An error occurred while getting application " + appId + " from registry.", e); - } - } - String contentId = app.getContentId(); - String appInstanceId = PortalConfig.GROUP_TYPE + "#" + space.getGroupId() + ":/" + contentId + "/" + - app.getApplicationName() + System.currentTimeMillis(); - org.exoplatform.portal.config.model.Application portletApplication = createPortletApplication(appInstanceId, - space, - isRoot); - portletApplication.setAccessPermissions(new String[] { "*:" + space.getGroupId() }); - portletApplication.setShowInfoBar(false); - - String pageTitle = space.getDisplayName() + " - " + app.getDisplayName(); - String pageName = app.getApplicationName(); - // is the application installed? - if (SpaceUtils.isInstalledApp(space, appId) && (appName != null)) { - pageName = appName; - } - UserPortalConfigService userPortalConfigService = getUserPortalConfigService(); - Page page = null; - try { - page = createSpacePage(userPortalConfigService, space, app, portletApplication, isRoot); - page.setName(pageName); - page.setTitle(pageTitle); - - // set permission for page - String visibility = space.getVisibility(); - if (CollectionUtils.isNotEmpty(spaceApplication.getRoles())) { - page.setAccessPermissions(spaceApplication.getRoles() - .stream() - .map(r -> r + ":" + space.getGroupId()) - .toArray(String[]::new)); - } else if (StringUtils.equals(visibility, Space.PUBLIC)) { - page.setAccessPermissions(new String[] { UserACL.EVERYONE }); - } else { - page.setAccessPermissions(new String[] { "*:" + space.getGroupId() }); - } - page.setEditPermission("manager:" + space.getGroupId()); - page.setProfiles(spaceApplication.getProfiles()); - - SiteKey siteKey = navContext.getKey(); - PageKey pageKey = new PageKey(siteKey, page.getName()); - PageState pageState = new PageState(page.getTitle(), - page.getDescription(), - page.isShowMaxWindow(), - page.isHideSharedLayout(), - page.getFactoryId(), - page.getProfiles(), - Arrays.asList(page.getAccessPermissions()), - page.getEditPermission(), - PageType.PAGE.name(), - null); - - pageStorage.savePage(new PageContext(pageKey, pageState)); - layoutService.save(page); - } catch (Exception e) { - LOG.warn("Error while creating the Page '{}' for space '{}'", - pageTitle, - space.getDisplayName(), - e); - } - - if (isRoot) { - pageName = space.getUrl(); - } else { - if (spaceApplication.getUri() != null && !spaceApplication.getUri().isEmpty()) { - pageName = spaceApplication.getUri(); - } - - } - NodeContext> childNodeCtx = null; - try { - childNodeCtx = nodeCtx.add(null, pageName); - } catch (Exception e) { - LOG.debug("Tree t={} already in the map", pageName); - childNodeCtx = nodeCtx.get(pageName); - } - Builder nodeStateBuilder = new NodeState.Builder() - .icon(spaceApplication.getIcon()) - .pageRef(PageKey.parse(page.getPageId())); - WebuiRequestContext context = WebuiRequestContext.getCurrentInstance(); - if (context != null && !context.getApplicationResourceBundle().containsKey(appId + ".label.name")) { - nodeStateBuilder.label(app.getDisplayName()); - } else { - nodeStateBuilder.label("#{" + appId + ".label.name}"); - } - childNodeCtx.setState(nodeStateBuilder.build()); - return childNodeCtx; - } - - protected Page createSpacePage(UserPortalConfigService userPortalConfigService, - Space space, - Application app, - org.exoplatform.portal.config.model.Application portletApplication, - boolean isRoot) throws Exception { - Page page; - if (isRoot) { - page = userPortalConfigService.createPageTemplate("spaceHomePage", - PortalConfig.GROUP_TYPE, - space.getGroupId()); - } else { - page = userPortalConfigService.createPageTemplate("space", - PortalConfig.GROUP_TYPE, - space.getGroupId()); - // setting some data to page. - setPage(space, app, portletApplication, page); - } - return page; - } - - /** - * Gets an application by its id. - * - * @param appId - * @return - * @throws SpaceException - */ - protected Application getApplication(String appId) throws SpaceException { - Application application = SpaceUtils.getApplication(appId); - if (application == null && appId.contains("/")) { - application = SpaceUtils.getApplication(appId.split("/")[1]); - } - if (application == null) { - throw new SpaceException(SpaceException.Code.UNABLE_TO_LIST_AVAILABLE_APPLICATIONS); - } - return application; - } - - protected void setPage(Space space, - Application app, - org.exoplatform.portal.config.model.Application portletApplication, - Page page) { - - ArrayList pageChilds = page.getChildren(); - - // - Container container = SpaceUtils.findContainerById(pageChilds, SpaceUtils.APPLICATION_CONTAINER); - ArrayList children = container.getChildren(); - - children.add(portletApplication); - - container.setChildren(children); - pageChilds = setContainerById(pageChilds, container); - page.setChildren(pageChilds); - setPermissionForPage(page.getChildren(), "*:" + space.getGroupId()); - } - - /** - * Sets permission for page. - * - * @param children - * @param perm - */ - protected void setPermissionForPage(ArrayList children, String perm) { - for (ModelObject modelObject : children) { - if (modelObject instanceof org.exoplatform.portal.config.model.Application) { - ((org.exoplatform.portal.config.model.Application) modelObject).setAccessPermissions(new String[] { perm }); - } else if (modelObject instanceof Container) { - ((Container) modelObject).setAccessPermissions(new String[] { perm }); - setPermissionForPage(((Container) modelObject).getChildren(), perm); - } - } - } - - /** - * Sets container by Id - * - * @param childs - * @param container - * @return - */ - protected ArrayList setContainerById(ArrayList childs, Container container) { - ArrayList result = childs; - int index = result.indexOf(container); - // if container existing and child of the page - if (index != -1) { - result.set(index, container); - } else { - for (int i = 0; i < result.size(); i++) { - ModelObject obj = result.get(i); - if (org.exoplatform.portal.config.model.Application.class.isInstance(obj)) { - continue; - } - Container objContainer = (Container) obj; - ArrayList tmp = setContainerById(objContainer.getChildren(), container); - objContainer.setChildren(tmp); - result.set(i, objContainer); - } - } - return result; - } - - /** - * Creates portlet application from instanceId - * - * @param instanceId - * @return - */ - protected org.exoplatform.portal.config.model.Application createPortletApplication(String instanceId, - Space space, - boolean isRoot) { - int i0 = instanceId.indexOf("#"); - int i1 = instanceId.indexOf(":/", i0 + 1); - String ownerType = instanceId.substring(0, i0); - String ownerId = instanceId.substring(i0 + 1, i1); - String persistenceid = instanceId.substring(i1 + 2); - String[] persistenceChunks = Utils.split("/", persistenceid); - PortletBuilder pb = new PortletBuilder(); - - String spaceTemplateName = space.getTemplate(); - SpaceTemplate spaceTemplate = spaceTemplateService.getSpaceTemplateByName(spaceTemplateName); - if (spaceTemplate == null) { - throw new IllegalStateException("Space template with name " + spaceTemplateName + " wasn't found"); - } - List spaceApplicationList = spaceTemplate.getSpaceApplicationList(); - SpaceApplication spaceApplication = null; - for (Iterator iterator = spaceApplicationList.iterator(); iterator.hasNext() && spaceApplication == null;) { - SpaceApplication tmpSpaceApplication = iterator.next(); - if (instanceId.contains(tmpSpaceApplication.getPortletName())) { - spaceApplication = tmpSpaceApplication; - } - } - if (spaceApplication != null && spaceApplication.getPreferences() != null) { - Set> entrySet = spaceApplication.getPreferences().entrySet(); - try { - for (Map.Entry preference : entrySet) { - pb.add(preference.getKey(), getSubstituteValueFromPattern(space, spaceApplication, preference.getValue())); - } - } catch (Exception exception) { - LOG.warn(exception.getMessage(), exception); - } - } - - TransientApplicationState portletState = new TransientApplicationState( - persistenceChunks[0] + "/" + - persistenceChunks[1], - pb.build(), - ownerType, - ownerId); - org.exoplatform.portal.config.model.Application portletApp = - org.exoplatform.portal.config.model.Application.createPortletApplication(); - portletApp.setState(portletState); - return portletApp; - } - - protected String getSubstituteValueFromPattern(Space space, SpaceApplication spaceApplication, String pattern) { - if (!pattern.contains("{") || !pattern.contains("}")) { - return pattern; - } - - if (pattern.contains(GROUP_ID_PREFERENCE)) { - pattern = pattern.replace(GROUP_ID_PREFERENCE, space.getGroupId()); - } else if (pattern.contains(MODIFIED_GROUP_ID_PREFERENCE)) { - String modifiedGroupId = space.getGroupId().replace("/", "."); - pattern = pattern.replace(MODIFIED_GROUP_ID_PREFERENCE, modifiedGroupId); - } else if (pattern.contains(PAGE_NAME_PREFERENCE)) { - pattern = pattern.replace(PAGE_NAME_PREFERENCE, spaceApplication.getAppTitle()); - } else if (pattern.contains(PAGE_URL_PREFERENCE)) { - pattern = pattern.replace(PAGE_URL_PREFERENCE, spaceApplication.getUri()); - } - return pattern; - } - - /** - * Gets userPortalConfigService for the usage of creating new page from page - * template - * - * @return - */ - protected UserPortalConfigService getUserPortalConfigService() { - return ExoContainerContext.getService(UserPortalConfigService.class); - } - - protected SpaceService getSpaceService() { - if (spaceService == null) { - spaceService = ExoContainerContext.getService(SpaceService.class); - } - return spaceService; - } - - protected boolean isPortletActive(String potletFullId) { - ModuleRegistry moduleRegistry = getModuleRegistry(); - if (moduleRegistry == null) { - return true; - } - return moduleRegistry.isPortletActive(potletFullId); - } - - protected ModuleRegistry getModuleRegistry() { - if (moduleRegistry == null) { - moduleRegistry = CommonsUtils.getService(ModuleRegistry.class); - } - return moduleRegistry; - } - - protected NodeContext> getSpaceUserNode(Space space) throws Exception { - NavigationContext spaceNavCtx = SpaceUtils.getGroupNavigationContext(space.getGroupId()); - return ExoContainerContext.getService(NavigationService.class).loadNode(NodeModel.SELF_MODEL, spaceNavCtx, Scope.ALL, null); - } - - protected SpaceApplication getSpaceApplication(SpaceTemplate spaceTemplate, String appId) throws SpaceException { - Application application; - try { - application = getApplication(appId); - } catch (SpaceException e) { - throw e; - } catch (Exception e) { - throw new SpaceException(SpaceException.Code.APPLICATION_NOT_FOUND); - } - SpaceApplication spaceApplication = - spaceTemplate.getSpaceApplicationList() - .stream() - .filter(app -> StringUtils.equalsIgnoreCase(application.getApplicationName(), - app.getPortletName())) - .findFirst() - .orElse(null); - if (spaceApplication == null) { - throw new SpaceException(SpaceException.Code.APPLICATION_NOT_FOUND_IN_TEMPLATE); - } - return spaceApplication; - } - -} diff --git a/component/core/src/main/java/org/exoplatform/social/core/space/impl/DynamicSpacePortalLayoutMatcher.java b/component/core/src/main/java/org/exoplatform/social/core/space/impl/DynamicSpacePortalLayoutMatcher.java deleted file mode 100644 index 3a3f2130b57..00000000000 --- a/component/core/src/main/java/org/exoplatform/social/core/space/impl/DynamicSpacePortalLayoutMatcher.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.exoplatform.social.core.space.impl; - -import java.util.regex.Pattern; - -import org.apache.commons.lang3.StringUtils; - -import org.exoplatform.container.ExoContainerContext; -import org.exoplatform.portal.config.*; -import org.exoplatform.portal.mop.SiteKey; -import org.exoplatform.portal.mop.SiteType; -import org.exoplatform.social.core.space.SpaceUtils; -import org.exoplatform.social.core.space.model.Space; -import org.exoplatform.social.core.space.spi.SpaceService; - -/** - * A dynamic layout matcher that could be injected via - * {@link DynamicPortalLayoutMatcherPlugin} on - * {@link DynamicPortalLayoutService} to customize site layout to display for - * exisintg spaces. This matcher add additional checks comparing to - * {@link DynamicPortalLayoutMatcher} in order to : - * - *
- * - Check if visited site is a space
- * 
- * - Check if visited space site matches spaceTemplate if a regex is configured
- * 
- */ -public class DynamicSpacePortalLayoutMatcher extends DynamicPortalLayoutMatcher { - - private String spaceTemplateRegex = null; - - private Pattern spaceTemplatePattern = null; - - private SpaceService spaceService = null; - - public void setSpaceTemplateRegex(String spaceTemplateRegex) { - this.spaceTemplateRegex = spaceTemplateRegex; - } - - public Pattern getSpaceTemplatePattern() { - if (spaceTemplatePattern == null && StringUtils.isNotBlank(spaceTemplateRegex)) { - spaceTemplatePattern = Pattern.compile(spaceTemplateRegex); - } - return spaceTemplatePattern; - } - - @Override - public boolean matches(SiteKey siteKey, String currentSiteName) { - if (!super.matches(siteKey, currentSiteName)) { - return false; - } - - if (isSpaceSite(siteKey)) { - Space space = getSpaceService().getSpaceByGroupId(siteKey.getName()); - if (space == null) { - return false; - } - - if (getSpaceTemplatePattern() == null) { - return true; - } - - if (space.getTemplate() == null || !getSpaceTemplatePattern().matcher(space.getTemplate()).matches()) { - return false; - } - } else { - return false; - } - return true; - } - - public SpaceService getSpaceService() { - if (spaceService == null) { - spaceService = ExoContainerContext.getService(SpaceService.class); - } - return spaceService; - } - - public void setSpaceService(SpaceService spaceService) { - this.spaceService = spaceService; - } - - private boolean isSpaceSite(SiteKey siteKey) { - return SiteType.GROUP.equals(siteKey.getType()) && siteKey.getName().startsWith(SpaceUtils.SPACE_GROUP); - } -} diff --git a/component/core/src/main/java/org/exoplatform/social/core/space/impl/SpaceAccessHandler.java b/component/core/src/main/java/org/exoplatform/social/core/space/impl/SpaceAccessHandler.java index d51e58ccf43..3c24e5c379a 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/space/impl/SpaceAccessHandler.java +++ b/component/core/src/main/java/org/exoplatform/social/core/space/impl/SpaceAccessHandler.java @@ -49,6 +49,8 @@ import org.exoplatform.web.url.navigation.NavigationResource; import org.exoplatform.web.url.navigation.NodeURL; +import io.meeds.social.core.space.service.SpaceLayoutService; + import jakarta.servlet.ServletConfig; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpSession; @@ -63,6 +65,8 @@ public class SpaceAccessHandler extends WebRequestHandler { private SpaceService spaceService; + private SpaceLayoutService spaceLayoutService; + private IdentityRegistry identityRegistry; private URLFactoryService urlFactoryService; @@ -126,7 +130,7 @@ public boolean execute(ControllerContext controllerContext) throws Exception { controllerContext.getResponse() .sendRedirect(String.format("%s/%s", controllerContext.getRequest().getContextPath(), - spaceService.getSpacePublicSiteName(space))); + spaceLayoutService.getSpacePublicSiteName(space))); return true; } else { processSpaceAccess(controllerContext, username, space); diff --git a/component/core/src/main/java/org/exoplatform/social/core/space/impl/SpaceRenamedListenerImpl.java b/component/core/src/main/java/org/exoplatform/social/core/space/impl/SpaceRenamedListenerImpl.java index 3f87b8dfca3..25a523365d5 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/space/impl/SpaceRenamedListenerImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/space/impl/SpaceRenamedListenerImpl.java @@ -1,16 +1,66 @@ package org.exoplatform.social.core.space.impl; +import org.exoplatform.commons.file.model.FileItem; +import org.exoplatform.commons.file.services.FileService; +import org.exoplatform.commons.utils.CommonsUtils; +import org.exoplatform.container.PortalContainer; +import org.exoplatform.container.component.RequestLifeCycle; +import org.exoplatform.services.log.ExoLogger; +import org.exoplatform.services.log.Log; +import org.exoplatform.services.organization.Group; +import org.exoplatform.services.organization.GroupHandler; +import org.exoplatform.services.organization.OrganizationService; +import org.exoplatform.social.core.identity.model.Identity; +import org.exoplatform.social.core.identity.model.Profile; +import org.exoplatform.social.core.jpa.storage.EntityConverterUtils; +import org.exoplatform.social.core.manager.IdentityManager; import org.exoplatform.social.core.space.SpaceListenerPlugin; -import org.exoplatform.social.core.space.SpaceUtils; import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.core.space.spi.SpaceLifeCycleEvent; public class SpaceRenamedListenerImpl extends SpaceListenerPlugin { + + private static final Log LOG = ExoLogger.getLogger(SpaceRenamedListenerImpl.class); + @Override public void spaceRenamed(SpaceLifeCycleEvent event) { Space space = event.getSpace(); - SpaceUtils.renamePageNode(space); - SpaceUtils.renameGroupLabel(space); - SpaceUtils.updateDefaultSpaceAvatar(space); + renameGroupLabel(space); + updateDefaultSpaceAvatar(space); + } + + private void renameGroupLabel(Space space) { + try { + RequestLifeCycle.begin(PortalContainer.getInstance()); + OrganizationService organizationService = CommonsUtils.getService(OrganizationService.class); + GroupHandler groupHandler = organizationService.getGroupHandler(); + Group group = groupHandler.findGroupById(space.getGroupId()); + group.setLabel(space.getDisplayName()); + groupHandler.saveGroup(group, true); + } catch (Exception e) { + LOG.error("Error while renaming, space group Label, ignore minor change and keep the old Group Label", e); + } finally { + RequestLifeCycle.end(); + } } + + private void updateDefaultSpaceAvatar(Space space) { + IdentityManager identityManager = CommonsUtils.getService(IdentityManager.class); + Identity spaceIdentity = identityManager.getOrCreateSpaceIdentity(space.getPrettyName()); + FileItem spaceAvatar = identityManager.getAvatarFile(spaceIdentity); + if (spaceAvatar != null && spaceAvatar.getFileInfo().getId() != null + && EntityConverterUtils.DEFAULT_AVATAR.equals(spaceAvatar.getFileInfo().getName())) { + Profile profile = spaceIdentity.getProfile(); + profile.removeProperty(Profile.AVATAR); + profile.setAvatarUrl(null); + profile.setAvatarLastUpdated(null); + profile.setProperty(Profile.FULL_NAME, space.getDisplayName()); + space.setAvatarAttachment(null); + space.setAvatarLastUpdated(System.currentTimeMillis()); + identityManager.updateProfile(profile); + FileService fileService = CommonsUtils.getService(FileService.class); + fileService.deleteFile(spaceAvatar.getFileInfo().getId()); + } + } + } diff --git a/component/core/src/main/java/org/exoplatform/social/core/space/impl/SpaceTemplateServiceImpl.java b/component/core/src/main/java/org/exoplatform/social/core/space/impl/SpaceTemplateServiceImpl.java deleted file mode 100644 index b3b261bc615..00000000000 --- a/component/core/src/main/java/org/exoplatform/social/core/space/impl/SpaceTemplateServiceImpl.java +++ /dev/null @@ -1,342 +0,0 @@ -/* - * Copyright (C) 2003-2019 eXo Platform SAS. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License - * as published by the Free Software Foundation; either version 3 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see. - */ -package org.exoplatform.social.core.space.impl; - -import org.apache.commons.lang3.StringUtils; -import org.exoplatform.commons.utils.CommonsUtils; -import org.exoplatform.container.xml.InitParams; -import org.exoplatform.portal.config.UserACL; -import org.exoplatform.portal.config.UserPortalConfigService; -import org.exoplatform.portal.config.model.PortalConfig; -import org.exoplatform.portal.mop.service.LayoutService; -import org.exoplatform.services.log.ExoLogger; -import org.exoplatform.services.log.Log; -import org.exoplatform.services.organization.Group; -import org.exoplatform.services.organization.GroupHandler; -import org.exoplatform.services.organization.OrganizationService; -import org.exoplatform.services.resources.ResourceBundleService; -import org.exoplatform.services.security.Authenticator; -import org.exoplatform.services.security.Identity; -import org.exoplatform.services.security.IdentityRegistry; -import org.exoplatform.social.core.space.SpaceApplication; -import org.exoplatform.social.core.space.SpaceException; -import org.exoplatform.social.core.space.SpaceTemplate; -import org.exoplatform.social.core.space.SpaceTemplateConfigPlugin; -import org.exoplatform.social.core.space.SpaceUtils; -import org.exoplatform.social.core.space.model.Space; -import org.exoplatform.social.core.space.spi.SpaceApplicationHandler; -import org.exoplatform.social.core.space.spi.SpaceTemplateService; - -import lombok.SneakyThrows; - -import org.picocontainer.Startable; - -import java.util.*; -import java.util.regex.Pattern; -import java.util.stream.Collectors; - -public class SpaceTemplateServiceImpl implements SpaceTemplateService, Startable { - - public static final String DEFAULT_PUBLIC_SITE_TEMPLATE = "spacePublic"; - - public static final String DEFAULT_SPACE_TEMPLATE_PARAM = "defaultSpaceTemplate"; - - private static final Log LOG = ExoLogger.getLogger(SpaceTemplateServiceImpl.class); - - private Map spaceApplicationHandlers = new HashMap<>(); - - private Map spaceTemplates = new HashMap<>(); - - private Map registeredSpaceTemplates = new HashMap<>(); - - private Map> extendedSpaceTemplates = new HashMap<>(); - - private LayoutService layoutService; - - private UserPortalConfigService portalConfigService; - - private String defaultSpaceTemplate; - - public SpaceTemplateServiceImpl(UserPortalConfigService portalConfigService, - LayoutService layoutService, - InitParams params) { - this.portalConfigService = portalConfigService; - this.layoutService = layoutService; - if (params != null) { - defaultSpaceTemplate = params.getValueParam(DEFAULT_SPACE_TEMPLATE_PARAM).getValue(); - } - } - - @Override - public List getSpaceTemplates() { - return Collections.unmodifiableList(new ArrayList<>(spaceTemplates.values().stream().map(SpaceTemplate::clone) - .sorted(Comparator.comparing(SpaceTemplate::getName)).toList())); - } - - @Override - public List getSpaceTemplates(String userId) throws Exception { - List list = new ArrayList<>(); - Identity identity = getIdentity(userId); - for (SpaceTemplate spaceTemplate : getSpaceTemplates()) { - String perms = spaceTemplate.getPermissions(); - if (perms != null) { - Pattern pattern = Pattern.compile(";"); - List permissions = pattern.splitAsStream(perms).toList(); - for (String perm : permissions) { - UserACL.Permission permission = new UserACL.Permission(); - permission.setPermissionExpression(perm); - String groupId = permission.getGroupId(); - String membership = permission.getMembership(); - if (identity.isMemberOf(groupId, membership)) { - list.add(spaceTemplate); - break; - } - } - } - } - return list; - } - - @Override - public List getLabelledSpaceTemplates(String userId, String lang) throws Exception { - List templatelist = new ArrayList<>(); - Identity identity = getIdentity(userId); - ResourceBundleService resourceBundleService = CommonsUtils.getService(ResourceBundleService.class); - OrganizationService organizationService = CommonsUtils.getService(OrganizationService.class); - for (SpaceTemplate spaceTemplate : getSpaceTemplates(userId)) { - String perms = spaceTemplate.getPermissions(); - StringBuilder templatePermission = new StringBuilder(""); - if (identity.isMemberOf("/platform/administrators")) { - if (perms != null) { - ResourceBundle resourceBundle = resourceBundleService.getResourceBundle("locale.portlet.social.SpacesAdministrationPortlet", new Locale(lang)); - Pattern pattern = Pattern.compile(";"); - List permissions = pattern.splitAsStream(perms).toList(); - for (String perm : permissions) { - UserACL.Permission permission = new UserACL.Permission(); - permission.setPermissionExpression(perm); - String groupId = permission.getGroupId(); - String membership = permission.getMembership(); - if ("*".equals(membership)) { - membership = resourceBundle.getString("social.spaces.templates.any"); - } else { - membership = StringUtils.capitalize(membership); - } - GroupHandler groupHandler1 = organizationService.getGroupHandler(); - String groupName = groupId; - Group group = groupHandler1.findGroupById(groupId); - if (group != null) { - groupName = group.getGroupName(); - } - // Uppercase the first char - groupName = StringUtils.capitalize(groupName); - String key = resourceBundle.getString("social.spaces.templates.permissionEntry"); - templatePermission.append(key.replace("{0}", membership).replace("{1}", groupName)); - templatePermission.append(", "); - } - int index = templatePermission.lastIndexOf(", "); - templatePermission.deleteCharAt(index); - } - } - ResourceBundle resourceBundle = resourceBundleService.getResourceBundle( - new String[] { "locale.portal.webui", - "locale.portlet.social.SpacesAdministrationPortlet" }, - new Locale(lang)); - if (resourceBundle != null) { - try { - spaceTemplate.setResolvedLabel(resourceBundle.getString("social.spaces.templates.name." + spaceTemplate.getName())); - } catch (MissingResourceException e) { - LOG.debug(e.getMessage()); - } - try { - spaceTemplate.setResolvedDescription(resourceBundle.getString("social.spaces.templates.description." - + spaceTemplate.getName())); - } catch (MissingResourceException e) { - LOG.debug(e.getMessage()); - } - } - - spaceTemplate.setPermissionsLabels(templatePermission.toString()); - templatelist.add(spaceTemplate); - } - return templatelist; - } - - @Override - public SpaceTemplate getSpaceTemplateByName(String name) { - if (name == null) { - name = getDefaultSpaceTemplate(); - } - SpaceTemplate template = spaceTemplates.get(name); - if(template != null) { - return template.clone(); - } - SpaceTemplate defaultTemplate = spaceTemplates.get(getDefaultSpaceTemplate()); - return defaultTemplate.clone(); - } - - @Override - public void registerSpaceTemplatePlugin(SpaceTemplateConfigPlugin spaceTemplateConfigPlugin) { - SpaceTemplate spaceTemplate = spaceTemplateConfigPlugin.getSpaceTemplate(); - if (spaceTemplate == null) { - LOG.warn("No space template found !"); - return; - } - registeredSpaceTemplates.put(spaceTemplate.getName(), spaceTemplate); - } - - @Override - public void extendSpaceTemplatePlugin(SpaceTemplateConfigPlugin spaceTemplateConfigPlugin) { - SpaceTemplate spaceTemplateExtension = spaceTemplateConfigPlugin.getSpaceTemplate(); - if (spaceTemplateExtension == null || StringUtils.isBlank(spaceTemplateExtension.getName())) { - LOG.warn("Space template plugin doesn't have mandatory object: {}. The plugin will be ignored.", spaceTemplateConfigPlugin); - return; - } - String templateName = spaceTemplateExtension.getName(); - if (!extendedSpaceTemplates.containsKey(templateName)) { - extendedSpaceTemplates.put(templateName, new ArrayList<>()); - } - extendedSpaceTemplates.get(templateName).add(spaceTemplateExtension); - } - - /** - * Add space application handler - * - */ - @Override - public void registerSpaceApplicationHandler(SpaceApplicationHandler spaceApplicationHandler) { - this.spaceApplicationHandlers.put(spaceApplicationHandler.getName(), spaceApplicationHandler); - } - - /** - * Gets space application handlers - * - * @return - */ - @Override - public Map getSpaceApplicationHandlers() { - return Collections.unmodifiableMap(this.spaceApplicationHandlers); - } - - @Override - public String getDefaultSpaceTemplate() { - return defaultSpaceTemplate; - } - - @Override - public void initSpaceApplications(Space space, SpaceApplicationHandler spaceApplicationHandler) throws SpaceException { - String type = space.getTemplate(); - SpaceTemplate spaceTemplate = getSpaceTemplateByName(type); - spaceApplicationHandler.initApps(space, spaceTemplate); - List apps = spaceTemplate.getSpaceApplicationList(); - if (apps != null) { - for (SpaceApplication spaceApplication : apps) { - setApp(space, spaceApplication.getPortletName(), spaceApplication.getAppTitle(), spaceApplication.isRemovable(), - Space.ACTIVE_STATUS); - } - } - } - - @SneakyThrows - @Override - public long createSpacePublicSite(Space space, - String name, - String label, - String[] accessPermissions) { - SpaceTemplate spaceTemplate = getSpaceTemplateByName(space.getTemplate()); - String publicSiteTemplateName = spaceTemplate == null ? null : spaceTemplate.getPublicSiteTemplateName(); - String siteTemplateName = StringUtils.firstNonBlank(publicSiteTemplateName, DEFAULT_PUBLIC_SITE_TEMPLATE); - String siteName = StringUtils.firstNonBlank(name, space.getPrettyName()); - portalConfigService.createUserPortalConfig(PortalConfig.PORTAL_TYPE, siteName, siteTemplateName); - PortalConfig portalConfig = layoutService.getPortalConfig(siteName); - if (accessPermissions != null) { - portalConfig.setAccessPermissions(accessPermissions); - portalConfig.setEditPermission(SpaceUtils.MANAGER + ":" + space.getGroupId()); - } - portalConfig.setLabel(StringUtils.firstNonBlank(label, space.getDisplayName())); - portalConfig.setDefaultSite(false); - portalConfig.setProperty(SpaceUtils.PUBLIC_SITE_SPACE_ID, space.getId()); - portalConfig.setProperty(SpaceUtils.IS_PUBLIC_SITE_SPACE, "true"); - layoutService.save(portalConfig); - return Long.parseLong(portalConfig.getStorageId().split("_")[1]); - } - - @Override - public void setApp(Space space, String appId, String appName, boolean isRemovable, String status) { - String apps = space.getApp(); - // an application status is composed with the form of - // [appId:appName:isRemovableString:status] - String applicationStatus = appId + ":" + appName; - if (isRemovable) { - applicationStatus += ":true"; - } else { - applicationStatus += ":false"; - } - applicationStatus += ":" + status; - if (apps == null) { - apps = applicationStatus; - } else { - apps += "," + applicationStatus; - } - space.setApp(apps); - } - - @Override - public void start() { - spaceTemplates = registeredSpaceTemplates; - for (String spaceTemplateExtensionName : extendedSpaceTemplates.keySet()) { - List spaceTemplateExtensions = extendedSpaceTemplates.get(spaceTemplateExtensionName); - for (SpaceTemplate spaceTemplateExtension : spaceTemplateExtensions) { - List apps = spaceTemplateExtension.getSpaceApplicationList(); - SpaceTemplate toExtendSpaceTemplate = this.spaceTemplates.get(spaceTemplateExtensionName); - if (toExtendSpaceTemplate == null) { - LOG.warn("Can't extend Space template '{}' with applications {} because the space template can't be found.", - spaceTemplateExtensionName, - apps == null ? "" : apps.stream().map(SpaceApplication::getPortletName).collect(Collectors.toList())); - } - if (spaceTemplateExtension.getBannerPath() != null) { - LOG.warn("Banner path defined in extension of space template {} isn't extensible", spaceTemplateExtensionName); - } - if (spaceTemplateExtension.getSpaceHomeApplication() != null) { - LOG.warn("Space home defined in extension of space template {} isn't extensible", spaceTemplateExtensionName); - } - if (apps != null && toExtendSpaceTemplate != null) { - for (SpaceApplication application : apps) { - toExtendSpaceTemplate.addToSpaceApplicationList(application); - } - } - } - } - } - - @Override - public void stop() { - - } - - private Identity getIdentity(String userId) throws Exception { - IdentityRegistry identityRegistry = CommonsUtils.getService(IdentityRegistry.class); - Identity identity = identityRegistry.getIdentity(userId); - if (identity == null) { - Authenticator authenticator = CommonsUtils.getService(Authenticator.class); - identity = authenticator.createIdentity(userId); - identityRegistry.register(identity); - return identity; - } else { - return identity; - } - } -} diff --git a/component/core/src/main/java/org/exoplatform/social/core/space/impl/SpacesAdministrationServiceImpl.java b/component/core/src/main/java/org/exoplatform/social/core/space/impl/SpacesAdministrationServiceImpl.java index 7dbff68ce34..3371738ea64 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/space/impl/SpacesAdministrationServiceImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/space/impl/SpacesAdministrationServiceImpl.java @@ -1,10 +1,8 @@ package org.exoplatform.social.core.space.impl; import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; import java.util.List; -import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; import org.picocontainer.Startable; @@ -13,7 +11,6 @@ import org.exoplatform.commons.api.settings.SettingValue; import org.exoplatform.commons.api.settings.data.Context; import org.exoplatform.commons.api.settings.data.Scope; -import org.exoplatform.commons.utils.CommonsUtils; import org.exoplatform.container.PortalContainer; import org.exoplatform.container.RootContainer; import org.exoplatform.container.component.RequestLifeCycle; @@ -23,14 +20,9 @@ import org.exoplatform.portal.config.UserACL; import org.exoplatform.portal.mop.page.PageContext; import org.exoplatform.portal.mop.page.PageKey; -import org.exoplatform.portal.mop.page.PageService; import org.exoplatform.portal.mop.page.PageState; -import org.exoplatform.services.log.ExoLogger; -import org.exoplatform.services.log.Log; -import org.exoplatform.services.organization.Membership; -import org.exoplatform.services.organization.OrganizationService; +import org.exoplatform.portal.mop.service.LayoutService; import org.exoplatform.services.security.IdentityConstants; -import org.exoplatform.services.security.IdentityRegistry; import org.exoplatform.services.security.MembershipEntry; import org.exoplatform.social.core.space.SpacesAdministrationService; @@ -42,38 +34,28 @@ @ManagedBy(SpacesAdministrationServiceManagerBean.class) public class SpacesAdministrationServiceImpl implements Startable, SpacesAdministrationService { - private static final Log LOG = ExoLogger.getLogger(SpacesAdministrationServiceImpl.class); + private static final String SPACES_ADMINISTRATORS_PARAM = "social.spaces.administrators"; - private static final String SPACES_ADMINISTRATORS_PARAM = "social.spaces.administrators"; + private static final String SPACES_ADMINISTRATORS_SETTING_KEY = "social.spaces.administrators"; - private static final String SPACES_CREATORS_PARAM = "social.spaces.creators"; + public static final PageKey SPACES_ADMINISTRATION_PAGE_KEY = PageKey.parse("group::/platform/users::spacesAdministration"); - private static final String SPACES_ADMINISTRATORS_SETTING_KEY = "social.spaces.administrators"; + private LayoutService layoutService; - private static final String SPACES_CREATORS_SETTING_KEY = "social.spaces.creators"; + private SettingService settingService; - public static final String SPACES_ADMINISTRATION_PAGE_KEY = "group::/platform/users::spacesAdministration"; + private UserACL userACL; - private SettingService settingService; - - private IdentityRegistry identityRegistry; + private InitParams initParams; - private OrganizationService organizationService; + private List spacesAdministratorsMemberships = new ArrayList<>(); - private UserACL userACL; - - private InitParams initParams; - - private List spacesAdministratorsMemberships = new ArrayList<>(); - - private List spaceCreatorsMemberships = new ArrayList<>(); - - public SpacesAdministrationServiceImpl(InitParams initParams, SettingService settingService, - IdentityRegistry identityRegistry, OrganizationService organizationService, - UserACL userACL) { + public SpacesAdministrationServiceImpl(SettingService settingService, + LayoutService layoutService, + UserACL userACL, + InitParams initParams) { this.settingService = settingService; - this.identityRegistry = identityRegistry; - this.organizationService = organizationService; + this.layoutService = layoutService; this.userACL = userACL; this.initParams = initParams; } @@ -82,122 +64,84 @@ public SpacesAdministrationServiceImpl(InitParams initParams, SettingService set public void start() { loadSettings(initParams); - // update Spaces administration at startup in case the configuration has changed - PortalContainer.addInitTask(PortalContainer.getInstance().getPortalContext(), new RootContainer.PortalContainerPostInitTask() { - @Override - public void execute(ServletContext context, PortalContainer portalContainer) { - List superManagersMemberships = SpacesAdministrationServiceImpl.this.getSpacesAdministratorsMemberships(); - updateSpacesAdministrationPagePermissions(superManagersMemberships); - } - }); + // update Spaces administration at startup in case the configuration has + // changed + PortalContainer.addInitTask(PortalContainer.getInstance().getPortalContext(), + new RootContainer.PortalContainerPostInitTask() { + @Override + public void execute(ServletContext context, PortalContainer portalContainer) { + List superManagersMemberships = + SpacesAdministrationServiceImpl.this.getSpacesAdministratorsMemberships(); + updateSpacesAdministrationPagePermissions(superManagersMemberships); + } + }); } - @Override - public void stop() { - } - - /** - * {@inheritDoc} - */ @Override public void updateSpacesAdministratorsMemberships(List permissionsExpressions) { - if(permissionsExpressions == null) { + if (permissionsExpressions == null) { throw new IllegalArgumentException("Permission expressions list couldn't be null"); } this.spacesAdministratorsMemberships = permissionsExpressions; - settingService.set(Context.GLOBAL, Scope.GLOBAL, SPACES_ADMINISTRATORS_SETTING_KEY, SettingValue.create(StringUtils.join(this.spacesAdministratorsMemberships, ","))); + settingService.set(Context.GLOBAL, + Scope.GLOBAL, + SPACES_ADMINISTRATORS_SETTING_KEY, + SettingValue.create(StringUtils.join(this.spacesAdministratorsMemberships, ","))); updateSpacesAdministrationPagePermissions(this.spacesAdministratorsMemberships); } - /** - * {@inheritDoc} - */ @Override public List getSpacesAdministratorsMemberships() { return Collections.unmodifiableList(spacesAdministratorsMemberships); } - /** - * {@inheritDoc} - */ - @Override - public List getSpacesCreatorsMemberships() { - return Collections.unmodifiableList(spaceCreatorsMemberships); - } - - /** - * {@inheritDoc} - */ @Override - public void updateSpacesCreatorsMemberships(List permissionsExpressions) { - if(permissionsExpressions == null) { - throw new IllegalArgumentException("Permission expressions list couldn't be null"); + public boolean isSuperManager(String username) { + if (StringUtils.isBlank(username) + || IdentityConstants.ANONIM.equals(username) + || IdentityConstants.SYSTEM.equals(username)) { + return false; + } else if (username.equals(userACL.getSuperUser())) { + return true; } - - this.spaceCreatorsMemberships = permissionsExpressions; - - settingService.set(Context.GLOBAL, Scope.GLOBAL, SPACES_CREATORS_SETTING_KEY, SettingValue.create(StringUtils.join(this.spaceCreatorsMemberships, ","))); - - updateSpacesAdministrationPagePermissions(this.spaceCreatorsMemberships); + org.exoplatform.services.security.Identity identity = userACL.getUserIdentity(username); + return identity != null && (identity.isMemberOf(userACL.getAdminGroups()) + || getSpacesAdministratorsMemberships().stream() + .anyMatch(identity::isMemberOf)); } /** - * Load Spaces Administration settings - * For both Spaces Administrators and Spaces Creators settings, it uses the value stored in the settings if any, - * otherwise it uses the value from the configuration + * Load Spaces Administration settings For Spaces Administrators setting, it + * uses the value stored in the settings if any, otherwise it uses the value + * from the configuration + * * @param initParams Service init parameters */ + @SuppressWarnings("unchecked") protected void loadSettings(InitParams initParams) { - SettingValue administrators = (SettingValue) settingService.get(Context.GLOBAL, Scope.GLOBAL, SPACES_ADMINISTRATORS_SETTING_KEY); + SettingValue administrators = (SettingValue) settingService.get(Context.GLOBAL, + Scope.GLOBAL, + SPACES_ADMINISTRATORS_SETTING_KEY); if (administrators != null && !StringUtils.isBlank(administrators.getValue())) { String[] administratorsArray = administrators.getValue().split(","); addSpacesAdministratorsMemberships(administratorsArray); } else if (initParams != null) { ValueParam spacesAdministratorsParam = initParams.getValueParam(SPACES_ADMINISTRATORS_PARAM); if (spacesAdministratorsParam != null) { - String spacesAdministratorsMemberships = spacesAdministratorsParam.getValue(); - if (StringUtils.isNotBlank(spacesAdministratorsMemberships)) { - String[] spacesAdministratorsMembershipsArray = spacesAdministratorsMemberships.split(","); + String memberships = spacesAdministratorsParam.getValue(); + if (StringUtils.isNotBlank(memberships)) { + String[] spacesAdministratorsMembershipsArray = memberships.split(","); addSpacesAdministratorsMemberships(spacesAdministratorsMembershipsArray); } } } - - SettingValue creators = (SettingValue) settingService.get(Context.GLOBAL, Scope.GLOBAL, SPACES_CREATORS_SETTING_KEY); - if (creators != null && !StringUtils.isBlank(creators.getValue())) { - String[] creatorsArray = creators.getValue().split(","); - addSpacesCreatorsMemberships(creatorsArray); - } else if (initParams != null) { - ValueParam spacesCreatorsParam = initParams.getValueParam(SPACES_CREATORS_PARAM); - if (spacesCreatorsParam != null) { - String spacesCreatorsMemberships = spacesCreatorsParam.getValue(); - if (StringUtils.isNotBlank(spacesCreatorsMemberships)) { - String[] spacesCreatorsMembershipsArray = spacesCreatorsMemberships.split(","); - addSpacesCreatorsMemberships(spacesCreatorsMembershipsArray); - } - } - } - } - - private void addSpacesCreatorsMemberships(String[] creatorsArray) { - for(String creatorArray : creatorsArray) { - if (StringUtils.isBlank(creatorArray)) { - continue; - } - if (!creatorArray.contains(":/")) { - this.spaceCreatorsMemberships.add(new MembershipEntry(creatorArray)); - } else { - String[] membershipParts = creatorArray.split(":"); - this.spaceCreatorsMemberships.add(new MembershipEntry(membershipParts[1], membershipParts[0])); - } - } } private void addSpacesAdministratorsMemberships(String[] administratorsArray) { - for(String administrator : administratorsArray) { + for (String administrator : administratorsArray) { if (StringUtils.isBlank(administrator)) { continue; } @@ -212,15 +156,15 @@ private void addSpacesAdministratorsMemberships(String[] administratorsArray) { /** * Update permissions of the Spaces Administration page - * @param superManagersMemberships New memberships to apply as read permissions on the page + * + * @param superManagersMemberships New memberships to apply as read + * permissions on the page */ private void updateSpacesAdministrationPagePermissions(List superManagersMemberships) { - if(superManagersMemberships != null) { + if (superManagersMemberships != null) { RequestLifeCycle.begin(PortalContainer.getInstance()); try { - PageService pageService = CommonsUtils.getService(PageService.class); - PageKey pageKey = PageKey.parse(SPACES_ADMINISTRATION_PAGE_KEY); - PageContext pageContext = pageService.loadPage(pageKey); + PageContext pageContext = layoutService.getPageContext(SPACES_ADMINISTRATION_PAGE_KEY); if (pageContext != null) { PageState page = pageContext.getState(); PageState pageState = new PageState(page.getDisplayName(), @@ -230,52 +174,15 @@ private void updateSpacesAdministrationPagePermissions(List sup superManagersMemberships.stream() .map(membership -> membership.getMembershipType() + ":" + membership.getGroup()) - .collect(Collectors.toList()), + .toList(), page.getEditPermission(), null, null); - pageService.savePage(new PageContext(pageKey, pageState)); + layoutService.save(new PageContext(SPACES_ADMINISTRATION_PAGE_KEY, pageState)); } } finally { RequestLifeCycle.end(); } } } - - /** - * {@inheritDoc} - */ - @Override - public boolean canCreateSpace(String userId) { - if (StringUtils.isBlank(userId) || IdentityConstants.ANONIM.equals(userId) || IdentityConstants.SYSTEM.equals(userId)) { - return false; - } - if (userId.equals(userACL.getSuperUser())) { - return true; - } - org.exoplatform.services.security.Identity identity = identityRegistry.getIdentity(userId); - if (identity == null) { - Collection memberships; - try { - memberships = organizationService.getMembershipHandler().findMembershipsByUser(userId); - } catch (Exception e) { - throw new RuntimeException("Can't get user '" + userId + "' memberships", e); - } - List entries = new ArrayList<>(); - for (Membership membership : memberships) { - entries.add(new MembershipEntry(membership.getGroupId(), membership.getMembershipType())); - } - identity = new org.exoplatform.services.security.Identity(userId, entries); - } - List spacesCreatorsMemberships = getSpacesCreatorsMemberships(); - if (spacesCreatorsMemberships != null && !spacesCreatorsMemberships.isEmpty()) { - for (MembershipEntry spacesCreatorMembership : spacesCreatorsMemberships) { - if ((spacesCreatorMembership.getMembershipType().equals("*") && identity.isMemberOf(spacesCreatorMembership.getGroup())) - || identity.isMemberOf(spacesCreatorMembership)) { - return true; - } - } - } - return false; - } } diff --git a/component/core/src/main/java/org/exoplatform/social/core/space/impl/SpacesAdministrationServiceManagerBean.java b/component/core/src/main/java/org/exoplatform/social/core/space/impl/SpacesAdministrationServiceManagerBean.java index f62ab93c079..6e658a5d294 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/space/impl/SpacesAdministrationServiceManagerBean.java +++ b/component/core/src/main/java/org/exoplatform/social/core/space/impl/SpacesAdministrationServiceManagerBean.java @@ -2,7 +2,6 @@ import java.util.ArrayList; import java.util.List; -import java.util.stream.Collectors; import org.exoplatform.management.annotations.Impact; import org.exoplatform.management.annotations.ImpactType; @@ -38,8 +37,8 @@ public SpacesAdministrationServiceManagerBean(SpacesAdministrationServiceImpl sp public List getSpaceManager() { return spacesAdministrationService.getSpacesAdministratorsMemberships() .stream() - .map(membership -> membership.toString()) - .collect(Collectors.toList()); + .map(MembershipEntry::toString) + .toList(); } /** @@ -70,55 +69,7 @@ public void removeSpaceManager(@ManagedDescription("Spaces super manger membersh List superManagersMemberships = spacesAdministrationService.getSpacesAdministratorsMemberships(); List updatedMemberships = superManagersMemberships.stream() .filter(m -> !m.toString().equals(permissionExpression)) - .collect(Collectors.toList()); + .toList(); spacesAdministrationService.updateSpacesAdministratorsMemberships(updatedMemberships); } - - /** - * Gets the list of permission expressions of space creators. - * See {@link SpacesAdministrationService#getSpacesCreatorsMemberships()} - * - * @return {@link List} of type {@link String} - */ - @Managed - @ManagedDescription("Get Spaces creators memberships") - @Impact(ImpactType.READ) - public List getSpacesCreatorsMemberships() { - return spacesAdministrationService.getSpacesCreatorsMemberships() - .stream() - .map(membership -> membership.toString()) - .collect(Collectors.toList()); - } - - /** - * Adds a membership in spaces creators - * - * @param permissionExpression permission expression of type {@link String} - * - */ - @Managed - @ManagedDescription("Add Spaces creators membership") - @Impact(ImpactType.WRITE) - public void addSpacesCreatorsMembership(@ManagedDescription("Spaces creator membership") @ManagedName("permissionExpression") String permissionExpression) { - List superCreatorsMemberships = new ArrayList<>(spacesAdministrationService.getSpacesCreatorsMemberships()); - superCreatorsMemberships.add(MembershipEntry.parse(permissionExpression)); - spacesAdministrationService.updateSpacesCreatorsMemberships(superCreatorsMemberships); - } - - /** - * Removes a membership in spaces creators - * - * @param permissionExpression permission expression of type {@link String} - * - */ - @Managed - @ManagedDescription("Remove Spaces creators membership") - @Impact(ImpactType.WRITE) - public void removeSpacesCreatorsMembership(@ManagedDescription("Spaces creator membership") @ManagedName("permissionExpression") String permissionExpression) { - List superCreatorsMemberships = spacesAdministrationService.getSpacesCreatorsMemberships(); - List updatedMemberships = superCreatorsMemberships.stream() - .filter(m -> !m.toString().equals(permissionExpression)) - .collect(Collectors.toList()); - spacesAdministrationService.updateSpacesCreatorsMemberships(updatedMemberships); - } } diff --git a/component/core/src/main/java/org/exoplatform/social/core/storage/ActivityFileStoragePlugin.java b/component/core/src/main/java/org/exoplatform/social/core/storage/ActivityFileStoragePlugin.java index 8f0eb2a432a..0a755764512 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/storage/ActivityFileStoragePlugin.java +++ b/component/core/src/main/java/org/exoplatform/social/core/storage/ActivityFileStoragePlugin.java @@ -1,6 +1,9 @@ package org.exoplatform.social.core.storage; -import java.util.*; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; import org.apache.commons.lang3.StringUtils; diff --git a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/CacheType.java b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/CacheType.java index ba55c2e88b4..1cf0db5b883 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/CacheType.java +++ b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/CacheType.java @@ -62,12 +62,8 @@ public enum CacheType { SPACE("social.SpaceCache"), SPACE_REF("social.SpaceRefCache"), SPACES_COUNT("social.SpacesCountCache"), - SPACES("social.SpacesCache"), - - // - SPACE_SIMPLE("social.SpaceSimpleCache") - - ; + SPACES_COUNT_BY_TEMPLATE("social.SpacesCountByTemplateCache"), + SPACES("social.SpacesCache"); private final String name; diff --git a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/CachedActivityStorage.java b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/CachedActivityStorage.java index aa9e54f210d..0a150ccf07b 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/CachedActivityStorage.java +++ b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/CachedActivityStorage.java @@ -19,12 +19,21 @@ import static org.exoplatform.social.core.storage.ActivityStorageException.Type.FAILED_TO_GET_ACTIVITY; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.SortedSet; import org.apache.commons.lang3.StringUtils; import org.exoplatform.commons.cache.future.FutureExoCache; -import org.exoplatform.services.cache.*; +import org.exoplatform.services.cache.CacheListener; +import org.exoplatform.services.cache.CacheListenerContext; +import org.exoplatform.services.cache.ExoCache; import org.exoplatform.services.log.ExoLogger; import org.exoplatform.services.log.Log; import org.exoplatform.social.core.ActivityProcessor; @@ -36,9 +45,18 @@ import org.exoplatform.social.core.storage.ActivityStorageException; import org.exoplatform.social.core.storage.api.ActivityStorage; import org.exoplatform.social.core.storage.cache.loader.ServiceContext; -import org.exoplatform.social.core.storage.cache.model.data.*; -import org.exoplatform.social.core.storage.cache.model.key.*; -import org.exoplatform.social.core.storage.cache.selector.*; +import org.exoplatform.social.core.storage.cache.model.data.ActivityData; +import org.exoplatform.social.core.storage.cache.model.data.IntegerData; +import org.exoplatform.social.core.storage.cache.model.data.ListActivitiesData; +import org.exoplatform.social.core.storage.cache.model.key.ActivityCountKey; +import org.exoplatform.social.core.storage.cache.model.key.ActivityKey; +import org.exoplatform.social.core.storage.cache.model.key.ActivityType; +import org.exoplatform.social.core.storage.cache.model.key.IdentityKey; +import org.exoplatform.social.core.storage.cache.model.key.ListActivitiesKey; +import org.exoplatform.social.core.storage.cache.selector.ActivityAttachmentCacheSelector; +import org.exoplatform.social.core.storage.cache.selector.ActivityMetadataCacheSelector; +import org.exoplatform.social.core.storage.cache.selector.ActivityOwnerCacheSelector; +import org.exoplatform.social.core.storage.cache.selector.ActivityStreamOwnerCacheSelector; /** * @author Alain Defrance diff --git a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/CachedRelationshipStorage.java b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/CachedRelationshipStorage.java index f85af0f39ae..483c4b93e04 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/CachedRelationshipStorage.java +++ b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/CachedRelationshipStorage.java @@ -17,7 +17,10 @@ package org.exoplatform.social.core.storage.cache; -import java.util.*; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; import java.util.Map.Entry; import org.apache.commons.lang3.StringUtils; @@ -35,9 +38,24 @@ import org.exoplatform.social.core.storage.api.IdentityStorage; import org.exoplatform.social.core.storage.api.RelationshipStorage; import org.exoplatform.social.core.storage.cache.loader.ServiceContext; -import org.exoplatform.social.core.storage.cache.model.data.*; -import org.exoplatform.social.core.storage.cache.model.key.*; -import org.exoplatform.social.core.storage.cache.selector.*; +import org.exoplatform.social.core.storage.cache.model.data.IdentityData; +import org.exoplatform.social.core.storage.cache.model.data.IntegerData; +import org.exoplatform.social.core.storage.cache.model.data.ListActivitiesData; +import org.exoplatform.social.core.storage.cache.model.data.ListIdentitiesData; +import org.exoplatform.social.core.storage.cache.model.data.RelationshipData; +import org.exoplatform.social.core.storage.cache.model.data.SuggestionsData; +import org.exoplatform.social.core.storage.cache.model.key.ActivityCountKey; +import org.exoplatform.social.core.storage.cache.model.key.IdentityFilterKey; +import org.exoplatform.social.core.storage.cache.model.key.IdentityKey; +import org.exoplatform.social.core.storage.cache.model.key.ListActivitiesKey; +import org.exoplatform.social.core.storage.cache.model.key.ListRelationshipsKey; +import org.exoplatform.social.core.storage.cache.model.key.RelationshipCountKey; +import org.exoplatform.social.core.storage.cache.model.key.RelationshipIdentityKey; +import org.exoplatform.social.core.storage.cache.model.key.RelationshipKey; +import org.exoplatform.social.core.storage.cache.model.key.RelationshipType; +import org.exoplatform.social.core.storage.cache.model.key.SuggestionKey; +import org.exoplatform.social.core.storage.cache.selector.RelationshipCacheSelector; +import org.exoplatform.social.core.storage.cache.selector.SuggestionCacheSelector; /** * Cache support for RelationshipStorage. diff --git a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/CachedSpaceStorage.java b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/CachedSpaceStorage.java index 8a9cd3bf104..353692c62ad 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/CachedSpaceStorage.java +++ b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/CachedSpaceStorage.java @@ -17,27 +17,43 @@ package org.exoplatform.social.core.storage.cache; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import org.exoplatform.commons.cache.future.FutureExoCache; import org.exoplatform.container.PortalContainer; import org.exoplatform.services.cache.ExoCache; import org.exoplatform.services.log.ExoLogger; import org.exoplatform.services.log.Log; -import org.exoplatform.social.common.Utils; import org.exoplatform.social.core.identity.model.Identity; import org.exoplatform.social.core.identity.provider.SpaceIdentityProvider; -import org.exoplatform.social.core.jpa.storage.RDBMSSpaceStorageImpl; -import org.exoplatform.social.core.jpa.storage.dao.*; +import org.exoplatform.social.core.jpa.storage.SpaceStorage; +import org.exoplatform.social.core.jpa.storage.dao.ActivityDAO; +import org.exoplatform.social.core.jpa.storage.dao.IdentityDAO; +import org.exoplatform.social.core.jpa.storage.dao.SpaceDAO; +import org.exoplatform.social.core.jpa.storage.dao.SpaceExternalInvitationDAO; +import org.exoplatform.social.core.jpa.storage.dao.SpaceMemberDAO; import org.exoplatform.social.core.search.Sorting; import org.exoplatform.social.core.space.SpaceFilter; import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.core.storage.SpaceStorageException; import org.exoplatform.social.core.storage.api.IdentityStorage; import org.exoplatform.social.core.storage.cache.loader.ServiceContext; -import org.exoplatform.social.core.storage.cache.model.data.*; -import org.exoplatform.social.core.storage.cache.model.key.*; -import org.exoplatform.social.core.storage.cache.selector.*; +import org.exoplatform.social.core.storage.cache.model.data.IntegerData; +import org.exoplatform.social.core.storage.cache.model.data.ListIdentitiesData; +import org.exoplatform.social.core.storage.cache.model.data.ListSpacesData; +import org.exoplatform.social.core.storage.cache.model.data.SpaceData; +import org.exoplatform.social.core.storage.cache.model.key.ListIdentitiesKey; +import org.exoplatform.social.core.storage.cache.model.key.ListSpacesKey; +import org.exoplatform.social.core.storage.cache.model.key.SpaceFilterKey; +import org.exoplatform.social.core.storage.cache.model.key.SpaceKey; +import org.exoplatform.social.core.storage.cache.model.key.SpaceRefKey; +import org.exoplatform.social.core.storage.cache.model.key.SpaceType; +import org.exoplatform.social.core.storage.cache.selector.IdentityCacheSelector; +import org.exoplatform.social.core.storage.cache.selector.LastAccessedSpacesCacheSelector; import org.exoplatform.social.metadata.favorite.FavoriteService; import org.exoplatform.web.security.security.RemindPasswordTokenService; @@ -45,27 +61,76 @@ * @author Alain Defrance * @version $Revision$ */ -public class CachedSpaceStorage extends RDBMSSpaceStorageImpl { +public class CachedSpaceStorage extends SpaceStorage { + + private static final SpaceKey EMPTY_SPACE_KEY = + new SpaceKey("0"); /** Logger */ - private static final Log LOG = ExoLogger.getLogger(CachedSpaceStorage.class); + private static final Log LOG = + ExoLogger.getLogger(CachedSpaceStorage.class); + + private final ExoCache spaceCache; + + private final ExoCache spaceRefCache; + + private final ExoCache spacesCountCache; + + private final ExoCache> spacesCountByTemplateCache; + + private final ExoCache spacesCache; + + private final ExoCache identitiesCache; + + private final FutureExoCache> spaceFutureCache; + + private final FutureExoCache> spaceRefFutureCache; + + private final FutureExoCache> spacesCountFutureCache; + + private final FutureExoCache, ServiceContext>> spacesCountByTemplateFutureCache; + + private final FutureExoCache> spacesFutureCache; - private final ExoCache exoSpaceCache; - private final ExoCache exoSpaceSimpleCache; - private final ExoCache exoRefSpaceCache; - private final ExoCache exoSpacesCountCache; - private final ExoCache exoSpacesCache; - private final ExoCache exoIdentitiesCache; + private SocialStorageCacheService cacheService; - private final FutureExoCache> spaceCache; - private final FutureExoCache> spaceSimpleCache; - private final FutureExoCache> spaceRefCache; - private final FutureExoCache> spacesCountCache; - private final FutureExoCache> spacesCache; + private CachedActivityStorage cachedActivityStorage; + + private CachedIdentityStorage cachedIdentityStorage; + + public CachedSpaceStorage(SpaceDAO spaceDAO, // NOSONAR + SpaceMemberDAO spaceMemberDAO, + IdentityStorage identityStorage, + IdentityDAO identityDAO, + ActivityDAO activityDAO, + SpaceExternalInvitationDAO spaceExternalInvitationDAO, + SocialStorageCacheService cacheService, + FavoriteService favoriteService, + RemindPasswordTokenService remindPasswordTokenService) { + super(spaceDAO, + spaceMemberDAO, + identityStorage, + identityDAO, + activityDAO, + spaceExternalInvitationDAO, + favoriteService, + remindPasswordTokenService); + this.cacheService = cacheService; - private SocialStorageCacheService cacheService; - private CachedActivityStorage cachedActivityStorage; - private CachedIdentityStorage cachedIdentityStorage; + this.spaceCache = cacheService.getSpaceCache(); + this.spaceRefCache = cacheService.getSpaceRefCache(); + this.spacesCountCache = cacheService.getSpacesCountCache(); + this.spacesCache = cacheService.getSpacesCache(); + this.identitiesCache = cacheService.getIdentitiesCache(); + this.spacesCountByTemplateCache = cacheService.getSpacesCountByTemplateCache(); + + this.spaceFutureCache = CacheType.SPACE.createFutureCache(spaceCache); + this.spaceRefFutureCache = CacheType.SPACE_REF.createFutureCache(spaceRefCache); + this.spacesCountFutureCache = CacheType.SPACES_COUNT.createFutureCache(spacesCountCache); + this.spacesCountByTemplateFutureCache = CacheType.SPACES_COUNT_BY_TEMPLATE.createFutureCache(spacesCountByTemplateCache); + this.spacesFutureCache = CacheType.SPACES.createFutureCache(spacesCache); + + } /** * Build the activity list from the caches Ids. @@ -75,7 +140,7 @@ public class CachedSpaceStorage extends RDBMSSpaceStorageImpl { */ private List buildSpaces(ListSpacesData data) { - List spaces = new ArrayList(); + List spaces = new ArrayList<>(); for (SpaceKey k : data.getIds()) { Space s = getSpaceById(k.getId()); spaces.add(s); @@ -83,7 +148,7 @@ private List buildSpaces(ListSpacesData data) { return spaces; } - + private List buildIds(ListSpacesData data) { if (data == null || data.getIds() == null) { return Collections.emptyList(); @@ -95,31 +160,6 @@ private List buildIds(ListSpacesData data) { return identityIds; } } - - /** - * Build the activity list from the caches Ids. - * - * @param data ids - * @return activities - */ - private List buildSimpleSpaces(ListSpacesData data) { - - List spaces = new ArrayList(); - for (SpaceKey k : data.getIds()) { - Space s = getSpaceSimpleById(k.getId()); - spaces.add(s); - } - return spaces; - - } - - public CachedActivityStorage getCachedActivityStorage() { - if (cachedActivityStorage == null) { - cachedActivityStorage = (CachedActivityStorage) - PortalContainer.getInstance().getComponentInstanceOfType(CachedActivityStorage.class); - } - return cachedActivityStorage; - } /** * Get cached identity storage. @@ -129,12 +169,12 @@ public CachedActivityStorage getCachedActivityStorage() { */ public CachedIdentityStorage getCachedIdentityStorage() { if (cachedIdentityStorage == null) { - cachedIdentityStorage = (CachedIdentityStorage) - PortalContainer.getInstance().getComponentInstanceOfType(CachedIdentityStorage.class); + cachedIdentityStorage = PortalContainer.getInstance() + .getComponentInstanceOfType(CachedIdentityStorage.class); } return cachedIdentityStorage; } - + /** * Build the ids from the space list. * @@ -142,16 +182,14 @@ public CachedIdentityStorage getCachedIdentityStorage() { * @return ids */ private ListSpacesData buildIds(List spaces) { - - List data = new ArrayList(); + List data = new ArrayList<>(); for (Space s : spaces) { SpaceKey k = putSpaceInCacheIfNotExists(s); data.add(k); } return new ListSpacesData(data); - } - + /** * Build the ids from the space identity id list. * @@ -159,166 +197,41 @@ private ListSpacesData buildIds(List spaces) { * @return identities */ private ListSpacesData buildListIdentityIds(List identities) { - - List data = new ArrayList(); + List data = new ArrayList<>(); for (String identityId : identities) { SpaceKey k = new SpaceKey(identityId); data.add(k); } return new ListSpacesData(data); - - } - - /** - * Build the ids from the space briefing list. - * - * @param spaces briefing spaces - * @return ids - */ - private ListSpacesData buildSimpleIds(List spaces) { - - List data = new ArrayList(); - for (Space s : spaces) { - SpaceKey k = putSpaceInCacheIfNotExists(s); - data.add(k); - } - return new ListSpacesData(data); - - } - - public CachedSpaceStorage(SpaceDAO spaceDAO, - SpaceMemberDAO spaceMemberDAO, - IdentityStorage identityStorage, - IdentityDAO identityDAO, - ActivityDAO activityDAO, - SpaceExternalInvitationDAO spaceExternalInvitationDAO, - SocialStorageCacheService cacheService, - FavoriteService favoriteService, - RemindPasswordTokenService remindPasswordTokenService) { - super(spaceDAO, spaceMemberDAO, identityStorage, identityDAO, activityDAO, spaceExternalInvitationDAO, favoriteService, remindPasswordTokenService); - this.cacheService = cacheService; - - this.exoSpaceCache = cacheService.getSpaceCache(); - this.exoSpaceSimpleCache = cacheService.getSpaceSimpleCache(); - this.exoRefSpaceCache = cacheService.getSpaceRefCache(); - this.exoSpacesCountCache = cacheService.getSpacesCountCache(); - this.exoSpacesCache = cacheService.getSpacesCache(); - this.exoIdentitiesCache = cacheService.getIdentitiesCache(); - - this.spaceCache = CacheType.SPACE.createFutureCache(exoSpaceCache); - this.spaceSimpleCache = CacheType.SPACE_SIMPLE.createFutureCache(exoSpaceSimpleCache); - this.spaceRefCache = CacheType.SPACE_REF.createFutureCache(exoRefSpaceCache); - this.spacesCountCache = CacheType.SPACES_COUNT.createFutureCache(exoSpacesCountCache); - this.spacesCache = CacheType.SPACES.createFutureCache(exoSpacesCache); - - } - - private void cleanRef(Space removed) { - if (removed == null) { - return; - } - exoRefSpaceCache.remove(new SpaceRefKey(removed.getDisplayName())); - exoRefSpaceCache.remove(new SpaceRefKey(null, removed.getPrettyName())); - exoRefSpaceCache.remove(new SpaceRefKey(null, null, removed.getGroupId())); - exoRefSpaceCache.remove(new SpaceRefKey(null, null, null, removed.getUrl())); - - spaceRefCache.remove(new SpaceRefKey(removed.getDisplayName())); - spaceRefCache.remove(new SpaceRefKey(null, removed.getPrettyName())); - spaceRefCache.remove(new SpaceRefKey(null, null, removed.getGroupId())); - spaceRefCache.remove(new SpaceRefKey(null, null, null, removed.getUrl())); } - void clearIdentityCache() { - - try { - exoIdentitiesCache.select(new IdentityCacheSelector(SpaceIdentityProvider.NAME)); - } - catch (Exception e) { - LOG.error("Error deleting cache entries of provider type 'Space Identities'", e); - } - - } - - void clearSpaceCache() { - + @Override + public Space saveSpace(final Space space, final boolean isNew) { try { - exoSpacesCache.clearCache(); - exoSpacesCountCache.clearCache(); - } - catch (Exception e) { - LOG.error("Error deleting space caches", e); - } - - } - - /** - * {@inheritDoc} - */ - public Space getSpaceByDisplayName(final String spaceDisplayName) throws SpaceStorageException { - - // - SpaceRefKey refKey = new SpaceRefKey(spaceDisplayName); - - // - SpaceKey key = spaceRefCache.get( - new ServiceContext() { - public SpaceKey execute() { - Space space = CachedSpaceStorage.super.getSpaceByDisplayName(spaceDisplayName); - if (space != null) { - return putSpaceInCacheIfNotExists(space); - } - else { - return SpaceKey.NULL_OBJECT; - } - } - }, - refKey); - - // - if (key != null && key != SpaceKey.NULL_OBJECT && key.getId() != null) { - return getSpaceById(key.getId()); - } - else { - return null; + return super.saveSpace(space, isNew); + } finally { + spaceCache.remove(new SpaceKey(space.getId())); + clearSpaceCache(); + clearIdentityCache(); + cleanRef(space); } - - } - - /** - * {@inheritDoc} - */ - public void saveSpace(final Space space, final boolean isNew) throws SpaceStorageException { - - // - super.saveSpace(space, isNew); - - - // - exoSpaceSimpleCache.remove(new SpaceKey(space.getId())); - exoSpaceCache.remove(new SpaceKey(space.getId())); - - clearSpaceCache(); - clearIdentityCache(); - cleanRef(space); } @Override public void renameSpace(Space space, String newDisplayName) throws SpaceStorageException { - String oldDisplayName = space.getDisplayName(); - String oldUrl = Utils.cleanString(oldDisplayName); String oldPrettyName = space.getPrettyName(); - + // super.renameSpace(space, newDisplayName); - //remove identity and profile from cache + // remove identity and profile from cache cachedIdentityStorage = this.getCachedIdentityStorage(); Identity identitySpace = cachedIdentityStorage.findIdentity(SpaceIdentityProvider.NAME, space.getPrettyName()); if (identitySpace == null) { identitySpace = cachedIdentityStorage.findIdentity(SpaceIdentityProvider.NAME, oldPrettyName); } - + if (identitySpace != null) { cachedIdentityStorage.clearIdentityCached(identitySpace, oldPrettyName); } @@ -328,19 +241,15 @@ public void renameSpace(Space space, String newDisplayName) throws SpaceStorageE cachedActivityStorage.clearOwnerStreamCache(oldPrettyName); // remove space cached - exoSpaceCache.remove(new SpaceKey(space.getId())); + spaceCache.remove(new SpaceKey(space.getId())); clearSpaceCache(); clearIdentityCache(); cleanRef(space); - exoRefSpaceCache.remove(new SpaceRefKey(oldDisplayName)); - exoRefSpaceCache.remove(new SpaceRefKey(null, oldPrettyName)); - exoRefSpaceCache.remove(new SpaceRefKey(null, null, space.getGroupId())); - exoRefSpaceCache.remove(new SpaceRefKey(null, null, null, oldUrl)); + spaceRefCache.remove(new SpaceRefKey(oldPrettyName)); + spaceRefCache.remove(new SpaceRefKey(null, space.getGroupId())); } - - /** - * {@inheritDoc} - */ + + @Override public void deleteSpace(final String id) throws SpaceStorageException { // @@ -348,7 +257,7 @@ public void deleteSpace(final String id) throws SpaceStorageException { super.deleteSpace(id); // - exoSpaceCache.remove(new SpaceKey(id)); + spaceCache.remove(new SpaceKey(id)); clearSpaceCache(); cleanRef(space); @@ -359,27 +268,22 @@ public void deleteSpace(final String id) throws SpaceStorageException { @Override public void ignoreSpace(String spaceId, String userId) { - super.ignoreSpace(spaceId, userId); - exoSpaceSimpleCache.remove(new SpaceKey(spaceId)); - SpaceData spaceData = exoSpaceCache.remove(new SpaceKey(spaceId)); - if (spaceData != null) { - Space space = spaceData.build(); - clearSpaceCache(); - clearIdentityCache(); - if (space != null) { - cleanRef(space); + try { + super.ignoreSpace(spaceId, userId); + } finally { + SpaceData spaceData = spaceCache.remove(new SpaceKey(spaceId)); + if (spaceData != null) { + Space space = spaceData.build(); + clearSpaceCache(); + clearIdentityCache(); + if (space != null) { + cleanRef(space); + } } } } @Override - public boolean isSpaceIgnored(String spaceId, String userId) { - return super.isSpaceIgnored(spaceId, userId); - } - - /** - * {@inheritDoc} - */ public List getManagerSpacesByFilter( final String userId, final SpaceFilter spaceFilter, @@ -387,20 +291,17 @@ public List getManagerSpacesByFilter( final long limit) { SpaceFilterKey key = new SpaceFilterKey(userId, spaceFilter, SpaceType.MANAGER); ListSpacesKey listKey = new ListSpacesKey(key, offset, limit); - ListSpacesData keys = spacesCache.get( - new ServiceContext() { - public ListSpacesData execute() { - if (limit == 0) { - return buildIds(Collections.emptyList()); - } - List got = CachedSpaceStorage.super.getManagerSpacesByFilter(userId, - spaceFilter, - offset, - limit); - return buildIds(got); - } - }, - listKey); + ListSpacesData keys = spacesFutureCache.get(() -> { + if (limit == 0) { + return buildIds(Collections.emptyList()); + } + List got = CachedSpaceStorage.super.getManagerSpacesByFilter(userId, + spaceFilter, + offset, + limit); + return buildIds(got); + }, + listKey); return buildSpaces(keys); } @@ -408,591 +309,385 @@ public ListSpacesData execute() { @Override public int getManagerSpacesByFilterCount(String userId, SpaceFilter spaceFilter) { SpaceFilterKey key = new SpaceFilterKey(userId, spaceFilter, SpaceType.MANAGER); - return spacesCountCache.get( - new ServiceContext() { - public IntegerData execute() { - return new IntegerData(CachedSpaceStorage.super.getManagerSpacesByFilterCount(userId, spaceFilter)); - } - }, - key) - .build(); + return spacesCountFutureCache.get(() -> new IntegerData(CachedSpaceStorage.super.getManagerSpacesByFilterCount(userId, + spaceFilter)), + key) + .build(); } - /** - * {@inheritDoc} - */ + @Override public int getMemberSpacesByFilterCount(final String userId, final SpaceFilter spaceFilter) { - - // SpaceFilterKey key = new SpaceFilterKey(userId, spaceFilter, SpaceType.MEMBER); - - // - return spacesCountCache.get( - new ServiceContext() { - public IntegerData execute() { - return new IntegerData(CachedSpaceStorage.super.getMemberSpacesByFilterCount(userId, spaceFilter)); - } - }, - key) - .build(); + return spacesCountFutureCache.get(() -> new IntegerData(CachedSpaceStorage.super.getMemberSpacesByFilterCount(userId, + spaceFilter)), + key) + .build(); } - /** - * {@inheritDoc} - */ + @Override public List getMemberSpacesByFilter( - final String userId, final SpaceFilter spaceFilter, final long offset, final long limit) { - - // + final String userId, + final SpaceFilter spaceFilter, + final long offset, + final long limit) { SpaceFilterKey key = new SpaceFilterKey(userId, spaceFilter, SpaceType.MEMBER); ListSpacesKey listKey = new ListSpacesKey(key, offset, limit); - - // - ListSpacesData keys = spacesCache.get( - new ServiceContext() { - public ListSpacesData execute() { - if (limit == 0) { - return buildIds(Collections.emptyList()); - } - List got = CachedSpaceStorage.super.getMemberSpacesByFilter(userId, spaceFilter, offset, limit); - return buildIds(got); - } - }, - listKey); - - // + ListSpacesData keys = spacesFutureCache.get(() -> { + if (limit == 0) { + return buildIds(Collections.emptyList()); + } + List got = + CachedSpaceStorage.super.getMemberSpacesByFilter(userId, + spaceFilter, + offset, + limit); + return buildIds(got); + }, listKey); return buildSpaces(keys); - } - /** - * {@inheritDoc} - */ + @Override public int getPendingSpacesByFilterCount(final String userId, final SpaceFilter spaceFilter) { - - // SpaceFilterKey key = new SpaceFilterKey(userId, spaceFilter, SpaceType.PENDING); - - // - return spacesCountCache.get( - new ServiceContext() { - public IntegerData execute() { - return new IntegerData(CachedSpaceStorage.super.getPendingSpacesByFilterCount(userId, spaceFilter)); - } - }, - key) - .build(); + return spacesCountFutureCache.get(() -> new IntegerData(CachedSpaceStorage.super.getPendingSpacesByFilterCount(userId, + spaceFilter)), + key) + .build(); } - /** - * {@inheritDoc} - */ + @Override public List getPendingSpacesByFilter( - final String userId, final SpaceFilter spaceFilter, final long offset, final long limit) { + final String userId, + final SpaceFilter spaceFilter, + final long offset, + final long limit) { // SpaceFilterKey key = new SpaceFilterKey(userId, spaceFilter, SpaceType.PENDING); ListSpacesKey listKey = new ListSpacesKey(key, offset, limit); // - ListSpacesData keys = spacesCache.get( - new ServiceContext() { - public ListSpacesData execute() { - if (limit == 0) { - return buildIds(Collections.emptyList()); - } - List got = CachedSpaceStorage.super.getPendingSpacesByFilter(userId, spaceFilter, offset, limit); - return buildIds(got); - } - }, - listKey); + ListSpacesData keys = spacesFutureCache.get(() -> { + if (limit == 0) { + return buildIds(Collections.emptyList()); + } + List got = + CachedSpaceStorage.super.getPendingSpacesByFilter(userId, + spaceFilter, + offset, + limit); + return buildIds(got); + }, listKey); // - return buildSpaces(keys); - + return + + buildSpaces(keys); + } - /** - * {@inheritDoc} - */ + @Override public int getInvitedSpacesByFilterCount(final String userId, final SpaceFilter spaceFilter) { - - // SpaceFilterKey key = new SpaceFilterKey(userId, spaceFilter, SpaceType.INVITED); - - // - return spacesCountCache.get( - new ServiceContext() { - public IntegerData execute() { - return new IntegerData(CachedSpaceStorage.super.getInvitedSpacesByFilterCount(userId, spaceFilter)); - } - }, - key) - .build(); + return spacesCountFutureCache.get(() -> new IntegerData(CachedSpaceStorage.super.getInvitedSpacesByFilterCount(userId, + spaceFilter)), + key) + .build(); } - /** - * {@inheritDoc} - */ - public List getInvitedSpacesByFilter(final String userId, final SpaceFilter spaceFilter, final long offset, final long limit) { + @Override + public List getInvitedSpacesByFilter(final String userId, + final SpaceFilter spaceFilter, + final long offset, + final long limit) { // SpaceFilterKey key = new SpaceFilterKey(userId, spaceFilter, SpaceType.INVITED); ListSpacesKey listKey = new ListSpacesKey(key, offset, limit); // - ListSpacesData keys = spacesCache.get( - new ServiceContext() { - public ListSpacesData execute() { - if (limit == 0) { - return buildIds(Collections.emptyList()); - } - List got = CachedSpaceStorage.super.getInvitedSpacesByFilter(userId, spaceFilter, offset, limit); - return buildIds(got); - } - }, - listKey); - - // - return buildSpaces(keys); - - } - - /** - * {@inheritDoc} - */ - public int getPublicSpacesByFilterCount(final String userId, final SpaceFilter spaceFilter) { + ListSpacesData keys = spacesFutureCache.get(() -> { + if (limit == 0) { + return buildIds(Collections.emptyList()); + } + List got = + CachedSpaceStorage.super.getInvitedSpacesByFilter(userId, + spaceFilter, + offset, + limit); + return buildIds(got); + }, listKey); // - SpaceFilterKey key = new SpaceFilterKey(userId, spaceFilter, SpaceType.PUBLIC); + return - // - return spacesCountCache.get( - new ServiceContext() { - public IntegerData execute() { - return new IntegerData(CachedSpaceStorage.super.getPublicSpacesByFilterCount(userId, spaceFilter)); - } - }, - key) - .build(); + buildSpaces(keys); } - /** - * {@inheritDoc} - */ + @Override public int getAccessibleSpacesByFilterCount(final String userId, final SpaceFilter spaceFilter) { // SpaceFilterKey key = new SpaceFilterKey(userId, spaceFilter, SpaceType.ACCESSIBLE); // - return spacesCountCache.get( - new ServiceContext() { - public IntegerData execute() { - return new IntegerData(CachedSpaceStorage.super.getAccessibleSpacesByFilterCount(userId, spaceFilter)); - } - }, - key) - .build(); - + return spacesCountFutureCache.get(() -> new IntegerData(CachedSpaceStorage.super.getAccessibleSpacesByFilterCount(userId, + spaceFilter)), + key) + .build(); + } - /** - * {@inheritDoc} - */ + @Override public int getVisibleSpacesCount(final String userId, final SpaceFilter spaceFilter) throws SpaceStorageException { // SpaceFilterKey key = new SpaceFilterKey(userId, spaceFilter, SpaceType.VISIBLE); - // - return spacesCountCache.get( - new ServiceContext() { - public IntegerData execute() { - return new IntegerData(CachedSpaceStorage.super.getVisibleSpacesCount(userId, spaceFilter)); - } - }, - key).build(); + return spacesCountFutureCache.get(() -> new IntegerData(CachedSpaceStorage.super.getVisibleSpacesCount(userId, + spaceFilter)), + key) + .build(); } - /** - * {@inheritDoc} - */ + @Override public List getAccessibleSpacesByFilter( - final String userId, final SpaceFilter spaceFilter, final long offset, final long limit) { + final String userId, + final SpaceFilter spaceFilter, + final long offset, + final long limit) { // SpaceFilterKey key = new SpaceFilterKey(userId, spaceFilter, SpaceType.ACCESSIBLE); ListSpacesKey listKey = new ListSpacesKey(key, offset, limit); // - ListSpacesData keys = spacesCache.get( - new ServiceContext() { - public ListSpacesData execute() { - if (limit == 0) { - return buildIds(Collections.emptyList()); - } - List got = CachedSpaceStorage.super.getAccessibleSpacesByFilter(userId, spaceFilter, offset, limit); - return buildIds(got); - } - }, - listKey); + ListSpacesData keys = spacesFutureCache.get(() -> { + if (limit == 0) { + return buildIds(Collections.emptyList()); + } + List got = + CachedSpaceStorage.super.getAccessibleSpacesByFilter(userId, + spaceFilter, + offset, + limit); + return buildIds(got); + }, listKey); // - return buildSpaces(keys); + return + + buildSpaces(keys); } - /** - * {@inheritDoc} - */ + @Override public int getEditableSpacesByFilterCount(final String userId, final SpaceFilter spaceFilter) { - - // SpaceFilterKey key = new SpaceFilterKey(userId, spaceFilter, SpaceType.EDITABLE); + return spacesCountFutureCache.get(() -> new IntegerData(CachedSpaceStorage.super.getEditableSpacesByFilterCount(userId, + spaceFilter)), + key) + .build(); - // - return spacesCountCache.get( - new ServiceContext() { - public IntegerData execute() { - return new IntegerData(CachedSpaceStorage.super.getEditableSpacesByFilterCount(userId, spaceFilter)); - } - }, - key) - .build(); - } - /** - * {@inheritDoc} - */ - public List getEditableSpacesByFilter( - final String userId, final SpaceFilter spaceFilter, final long offset, final long limit) { + @Override + public List getEditableSpacesByFilter(String userId, + SpaceFilter spaceFilter, + long offset, + long limit) { // SpaceFilterKey key = new SpaceFilterKey(userId, spaceFilter, SpaceType.EDITABLE); ListSpacesKey listKey = new ListSpacesKey(key, offset, limit); // - ListSpacesData keys = spacesCache.get( - new ServiceContext() { - public ListSpacesData execute() { - if (limit == 0) { - return buildIds(Collections.emptyList()); - } - List got = CachedSpaceStorage.super.getEditableSpacesByFilter(userId, spaceFilter, offset, limit); - return buildIds(got); - } - }, - listKey); + ListSpacesData keys = spacesFutureCache.get(() -> { + if (limit == 0) { + return buildIds(Collections.emptyList()); + } + List got = + CachedSpaceStorage.super.getEditableSpacesByFilter(userId, + spaceFilter, + offset, + limit); + return buildIds(got); + }, listKey); // - return buildSpaces(keys); + return + + buildSpaces(keys); } - /** - * {@inheritDoc} - */ + @Override public int getAllSpacesByFilterCount(final SpaceFilter spaceFilter) { - // SpaceFilterKey key = new SpaceFilterKey(null, spaceFilter, null); - - // - return spacesCountCache.get( - new ServiceContext() { - public IntegerData execute() { - return new IntegerData(CachedSpaceStorage.super.getAllSpacesByFilterCount(spaceFilter)); - } - }, - key) - .build(); + return spacesCountFutureCache.get(() -> new IntegerData(CachedSpaceStorage.super.getAllSpacesByFilterCount(spaceFilter)), key) + .build(); } - /** - * {@inheritDoc} - */ + @Override public List getSpacesByFilter(final SpaceFilter spaceFilter, final long offset, final long limit) { - // SpaceFilterKey key = new SpaceFilterKey(spaceFilter == null ? null : spaceFilter.getRemoteId(), spaceFilter, null); ListSpacesKey listKey = new ListSpacesKey(key, offset, limit); + ListSpacesData keys = spacesFutureCache.get(() -> { + if (limit == 0) { + return buildIds(Collections.emptyList()); + } + List got = CachedSpaceStorage.super.getSpacesByFilter(spaceFilter, + offset, + limit); + return buildIds(got); + }, listKey); // - ListSpacesData keys = spacesCache.get( - new ServiceContext() { - public ListSpacesData execute() { - if (limit == 0) { - return buildIds(Collections.emptyList()); - } - List got = CachedSpaceStorage.super.getSpacesByFilter(spaceFilter, offset, limit); - return buildIds(got); - } - }, - listKey); + return - // - return buildSpaces(keys); + buildSpaces(keys); } - /** - * {@inheritDoc} - */ + @Override public Space getSpaceById(final String id) throws SpaceStorageException { // SpaceKey key = new SpaceKey(id); // - SpaceData data = spaceCache.get( - new ServiceContext() { - public SpaceData execute() { - Space space = CachedSpaceStorage.super.getSpaceById(id); - if (space != null) { - putSpaceInCacheIfNotExists(space); - return new SpaceData(space); - } - else { - return null; - } - } - }, - key); + SpaceData data = spaceFutureCache.get(() -> { + Space space = CachedSpaceStorage.super.getSpaceById(id); + if (space != null) { + putSpaceInCacheIfNotExists(space); + return new SpaceData(space); + } else { + return null; + } + }, key); if (data != null) { return data.build(); - } - else { + } else { return null; } - - } - - /** - * {@inheritDoc} - */ - public Space getSpaceSimpleById(final String id) throws SpaceStorageException { - // - SpaceKey key = new SpaceKey(id); - - SpaceData data = exoSpaceCache.get(key); - if (data != null) { - Space s = data.build(); - if (exoSpaceSimpleCache.get(key) == null) { - putSpaceInCacheIfNotExists(s); - } - - return s; - - } - // - SpaceSimpleData simpleData = spaceSimpleCache.get( - new ServiceContext() { - public SpaceSimpleData execute() { - Space space = CachedSpaceStorage.super.getSpaceSimpleById(id); - if (space != null) { - return new SpaceSimpleData(space); - } - else { - return null; - } - } - }, - key); - - if (simpleData != null) { - return simpleData.build(); - } - else { - return null; - } - } - /** - * {@inheritDoc} - */ + @Override public Space getSpaceByPrettyName(final String spacePrettyName) throws SpaceStorageException { // - SpaceRefKey refKey = new SpaceRefKey(null, spacePrettyName); + SpaceRefKey refKey = new SpaceRefKey(spacePrettyName); // - SpaceKey key = spaceRefCache.get( - new ServiceContext() { - public SpaceKey execute() { - Space space = CachedSpaceStorage.super.getSpaceByPrettyName(spacePrettyName); - if (space != null) { - return putSpaceInCacheIfNotExists(space); - } - else { - return SpaceKey.NULL_OBJECT; - } - } - }, - refKey); + SpaceKey key = spaceRefFutureCache.get(() -> { + Space space = CachedSpaceStorage.super.getSpaceByPrettyName(spacePrettyName); + if (space != null) { + return putSpaceInCacheIfNotExists(space); + } else { + return SpaceKey.NULL_OBJECT; + } + }, refKey); // if (key != null && key != SpaceKey.NULL_OBJECT && key.getId() != null) { return getSpaceById(key.getId()); - } - else { + } else { return null; } } - /** - * {@inheritDoc} - */ + @Override public Space getSpaceByGroupId(final String groupId) throws SpaceStorageException { // - SpaceRefKey refKey = new SpaceRefKey(null, null, groupId); + SpaceRefKey refKey = new SpaceRefKey(null, groupId); // - SpaceKey key = spaceRefCache.get( - new ServiceContext() { - public SpaceKey execute() { - Space space = CachedSpaceStorage.super.getSpaceByGroupId(groupId); - if (space != null) { - return putSpaceInCacheIfNotExists(space); - } - else { - return SpaceKey.NULL_OBJECT; - } - } - }, - refKey); + SpaceKey key = spaceRefFutureCache.get(() -> { + Space space = CachedSpaceStorage.super.getSpaceByGroupId(groupId); + if (space != null) { + return putSpaceInCacheIfNotExists(space); + } else { + return SpaceKey.NULL_OBJECT; + } + }, refKey); // if (key != null && key != SpaceKey.NULL_OBJECT && key.getId() != null) { return getSpaceById(key.getId()); - } - else { + } else { return null; } } - /** - * {@inheritDoc} - */ - public Space getSpaceByUrl(final String url) throws SpaceStorageException { - - // - SpaceRefKey refKey = new SpaceRefKey(null, null, null, url); - - // - SpaceKey key = spaceRefCache.get( - new ServiceContext() { - public SpaceKey execute() { - Space space = CachedSpaceStorage.super.getSpaceByUrl(url); - if (space != null) { - return putSpaceInCacheIfNotExists(space); - } - else { - return SpaceKey.NULL_OBJECT; - } - } - }, - refKey); - - // - if (key != null && key != SpaceKey.NULL_OBJECT && key.getId() != null) { - return getSpaceById(key.getId()); - } - else { - return null; - } - - } - @Override public void updateSpaceAccessed(String remoteId, Space space) throws SpaceStorageException { - // we remove all cache entries for the given userId and for space type LATEST_ACCESSED + // we remove all cache entries for the given userId and for space type + // LATEST_ACCESSED LastAccessedSpacesCacheSelector selector = new LastAccessedSpacesCacheSelector(remoteId, space, cacheService); try { // Update the storage only if the user has accessed a different space if (selector.isUpdateStore()) { super.updateSpaceAccessed(remoteId, space); } - exoSpacesCache.select(selector); + spacesCache.select(selector); } catch (Exception e) { LOG.error("Error while removing cache entries for remoteId=" + remoteId + ", space=" + space.getDisplayName() + - " and type=" + SpaceType.LATEST_ACCESSED.name() + " or type=" + SpaceType.VISITED, e); + " and type=" + SpaceType.LATEST_ACCESSED.name() + " or type=" + SpaceType.VISITED, e); } } @Override - public List getLastAccessedSpace(final SpaceFilter filter, final int offset, final int limit) throws SpaceStorageException { + public List getLastAccessedSpace(final SpaceFilter filter, + final int offset, + final int limit) throws SpaceStorageException { // SpaceFilterKey key = new SpaceFilterKey(filter.getRemoteId(), filter, SpaceType.LATEST_ACCESSED); ListSpacesKey listKey = new ListSpacesKey(key, offset, limit); // - ListSpacesData keys = spacesCache.get( - new ServiceContext() { - public ListSpacesData execute() { - if (limit == 0) { - return buildIds(Collections.emptyList()); - } - List got = CachedSpaceStorage.super.getLastAccessedSpace(filter, offset, limit); - return buildSimpleIds(got); - } - }, - listKey); - - // - return buildSimpleSpaces(keys); + ListSpacesData keys = spacesFutureCache.get(() -> { + if (limit == 0) { + return buildIds(Collections.emptyList()); + } + List got = CachedSpaceStorage.super.getLastAccessedSpace(filter, + offset, + limit); + return buildIds(got); + }, listKey); + return buildSpaces(keys); } + @Override public List getLastSpaces(final int limit) { - SpaceFilter filter = new SpaceFilter(); - filter.setSorting(new Sorting(Sorting.SortBy.DATE, Sorting.OrderBy.DESC)); - - SpaceFilterKey key = new SpaceFilterKey(null, filter, null); - ListSpacesKey listKey = new ListSpacesKey(key, 0, limit); - - // - ListSpacesData keys = spacesCache.get( - new ServiceContext() { - public ListSpacesData execute() { - if (limit == 0) { - return buildIds(Collections.emptyList()); - } - List got = CachedSpaceStorage.super.getLastSpaces(limit); - return buildIds(got); - } - }, - listKey); - - // - return buildSimpleSpaces(keys); - } + SpaceFilter filter = new SpaceFilter(); + filter.setSorting(new Sorting(Sorting.SortBy.DATE, Sorting.OrderBy.DESC)); - @Override - public int getNumberOfMemberPublicSpaces(final String userId) { - // - SpaceFilterKey key = new SpaceFilterKey(userId, null, SpaceType.PUBLIC); + SpaceFilterKey key = new SpaceFilterKey(null, filter, null); + ListSpacesKey listKey = new ListSpacesKey(key, 0, limit); // - return spacesCountCache.get( - new ServiceContext() { - public IntegerData execute() { - return new IntegerData(CachedSpaceStorage.super.getNumberOfMemberPublicSpaces(userId)); - } - }, - key) - .build(); + ListSpacesData keys = spacesFutureCache.get(() -> { + if (limit == 0) { + return buildIds(Collections.emptyList()); + } + List got = CachedSpaceStorage.super.getLastSpaces(limit); + return buildIds(got); + }, + listKey); + // + return buildSpaces(keys); } - + @Override public List getVisitedSpaces(final SpaceFilter filter, final int offset, final int limit) throws SpaceStorageException { // @@ -1000,14 +695,12 @@ public List getVisitedSpaces(final SpaceFilter filter, final int offset, ListSpacesKey listKey = new ListSpacesKey(key, offset, limit); // - ListSpacesData keys = spacesCache.get(new ServiceContext() { - public ListSpacesData execute() { - if (limit == 0) { - return buildIds(Collections.emptyList()); - } - List got = CachedSpaceStorage.super.getVisitedSpaces(filter, offset, limit); - return buildIds(got); + ListSpacesData keys = spacesFutureCache.get(() -> { + if (limit == 0) { + return buildIds(Collections.emptyList()); } + List got = CachedSpaceStorage.super.getVisitedSpaces(filter, offset, limit); + return buildIds(got); }, listKey); // @@ -1021,17 +714,16 @@ public List getMemberRoleSpaceIdentityIds(String identityId, int offset, ListSpacesKey listKey = new ListSpacesKey(key, offset, limit); // - ListSpacesData keys = spacesCache.get( - new ServiceContext() { - public ListSpacesData execute() { - if (limit == 0) { - return buildIds(Collections.emptyList()); - } - List got = CachedSpaceStorage.super.getMemberRoleSpaceIdentityIds(identityId, offset, limit); - return buildListIdentityIds(got); - } - }, - listKey); + ListSpacesData keys = spacesFutureCache.get(() -> { + if (limit == 0) { + return buildIds(Collections.emptyList()); + } + List got = + CachedSpaceStorage.super.getMemberRoleSpaceIdentityIds(identityId, + offset, + limit); + return buildListIdentityIds(got); + }, listKey); // return buildIds(keys); @@ -1044,56 +736,32 @@ public List getMemberRoleSpaceIds(String identityId, int offset, int lim ListSpacesKey listKey = new ListSpacesKey(key, offset, limit); // - ListSpacesData keys = spacesCache.get( - new ServiceContext() { - public ListSpacesData execute() { - if (limit == 0) { - return buildIds(Collections.emptyList()); - } - List got = CachedSpaceStorage.super.getMemberRoleSpaceIds(identityId, - offset, - limit); - return buildListIdentityIds(got); - } - }, - listKey); + ListSpacesData keys = spacesFutureCache.get(() -> { + if (limit == 0) { + return buildIds(Collections.emptyList()); + } + List got = CachedSpaceStorage.super.getMemberRoleSpaceIds(identityId, + offset, + limit); + return buildListIdentityIds(got); + }, listKey); // return buildIds(keys); } - private SpaceKey putSpaceInCacheIfNotExists(Space space) { - SpaceKey key = new SpaceKey(space.getId()); - if(exoSpaceCache.get(key) == null) { - exoSpaceCache.putLocal(key, new SpaceData(space)); - exoSpaceSimpleCache.putLocal(key, new SpaceSimpleData(space)); - } - SpaceRefKey refKey = new SpaceRefKey(space.getDisplayName(), null, null, null); - if(exoRefSpaceCache.get(refKey) == null) { - exoRefSpaceCache.putLocal(refKey, key); - } - refKey = new SpaceRefKey(null, null, space.getGroupId(), null); - if(exoRefSpaceCache.get(refKey) == null) { - exoRefSpaceCache.putLocal(refKey, key); - } - refKey = new SpaceRefKey(null, space.getPrettyName(), null, null); - if(exoRefSpaceCache.get(refKey) == null) { - exoRefSpaceCache.putLocal(refKey, key); - } - refKey = new SpaceRefKey(null, null, null, space.getUrl()); - if(exoRefSpaceCache.get(refKey) == null) { - exoRefSpaceCache.putLocal(refKey, key); - } - return key; + @Override + public Map countSpacesByTemplate() { + return spacesCountByTemplateFutureCache.get(() -> new HashMap<>(super.countSpacesByTemplate()), + EMPTY_SPACE_KEY); } public void clearSpaceCached(String spaceId) { SpaceKey cacheKey = new SpaceKey(spaceId); - SpaceData cachedSpace = exoSpaceCache.get(cacheKey); + SpaceData cachedSpace = spaceCache.get(cacheKey); if (cachedSpace != null) { Space space = cachedSpace.build(); - exoSpaceSimpleCache.remove(cacheKey); - exoSpaceCache.remove(cacheKey); + spaceCache.remove(cacheKey); cleanRef(space); } clearSpaceCache(); @@ -1101,13 +769,65 @@ public void clearSpaceCached(String spaceId) { } public void clearCaches() { - exoSpaceCache.clearCache(); - exoSpaceSimpleCache.clearCache(); - exoSpacesCountCache.clearCache(); - exoSpacesCache.clearCache(); - exoRefSpaceCache.clearCache(); - exoIdentitiesCache.clearCache(); + spaceCache.clearCache(); + spacesCountCache.clearCache(); + spacesCountByTemplateCache.clearCache(); + spacesCache.clearCache(); + spaceRefCache.clearCache(); + identitiesCache.clearCache(); } -} + private SpaceKey putSpaceInCacheIfNotExists(Space space) { + SpaceKey key = new SpaceKey(space.getId()); + if (spaceCache.get(key) == null) { + spaceCache.putLocal(key, new SpaceData(space)); + } + SpaceRefKey refKey = new SpaceRefKey(null, space.getGroupId()); + if (spaceRefCache.get(refKey) == null) { + spaceRefCache.putLocal(refKey, key); + } + refKey = new SpaceRefKey(space.getPrettyName()); + if (spaceRefCache.get(refKey) == null) { + spaceRefCache.putLocal(refKey, key); + } + return key; + } + + private CachedActivityStorage getCachedActivityStorage() { + if (cachedActivityStorage == null) { + cachedActivityStorage = PortalContainer.getInstance() + .getComponentInstanceOfType(CachedActivityStorage.class); + } + return cachedActivityStorage; + } + + private void cleanRef(Space removed) { + if (removed == null) { + return; + } + spaceRefCache.remove(new SpaceRefKey(removed.getPrettyName())); + spaceRefCache.remove(new SpaceRefKey(null, removed.getGroupId())); + + spaceRefFutureCache.remove(new SpaceRefKey(removed.getPrettyName())); + spaceRefFutureCache.remove(new SpaceRefKey(null, removed.getGroupId())); + } + + private void clearIdentityCache() { + try { + identitiesCache.select(new IdentityCacheSelector(SpaceIdentityProvider.NAME)); + } catch (Exception e) { + LOG.error("Error deleting cache entries of provider type 'Space Identities'", e); + } + } + private void clearSpaceCache() { + try { + spacesCache.clearCache(); + spacesCountCache.clearCache(); + spacesCountByTemplateCache.clearCache(); + } catch (Exception e) { + LOG.error("Error deleting space caches", e); + } + } + +} diff --git a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/SocialStorageCacheService.java b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/SocialStorageCacheService.java index afc9705c92e..07a2f8147e9 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/SocialStorageCacheService.java +++ b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/SocialStorageCacheService.java @@ -17,7 +17,8 @@ package org.exoplatform.social.core.storage.cache; -import org.exoplatform.commons.file.model.FileItem; +import java.util.HashMap; + import org.exoplatform.services.cache.CacheService; import org.exoplatform.services.cache.ExoCache; import org.exoplatform.social.core.storage.cache.model.data.ActivityData; @@ -29,7 +30,6 @@ import org.exoplatform.social.core.storage.cache.model.data.ProfileData; import org.exoplatform.social.core.storage.cache.model.data.RelationshipData; import org.exoplatform.social.core.storage.cache.model.data.SpaceData; -import org.exoplatform.social.core.storage.cache.model.data.SpaceSimpleData; import org.exoplatform.social.core.storage.cache.model.data.SuggestionsData; import org.exoplatform.social.core.storage.cache.model.key.ActivityCountKey; import org.exoplatform.social.core.storage.cache.model.key.ActivityKey; @@ -80,10 +80,9 @@ public class SocialStorageCacheService { private final ExoCache spaceCache; private final ExoCache spaceRefCache; private final ExoCache spacesCountCache; + private final ExoCache> spacesCountByTemplateCache; private final ExoCache spacesCache; - private final ExoCache spaceSimpleCache; - public SocialStorageCacheService(CacheService cacheService) { this.identityCache = CacheType.IDENTITY.getFromService(cacheService); @@ -107,10 +106,12 @@ public SocialStorageCacheService(CacheService cacheService) { this.spaceCache = CacheType.SPACE.getFromService(cacheService); this.spaceRefCache = CacheType.SPACE_REF.getFromService(cacheService); this.spacesCountCache = CacheType.SPACES_COUNT.getFromService(cacheService); + this.spacesCountByTemplateCache = CacheType.SPACES_COUNT_BY_TEMPLATE.getFromService(cacheService); this.spacesCache = CacheType.SPACES.getFromService(cacheService); - - this.spaceSimpleCache = CacheType.SPACE_SIMPLE.getFromService(cacheService); + } + public ExoCache> getSpacesCountByTemplateCache() { + return spacesCountByTemplateCache; } public ExoCache getIdentityCache() { @@ -171,10 +172,6 @@ public ExoCache getActivitiesCache() { public ExoCache getSpaceCache() { return spaceCache; } - - public ExoCache getSpaceSimpleCache() { - return spaceSimpleCache; - } public ExoCache getSpaceRefCache() { return spaceRefCache; @@ -187,4 +184,5 @@ public ExoCache getSpacesCountCache() { public ExoCache getSpacesCache() { return spacesCache; } + } diff --git a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/IdentityData.java b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/IdentityData.java index 90ae7518d99..5889e8e6430 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/IdentityData.java +++ b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/IdentityData.java @@ -17,10 +17,10 @@ package org.exoplatform.social.core.storage.cache.model.data; -import org.exoplatform.social.core.identity.model.Identity; - import java.util.Objects; +import org.exoplatform.social.core.identity.model.Identity; + /** * Immutable identity data. * diff --git a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/ListActivitiesData.java b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/ListActivitiesData.java index 8fd98738f48..74aaf59676b 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/ListActivitiesData.java +++ b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/ListActivitiesData.java @@ -17,10 +17,10 @@ package org.exoplatform.social.core.storage.cache.model.data; -import org.exoplatform.social.core.storage.cache.model.key.ActivityKey; - import java.util.List; +import org.exoplatform.social.core.storage.cache.model.key.ActivityKey; + /** * Immutable activity list keys. * diff --git a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/ListIdentitiesData.java b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/ListIdentitiesData.java index 6570986d6e5..23259a16485 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/ListIdentitiesData.java +++ b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/ListIdentitiesData.java @@ -17,10 +17,10 @@ package org.exoplatform.social.core.storage.cache.model.data; -import org.exoplatform.social.core.storage.cache.model.key.IdentityKey; - import java.util.List; +import org.exoplatform.social.core.storage.cache.model.key.IdentityKey; + /** * Immutable identity list keys. * diff --git a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/ListRelationshipsData.java b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/ListRelationshipsData.java index 6085c8accad..decf0b439f4 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/ListRelationshipsData.java +++ b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/ListRelationshipsData.java @@ -17,10 +17,10 @@ package org.exoplatform.social.core.storage.cache.model.data; -import org.exoplatform.social.core.storage.cache.model.key.RelationshipKey; - import java.util.List; +import org.exoplatform.social.core.storage.cache.model.key.RelationshipKey; + /** * Immutable relationship list keys. * diff --git a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/ListSpacesData.java b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/ListSpacesData.java index 62e715949ac..97c864f4d8b 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/ListSpacesData.java +++ b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/ListSpacesData.java @@ -17,10 +17,10 @@ package org.exoplatform.social.core.storage.cache.model.data; -import org.exoplatform.social.core.storage.cache.model.key.SpaceKey; - import java.util.List; +import org.exoplatform.social.core.storage.cache.model.key.SpaceKey; + /** * Immutable space list keys. * diff --git a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/ProfileData.java b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/ProfileData.java index 86d3de297ac..1c7598d8e98 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/ProfileData.java +++ b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/ProfileData.java @@ -17,14 +17,14 @@ package org.exoplatform.social.core.storage.cache.model.data; -import org.exoplatform.social.core.identity.model.Identity; -import org.exoplatform.social.core.identity.model.Profile; - import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.exoplatform.social.core.identity.model.Identity; +import org.exoplatform.social.core.identity.model.Profile; + /** * Immutable profile data. * diff --git a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/RelationshipData.java b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/RelationshipData.java index 61338252c80..63a665e1239 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/RelationshipData.java +++ b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/RelationshipData.java @@ -18,6 +18,7 @@ package org.exoplatform.social.core.storage.cache.model.data; import org.apache.commons.lang3.StringUtils; + import org.exoplatform.social.core.relationship.model.Relationship; /** diff --git a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/SpaceData.java b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/SpaceData.java index 1b921995730..762be3242e0 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/SpaceData.java +++ b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/SpaceData.java @@ -17,10 +17,11 @@ package org.exoplatform.social.core.storage.cache.model.data; +import java.util.List; + import org.exoplatform.social.core.space.model.Space; -import java.util.Arrays; -import java.util.Objects; +import lombok.EqualsAndHashCode; /** * Immutable space data. @@ -28,13 +29,12 @@ * @author Alain Defrance * @version $Revision$ */ +@EqualsAndHashCode public class SpaceData implements CacheData { private static final long serialVersionUID = 6109309246791818373L; private final String id; - private final String app; - private final String prettyName; private final String displayName; @@ -43,12 +43,8 @@ public class SpaceData implements CacheData { private final String description; - private final String type; - private final String visibility; - private final String priority; - private final String avatarUrl; private final String bannerUrl; @@ -65,6 +61,8 @@ public class SpaceData implements CacheData { private final Long lastUpdatedTime; + private final long templateId; + private final long cacheTime; private final String[] members; @@ -83,24 +81,24 @@ public class SpaceData implements CacheData { private String publicSiteVisibility; - public SpaceData(final Space space) { + private List layoutPermissions; + + private List deletePermissions; + public SpaceData(final Space space) { id = space.getId(); - app = space.getApp(); + templateId = space.getTemplateId(); prettyName = space.getPrettyName(); displayName = space.getDisplayName(); registration = space.getRegistration(); description = space.getDescription(); - type = space.getType(); visibility = space.getVisibility(); - priority = space.getPriority(); avatarLastUpdated = space.getAvatarLastUpdated(); bannerLastUpdated = space.getBannerLastUpdated(); avatarUrl = space.getAvatarUrl(); bannerUrl = space.getBannerUrl(); groupId = space.getGroupId(); url = space.getUrl(); - members = space.getMembers(); redactors = space.getRedactors(); publishers = space.getPublishers(); @@ -110,24 +108,21 @@ public SpaceData(final Space space) { createdTime = space.getCreatedTime(); publicSiteId = space.getPublicSiteId(); publicSiteVisibility = space.getPublicSiteVisibility(); - + layoutPermissions = space.getLayoutPermissions(); + deletePermissions = space.getDeletePermissions(); lastUpdatedTime = space.getLastUpdatedTime(); cacheTime = System.currentTimeMillis(); } public Space build() { - Space space = new Space(); - space.setId(id); - space.setApp(app); + space.setTemplateId(templateId); space.setDisplayName(displayName); space.setPrettyName(prettyName); space.setRegistration(registration); space.setDescription(description); - space.setType(type); space.setVisibility(visibility); - space.setPriority(priority); space.setAvatarLastUpdated(avatarLastUpdated); space.setBannerLastUpdated(bannerLastUpdated); space.setAvatarUrl(avatarUrl); @@ -145,120 +140,8 @@ public Space build() { space.setCacheTime(cacheTime); space.setPublicSiteId(publicSiteId); space.setPublicSiteVisibility(publicSiteVisibility); - + space.setLayoutPermissions(layoutPermissions); + space.setDeletePermissions(deletePermissions); return space; - - } - - public String getId() { - return id; - } - - public String getApp() { - return app; - } - - public String getPrettyName() { - return prettyName; - } - - public String getDisplayName() { - return displayName; - } - - public String getRegistration() { - return registration; - } - - public String getDescription() { - return description; - } - - public String getType() { - return type; - } - - public String getVisibility() { - return visibility; - } - - public String getPriority() { - return priority; - } - - public String getAvatarUrl() { - return avatarUrl; - } - - public String getGroupId() { - return groupId; - } - - public String getUrl() { - return url; - } - - public String[] getMembers() { - return members; - } - - public String[] getRedactors() { - return redactors; - } - - public String[] getPublishers() { - return publishers; - } - - public String[] getManagers() { - return managers; - } - - public String[] getPendingUser() { - return pendingUser; - } - - public String[] getInvitedUser() { - return invitedUser; - } - - public String getBannerUrl() { - return bannerUrl; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - SpaceData spaceData = (SpaceData) o; - return Objects.equals(id, spaceData.id) && - Objects.equals(app, spaceData.app) && - Objects.equals(prettyName, spaceData.prettyName) && - Objects.equals(displayName, spaceData.displayName) && - Objects.equals(registration, spaceData.registration) && - Objects.equals(description, spaceData.description) && - Objects.equals(type, spaceData.type) && - Objects.equals(visibility, spaceData.visibility) && - Objects.equals(priority, spaceData.priority) && - Objects.equals(avatarUrl, spaceData.avatarUrl) && - Objects.equals(bannerUrl, spaceData.bannerUrl) && - Objects.equals(groupId, spaceData.groupId) && - Objects.equals(url, spaceData.url) && - Objects.equals(avatarLastUpdated, spaceData.avatarLastUpdated) && - Objects.equals(bannerLastUpdated, spaceData.bannerLastUpdated) && - Objects.equals(createdTime, spaceData.createdTime) && - Arrays.equals(members, spaceData.members) && - Arrays.equals(redactors, spaceData.redactors) && - Arrays.equals(publishers, spaceData.publishers) && - Arrays.equals(managers, spaceData.managers) && - Arrays.equals(pendingUser, spaceData.pendingUser) && - Arrays.equals(invitedUser, spaceData.invitedUser); - } - - @Override - public int hashCode() { - return Objects.hash(id, app, prettyName, displayName, registration, description, type, visibility, - priority, avatarUrl, bannerUrl, groupId, url, avatarLastUpdated, bannerLastUpdated, createdTime, - members, managers, redactors, publishers, pendingUser, invitedUser); } } diff --git a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/SpaceSimpleData.java b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/SpaceSimpleData.java deleted file mode 100644 index 28fe5e9a31f..00000000000 --- a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/data/SpaceSimpleData.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (C) 2003-2011 eXo Platform SAS. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -package org.exoplatform.social.core.storage.cache.model.data; - -import org.exoplatform.social.core.space.model.Space; - -import java.util.Objects; - -/** - * Immutable space simple data. - * It only contains the briefing data for Space. - * - * @author Thanh Vu - * @version $Revision$ - */ -public class SpaceSimpleData implements CacheData { - private static final long serialVersionUID = -8017088221992883071L; - - private final String id; - private final String app; - private final String prettyName; - private final String displayName; - private final String description; - private final String avatarUrl; - private final String groupId; - private final String url; - private final Long avatarLastUpdated; - - public SpaceSimpleData(final Space space) { - - id = space.getId(); - app = space.getApp(); - prettyName = space.getPrettyName(); - displayName = space.getDisplayName(); - description = space.getDescription(); - avatarLastUpdated = space.getAvatarLastUpdated(); - avatarUrl = space.getAvatarUrl(); - groupId = space.getGroupId(); - url = space.getUrl(); - } - - public Space build() { - - Space space = new Space(); - space.setId(id); - space.setApp(app); - space.setDisplayName(displayName); - space.setPrettyName(prettyName); - space.setDescription(description); - space.setAvatarLastUpdated(avatarLastUpdated); - space.setAvatarUrl(avatarUrl); - space.setGroupId(groupId); - space.setUrl(url); - return space; - } - - public String getId() { - return id; - } - - public String getApp() { - return app; - } - - public String getPrettyName() { - return prettyName; - } - - public String getDisplayName() { - return displayName; - } - - public String getDescription() { - return description; - } - - public String getAvatarUrl() { - return avatarUrl; - } - - public String getGroupId() { - return groupId; - } - - public String getUrl() { - return url; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - SpaceSimpleData that = (SpaceSimpleData) o; - return Objects.equals(id, that.id) && - Objects.equals(app, that.app) && - Objects.equals(prettyName, that.prettyName) && - Objects.equals(displayName, that.displayName) && - Objects.equals(description, that.description) && - Objects.equals(avatarUrl, that.avatarUrl) && - Objects.equals(groupId, that.groupId) && - Objects.equals(url, that.url) && - Objects.equals(avatarLastUpdated, that.avatarLastUpdated); - } - - @Override - public int hashCode() { - return Objects.hash(id, app, prettyName, displayName, description, avatarUrl, groupId, url, avatarLastUpdated); - } -} diff --git a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/key/SpaceRefKey.java b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/key/SpaceRefKey.java index 1221f6d4c80..4218264b0a3 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/key/SpaceRefKey.java +++ b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/model/key/SpaceRefKey.java @@ -17,75 +17,24 @@ package org.exoplatform.social.core.storage.cache.model.key; -/** - * Immutable space reference key. - * This key is used to cache space by displayName, prettyName, groupId or url. - * - * @author Alain Defrance - * @version $Revision$ - */ +import lombok.EqualsAndHashCode; + +@EqualsAndHashCode public class SpaceRefKey implements CacheKey { - private static final long serialVersionUID = -7953413006239399161L; - private final String displayName; - private final String prettyName; - private final String groupId; - private final String url; + private static final long serialVersionUID = -7953413006239399161L; - public SpaceRefKey(final String displayName) { - this(displayName, null, null, null); - } + private final String prettyName; - public SpaceRefKey(final String displayName, final String prettyName) { - this(displayName, prettyName, null, null); - } + private final String groupId; - public SpaceRefKey(final String displayName, final String prettyName, final String groupId) { - this(displayName, prettyName, groupId, null); + public SpaceRefKey(final String prettyName) { + this(prettyName, null); } - public SpaceRefKey(final String displayName, final String prettyName, final String groupId, final String url) { - this.displayName = displayName; + public SpaceRefKey(final String prettyName, final String groupId) { this.prettyName = prettyName; this.groupId = groupId; - this.url = url; } - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - if (!(o instanceof SpaceRefKey)) { - return false; - } - - SpaceRefKey that = (SpaceRefKey) o; - - if (displayName != null ? !displayName.equals(that.displayName) : that.displayName != null) { - return false; - } - if (groupId != null ? !groupId.equals(that.groupId) : that.groupId != null) { - return false; - } - if (prettyName != null ? !prettyName.equals(that.prettyName) : that.prettyName != null) { - return false; - } - if (url != null ? !url.equals(that.url) : that.url != null) { - return false; - } - - return true; - - } - - @Override - public int hashCode() { - int result = (displayName != null ? displayName.hashCode() : 0); - result = 31 * result + (prettyName != null ? prettyName.hashCode() : 0); - result = 31 * result + (groupId != null ? groupId.hashCode() : 0); - result = 31 * result + (url != null ? url.hashCode() : 0); - return result; - } - } diff --git a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/selector/IdentityCacheSelector.java b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/selector/IdentityCacheSelector.java index b97aed73ada..41aed75436c 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/selector/IdentityCacheSelector.java +++ b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/selector/IdentityCacheSelector.java @@ -20,7 +20,9 @@ import org.apache.commons.lang3.StringUtils; import org.exoplatform.services.cache.ObjectCacheInfo; -import org.exoplatform.social.core.storage.cache.model.key.*; +import org.exoplatform.social.core.storage.cache.model.key.CacheKey; +import org.exoplatform.social.core.storage.cache.model.key.IdentityFilterKey; +import org.exoplatform.social.core.storage.cache.model.key.ListIdentitiesKey; /** * @author Alain Defrance diff --git a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/selector/RelationshipCacheSelector.java b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/selector/RelationshipCacheSelector.java index 14327987528..7b5755cb55f 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/selector/RelationshipCacheSelector.java +++ b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/selector/RelationshipCacheSelector.java @@ -20,7 +20,11 @@ import org.apache.commons.lang3.StringUtils; import org.exoplatform.services.cache.ObjectCacheInfo; -import org.exoplatform.social.core.storage.cache.model.key.*; +import org.exoplatform.social.core.storage.cache.model.key.CacheKey; +import org.exoplatform.social.core.storage.cache.model.key.IdentityKey; +import org.exoplatform.social.core.storage.cache.model.key.ListRelationshipsKey; +import org.exoplatform.social.core.storage.cache.model.key.RelationshipCountKey; +import org.exoplatform.social.core.storage.cache.model.key.RelationshipIdentityKey; /** * @author Alain Defrance diff --git a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/selector/SuggestionCacheSelector.java b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/selector/SuggestionCacheSelector.java index 0c38f06f7c0..5a78f4b5dc4 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/storage/cache/selector/SuggestionCacheSelector.java +++ b/component/core/src/main/java/org/exoplatform/social/core/storage/cache/selector/SuggestionCacheSelector.java @@ -18,7 +18,9 @@ import org.exoplatform.services.cache.ObjectCacheInfo; import org.exoplatform.social.core.storage.cache.model.data.SuggestionsData; -import org.exoplatform.social.core.storage.cache.model.key.*; +import org.exoplatform.social.core.storage.cache.model.key.CacheKey; +import org.exoplatform.social.core.storage.cache.model.key.IdentityKey; +import org.exoplatform.social.core.storage.cache.model.key.SuggestionKey; public class SuggestionCacheSelector extends CacheSelector { diff --git a/component/core/src/main/java/org/exoplatform/social/core/storage/impl/StorageUtils.java b/component/core/src/main/java/org/exoplatform/social/core/storage/impl/StorageUtils.java index 8a42223b056..4981807de5b 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/storage/impl/StorageUtils.java +++ b/component/core/src/main/java/org/exoplatform/social/core/storage/impl/StorageUtils.java @@ -4,241 +4,23 @@ import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import java.time.format.ResolverStyle; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Calendar; import java.util.Collections; -import java.util.Comparator; import java.util.Date; -import java.util.LinkedHashMap; -import java.util.LinkedList; import java.util.List; -import java.util.Map; -import java.util.regex.Pattern; - -import org.exoplatform.services.log.ExoLogger; -import org.exoplatform.services.log.Log; -import org.exoplatform.social.core.activity.model.ExoSocialActivity; -import org.exoplatform.social.core.identity.model.Identity; -import org.exoplatform.social.core.space.model.Space; /** * @author Alain Defrance * @version $Revision$ */ public class StorageUtils { - // - private static final Log LOG = ExoLogger.getLogger(StorageUtils.class.getName()); - - // - public static final String ASTERISK_STR = "*"; - - public static final String PERCENT_STR = "%"; - - public static final char ASTERISK_CHAR = '*'; - - public static final String SPACE_STR = " "; - - public static final String EMPTY_STR = ""; - - public static final String SLASH_STR = "/"; - - public static final String COLON_STR = ":"; - - public static final String SOC_RELATIONSHIP = "soc:relationship"; - - public static final String SOC_RELCEIVER = "soc:receiver"; - - public static final String SOC_SENDER = "soc:sender"; - - public static final String SOC_IGNORED = "soc:ignored"; - public static final String SOC_FROM = "soc:from"; + public static final String ASTERISK_STR = "*"; - public static final String SOC_TO = "soc:to"; - - public static final String SOC_ACTIVITY_INFO = "soc:activityInfo"; - - public static final String SOC_PREFIX = "soc:"; + public static final String EMPTY_STR = ""; public static final DateTimeFormatter RFC_3339_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss[.SSS][XXX]") .withResolverStyle(ResolverStyle.LENIENT); - private final static long DAY_MILISECONDS = 86400000; // a - // day - // = - // 24h - // x - // 60m - // x - // 60s - // x - // 1000 - // milisecond. - - public static String processUsernameSearchPattern(final String userName) { - String modifiedUserName = userName; - if (modifiedUserName.length() > 0) { - modifiedUserName = - ((EMPTY_STR.equals(modifiedUserName)) || (modifiedUserName.length() == 0)) - ? ASTERISK_STR - : modifiedUserName; - - modifiedUserName = - (modifiedUserName.charAt(0) != ASTERISK_CHAR) ? ASTERISK_STR + modifiedUserName : modifiedUserName; - - modifiedUserName = - (modifiedUserName.charAt(modifiedUserName.length() - 1) != ASTERISK_CHAR) - ? modifiedUserName += - ASTERISK_STR - : modifiedUserName; - - modifiedUserName = - (modifiedUserName.indexOf(ASTERISK_STR) >= 0) - ? modifiedUserName.replace(ASTERISK_STR, "." + ASTERISK_STR) - : modifiedUserName; - - modifiedUserName = - (modifiedUserName.indexOf(PERCENT_STR) >= 0) - ? modifiedUserName.replace(PERCENT_STR, "." + ASTERISK_STR) - : modifiedUserName; - - Pattern.compile(modifiedUserName); - } - return userName; - } - - public static String addAsteriskToStringInput(final String input) { - if (input.length() != 0) { - if (input.indexOf(ASTERISK_STR) == -1) { - return ASTERISK_STR + input + ASTERISK_STR; - } - return input; - } - return EMPTY_STR; - } - - /** - * Process Unified Search Condition - * - * @param searchCondition the input search condition - * @return List of conditions - * @since 4.0.x - */ - public static List processUnifiedSearchCondition(String searchCondition) { - String[] spaceConditions = searchCondition.split(" "); - List result = new ArrayList(spaceConditions.length); - - for (String conditionValue : spaceConditions) { - result.add(conditionValue); - } - return result; - } - - /** - * Gets common item number from two list - * - * @param m the first list - * @param n the second list - * @return number of common item - */ - public static int getCommonItemNumber(final List m, final List n) { - if (m == null || n == null) { - return 0; - } - List copy = new ArrayList(m); - copy.removeAll(n); - - return (m.size() - copy.size()); - } - - /** - * Sort one map by its value - * - * @param map the input map - * @param asc indicate sort by ASC (true) or DESC (false) - * @return the sorted map - * @since 4.0.x - */ - public static > Map sortMapByValue(Map map, final boolean asc) { - // - List> list = new LinkedList>(map.entrySet()); - // - Collections.sort(list, new Comparator>() { - public int compare(Map.Entry o1, Map.Entry o2) { - if (asc) - return (o1.getValue()).compareTo(o2.getValue()); - else - return (o1.getValue()).compareTo(o2.getValue()) / -1; - } - }); - - Map result = new LinkedHashMap(); - for (Map.Entry entry : list) { - result.put(entry.getKey(), entry.getValue()); - } - return result; - } - - /** - * Sort list of spaces by space's display name - * - * @param list - * @param asc - * @return sorted list - */ - public static List sortSpaceByName(List list, final boolean asc) { - // - Collections.sort(list, new Comparator() { - public int compare(Space o1, Space o2) { - if (asc) - return (o1.getDisplayName()).compareTo(o2.getDisplayName()); - else - return (o1.getDisplayName()).compareTo(o2.getDisplayName()) / -1; - } - }); - - return list; - } - - /** - * Sort list of identities by full name - * - * @param list - * @param asc - * @return sorted list - */ - public static List sortIdentitiesByFullName(List list, final boolean asc) { - // - Collections.sort(list, new Comparator() { - public int compare(Identity o1, Identity o2) { - if (asc) - return (o1.getProfile().getFullName()).compareTo(o2.getProfile().getFullName()); - else - return (o1.getProfile().getFullName()).compareTo(o2.getProfile().getFullName()) / -1; - } - }); - - return list; - } - - /** - * Sort a list of activity by updated time - * - * @param list - * @return - */ - public static List sortActivitiesByTime(List list, int limit) { - // - Collections.sort(list, new Comparator() { - public int compare(ExoSocialActivity a1, ExoSocialActivity a2) { - return ((Long) a1.getUpdated().getTime()).compareTo((Long) a2.getUpdated().getTime()) / -1; - } - }); - - return list.size() > limit ? list.subList(0, limit - 1) : list; - } - /** * Gets sub list from the provided list with start and end index. * @@ -261,67 +43,6 @@ public static List subList(List list, int startIndex, int toIndex) { return list.subList(startIndex, toIndex); } - /* - * Gets added element when compares between l1 and l2 - * @param l1 - * @param l2 - * @return - */ - public static String[] sub(String[] l1, String[] l2) { - - if (l1 == null) { - return new String[] {}; - } - - if (l2 == null) { - return l1; - } - - List l = new ArrayList(Arrays.asList(l1)); - l.removeAll(Arrays.asList(l2)); - return l.toArray(new String[] {}); - } - - /** - * @param aroundDays - * @param lazilyCreatedTime - * @return - */ - public static boolean isActiveUser(int aroundDays, long lazilyCreatedTime) { - Calendar cal = Calendar.getInstance(); - cal.set(Calendar.DAY_OF_MONTH, cal.get(Calendar.DAY_OF_MONTH) - aroundDays); - long limitTime = cal.getTimeInMillis(); - return lazilyCreatedTime >= limitTime; - } - - /** - * Compares oldDate and newDate. return TRUE if given newDate the after one - * day or more the given oldDate - * - * @param oldDate - * @param newDate - * @return TRUE: the day after oldDate - */ - public static boolean afterDayOrMore(long oldDate, long newDate) { - long diffValue = newDate - oldDate; - return diffValue >= DAY_MILISECONDS; - } - - /** - * Gets the list of activity's id from the activities - * - * @param activities - * @return list of ids - */ - public static List getIds(List activities) { - List ids = new LinkedList(); - for (ExoSocialActivity a : activities) { - ids.add(a.getId()); - } - - return ids; - } - public static String toRFC3339Date(Date dateTime) { if (dateTime == null) { return null; diff --git a/component/core/src/main/java/org/exoplatform/social/core/thumbnail/ImageThumbnailServiceImpl.java b/component/core/src/main/java/org/exoplatform/social/core/thumbnail/ImageThumbnailServiceImpl.java index 1eda575120c..fd84619552c 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/thumbnail/ImageThumbnailServiceImpl.java +++ b/component/core/src/main/java/org/exoplatform/social/core/thumbnail/ImageThumbnailServiceImpl.java @@ -15,7 +15,14 @@ */ package org.exoplatform.social.core.thumbnail; +import java.io.ByteArrayInputStream; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import org.apache.commons.io.IOUtils; + import org.exoplatform.commons.file.model.FileInfo; import org.exoplatform.commons.file.model.FileItem; import org.exoplatform.commons.file.services.FileService; @@ -30,12 +37,6 @@ import org.exoplatform.social.metadata.model.MetadataType; import org.exoplatform.social.metadata.thumbnail.model.ThumbnailObject; -import java.io.ByteArrayInputStream; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - public class ImageThumbnailServiceImpl implements ImageThumbnailService { private static final Log LOG = ExoLogger.getExoLogger(ImageThumbnailServiceImpl.class); diff --git a/component/core/src/main/java/org/exoplatform/social/core/utils/MentionUtils.java b/component/core/src/main/java/org/exoplatform/social/core/utils/MentionUtils.java index af516489156..2e23d169e89 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/utils/MentionUtils.java +++ b/component/core/src/main/java/org/exoplatform/social/core/utils/MentionUtils.java @@ -1,6 +1,7 @@ package org.exoplatform.social.core.utils; -import static org.exoplatform.social.core.BaseActivityProcessorPlugin.*; +import static org.exoplatform.social.core.BaseActivityProcessorPlugin.TEMPLATE_PARAM_LIST_DELIM; +import static org.exoplatform.social.core.BaseActivityProcessorPlugin.TEMPLATE_PARAM_TO_PROCESS; import java.util.ArrayList; import java.util.Collections; diff --git a/component/core/src/main/resources/db/changelog/social-rdbms.db.changelog-1.0.0.xml b/component/core/src/main/resources/db/changelog/social-rdbms.db.changelog-1.0.0.xml index b24db35d527..c0fe9c576a5 100644 --- a/component/core/src/main/resources/db/changelog/social-rdbms.db.changelog-1.0.0.xml +++ b/component/core/src/main/resources/db/changelog/social-rdbms.db.changelog-1.0.0.xml @@ -1018,4 +1018,85 @@ + + + + + + ANY + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ALTER TABLE SOC_SPACE_TEMPLATES MODIFY COLUMN LAYOUT longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + + + + + + + + + + + + + + + diff --git a/component/core/src/main/resources/db/changelog/social-rdbms.db.changelog-master.xml b/component/core/src/main/resources/db/changelog/social-rdbms.db.changelog-master.xml deleted file mode 100644 index 7abc934bae5..00000000000 --- a/component/core/src/main/resources/db/changelog/social-rdbms.db.changelog-master.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/component/core/src/main/resources/jpa-entities.idx b/component/core/src/main/resources/jpa-entities.idx index 7306feca9da..15a3f9cb006 100644 --- a/component/core/src/main/resources/jpa-entities.idx +++ b/component/core/src/main/resources/jpa-entities.idx @@ -20,3 +20,4 @@ org.exoplatform.social.core.jpa.storage.entity.ProfileLabelEntity io.meeds.social.link.entity.LinkSettingEntity org.exoplatform.social.core.jpa.storage.entity.SpaceExternalInvitationEntity org.exoplatform.social.core.jpa.storage.entity.MetadataItemEntity +io.meeds.social.space.template.entity.SpaceTemplateEntity diff --git a/component/core/src/main/resources/locale/social/Core_ar.properties b/component/core/src/main/resources/locale/social/Core_ar.properties index 62712a444d1..d2329f3f702 100644 --- a/component/core/src/main/resources/locale/social/Core_ar.properties +++ b/component/core/src/main/resources/locale/social/Core_ar.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} تم إنشاؤه من قبل {1}. -SpaceActivityPublisher.manager_role_granted={0} تم ترقيته إلى مسؤول عن الفضاء. -SpaceActivityPublisher.manager_role_revoked=تم إلغاء صلاحيات {0} كمسؤول عن الفضاء. -SpaceActivityPublisher.user_space_joined=انضممت إلى {0} فضاءات. -SpaceActivityPublisher.has_joined=انضم إلى الفضاء. -SpaceActivityPublisher.has_left=غادر الفضاء. -SpaceActivityPublisher.user_joined={0} انضم إلى الفضاء. -SpaceActivityPublisher.member_left={0} غادر الفضاء. -SpaceActivityPublisher.space_renamed=تم تحديث الاسم إلى: {0}. -SpaceActivityPublisher.space_description_edited=تم تحديث الوصف إلى: {0}. -SpaceActivityPublisher.space_avatar_edited=هذا الفضاء لديه صورة جديدة. -SpaceActivityPublisher.member_of_one_or_zero_public_space=أنا الآن عضو في {0} فضاء. -SpaceActivityPublisher.member_of_number_public_spaces=أنا الآن عضو في {0} فضاءات. -SpaceActivityPublisher.members={0} أعضاء -SpaceActivityPublisher.member={0} أعضاء ProfileUpdatesPublisher.avatar_updated=تم تحديث الصورة الرمزية. diff --git a/component/core/src/main/resources/locale/social/Core_aro.properties b/component/core/src/main/resources/locale/social/Core_aro.properties index cf33a5c0319..c8917de1c4b 100644 --- a/component/core/src/main/resources/locale/social/Core_aro.properties +++ b/component/core/src/main/resources/locale/social/Core_aro.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} تم إنشاؤه من قبل {1}. -SpaceActivityPublisher.manager_role_granted={0} تم ترقيته إلى مدير الفضاء. -SpaceActivityPublisher.manager_role_revoked=تم إلغاء صلاحيات {0} كمدير للفضاء . -SpaceActivityPublisher.user_space_joined=انضممت إلى {0} مساحة. -SpaceActivityPublisher.has_joined=انضم إلى المساحة. -SpaceActivityPublisher.has_left=غادر المساحة. -SpaceActivityPublisher.user_joined={0} انضم إلى المساحة. -SpaceActivityPublisher.member_left={0} غادر المساحة. -SpaceActivityPublisher.space_renamed=تم تحديث الاسم إلى: {0}. -SpaceActivityPublisher.space_description_edited=تم تحديث الوصف إلى: {0}. -SpaceActivityPublisher.space_avatar_edited=لهذه المساحة صورة جديدة. -SpaceActivityPublisher.member_of_one_or_zero_public_space=أنا الآن عضو في {0} المساحة. -SpaceActivityPublisher.member_of_number_public_spaces=أنا الآن عضو في {0} مساحات. -SpaceActivityPublisher.members={0} أعضاء -SpaceActivityPublisher.member={0} أعضاء ProfileUpdatesPublisher.avatar_updated=تم تحديث الصورة الرمزية. diff --git a/component/core/src/main/resources/locale/social/Core_az.properties b/component/core/src/main/resources/locale/social/Core_az.properties index bc7eaf44aee..98527194e91 100644 --- a/component/core/src/main/resources/locale/social/Core_az.properties +++ b/component/core/src/main/resources/locale/social/Core_az.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} was created by {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=I joined {0} space(s). -SpaceActivityPublisher.has_joined=Has joined the space. -SpaceActivityPublisher.has_left=Has left the space. -SpaceActivityPublisher.user_joined={0} has joined the space. -SpaceActivityPublisher.member_left={0} has left the space. -SpaceActivityPublisher.space_renamed=The name has been updated to: {0}. -SpaceActivityPublisher.space_description_edited=The description has been updated to: {0}. -SpaceActivityPublisher.space_avatar_edited=This space has a new logo. -SpaceActivityPublisher.member_of_one_or_zero_public_space=I am now member of {0} space. -SpaceActivityPublisher.member_of_number_public_spaces=I am now member of {0} spaces. -SpaceActivityPublisher.members={0} Members -SpaceActivityPublisher.member={0} Members ProfileUpdatesPublisher.avatar_updated=Avatar has been updated. diff --git a/component/core/src/main/resources/locale/social/Core_ca.properties b/component/core/src/main/resources/locale/social/Core_ca.properties index b1e658e379e..6bf9f01b680 100644 --- a/component/core/src/main/resources/locale/social/Core_ca.properties +++ b/component/core/src/main/resources/locale/social/Core_ca.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} ha estat creat per {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=Me unit a {0} espai(s). -SpaceActivityPublisher.has_joined=S'ha incorporat a l'espai. -SpaceActivityPublisher.has_left=Ha deixat l'espai. -SpaceActivityPublisher.user_joined={0} s'ha incorporat a l'espai. -SpaceActivityPublisher.member_left={0} ha deixat l'espai. -SpaceActivityPublisher.space_renamed=El nom ha estat actualitzat a: {0}. -SpaceActivityPublisher.space_description_edited=La descripció ha estat actualitzada a: {0}. -SpaceActivityPublisher.space_avatar_edited=Aquest espai té un nou logotip. -SpaceActivityPublisher.member_of_one_or_zero_public_space=Ara sóc un membre de l'espai {0}. -SpaceActivityPublisher.member_of_number_public_spaces=Ara sóc membre de {0} espais. -SpaceActivityPublisher.members={0} Membres -SpaceActivityPublisher.member={0} Membres ProfileUpdatesPublisher.avatar_updated=La foto ha estat actualitzada. diff --git a/component/core/src/main/resources/locale/social/Core_ceb.properties b/component/core/src/main/resources/locale/social/Core_ceb.properties index bc7eaf44aee..98527194e91 100644 --- a/component/core/src/main/resources/locale/social/Core_ceb.properties +++ b/component/core/src/main/resources/locale/social/Core_ceb.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} was created by {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=I joined {0} space(s). -SpaceActivityPublisher.has_joined=Has joined the space. -SpaceActivityPublisher.has_left=Has left the space. -SpaceActivityPublisher.user_joined={0} has joined the space. -SpaceActivityPublisher.member_left={0} has left the space. -SpaceActivityPublisher.space_renamed=The name has been updated to: {0}. -SpaceActivityPublisher.space_description_edited=The description has been updated to: {0}. -SpaceActivityPublisher.space_avatar_edited=This space has a new logo. -SpaceActivityPublisher.member_of_one_or_zero_public_space=I am now member of {0} space. -SpaceActivityPublisher.member_of_number_public_spaces=I am now member of {0} spaces. -SpaceActivityPublisher.members={0} Members -SpaceActivityPublisher.member={0} Members ProfileUpdatesPublisher.avatar_updated=Avatar has been updated. diff --git a/component/core/src/main/resources/locale/social/Core_co.properties b/component/core/src/main/resources/locale/social/Core_co.properties index bc7eaf44aee..98527194e91 100644 --- a/component/core/src/main/resources/locale/social/Core_co.properties +++ b/component/core/src/main/resources/locale/social/Core_co.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} was created by {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=I joined {0} space(s). -SpaceActivityPublisher.has_joined=Has joined the space. -SpaceActivityPublisher.has_left=Has left the space. -SpaceActivityPublisher.user_joined={0} has joined the space. -SpaceActivityPublisher.member_left={0} has left the space. -SpaceActivityPublisher.space_renamed=The name has been updated to: {0}. -SpaceActivityPublisher.space_description_edited=The description has been updated to: {0}. -SpaceActivityPublisher.space_avatar_edited=This space has a new logo. -SpaceActivityPublisher.member_of_one_or_zero_public_space=I am now member of {0} space. -SpaceActivityPublisher.member_of_number_public_spaces=I am now member of {0} spaces. -SpaceActivityPublisher.members={0} Members -SpaceActivityPublisher.member={0} Members ProfileUpdatesPublisher.avatar_updated=Avatar has been updated. diff --git a/component/core/src/main/resources/locale/social/Core_cs.properties b/component/core/src/main/resources/locale/social/Core_cs.properties index 4aaadbca100..41af0af429e 100644 --- a/component/core/src/main/resources/locale/social/Core_cs.properties +++ b/component/core/src/main/resources/locale/social/Core_cs.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} byl vytvořen uživatelem {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=Připojil jsem se ke skupinám {0}. -SpaceActivityPublisher.has_joined=Se připojil(a) ke skupině. -SpaceActivityPublisher.has_left=Opustil(a) skupinu. -SpaceActivityPublisher.user_joined={0} se připojil(a) ke skupině. -SpaceActivityPublisher.member_left={0} opustil(a) skupinu. -SpaceActivityPublisher.space_renamed=Název byl aktualizován na: {0}. -SpaceActivityPublisher.space_description_edited=Popis byl aktualizován na: {0}. -SpaceActivityPublisher.space_avatar_edited=Tato skupina má nový avatar. -SpaceActivityPublisher.member_of_one_or_zero_public_space=Jsem nyní členem skupiny {0}. -SpaceActivityPublisher.member_of_number_public_spaces=Jsem nyní členem skupin {0}. -SpaceActivityPublisher.members={0} členové -SpaceActivityPublisher.member={0} členové ProfileUpdatesPublisher.avatar_updated=Avatar byl aktualizován. diff --git a/component/core/src/main/resources/locale/social/Core_de.properties b/component/core/src/main/resources/locale/social/Core_de.properties index c2c2a49b536..1e65bb354e8 100644 --- a/component/core/src/main/resources/locale/social/Core_de.properties +++ b/component/core/src/main/resources/locale/social/Core_de.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} wurde von {1} erstellt. -SpaceActivityPublisher.manager_role_granted={0} wurde als Manager für diesen Raum eingestuft. -SpaceActivityPublisher.manager_role_revoked={0} wurde als Manager für den Raum entfernt. -SpaceActivityPublisher.user_space_joined=Ich trat {0} Raum/Räumen bei. -SpaceActivityPublisher.has_joined=ist dem Raum beigetreten. -SpaceActivityPublisher.has_left=hat den Raum verlassen. -SpaceActivityPublisher.user_joined={0} ist dem Raum beigetreten. -SpaceActivityPublisher.member_left={0} hat den Raum verlassen. -SpaceActivityPublisher.space_renamed=Name wurde aktualisiert auf: {0}. -SpaceActivityPublisher.space_description_edited=Beschreibung wurde aktualisiert auf: {0}. -SpaceActivityPublisher.space_avatar_edited=Dieser Raum hat einen neuen Avatar. -SpaceActivityPublisher.member_of_one_or_zero_public_space=Ich bin jetzt Mitglied von {0} Raum. -SpaceActivityPublisher.member_of_number_public_spaces=Ich bin jetzt Mitglied von {0} Räumen. -SpaceActivityPublisher.members={0} Mitglieder -SpaceActivityPublisher.member={0} Mitglieder ProfileUpdatesPublisher.avatar_updated=Dar Avatar wurde aktualisiert. diff --git a/component/core/src/main/resources/locale/social/Core_el.properties b/component/core/src/main/resources/locale/social/Core_el.properties index 4a8604bc9f3..60270a6e4d9 100644 --- a/component/core/src/main/resources/locale/social/Core_el.properties +++ b/component/core/src/main/resources/locale/social/Core_el.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} δημιουργήθηκε από {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=Συμμετέχω σε {0} νέους Χώρους. -SpaceActivityPublisher.has_joined=Συνδέθηκε με το Χώρο. -SpaceActivityPublisher.has_left=Αποχώρησε από το Χώρο. -SpaceActivityPublisher.user_joined={0} συνδέθηκε με το Χώρο. -SpaceActivityPublisher.member_left={0} αποχώρησε από το Χώρο. -SpaceActivityPublisher.space_renamed=Το όνομα άλλαξε σε: {0}. -SpaceActivityPublisher.space_description_edited=Η περιγραφή τροποποιήθηκε σε: {0}. -SpaceActivityPublisher.space_avatar_edited=Ο Χώρος έχει ένα καινούργιο Προσωπείο. -SpaceActivityPublisher.member_of_one_or_zero_public_space=Είμαι πλέον μέλος του Χώρου {0}. -SpaceActivityPublisher.member_of_number_public_spaces=Είμαι τώρα μέλος σε {0} Χώρους. -SpaceActivityPublisher.members={0} Members -SpaceActivityPublisher.member={0} Members ProfileUpdatesPublisher.avatar_updated=Το προσωπείο (avatar) έχει ενημερωθεί diff --git a/component/core/src/main/resources/locale/social/Core_en.properties b/component/core/src/main/resources/locale/social/Core_en.properties index bc7eaf44aee..5c4013daf11 100644 --- a/component/core/src/main/resources/locale/social/Core_en.properties +++ b/component/core/src/main/resources/locale/social/Core_en.properties @@ -1,19 +1,4 @@ -SpaceActivityPublisher.space_created={0} was created by {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=I joined {0} space(s). -SpaceActivityPublisher.has_joined=Has joined the space. -SpaceActivityPublisher.has_left=Has left the space. -SpaceActivityPublisher.user_joined={0} has joined the space. -SpaceActivityPublisher.member_left={0} has left the space. -SpaceActivityPublisher.space_renamed=The name has been updated to: {0}. -SpaceActivityPublisher.space_description_edited=The description has been updated to: {0}. -SpaceActivityPublisher.space_avatar_edited=This space has a new logo. -SpaceActivityPublisher.member_of_one_or_zero_public_space=I am now member of {0} space. -SpaceActivityPublisher.member_of_number_public_spaces=I am now member of {0} spaces. -SpaceActivityPublisher.members={0} Members -SpaceActivityPublisher.member={0} Members - +space.name.more=and {0} more ProfileUpdatesPublisher.avatar_updated=Avatar has been updated. ProfileUpdatesPublisher.position_updated=Position is now: {0} @@ -24,3 +9,12 @@ ProfileUpdatesPublisher.aboutMe_section_updated="About me" has been updated. RelationshipPublisher.user_relation_confirmed=I'm now connected with {0} RelationshipPublisher.user_relations=I'm now connected with {0} user(s) + +space.template.announcement.title=Announcement +space.template.announcement.description=A channel listing news and key informations per topic +space.template.circle.title=Circle +space.template.circle.description=The simplest way to start sharing with people +space.template.community.title=Community +space.template.community.description=Boost your community with engagement programs +space.template.project.title=Project +space.template.project.description=Centralize infos and organize workload for a project diff --git a/component/core/src/main/resources/locale/social/Core_es_ES.properties b/component/core/src/main/resources/locale/social/Core_es_ES.properties index 169ca87afc3..3d423738fac 100644 --- a/component/core/src/main/resources/locale/social/Core_es_ES.properties +++ b/component/core/src/main/resources/locale/social/Core_es_ES.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} fue creado por {1}. -SpaceActivityPublisher.manager_role_granted={0} ha ascendido a anfitrión del espacio. -SpaceActivityPublisher.manager_role_revoked={0} se ha quitado de anfitrión del espacio. -SpaceActivityPublisher.user_space_joined=Me uní a {0} espacio (s). -SpaceActivityPublisher.has_joined=Se ha incorporado al espacio. -SpaceActivityPublisher.has_left=Ha dejado el espacio. -SpaceActivityPublisher.user_joined={0} se ha incorporado al espacio. -SpaceActivityPublisher.member_left={0} ha dejado el espacio. -SpaceActivityPublisher.space_renamed=El nombre se ha actualizado a: {0}. -SpaceActivityPublisher.space_description_edited=La descripción se ha actualizado a: {0}. -SpaceActivityPublisher.space_avatar_edited=Este espacio tiene un nuevo avatar. -SpaceActivityPublisher.member_of_one_or_zero_public_space=Ahora soy miembro de {0} espacio. -SpaceActivityPublisher.member_of_number_public_spaces=Ahora soy miembro de {0} espacios. -SpaceActivityPublisher.members={0} Miembros -SpaceActivityPublisher.member={0} Miembros ProfileUpdatesPublisher.avatar_updated=El avatar se ha actualizado. diff --git a/component/core/src/main/resources/locale/social/Core_eu.properties b/component/core/src/main/resources/locale/social/Core_eu.properties index bc7eaf44aee..98527194e91 100644 --- a/component/core/src/main/resources/locale/social/Core_eu.properties +++ b/component/core/src/main/resources/locale/social/Core_eu.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} was created by {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=I joined {0} space(s). -SpaceActivityPublisher.has_joined=Has joined the space. -SpaceActivityPublisher.has_left=Has left the space. -SpaceActivityPublisher.user_joined={0} has joined the space. -SpaceActivityPublisher.member_left={0} has left the space. -SpaceActivityPublisher.space_renamed=The name has been updated to: {0}. -SpaceActivityPublisher.space_description_edited=The description has been updated to: {0}. -SpaceActivityPublisher.space_avatar_edited=This space has a new logo. -SpaceActivityPublisher.member_of_one_or_zero_public_space=I am now member of {0} space. -SpaceActivityPublisher.member_of_number_public_spaces=I am now member of {0} spaces. -SpaceActivityPublisher.members={0} Members -SpaceActivityPublisher.member={0} Members ProfileUpdatesPublisher.avatar_updated=Avatar has been updated. diff --git a/component/core/src/main/resources/locale/social/Core_fa.properties b/component/core/src/main/resources/locale/social/Core_fa.properties index 8f07f3246f1..5814a784dee 100644 --- a/component/core/src/main/resources/locale/social/Core_fa.properties +++ b/component/core/src/main/resources/locale/social/Core_fa.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} توسط {1} ایجاد شده است. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=من به فضا(ها)ی {0} پیوستم. -SpaceActivityPublisher.has_joined=به فضا پیوسته است. -SpaceActivityPublisher.has_left=فضا را ترک کرد. -SpaceActivityPublisher.user_joined={0} به فضا پیوسته است. -SpaceActivityPublisher.member_left={0} فضا را ترک کرده است. -SpaceActivityPublisher.space_renamed=نام به روز شده به: {0}. -SpaceActivityPublisher.space_description_edited=توضیحات به روز شده به: {0}. -SpaceActivityPublisher.space_avatar_edited=این فضا یک صورتک جدید دارد. -SpaceActivityPublisher.member_of_one_or_zero_public_space=هم اکنون من عضو فضای {0} هستم. -SpaceActivityPublisher.member_of_number_public_spaces=هم اکنون من عضو فضاهای {0} هستم. -SpaceActivityPublisher.members={0} Members -SpaceActivityPublisher.member={0} Members ProfileUpdatesPublisher.avatar_updated=صورتک به روز شده است. diff --git a/component/core/src/main/resources/locale/social/Core_fi.properties b/component/core/src/main/resources/locale/social/Core_fi.properties index bc7eaf44aee..98527194e91 100644 --- a/component/core/src/main/resources/locale/social/Core_fi.properties +++ b/component/core/src/main/resources/locale/social/Core_fi.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} was created by {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=I joined {0} space(s). -SpaceActivityPublisher.has_joined=Has joined the space. -SpaceActivityPublisher.has_left=Has left the space. -SpaceActivityPublisher.user_joined={0} has joined the space. -SpaceActivityPublisher.member_left={0} has left the space. -SpaceActivityPublisher.space_renamed=The name has been updated to: {0}. -SpaceActivityPublisher.space_description_edited=The description has been updated to: {0}. -SpaceActivityPublisher.space_avatar_edited=This space has a new logo. -SpaceActivityPublisher.member_of_one_or_zero_public_space=I am now member of {0} space. -SpaceActivityPublisher.member_of_number_public_spaces=I am now member of {0} spaces. -SpaceActivityPublisher.members={0} Members -SpaceActivityPublisher.member={0} Members ProfileUpdatesPublisher.avatar_updated=Avatar has been updated. diff --git a/component/core/src/main/resources/locale/social/Core_fil.properties b/component/core/src/main/resources/locale/social/Core_fil.properties index 6a120f0b556..7041a9c5f7b 100644 --- a/component/core/src/main/resources/locale/social/Core_fil.properties +++ b/component/core/src/main/resources/locale/social/Core_fil.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} ay nilikha ni {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=Ako ay sumali {0} ng (mga) espasyo. -SpaceActivityPublisher.has_joined=Sumali sa espasyo. -SpaceActivityPublisher.has_left=Umalis sa espasyo. -SpaceActivityPublisher.user_joined={0} ay sumali sa espasyo. -SpaceActivityPublisher.member_left={0} ay umalis sa espasyo. -SpaceActivityPublisher.space_renamed=Ang pangalan ay na-update na sa: {0}. -SpaceActivityPublisher.space_description_edited=Ang paglalarawan ay na-update na sa: {0}. -SpaceActivityPublisher.space_avatar_edited=Ang espasyo na ito ay may bagong avatar. -SpaceActivityPublisher.member_of_one_or_zero_public_space=Ako ay miyembro na ngayon {0} ng espasyo. -SpaceActivityPublisher.member_of_number_public_spaces=Ako ay miyembro na ngayon ng {0} na mga space. -SpaceActivityPublisher.members={0} ang mga Kasapi -SpaceActivityPublisher.member={0} ang mga Miyembro ProfileUpdatesPublisher.avatar_updated=Ang avatar ay na update na. diff --git a/component/core/src/main/resources/locale/social/Core_fr.properties b/component/core/src/main/resources/locale/social/Core_fr.properties index a7c2d9f8cec..5c2a3ed3c83 100644 --- a/component/core/src/main/resources/locale/social/Core_fr.properties +++ b/component/core/src/main/resources/locale/social/Core_fr.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} a été créé par {1}. -SpaceActivityPublisher.manager_role_granted={0} a été promu administrateur d'espace. -SpaceActivityPublisher.manager_role_revoked={0} n'est plus administrateur d'espace. -SpaceActivityPublisher.user_space_joined=J'ai rejoint {0} espaces. -SpaceActivityPublisher.has_joined=A rejoint l'espace. -SpaceActivityPublisher.has_left=A quitté l'espace. -SpaceActivityPublisher.user_joined={0} a rejoint l'espace. -SpaceActivityPublisher.member_left={0} a quitté l'espace. -SpaceActivityPublisher.space_renamed=L'espace a été renommé en : {0}. -SpaceActivityPublisher.space_description_edited=La description de l'espace a été mise à jour: {0}. -SpaceActivityPublisher.space_avatar_edited=L'espace a un nouveau logo. -SpaceActivityPublisher.member_of_one_or_zero_public_space=Je suis maintenant membre de {0} espace. -SpaceActivityPublisher.member_of_number_public_spaces=Je suis maintenant membre de {0} espaces. -SpaceActivityPublisher.members={0} Membres -SpaceActivityPublisher.member={0} Membres ProfileUpdatesPublisher.avatar_updated=La photo a été mise à jour. diff --git a/component/core/src/main/resources/locale/social/Core_he.properties b/component/core/src/main/resources/locale/social/Core_he.properties index 3b3df2fdebd..98527194e91 100644 --- a/component/core/src/main/resources/locale/social/Core_he.properties +++ b/component/core/src/main/resources/locale/social/Core_he.properties @@ -1,16 +1,3 @@ -SpaceActivityPublisher.space_created={0} was created by {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted as the space's manager. -SpaceActivityPublisher.manager_role_revoked={0} has been revoked as the space's manager. -SpaceActivityPublisher.user_space_joined=I joined {0} space(s). -SpaceActivityPublisher.has_joined=Has joined the space. -SpaceActivityPublisher.has_left=Has left the space. -SpaceActivityPublisher.user_joined={0} has joined the space. -SpaceActivityPublisher.member_left={0} has left the space. -SpaceActivityPublisher.space_renamed=Name has been updated to: {0}. -SpaceActivityPublisher.space_description_edited=Description has been updated to: {0}. -SpaceActivityPublisher.space_avatar_edited=This space has a new avatar. -SpaceActivityPublisher.member_of_one_or_zero_public_space=I am now member of {0} space. -SpaceActivityPublisher.member_of_number_public_spaces=I am now member of {0} spaces. ProfileUpdatesPublisher.avatar_updated=Avatar has been updated. diff --git a/component/core/src/main/resources/locale/social/Core_hi.properties b/component/core/src/main/resources/locale/social/Core_hi.properties index bc7eaf44aee..98527194e91 100644 --- a/component/core/src/main/resources/locale/social/Core_hi.properties +++ b/component/core/src/main/resources/locale/social/Core_hi.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} was created by {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=I joined {0} space(s). -SpaceActivityPublisher.has_joined=Has joined the space. -SpaceActivityPublisher.has_left=Has left the space. -SpaceActivityPublisher.user_joined={0} has joined the space. -SpaceActivityPublisher.member_left={0} has left the space. -SpaceActivityPublisher.space_renamed=The name has been updated to: {0}. -SpaceActivityPublisher.space_description_edited=The description has been updated to: {0}. -SpaceActivityPublisher.space_avatar_edited=This space has a new logo. -SpaceActivityPublisher.member_of_one_or_zero_public_space=I am now member of {0} space. -SpaceActivityPublisher.member_of_number_public_spaces=I am now member of {0} spaces. -SpaceActivityPublisher.members={0} Members -SpaceActivityPublisher.member={0} Members ProfileUpdatesPublisher.avatar_updated=Avatar has been updated. diff --git a/component/core/src/main/resources/locale/social/Core_hu.properties b/component/core/src/main/resources/locale/social/Core_hu.properties index bc7eaf44aee..98527194e91 100644 --- a/component/core/src/main/resources/locale/social/Core_hu.properties +++ b/component/core/src/main/resources/locale/social/Core_hu.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} was created by {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=I joined {0} space(s). -SpaceActivityPublisher.has_joined=Has joined the space. -SpaceActivityPublisher.has_left=Has left the space. -SpaceActivityPublisher.user_joined={0} has joined the space. -SpaceActivityPublisher.member_left={0} has left the space. -SpaceActivityPublisher.space_renamed=The name has been updated to: {0}. -SpaceActivityPublisher.space_description_edited=The description has been updated to: {0}. -SpaceActivityPublisher.space_avatar_edited=This space has a new logo. -SpaceActivityPublisher.member_of_one_or_zero_public_space=I am now member of {0} space. -SpaceActivityPublisher.member_of_number_public_spaces=I am now member of {0} spaces. -SpaceActivityPublisher.members={0} Members -SpaceActivityPublisher.member={0} Members ProfileUpdatesPublisher.avatar_updated=Avatar has been updated. diff --git a/component/core/src/main/resources/locale/social/Core_id.properties b/component/core/src/main/resources/locale/social/Core_id.properties index e46240fea52..7d500f04a64 100644 --- a/component/core/src/main/resources/locale/social/Core_id.properties +++ b/component/core/src/main/resources/locale/social/Core_id.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} dibuat oleh {1}. -SpaceActivityPublisher.manager_role_granted={0} telah dipromosikan sebagai pengelola ruang. -SpaceActivityPublisher.manager_role_revoked={0} telah dicabut sebagai pengelola ruang. -SpaceActivityPublisher.user_space_joined=Saya bergabung dengan {0} ruang(s). -SpaceActivityPublisher.has_joined=Telah bergabung dengan ruang. -SpaceActivityPublisher.has_left=Telah meninggalkan ruang. -SpaceActivityPublisher.user_joined={0} sudah bergabung dalam satu ruang. -SpaceActivityPublisher.member_left={0} sudah meninggalkan ruang. -SpaceActivityPublisher.space_renamed=Nama ini telah diperbarui untuk: {0}. -SpaceActivityPublisher.space_description_edited=Deskripsi ini telah diperbarui untuk: {0}. -SpaceActivityPublisher.space_avatar_edited=Ruang ini mempunyai avatar baru. -SpaceActivityPublisher.member_of_one_or_zero_public_space=Sekarang saya anggota dari {0} ruang. -SpaceActivityPublisher.member_of_number_public_spaces=Saya sekarang anggota {0} ruang. -SpaceActivityPublisher.members={0} Anggota -SpaceActivityPublisher.member={0} Anggota ProfileUpdatesPublisher.avatar_updated=Avatar telah diperbarui. diff --git a/component/core/src/main/resources/locale/social/Core_in.properties b/component/core/src/main/resources/locale/social/Core_in.properties index 6a4ead7d7fa..7d500f04a64 100644 --- a/component/core/src/main/resources/locale/social/Core_in.properties +++ b/component/core/src/main/resources/locale/social/Core_in.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} dibuat oleh {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted as host of the space -SpaceActivityPublisher.manager_role_revoked={0} has been revoked as the space's host. -SpaceActivityPublisher.user_space_joined=Saya bergabung dengan {0} ruang(s). -SpaceActivityPublisher.has_joined=Telah bergabung dengan ruang. -SpaceActivityPublisher.has_left=Telah meninggalkan ruang. -SpaceActivityPublisher.user_joined={0} sudah bergabung dalam satu ruang. -SpaceActivityPublisher.member_left={0} sudah meninggalkan ruang. -SpaceActivityPublisher.space_renamed=Nama ini telah diperbarui untuk: {0}. -SpaceActivityPublisher.space_description_edited=Deskripsi ini telah diperbarui untuk: {0}. -SpaceActivityPublisher.space_avatar_edited=Ruang ini mempunyai avatar baru. -SpaceActivityPublisher.member_of_one_or_zero_public_space=Sekarang saya anggota dari {0} ruang. -SpaceActivityPublisher.member_of_number_public_spaces=Saya sekarang anggota {0} ruang. -SpaceActivityPublisher.members={0} Anggota -SpaceActivityPublisher.member={0} Anggota ProfileUpdatesPublisher.avatar_updated=Avatar telah diperbarui. diff --git a/component/core/src/main/resources/locale/social/Core_it.properties b/component/core/src/main/resources/locale/social/Core_it.properties index c2d15c31c24..09d80388c70 100644 --- a/component/core/src/main/resources/locale/social/Core_it.properties +++ b/component/core/src/main/resources/locale/social/Core_it.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} è stato creato da {1}. -SpaceActivityPublisher.manager_role_granted={0} è stato promosso come animatore dello spazio -SpaceActivityPublisher.manager_role_revoked={0} è stato revocato come animatore dello spazio. -SpaceActivityPublisher.user_space_joined=Mi sono iscritto a {0} spazi(o). -SpaceActivityPublisher.has_joined=Ha aderito allo spazio. -SpaceActivityPublisher.has_left=Ha lasciato lo spazio. -SpaceActivityPublisher.user_joined={0} ha aderito allo spazio. -SpaceActivityPublisher.member_left={0} ha lasciato lo spazio. -SpaceActivityPublisher.space_renamed=Nome aggiornato a: {0}. -SpaceActivityPublisher.space_description_edited=La descrizione è stata aggiornata a: {0}. -SpaceActivityPublisher.space_avatar_edited=Space has a new avatar. -SpaceActivityPublisher.member_of_one_or_zero_public_space=Ora sono membro dello spazio : {0} -SpaceActivityPublisher.member_of_number_public_spaces=Ora sono membro degli spazi : {0} -SpaceActivityPublisher.members={0} Membri -SpaceActivityPublisher.member={0} Membri ProfileUpdatesPublisher.avatar_updated=Avatar aggiornato. diff --git a/component/core/src/main/resources/locale/social/Core_ja.properties b/component/core/src/main/resources/locale/social/Core_ja.properties index 21c85211b96..151917f5f48 100644 --- a/component/core/src/main/resources/locale/social/Core_ja.properties +++ b/component/core/src/main/resources/locale/social/Core_ja.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} は {1} によって作成されました -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined={0} スペースに加入しました -SpaceActivityPublisher.has_joined=スペースに参加しました -SpaceActivityPublisher.has_left=スペースから離れました -SpaceActivityPublisher.user_joined={0} がスペースに参加しました -SpaceActivityPublisher.member_left={0} がスペースから離れました -SpaceActivityPublisher.space_renamed=名前がアップデートされました: {0} -SpaceActivityPublisher.space_description_edited=説明がアップデートされました: {0} -SpaceActivityPublisher.space_avatar_edited=新しいアバターが追加されました -SpaceActivityPublisher.member_of_one_or_zero_public_space={0} スペースのメンバーになりました -SpaceActivityPublisher.member_of_number_public_spaces={0} スペースのメンバーになりました -SpaceActivityPublisher.members={0} メンバー -SpaceActivityPublisher.member={0} メンバー ProfileUpdatesPublisher.avatar_updated=アバターがアップデートされました diff --git a/component/core/src/main/resources/locale/social/Core_kab.properties b/component/core/src/main/resources/locale/social/Core_kab.properties index a7ee6f478ba..98527194e91 100644 --- a/component/core/src/main/resources/locale/social/Core_kab.properties +++ b/component/core/src/main/resources/locale/social/Core_kab.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} was created by {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted as the space's manager. -SpaceActivityPublisher.manager_role_revoked={0} has been revoked as the space's manager. -SpaceActivityPublisher.user_space_joined=I joined {0} space(s). -SpaceActivityPublisher.has_joined=Has joined the space. -SpaceActivityPublisher.has_left=Has left the space. -SpaceActivityPublisher.user_joined={0} has joined the space. -SpaceActivityPublisher.member_left={0} has left the space. -SpaceActivityPublisher.space_renamed=Name has been updated to: {0}. -SpaceActivityPublisher.space_description_edited=Description has been updated to: {0}. -SpaceActivityPublisher.space_avatar_edited=This space has a new avatar. -SpaceActivityPublisher.member_of_one_or_zero_public_space=I am now member of {0} space. -SpaceActivityPublisher.member_of_number_public_spaces=I am now member of {0} spaces. -SpaceActivityPublisher.members={0} Members -SpaceActivityPublisher.member={0} Members ProfileUpdatesPublisher.avatar_updated=Avatar has been updated. diff --git a/component/core/src/main/resources/locale/social/Core_ko.properties b/component/core/src/main/resources/locale/social/Core_ko.properties index bc7eaf44aee..98527194e91 100644 --- a/component/core/src/main/resources/locale/social/Core_ko.properties +++ b/component/core/src/main/resources/locale/social/Core_ko.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} was created by {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=I joined {0} space(s). -SpaceActivityPublisher.has_joined=Has joined the space. -SpaceActivityPublisher.has_left=Has left the space. -SpaceActivityPublisher.user_joined={0} has joined the space. -SpaceActivityPublisher.member_left={0} has left the space. -SpaceActivityPublisher.space_renamed=The name has been updated to: {0}. -SpaceActivityPublisher.space_description_edited=The description has been updated to: {0}. -SpaceActivityPublisher.space_avatar_edited=This space has a new logo. -SpaceActivityPublisher.member_of_one_or_zero_public_space=I am now member of {0} space. -SpaceActivityPublisher.member_of_number_public_spaces=I am now member of {0} spaces. -SpaceActivityPublisher.members={0} Members -SpaceActivityPublisher.member={0} Members ProfileUpdatesPublisher.avatar_updated=Avatar has been updated. diff --git a/component/core/src/main/resources/locale/social/Core_lt.properties b/component/core/src/main/resources/locale/social/Core_lt.properties index e38f8fcce35..1a1a6f4d490 100644 --- a/component/core/src/main/resources/locale/social/Core_lt.properties +++ b/component/core/src/main/resources/locale/social/Core_lt.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={1} sukūrė {0}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=Aš prisijungiau prie {0} erdvės(ių). -SpaceActivityPublisher.has_joined=Prisijungė prie erdvės. -SpaceActivityPublisher.has_left=Paliko erdvę. -SpaceActivityPublisher.user_joined={0} prisijungė prie erdvės. -SpaceActivityPublisher.member_left={0} paliko erdvę. -SpaceActivityPublisher.space_renamed=Pavadinimas buvo atnaujintas į: {0}. -SpaceActivityPublisher.space_description_edited=Aprašymas buvo atnaujintas į: {0}. -SpaceActivityPublisher.space_avatar_edited=Ši erdvė turi naują avatarą. -SpaceActivityPublisher.member_of_one_or_zero_public_space=Aš dabar {0} erdvės narys. -SpaceActivityPublisher.member_of_number_public_spaces=Aš dabar {0} erdvių narys. -SpaceActivityPublisher.members={0} Members -SpaceActivityPublisher.member={0} Members ProfileUpdatesPublisher.avatar_updated=Avataras buvo atnaujintas. diff --git a/component/core/src/main/resources/locale/social/Core_ms.properties b/component/core/src/main/resources/locale/social/Core_ms.properties index bc7eaf44aee..98527194e91 100644 --- a/component/core/src/main/resources/locale/social/Core_ms.properties +++ b/component/core/src/main/resources/locale/social/Core_ms.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} was created by {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=I joined {0} space(s). -SpaceActivityPublisher.has_joined=Has joined the space. -SpaceActivityPublisher.has_left=Has left the space. -SpaceActivityPublisher.user_joined={0} has joined the space. -SpaceActivityPublisher.member_left={0} has left the space. -SpaceActivityPublisher.space_renamed=The name has been updated to: {0}. -SpaceActivityPublisher.space_description_edited=The description has been updated to: {0}. -SpaceActivityPublisher.space_avatar_edited=This space has a new logo. -SpaceActivityPublisher.member_of_one_or_zero_public_space=I am now member of {0} space. -SpaceActivityPublisher.member_of_number_public_spaces=I am now member of {0} spaces. -SpaceActivityPublisher.members={0} Members -SpaceActivityPublisher.member={0} Members ProfileUpdatesPublisher.avatar_updated=Avatar has been updated. diff --git a/component/core/src/main/resources/locale/social/Core_nl.properties b/component/core/src/main/resources/locale/social/Core_nl.properties index d1e89a7565a..38fc63f0df9 100644 --- a/component/core/src/main/resources/locale/social/Core_nl.properties +++ b/component/core/src/main/resources/locale/social/Core_nl.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} werd opgericht door {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=Ik ging {0} krijgen. -SpaceActivityPublisher.has_joined=Is toegetreden tot de ruimte. -SpaceActivityPublisher.has_left=De ruimte heeft gelaten. -SpaceActivityPublisher.user_joined={0} heeft zich aangesloten bij de ruimte. -SpaceActivityPublisher.member_left={0} heeft de ruimte verlaten. -SpaceActivityPublisher.space_renamed=Naam is vernieuwd naar: {0}. -SpaceActivityPublisher.space_description_edited=Beschrijving is vernieuwd naar: {0}. -SpaceActivityPublisher.space_avatar_edited=Deze ruimte heeft een nieuwe avatar. -SpaceActivityPublisher.member_of_one_or_zero_public_space=Ik ben nu lid van {0} ruimte. -SpaceActivityPublisher.member_of_number_public_spaces=Ik ben nu lid van {0} ruimten. -SpaceActivityPublisher.members={0} Leden -SpaceActivityPublisher.member={0} Leden ProfileUpdatesPublisher.avatar_updated=Avatar is bijgewerkt. diff --git a/component/core/src/main/resources/locale/social/Core_no.properties b/component/core/src/main/resources/locale/social/Core_no.properties index c6e749c912e..e882203ca08 100644 --- a/component/core/src/main/resources/locale/social/Core_no.properties +++ b/component/core/src/main/resources/locale/social/Core_no.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} ble opprettet av {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=Jeg har blitt medlem av {0} fellesskap(er). -SpaceActivityPublisher.has_joined=Har blitt medlem av fellesskapet. -SpaceActivityPublisher.has_left=Har forlatt fellesskapet. -SpaceActivityPublisher.user_joined={0} har blitt deltagere i fellesskapet. -SpaceActivityPublisher.member_left={0} har forlatt fellesskapet. -SpaceActivityPublisher.space_renamed=Navnet har blitt oppdatert til: {0}. -SpaceActivityPublisher.space_description_edited=Beskrivelsen er oppdatert til: {0}. -SpaceActivityPublisher.space_avatar_edited=Dette fellesskapet har fått nytt profil bilde. -SpaceActivityPublisher.member_of_one_or_zero_public_space=Jeg er nå medlem av {0} fellesskap. -SpaceActivityPublisher.member_of_number_public_spaces=Jeg er nå medlem av {0} fellesskap. -SpaceActivityPublisher.members={0} Members -SpaceActivityPublisher.member={0} Members ProfileUpdatesPublisher.avatar_updated=Profil bildet har blitt oppdatert. diff --git a/component/core/src/main/resources/locale/social/Core_pcm.properties b/component/core/src/main/resources/locale/social/Core_pcm.properties index bc7eaf44aee..98527194e91 100644 --- a/component/core/src/main/resources/locale/social/Core_pcm.properties +++ b/component/core/src/main/resources/locale/social/Core_pcm.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} was created by {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=I joined {0} space(s). -SpaceActivityPublisher.has_joined=Has joined the space. -SpaceActivityPublisher.has_left=Has left the space. -SpaceActivityPublisher.user_joined={0} has joined the space. -SpaceActivityPublisher.member_left={0} has left the space. -SpaceActivityPublisher.space_renamed=The name has been updated to: {0}. -SpaceActivityPublisher.space_description_edited=The description has been updated to: {0}. -SpaceActivityPublisher.space_avatar_edited=This space has a new logo. -SpaceActivityPublisher.member_of_one_or_zero_public_space=I am now member of {0} space. -SpaceActivityPublisher.member_of_number_public_spaces=I am now member of {0} spaces. -SpaceActivityPublisher.members={0} Members -SpaceActivityPublisher.member={0} Members ProfileUpdatesPublisher.avatar_updated=Avatar has been updated. diff --git a/component/core/src/main/resources/locale/social/Core_pl.properties b/component/core/src/main/resources/locale/social/Core_pl.properties index c46e98bcc89..b8ab6070945 100644 --- a/component/core/src/main/resources/locale/social/Core_pl.properties +++ b/component/core/src/main/resources/locale/social/Core_pl.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} został stworzony przez {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=Dołączyłeś do {0} przestrzeni. -SpaceActivityPublisher.has_joined=Dołączył(-a) do przestrzeni. -SpaceActivityPublisher.has_left=Opuścił(-a) przestrzeń. -SpaceActivityPublisher.user_joined={0} dołączył(-a) do przestrzeni. -SpaceActivityPublisher.member_left={0} opuścił(-a) przestrzeń. -SpaceActivityPublisher.space_renamed=Nazwa została zaktualizowana: {0}. -SpaceActivityPublisher.space_description_edited=Opis został zaktualizowany: {0}. -SpaceActivityPublisher.space_avatar_edited=Ta przestrzeń ma nowego awatara. -SpaceActivityPublisher.member_of_one_or_zero_public_space=Jestem teraz członkiem {0} przestrzeni. -SpaceActivityPublisher.member_of_number_public_spaces=Jestem teraz członkiem {0} przestrzeni. -SpaceActivityPublisher.members={0} Członków -SpaceActivityPublisher.member={0} Członków ProfileUpdatesPublisher.avatar_updated=Awatar został zaktualizowany. diff --git a/component/core/src/main/resources/locale/social/Core_pt_BR.properties b/component/core/src/main/resources/locale/social/Core_pt_BR.properties index 788ddc81804..313fb8e10bb 100644 --- a/component/core/src/main/resources/locale/social/Core_pt_BR.properties +++ b/component/core/src/main/resources/locale/social/Core_pt_BR.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} foi criado por {1}. -SpaceActivityPublisher.manager_role_granted={0} foi promovido a gerente do espaço. -SpaceActivityPublisher.manager_role_revoked={0} foi revogado como gerente do espaço. -SpaceActivityPublisher.user_space_joined=Juntei-me a {0} espaço(s). -SpaceActivityPublisher.has_joined=Juntou-se ao espaço. -SpaceActivityPublisher.has_left=Deixou o espaço. -SpaceActivityPublisher.user_joined={0} juntou-se ao espaço. -SpaceActivityPublisher.member_left={0} deixou o espaço. -SpaceActivityPublisher.space_renamed=O nome foi atualizado para: {0}. -SpaceActivityPublisher.space_description_edited=A descrição foi atualizada para: {0}. -SpaceActivityPublisher.space_avatar_edited=Este espaço tem um novo avatar. -SpaceActivityPublisher.member_of_one_or_zero_public_space=Agora sou membro do espaço {0}. -SpaceActivityPublisher.member_of_number_public_spaces=Eu agora sou membro dos espaços {0}. -SpaceActivityPublisher.members={0} Membros -SpaceActivityPublisher.member={0} Membros ProfileUpdatesPublisher.avatar_updated=O avatar foi atualizado. diff --git a/component/core/src/main/resources/locale/social/Core_pt_PT.properties b/component/core/src/main/resources/locale/social/Core_pt_PT.properties index ea2f1f4d6af..313fb8e10bb 100644 --- a/component/core/src/main/resources/locale/social/Core_pt_PT.properties +++ b/component/core/src/main/resources/locale/social/Core_pt_PT.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} foi criado por {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=Juntei-me a {0} espaço(s). -SpaceActivityPublisher.has_joined=Aderiu ao espaço. -SpaceActivityPublisher.has_left=Abandonou o espaço. -SpaceActivityPublisher.user_joined={0} aderiu ao espaço. -SpaceActivityPublisher.member_left={0} abandonou o espaço. -SpaceActivityPublisher.space_renamed=O nome foi atualizado para: {0}. -SpaceActivityPublisher.space_description_edited=A descrição foi atualizada para: {0}. -SpaceActivityPublisher.space_avatar_edited=Este espaço tem um novo avatar. -SpaceActivityPublisher.member_of_one_or_zero_public_space=Agora sou membro do espaço {0}. -SpaceActivityPublisher.member_of_number_public_spaces=Eu agora sou membro dos espaços {0}. -SpaceActivityPublisher.members={0} Membros -SpaceActivityPublisher.member={0} Membros ProfileUpdatesPublisher.avatar_updated=O avatar foi atualizado. diff --git a/component/core/src/main/resources/locale/social/Core_ro.properties b/component/core/src/main/resources/locale/social/Core_ro.properties index a956a27f46d..eb05dbf03c9 100644 --- a/component/core/src/main/resources/locale/social/Core_ro.properties +++ b/component/core/src/main/resources/locale/social/Core_ro.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} a fost creat de {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=M-am alăturat la {0} spații. -SpaceActivityPublisher.has_joined=S-a alăturat spaţiului. -SpaceActivityPublisher.has_left=A părăsit spațiul. -SpaceActivityPublisher.user_joined={0} s-a alăturat spaţiului. -SpaceActivityPublisher.member_left={0} a părăsit spaţiul. -SpaceActivityPublisher.space_renamed=Numele a fost actualizat la: {0}. -SpaceActivityPublisher.space_description_edited=Descrierea a fost actualizată la: {0}. -SpaceActivityPublisher.space_avatar_edited=Acest spațiu are un avatar nou. -SpaceActivityPublisher.member_of_one_or_zero_public_space=Eu sunt acum membru al spațiului {0}. -SpaceActivityPublisher.member_of_number_public_spaces=Eu sunt acum membru al {0} spații. -SpaceActivityPublisher.members={0} Membrii -SpaceActivityPublisher.member={0} Membrii ProfileUpdatesPublisher.avatar_updated=Avatarul a fost actualizat. diff --git a/component/core/src/main/resources/locale/social/Core_ru.properties b/component/core/src/main/resources/locale/social/Core_ru.properties index 815d2417729..c5c56617e7e 100644 --- a/component/core/src/main/resources/locale/social/Core_ru.properties +++ b/component/core/src/main/resources/locale/social/Core_ru.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} был создан {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=Я присоединился к области (областям): {0}. -SpaceActivityPublisher.has_joined=Присоединился(-лась) к области. -SpaceActivityPublisher.has_left=Покинул(а) область. -SpaceActivityPublisher.user_joined={0} присоединился(-лась) к области. -SpaceActivityPublisher.member_left={0} покинул(а) область. -SpaceActivityPublisher.space_renamed=Обновлено название: {0}. -SpaceActivityPublisher.space_description_edited=Обновлено описание: {0}. -SpaceActivityPublisher.space_avatar_edited=У этой области новый аватар. -SpaceActivityPublisher.member_of_one_or_zero_public_space=Теперь я член {0} области. -SpaceActivityPublisher.member_of_number_public_spaces=Теперь я член {0} областей. -SpaceActivityPublisher.members={0} Членов -SpaceActivityPublisher.member={0} Членов ProfileUpdatesPublisher.avatar_updated=Аватар был обновлен. diff --git a/component/core/src/main/resources/locale/social/Core_sk.properties b/component/core/src/main/resources/locale/social/Core_sk.properties index bc7eaf44aee..98527194e91 100644 --- a/component/core/src/main/resources/locale/social/Core_sk.properties +++ b/component/core/src/main/resources/locale/social/Core_sk.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} was created by {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=I joined {0} space(s). -SpaceActivityPublisher.has_joined=Has joined the space. -SpaceActivityPublisher.has_left=Has left the space. -SpaceActivityPublisher.user_joined={0} has joined the space. -SpaceActivityPublisher.member_left={0} has left the space. -SpaceActivityPublisher.space_renamed=The name has been updated to: {0}. -SpaceActivityPublisher.space_description_edited=The description has been updated to: {0}. -SpaceActivityPublisher.space_avatar_edited=This space has a new logo. -SpaceActivityPublisher.member_of_one_or_zero_public_space=I am now member of {0} space. -SpaceActivityPublisher.member_of_number_public_spaces=I am now member of {0} spaces. -SpaceActivityPublisher.members={0} Members -SpaceActivityPublisher.member={0} Members ProfileUpdatesPublisher.avatar_updated=Avatar has been updated. diff --git a/component/core/src/main/resources/locale/social/Core_sl.properties b/component/core/src/main/resources/locale/social/Core_sl.properties index a8d579d428f..15b3dc61fd8 100644 --- a/component/core/src/main/resources/locale/social/Core_sl.properties +++ b/component/core/src/main/resources/locale/social/Core_sl.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={1} je ustvaril/a {0}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=Pridružil(a) sem se {0} prostorom. -SpaceActivityPublisher.has_joined=Se je pridružil prostoru. -SpaceActivityPublisher.has_left=Zapustil je prostor. -SpaceActivityPublisher.user_joined={0} se je pridružil(a) prostoru. -SpaceActivityPublisher.member_left={0} je zapustil prostor. -SpaceActivityPublisher.space_renamed=Ime je bilo posodobljeno na: {0}. -SpaceActivityPublisher.space_description_edited=Opis je bil posodobljen na: {0}. -SpaceActivityPublisher.space_avatar_edited=Ta prostor ima nov avatar. -SpaceActivityPublisher.member_of_one_or_zero_public_space=Zdaj sem član(ica) prostora {0}. -SpaceActivityPublisher.member_of_number_public_spaces=Zdaj sem član(ica) {0} prostorov. -SpaceActivityPublisher.members={0} članov -SpaceActivityPublisher.member={0} članov ProfileUpdatesPublisher.avatar_updated=Avatar je bil posodobljen. diff --git a/component/core/src/main/resources/locale/social/Core_sq.properties b/component/core/src/main/resources/locale/social/Core_sq.properties index 00e04579e9e..2cd1c5472de 100644 --- a/component/core/src/main/resources/locale/social/Core_sq.properties +++ b/component/core/src/main/resources/locale/social/Core_sq.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created=crwdns38632:0{0}crwdnd38632:0{1}crwdne38632:0 -SpaceActivityPublisher.manager_role_granted=crwdns38634:0{0}crwdne38634:0 -SpaceActivityPublisher.manager_role_revoked=crwdns38636:0{0}crwdne38636:0 -SpaceActivityPublisher.user_space_joined=crwdns38638:0{0}crwdne38638:0 -SpaceActivityPublisher.has_joined=crwdns38640:0crwdne38640:0 -SpaceActivityPublisher.has_left=crwdns38642:0crwdne38642:0 -SpaceActivityPublisher.user_joined=crwdns38644:0{0}crwdne38644:0 -SpaceActivityPublisher.member_left=crwdns38646:0{0}crwdne38646:0 -SpaceActivityPublisher.space_renamed=crwdns38648:0{0}crwdne38648:0 -SpaceActivityPublisher.space_description_edited=crwdns38650:0{0}crwdne38650:0 -SpaceActivityPublisher.space_avatar_edited=crwdns38652:0crwdne38652:0 -SpaceActivityPublisher.member_of_one_or_zero_public_space=crwdns38654:0{0}crwdne38654:0 -SpaceActivityPublisher.member_of_number_public_spaces=crwdns38656:0{0}crwdne38656:0 -SpaceActivityPublisher.members=crwdns38658:0{0}crwdne38658:0 -SpaceActivityPublisher.member=crwdns38660:0{0}crwdne38660:0 ProfileUpdatesPublisher.avatar_updated=crwdns38662:0crwdne38662:0 diff --git a/component/core/src/main/resources/locale/social/Core_sv_SE.properties b/component/core/src/main/resources/locale/social/Core_sv_SE.properties index 2fc45778fc5..9faff4d66d8 100644 --- a/component/core/src/main/resources/locale/social/Core_sv_SE.properties +++ b/component/core/src/main/resources/locale/social/Core_sv_SE.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} skapades av {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=Jag gick med {0} plats(er). -SpaceActivityPublisher.has_joined=Har gått med i platsen. -SpaceActivityPublisher.has_left=Har lämnat platsen. -SpaceActivityPublisher.user_joined=Har gått med i platsen. -SpaceActivityPublisher.member_left=Har lämnat platsen. -SpaceActivityPublisher.space_renamed=Namn har uppdaterats till: {0}. -SpaceActivityPublisher.space_description_edited=Beskrivning har uppdaterats till: {0}. -SpaceActivityPublisher.space_avatar_edited=Denna webb-yta har en ny avatar. -SpaceActivityPublisher.member_of_one_or_zero_public_space=Jag är nu medlem i {0} webb-ytan. -SpaceActivityPublisher.member_of_number_public_spaces=Jag är nu medlem i {0} webb-ytan. -SpaceActivityPublisher.members={0} Members -SpaceActivityPublisher.member={0} Members ProfileUpdatesPublisher.avatar_updated=Avatar har uppdaterats. diff --git a/component/core/src/main/resources/locale/social/Core_th.properties b/component/core/src/main/resources/locale/social/Core_th.properties index bc7eaf44aee..98527194e91 100644 --- a/component/core/src/main/resources/locale/social/Core_th.properties +++ b/component/core/src/main/resources/locale/social/Core_th.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} was created by {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=I joined {0} space(s). -SpaceActivityPublisher.has_joined=Has joined the space. -SpaceActivityPublisher.has_left=Has left the space. -SpaceActivityPublisher.user_joined={0} has joined the space. -SpaceActivityPublisher.member_left={0} has left the space. -SpaceActivityPublisher.space_renamed=The name has been updated to: {0}. -SpaceActivityPublisher.space_description_edited=The description has been updated to: {0}. -SpaceActivityPublisher.space_avatar_edited=This space has a new logo. -SpaceActivityPublisher.member_of_one_or_zero_public_space=I am now member of {0} space. -SpaceActivityPublisher.member_of_number_public_spaces=I am now member of {0} spaces. -SpaceActivityPublisher.members={0} Members -SpaceActivityPublisher.member={0} Members ProfileUpdatesPublisher.avatar_updated=Avatar has been updated. diff --git a/component/core/src/main/resources/locale/social/Core_tl.properties b/component/core/src/main/resources/locale/social/Core_tl.properties index bc7eaf44aee..98527194e91 100644 --- a/component/core/src/main/resources/locale/social/Core_tl.properties +++ b/component/core/src/main/resources/locale/social/Core_tl.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} was created by {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=I joined {0} space(s). -SpaceActivityPublisher.has_joined=Has joined the space. -SpaceActivityPublisher.has_left=Has left the space. -SpaceActivityPublisher.user_joined={0} has joined the space. -SpaceActivityPublisher.member_left={0} has left the space. -SpaceActivityPublisher.space_renamed=The name has been updated to: {0}. -SpaceActivityPublisher.space_description_edited=The description has been updated to: {0}. -SpaceActivityPublisher.space_avatar_edited=This space has a new logo. -SpaceActivityPublisher.member_of_one_or_zero_public_space=I am now member of {0} space. -SpaceActivityPublisher.member_of_number_public_spaces=I am now member of {0} spaces. -SpaceActivityPublisher.members={0} Members -SpaceActivityPublisher.member={0} Members ProfileUpdatesPublisher.avatar_updated=Avatar has been updated. diff --git a/component/core/src/main/resources/locale/social/Core_tr.properties b/component/core/src/main/resources/locale/social/Core_tr.properties index 49f42e6f045..7bcc7d69f91 100644 --- a/component/core/src/main/resources/locale/social/Core_tr.properties +++ b/component/core/src/main/resources/locale/social/Core_tr.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} {1} tarafından oluşturuldu. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined={0} alanlarına katıldım. -SpaceActivityPublisher.has_joined=Alana katıldı. -SpaceActivityPublisher.has_left=Alandan çıktı. -SpaceActivityPublisher.user_joined={0} alanına katıldı. -SpaceActivityPublisher.member_left={0} alanından çıktı. -SpaceActivityPublisher.space_renamed=Adı güncellendi: {0}. -SpaceActivityPublisher.space_description_edited=Açıklama güncellendi: {0}. -SpaceActivityPublisher.space_avatar_edited=Bu alanın, yeni bir avatarı var. -SpaceActivityPublisher.member_of_one_or_zero_public_space=Şimdi {0} alanının üyesiyim. -SpaceActivityPublisher.member_of_number_public_spaces=Şimdi {0} alanlarının üyesiyim. -SpaceActivityPublisher.members={0} Üyeler -SpaceActivityPublisher.member={0} Üyeler ProfileUpdatesPublisher.avatar_updated=Avatar güncellenmiştir. diff --git a/component/core/src/main/resources/locale/social/Core_uk.properties b/component/core/src/main/resources/locale/social/Core_uk.properties index 60c83a4abd5..147eb6c40ed 100644 --- a/component/core/src/main/resources/locale/social/Core_uk.properties +++ b/component/core/src/main/resources/locale/social/Core_uk.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} створено {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=Я приєднався до області(ей) {0}. -SpaceActivityPublisher.has_joined=Приєднався до області. -SpaceActivityPublisher.has_left=Залишив область. -SpaceActivityPublisher.user_joined={0}приєднався до області. -SpaceActivityPublisher.member_left={0} залишив область. -SpaceActivityPublisher.space_renamed=Були поновлені імена до: {0}. -SpaceActivityPublisher.space_description_edited=Оновлено Опис: {0}. -SpaceActivityPublisher.space_avatar_edited=Ця область має новий аватар. -SpaceActivityPublisher.member_of_one_or_zero_public_space=Я тепер член {0} області. -SpaceActivityPublisher.member_of_number_public_spaces=Я тепер член {0} областей. -SpaceActivityPublisher.members={0} Членів -SpaceActivityPublisher.member={0} Членів ProfileUpdatesPublisher.avatar_updated=Аватар був оновлений. diff --git a/component/core/src/main/resources/locale/social/Core_ur_IN.properties b/component/core/src/main/resources/locale/social/Core_ur_IN.properties index bc7eaf44aee..98527194e91 100644 --- a/component/core/src/main/resources/locale/social/Core_ur_IN.properties +++ b/component/core/src/main/resources/locale/social/Core_ur_IN.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} was created by {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=I joined {0} space(s). -SpaceActivityPublisher.has_joined=Has joined the space. -SpaceActivityPublisher.has_left=Has left the space. -SpaceActivityPublisher.user_joined={0} has joined the space. -SpaceActivityPublisher.member_left={0} has left the space. -SpaceActivityPublisher.space_renamed=The name has been updated to: {0}. -SpaceActivityPublisher.space_description_edited=The description has been updated to: {0}. -SpaceActivityPublisher.space_avatar_edited=This space has a new logo. -SpaceActivityPublisher.member_of_one_or_zero_public_space=I am now member of {0} space. -SpaceActivityPublisher.member_of_number_public_spaces=I am now member of {0} spaces. -SpaceActivityPublisher.members={0} Members -SpaceActivityPublisher.member={0} Members ProfileUpdatesPublisher.avatar_updated=Avatar has been updated. diff --git a/component/core/src/main/resources/locale/social/Core_vi.properties b/component/core/src/main/resources/locale/social/Core_vi.properties index dd513d57a72..4f7dfb05fad 100644 --- a/component/core/src/main/resources/locale/social/Core_vi.properties +++ b/component/core/src/main/resources/locale/social/Core_vi.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created={0} đã được tạo bởi {1}. -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=Tôi đã gia nhập {0} nhóm. -SpaceActivityPublisher.has_joined=Đã gia nhập nhóm. -SpaceActivityPublisher.has_left=Đã rời khỏi nhóm. -SpaceActivityPublisher.user_joined={0} đã gia nhập nhóm. -SpaceActivityPublisher.member_left={0} đã rời khỏi nhóm. -SpaceActivityPublisher.space_renamed=Tên nhóm đã được thay đổi thành: {0}. -SpaceActivityPublisher.space_description_edited=Mô tả nhóm đã được thay đổi thành: {0}. -SpaceActivityPublisher.space_avatar_edited=Nhóm có hình ảnh đại diện mới. -SpaceActivityPublisher.member_of_one_or_zero_public_space=Tôi là thành viên của {0} nhóm. -SpaceActivityPublisher.member_of_number_public_spaces=Tôi là thành viên của {0} nhóm. -SpaceActivityPublisher.members={0} Members -SpaceActivityPublisher.member={0} Members ProfileUpdatesPublisher.avatar_updated=Hình ảnh đại diện đã được thay đổi. diff --git a/component/core/src/main/resources/locale/social/Core_zh_CN.properties b/component/core/src/main/resources/locale/social/Core_zh_CN.properties index 4ffbfe3e905..564b600466a 100644 --- a/component/core/src/main/resources/locale/social/Core_zh_CN.properties +++ b/component/core/src/main/resources/locale/social/Core_zh_CN.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created=由 {1} 创建 {0}。 -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=我加入了 {0} 空间。 -SpaceActivityPublisher.has_joined=已经加入了空间。 -SpaceActivityPublisher.has_left=已离开空间。 -SpaceActivityPublisher.user_joined={0} 已加入了空间。 -SpaceActivityPublisher.member_left={0}已离开空间。 -SpaceActivityPublisher.space_renamed=名称已更新到: {0}。 -SpaceActivityPublisher.space_description_edited=说明已更新到: {0}。 -SpaceActivityPublisher.space_avatar_edited=这个空间有一个新的头像。 -SpaceActivityPublisher.member_of_one_or_zero_public_space=我现在是 {0} 空间的成员。 -SpaceActivityPublisher.member_of_number_public_spaces=我现在是 {0} 空间的成员。 -SpaceActivityPublisher.members={0} 成员 -SpaceActivityPublisher.member={0} 成员 ProfileUpdatesPublisher.avatar_updated=徽标已被更新。 diff --git a/component/core/src/main/resources/locale/social/Core_zh_TW.properties b/component/core/src/main/resources/locale/social/Core_zh_TW.properties index 56a1b973dba..9aa3ea69211 100644 --- a/component/core/src/main/resources/locale/social/Core_zh_TW.properties +++ b/component/core/src/main/resources/locale/social/Core_zh_TW.properties @@ -1,18 +1,3 @@ -SpaceActivityPublisher.space_created=由 {1} 建立 {0}。 -SpaceActivityPublisher.manager_role_granted={0} has been promoted to space admin -SpaceActivityPublisher.manager_role_revoked={0} is no longer an admin of the space. -SpaceActivityPublisher.user_space_joined=我加入了 {0} 空間。 -SpaceActivityPublisher.has_joined=已經加入了空間。 -SpaceActivityPublisher.has_left=離開了空間。 -SpaceActivityPublisher.user_joined={0} 已經加入了空間。 -SpaceActivityPublisher.member_left={0} 離開了空間。 -SpaceActivityPublisher.space_renamed=名稱已更新到: {0}。 -SpaceActivityPublisher.space_description_edited=描述已更新到: {0}。 -SpaceActivityPublisher.space_avatar_edited=這個空間有一個新的頭象。 -SpaceActivityPublisher.member_of_one_or_zero_public_space=我現在是 {0} 空間的成員。 -SpaceActivityPublisher.member_of_number_public_spaces=我現在是 {0} 空間的成員。 -SpaceActivityPublisher.members={0} Members -SpaceActivityPublisher.member={0} Members ProfileUpdatesPublisher.avatar_updated=頭象已被更新。 diff --git a/component/core/src/test/java/io/meeds/social/authorization/AuthorizationManagerTest.java b/component/core/src/test/java/io/meeds/social/authorization/AuthorizationManagerTest.java index d730d324e07..33434006d17 100644 --- a/component/core/src/test/java/io/meeds/social/authorization/AuthorizationManagerTest.java +++ b/component/core/src/test/java/io/meeds/social/authorization/AuthorizationManagerTest.java @@ -41,6 +41,7 @@ import org.exoplatform.services.security.Identity; import org.exoplatform.services.security.MembershipEntry; import org.exoplatform.social.core.space.SpacesAdministrationService; +import org.exoplatform.social.core.space.spi.SpaceService; @RunWith(MockitoJUnitRunner.class) public class AuthorizationManagerTest { @@ -70,6 +71,9 @@ public class AuthorizationManagerTest { @Mock SpacesAdministrationService spacesAdministrationService; + @Mock + SpaceService spacesService; + @Mock InitParams params; @@ -94,6 +98,7 @@ public class AuthorizationManagerTest { public void setup() { authorizationManager = new AuthorizationManager(params); authorizationManager.setSpacesAdministrationService(spacesAdministrationService); + authorizationManager.setSpaceService(spacesService); when(spacesAdministrationService.getSpacesAdministratorsMemberships()).thenReturn(Collections.singletonList(ADMIN_SPACES_MEMBERSHIP)); } diff --git a/component/core/src/test/java/io/meeds/social/space/service/SpaceLayoutServiceTest.java b/component/core/src/test/java/io/meeds/social/space/service/SpaceLayoutServiceTest.java new file mode 100644 index 00000000000..5449ec5d161 --- /dev/null +++ b/component/core/src/test/java/io/meeds/social/space/service/SpaceLayoutServiceTest.java @@ -0,0 +1,167 @@ +/** + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package io.meeds.social.space.service; + +import static org.junit.Assert.assertThrows; + +import java.util.Arrays; +import java.util.HashSet; + +import org.exoplatform.commons.exception.ObjectNotFoundException; +import org.exoplatform.component.test.ConfigurationUnit; +import org.exoplatform.component.test.ConfiguredBy; +import org.exoplatform.component.test.ContainerScope; +import org.exoplatform.portal.config.model.PortalConfig; +import org.exoplatform.portal.mop.service.LayoutService; +import org.exoplatform.social.core.space.SpaceUtils; +import org.exoplatform.social.core.space.model.Space; +import org.exoplatform.social.core.test.AbstractCoreTest; + +import io.meeds.social.core.space.service.SpaceLayoutService; + +import lombok.SneakyThrows; + +@ConfiguredBy({ + @ConfigurationUnit(scope = ContainerScope.ROOT, + path = "conf/configuration.xml"), + @ConfigurationUnit(scope = ContainerScope.ROOT, + path = "conf/exo.social.component.core-local-root-configuration.xml"), + @ConfigurationUnit(scope = ContainerScope.PORTAL, + path = "conf/portal/configuration.xml"), + @ConfigurationUnit(scope = ContainerScope.PORTAL, + path = "conf/exo.social.component.core-local-configuration.xml"), + @ConfigurationUnit(scope = ContainerScope.PORTAL, + path = "conf/social.component.core-local-portal-configuration.xml"), + @ConfigurationUnit(scope = ContainerScope.PORTAL, + path = "conf/exo.portal.component.portal-configuration-local.xml"), +}) +public class SpaceLayoutServiceTest extends AbstractCoreTest { + + private SpaceLayoutService spaceLayoutService; + + @Override + protected void setUp() throws Exception { + super.setUp(); + this.spaceLayoutService = getService(SpaceLayoutService.class); + } + + @SneakyThrows + public void testSaveSpacePublicSite() { + Space space = getSpaceInstance(18); + String spaceId = space.getId(); + + assertThrows(ObjectNotFoundException.class, + () -> spaceLayoutService.saveSpacePublicSite("15587688", SpaceUtils.AUTHENTICATED, "demo")); + assertThrows(IllegalAccessException.class, + () -> spaceLayoutService.saveSpacePublicSite(spaceId, SpaceUtils.AUTHENTICATED, "raul")); + + spaceLayoutService.saveSpacePublicSite(spaceId, SpaceUtils.AUTHENTICATED, "demo"); + space = spaceService.getSpaceById(space.getId()); + assertEquals(SpaceUtils.AUTHENTICATED, space.getPublicSiteVisibility()); + long publicSiteId = space.getPublicSiteId(); + assertTrue(publicSiteId > 0); + + LayoutService layoutService = getContainer().getComponentInstanceOfType(LayoutService.class); + PortalConfig publicSitePortalConfig = layoutService.getPortalConfig(publicSiteId); + assertNotNull(publicSitePortalConfig); + assertEquals(space.getPrettyName(), publicSitePortalConfig.getName()); + assertEquals(space.getDisplayName(), publicSitePortalConfig.getLabel()); + assertEquals(2, publicSitePortalConfig.getAccessPermissions().length); + assertEquals(new HashSet(Arrays.asList("member:/platform/externals", + "member:/platform/users")), + new HashSet(Arrays.asList(publicSitePortalConfig.getAccessPermissions()))); + assertEquals(SpaceUtils.MANAGER + ":" + space.getGroupId(), publicSitePortalConfig.getEditPermission()); + assertEquals(spaceId, publicSitePortalConfig.getProperty("SPACE_ID")); + assertEquals("true", publicSitePortalConfig.getProperty("IS_SPACE_PUBLIC_SITE")); + } + + @SneakyThrows + public void testChangeSpacePublicSiteVisibility() { + Space space = getSpaceInstance(18); + String spaceId = space.getId(); + + assertThrows(ObjectNotFoundException.class, + () -> spaceLayoutService.saveSpacePublicSite("15587688", SpaceUtils.AUTHENTICATED, "demo")); + assertThrows(IllegalAccessException.class, + () -> spaceLayoutService.saveSpacePublicSite(spaceId, SpaceUtils.AUTHENTICATED, "raul")); + + spaceLayoutService.saveSpacePublicSite(spaceId, SpaceUtils.AUTHENTICATED, "demo"); + space = spaceService.getSpaceById(space.getId()); + assertEquals(SpaceUtils.AUTHENTICATED, space.getPublicSiteVisibility()); + long publicSiteId = space.getPublicSiteId(); + assertTrue(publicSiteId > 0); + + space.setVisibility(Space.HIDDEN); + spaceService.updateSpace(space); + space = spaceService.getSpaceById(space.getId()); + + assertEquals(SpaceUtils.MEMBER, space.getPublicSiteVisibility()); + assertEquals(space.getPrettyName(), spaceLayoutService.getSpacePublicSiteName(space)); + + LayoutService layoutService = getContainer().getComponentInstanceOfType(LayoutService.class); + PortalConfig publicSitePortalConfig = layoutService.getPortalConfig(publicSiteId); + assertNotNull(publicSitePortalConfig); + assertEquals(space.getPrettyName(), publicSitePortalConfig.getName()); + assertEquals(space.getDisplayName(), publicSitePortalConfig.getLabel()); + assertFalse(publicSitePortalConfig.isDefaultSite()); + assertEquals(1, publicSitePortalConfig.getAccessPermissions().length); + assertEquals(new HashSet(Arrays.asList(SpaceUtils.MEMBER + ":" + space.getGroupId())), + new HashSet(Arrays.asList(publicSitePortalConfig.getAccessPermissions()))); + assertEquals(SpaceUtils.MANAGER + ":" + space.getGroupId(), publicSitePortalConfig.getEditPermission()); + } + + @SneakyThrows + public void testSpaceWithPublicSiteRemoved() { + Space space = getSpaceInstance(19); + String spaceId = space.getId(); + spaceLayoutService.saveSpacePublicSite(spaceId, SpaceUtils.AUTHENTICATED, "demo"); + space = spaceService.getSpaceById(space.getId()); + long publicSiteId = space.getPublicSiteId(); + assertTrue(publicSiteId > 0); + + LayoutService layoutService = getContainer().getComponentInstanceOfType(LayoutService.class); + PortalConfig publicSitePortalConfig = layoutService.getPortalConfig(publicSiteId); + assertNotNull(publicSitePortalConfig); + + spaceService.deleteSpace(space); + assertNull(layoutService.getPortalConfig(publicSiteId)); + } + + private Space getSpaceInstance(int number) { + Space space = new Space(); + space.setDisplayName("my space " + number); + space.setPrettyName(space.getDisplayName()); + space.setRegistration(Space.OPEN); + space.setDescription("add new space " + number); + space.setVisibility(Space.PUBLIC); + space.setRegistration(Space.VALIDATION); + Space createdSpace = this.spaceService.createSpace(space, "root"); + String[] managers = new String[] { "demo", "tom" }; + String[] members = new String[] { "demo", "raul", "ghost", "dragon" }; + String[] invitedUsers = new String[] { "register1", "mary" }; + String[] pendingUsers = new String[] { "jame", "paul", "hacker" }; + Arrays.stream(pendingUsers).forEach(u -> spaceService.addPendingUser(createdSpace, u)); + Arrays.stream(invitedUsers).forEach(u -> spaceService.addInvitedUser(createdSpace, u)); + Arrays.stream(members).forEach(u -> spaceService.addMember(createdSpace, u)); + Arrays.stream(managers).forEach(u -> spaceService.addMember(createdSpace, u)); + Arrays.stream(managers).forEach(u -> spaceService.setManager(createdSpace, u, true)); + return createdSpace; + } + +} diff --git a/component/core/src/test/java/io/meeds/social/space/template/plugin/attachment/SpaceTemplateBannerAttachmentPluginTest.java b/component/core/src/test/java/io/meeds/social/space/template/plugin/attachment/SpaceTemplateBannerAttachmentPluginTest.java new file mode 100644 index 00000000000..d7f91ae6baf --- /dev/null +++ b/component/core/src/test/java/io/meeds/social/space/template/plugin/attachment/SpaceTemplateBannerAttachmentPluginTest.java @@ -0,0 +1,113 @@ +/** + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package io.meeds.social.space.template.plugin.attachment; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThrows; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.when; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; + +import org.exoplatform.commons.exception.ObjectNotFoundException; +import org.exoplatform.services.security.Identity; +import org.exoplatform.social.attachment.AttachmentService; + +import io.meeds.social.space.template.model.SpaceTemplate; +import io.meeds.social.space.template.service.SpaceTemplateService; + +import lombok.SneakyThrows; + +@RunWith(MockitoJUnitRunner.class) +public class SpaceTemplateBannerAttachmentPluginTest { + + @Mock + private SpaceTemplateService spaceTemplateService; + + @Mock + private AttachmentService attachmentService; + + private SpaceTemplateBannerAttachmentPlugin attachmentPlugin; + + @Mock + private Identity userIdentity; + + @Mock + private SpaceTemplate spaceTemplate; + + @Before + public void init() { + attachmentPlugin = new SpaceTemplateBannerAttachmentPlugin(); + attachmentPlugin.attachmentService = attachmentService; + attachmentPlugin.spaceTemplateService = spaceTemplateService; + } + + @Test + public void getObjectType() { + assertEquals(SpaceTemplateBannerAttachmentPlugin.OBJECT_TYPE, attachmentPlugin.getObjectType()); + } + + @Test + @SneakyThrows + public void testHasEditPermission() { + assertFalse(attachmentPlugin.hasEditPermission(null, null)); + assertFalse(attachmentPlugin.hasEditPermission(userIdentity, null)); + + when(userIdentity.getUserId()).thenReturn("test"); + assertFalse(attachmentPlugin.hasEditPermission(userIdentity, null)); + + when(spaceTemplateService.canManageTemplates("test")).thenReturn(true); + assertTrue(attachmentPlugin.hasEditPermission(userIdentity, "2")); + } + + @Test + @SneakyThrows + public void testHasAccessPermission() { + assertFalse(attachmentPlugin.hasAccessPermission(null, null)); + assertFalse(attachmentPlugin.hasAccessPermission(userIdentity, null)); + assertFalse(attachmentPlugin.hasAccessPermission(null, "2")); + + when(userIdentity.getUserId()).thenReturn("test"); + assertThrows(ObjectNotFoundException.class, () -> attachmentPlugin.hasAccessPermission(userIdentity, "2")); + + when(spaceTemplateService.getSpaceTemplate(2)).thenReturn(spaceTemplate); + assertFalse(attachmentPlugin.hasAccessPermission(userIdentity, "2")); + + when(spaceTemplateService.canViewTemplate(2, "test")).thenReturn(true); + assertTrue(attachmentPlugin.hasAccessPermission(userIdentity, "2")); + } + + @Test + @SneakyThrows + public void getAudienceId() { + assertEquals(0l, attachmentPlugin.getAudienceId(null)); + } + + @Test + @SneakyThrows + public void getSpaceId() { + assertEquals(0l, attachmentPlugin.getSpaceId("")); + } + +} diff --git a/component/core/src/test/java/io/meeds/social/space/template/plugin/translation/SpaceTemplateTranslationPluginTest.java b/component/core/src/test/java/io/meeds/social/space/template/plugin/translation/SpaceTemplateTranslationPluginTest.java new file mode 100644 index 00000000000..d0ac653e3b5 --- /dev/null +++ b/component/core/src/test/java/io/meeds/social/space/template/plugin/translation/SpaceTemplateTranslationPluginTest.java @@ -0,0 +1,102 @@ +/** + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package io.meeds.social.space.template.plugin.translation; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThrows; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.when; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; + +import org.exoplatform.commons.exception.ObjectNotFoundException; + +import io.meeds.social.space.template.model.SpaceTemplate; +import io.meeds.social.space.template.service.SpaceTemplateService; +import io.meeds.social.translation.service.TranslationService; + +import lombok.SneakyThrows; + +@RunWith(MockitoJUnitRunner.class) +public class SpaceTemplateTranslationPluginTest { + + private static final String TEST_USER = "test"; + + @Mock + private SpaceTemplateService spaceTemplateService; + + @Mock + private TranslationService translationService; + + @Mock + private SpaceTemplate spaceTemplate; + + private SpaceTemplateTranslationPlugin translationPlugin; + + @Before + public void init() { + translationPlugin = new SpaceTemplateTranslationPlugin(); + translationPlugin.translationService = translationService; + translationPlugin.spaceTemplateService = spaceTemplateService; + } + + @Test + @SneakyThrows + public void testHasEditPermission() { + assertFalse(translationPlugin.hasEditPermission(0, TEST_USER)); + when(spaceTemplateService.canManageTemplates(TEST_USER)).thenReturn(true); + assertTrue(translationPlugin.hasEditPermission(0, TEST_USER)); + } + + @Test + @SneakyThrows + public void testHasAccessPermission() { + assertThrows(ObjectNotFoundException.class, () -> translationPlugin.hasAccessPermission(2, TEST_USER)); + when(spaceTemplateService.canManageTemplates(TEST_USER)).thenReturn(true); + assertTrue(translationPlugin.hasEditPermission(0, TEST_USER)); + + when(spaceTemplateService.getSpaceTemplate(2)).thenReturn(spaceTemplate); + assertFalse(translationPlugin.hasAccessPermission(2, TEST_USER)); + assertThrows(ObjectNotFoundException.class, () -> translationPlugin.hasAccessPermission(3, TEST_USER)); + + when(spaceTemplateService.canViewTemplate(2, TEST_USER)).thenReturn(true); + assertTrue(translationPlugin.hasAccessPermission(2, TEST_USER)); + } + + @Test + public void getObjectType() { + assertEquals(SpaceTemplateTranslationPlugin.OBJECT_TYPE, translationPlugin.getObjectType()); + } + + @Test + public void getAudienceId() { + assertEquals(0l, translationPlugin.getAudienceId(0)); + } + + @Test + public void getSpaceId() { + assertEquals(0l, translationPlugin.getSpaceId(0)); + } + +} diff --git a/component/core/src/test/java/io/meeds/social/space/template/service/SpaceTemplateServiceTest.java b/component/core/src/test/java/io/meeds/social/space/template/service/SpaceTemplateServiceTest.java new file mode 100644 index 00000000000..59ec28981f7 --- /dev/null +++ b/component/core/src/test/java/io/meeds/social/space/template/service/SpaceTemplateServiceTest.java @@ -0,0 +1,247 @@ +/** + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package io.meeds.social.space.template.service; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertThrows; +import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import java.util.Arrays; +import java.util.List; +import java.util.Locale; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; +import org.springframework.data.domain.Pageable; + +import org.exoplatform.commons.exception.ObjectNotFoundException; +import org.exoplatform.portal.config.UserACL; +import org.exoplatform.services.security.Identity; +import org.exoplatform.services.security.MembershipEntry; +import org.exoplatform.social.attachment.AttachmentService; +import org.exoplatform.social.core.space.SpacesAdministrationService; + +import io.meeds.social.core.space.constant.Registration; +import io.meeds.social.core.space.constant.Visibility; +import io.meeds.social.space.template.model.SpaceTemplate; +import io.meeds.social.space.template.model.SpaceTemplateFilter; +import io.meeds.social.space.template.storage.SpaceTemplateStorage; +import io.meeds.social.translation.service.TranslationService; + +@RunWith(MockitoJUnitRunner.class) +public class SpaceTemplateServiceTest { + + private static final String SPACE_FIELDS = "spaceFields"; + + private static final String SPACE_DELETE_PERMISSIONS = "spaceDeletePermissions"; + + private static final String SPACE_LAYOUT_PERMISSIONS = "spaceLayoutPermissions"; + + private static final String CREATE_AND_ACCESS_PERMISSIONS = "permissions"; + + private static final String TEST_USER = "testuser"; + + @Mock + protected TranslationService translationService; + + @Mock + protected AttachmentService attachmentService; + + @Mock + protected SpacesAdministrationService spacesAdministrationService; + + @Mock + protected UserACL userAcl; + + @Mock + private SpaceTemplateStorage spaceTemplateStorage; + + @Mock + private Identity userIdentity; + + private SpaceTemplateService spaceTemplateService; + + @Before + public void init() { + spaceTemplateService = new SpaceTemplateService(translationService, + attachmentService, + userAcl, + spacesAdministrationService, + spaceTemplateStorage); + } + + @Test + public void testGetSpaceTemplates() { + Pageable pageable = Pageable.unpaged(); + List spaceTemplates = spaceTemplateService.getSpaceTemplates(new SpaceTemplateFilter(), pageable, true); + assertNotNull(spaceTemplates); + assertEquals(0, spaceTemplates.size()); + + SpaceTemplate spaceTemplate = newSpaceTemplate(2l); + when(spaceTemplateStorage.getSpaceTemplates(pageable)).then(invocation -> List.of(spaceTemplate)); + spaceTemplates = spaceTemplateService.getSpaceTemplates(null, pageable, true); + assertNotNull(spaceTemplates); + assertEquals(1, spaceTemplates.size()); + assertEquals(spaceTemplate, spaceTemplates.get(0)); + + SpaceTemplateFilter spaceTemplateFilter = new SpaceTemplateFilter(); + spaceTemplateFilter.setUsername(TEST_USER); + spaceTemplateFilter.setIncludeDisabled(true); + spaceTemplates = spaceTemplateService.getSpaceTemplates(spaceTemplateFilter, pageable, true); + assertNotNull(spaceTemplates); + assertEquals(0, spaceTemplates.size()); + + setCanViewTemplate(true); + when(spaceTemplateStorage.getSpaceTemplate(2l)).thenReturn(spaceTemplate); + + spaceTemplates = spaceTemplateService.getSpaceTemplates(spaceTemplateFilter, pageable, false); + assertNotNull(spaceTemplates); + assertEquals(1, spaceTemplates.size()); + assertEquals(spaceTemplate, spaceTemplates.get(0)); + } + + @Test + public void testGetSpaceTemplate() throws IllegalAccessException { + assertNull(spaceTemplateService.getSpaceTemplate(2l)); + assertNull(spaceTemplateService.getSpaceTemplate(2l, TEST_USER, Locale.ENGLISH, false)); + + SpaceTemplate spaceTemplate = newSpaceTemplate(2l); + when(spaceTemplateStorage.getSpaceTemplate(2l)).thenReturn(spaceTemplate); + assertEquals(spaceTemplate, spaceTemplateService.getSpaceTemplate(2l)); + + assertThrows(IllegalAccessException.class, () -> spaceTemplateService.getSpaceTemplate(2l, TEST_USER, Locale.ENGLISH, false)); + setCanViewTemplate(true); + assertEquals(spaceTemplate, spaceTemplateService.getSpaceTemplate(2l, TEST_USER, Locale.ENGLISH, false)); + } + + @Test + public void testCanManageTemplates() { + assertFalse(spaceTemplateService.canManageTemplates(TEST_USER)); + setCanManageTemplate(true); + assertTrue(spaceTemplateService.canManageTemplates(TEST_USER)); + } + + @Test + public void testCanViewTemplateWhenManager() { + assertFalse(spaceTemplateService.canViewTemplate(2l, null)); + assertFalse(spaceTemplateService.canViewTemplate(2l, TEST_USER)); + setCanManageTemplate(true); + assertFalse(spaceTemplateService.canViewTemplate(2l, TEST_USER)); + when(spaceTemplateStorage.getSpaceTemplate(2l)).thenReturn(newSpaceTemplate(2l)); + assertTrue(spaceTemplateService.canViewTemplate(2l, TEST_USER)); + } + + @Test + public void testCanViewTemplateWhenMemberOfPermissions() { + assertFalse(spaceTemplateService.canViewTemplate(2l, TEST_USER)); + setCanViewTemplate(true); + assertFalse(spaceTemplateService.canViewTemplate(2l, TEST_USER)); + when(spaceTemplateStorage.getSpaceTemplate(2l)).thenReturn(newSpaceTemplate(2l)); + assertTrue(spaceTemplateService.canViewTemplate(2l, TEST_USER)); + } + + @Test + public void testCreateSpaceTemplate() throws IllegalAccessException { + assertThrows(IllegalAccessException.class, () -> spaceTemplateService.createSpaceTemplate(newSpaceTemplate(0l), TEST_USER)); + setCanManageTemplate(true); + assertThrows(IllegalArgumentException.class, () -> spaceTemplateService.createSpaceTemplate(newSpaceTemplate(2l), TEST_USER)); + SpaceTemplate spaceTemplate = newSpaceTemplate(0l); + spaceTemplateService.createSpaceTemplate(spaceTemplate, TEST_USER); + verify(spaceTemplateStorage).createSpaceTemplate(spaceTemplate); + } + + @Test + public void testUpdateSpaceTemplate() throws ObjectNotFoundException, IllegalAccessException { + SpaceTemplate spaceTemplate = newSpaceTemplate(2l); + assertThrows(IllegalAccessException.class, () -> spaceTemplateService.updateSpaceTemplate(spaceTemplate, TEST_USER)); + setCanManageTemplate(true); + spaceTemplate.setDeleted(true); + assertThrows(IllegalArgumentException.class, () -> spaceTemplateService.updateSpaceTemplate(spaceTemplate, TEST_USER)); + + SpaceTemplate savedSpaceTemplate = newSpaceTemplate(2l); + when(spaceTemplateStorage.getSpaceTemplate(2l)).thenReturn(savedSpaceTemplate); + savedSpaceTemplate.setDeleted(true); + spaceTemplate.setDeleted(false); + + assertThrows(ObjectNotFoundException.class, () -> spaceTemplateService.updateSpaceTemplate(spaceTemplate, TEST_USER)); + + savedSpaceTemplate.setDeleted(false); + spaceTemplateService.updateSpaceTemplate(spaceTemplate, TEST_USER); + verify(spaceTemplateStorage).updateSpaceTemplate(spaceTemplate); + } + + @Test + public void testDeleteSpaceTemplate() throws IllegalAccessException, ObjectNotFoundException { + assertThrows(IllegalAccessException.class, () -> spaceTemplateService.deleteSpaceTemplate(2l, TEST_USER)); + setCanManageTemplate(true); + assertThrows(ObjectNotFoundException.class, () -> spaceTemplateService.deleteSpaceTemplate(2l, TEST_USER)); + + SpaceTemplate savedSpaceTemplate = newSpaceTemplate(2l); + when(spaceTemplateStorage.getSpaceTemplate(2l)).thenReturn(savedSpaceTemplate); + savedSpaceTemplate.setSystem(false); + savedSpaceTemplate.setDeleted(true); + assertThrows(ObjectNotFoundException.class, () -> spaceTemplateService.deleteSpaceTemplate(2l, TEST_USER)); + + savedSpaceTemplate.setDeleted(false); + savedSpaceTemplate.setSystem(true); + assertThrows(IllegalAccessException.class, () -> spaceTemplateService.deleteSpaceTemplate(2l, TEST_USER)); + savedSpaceTemplate.setSystem(false); + + spaceTemplateService.deleteSpaceTemplate(2l, TEST_USER); + verify(spaceTemplateStorage).updateSpaceTemplate(savedSpaceTemplate); + assertTrue(savedSpaceTemplate.isDeleted()); + } + + private void setCanViewTemplate(boolean hasAccess) { + when(userAcl.getUserIdentity(TEST_USER)).thenReturn(userIdentity); + when(userIdentity.isMemberOf(new MembershipEntry(CREATE_AND_ACCESS_PERMISSIONS))).thenReturn(hasAccess); + } + + private void setCanManageTemplate(boolean hasAccess) { + when(spacesAdministrationService.isSuperManager(TEST_USER)).thenReturn(hasAccess); + } + + private SpaceTemplate newSpaceTemplate(long id) { + return new SpaceTemplate(id, + "name", + "description", + 6l, + "icon", + true, + false, + true, + "layout", + Arrays.asList(CREATE_AND_ACCESS_PERMISSIONS), + Arrays.asList(SPACE_LAYOUT_PERMISSIONS), + Arrays.asList(SPACE_DELETE_PERMISSIONS), + Arrays.asList(SPACE_FIELDS), + Visibility.PRIVATE, + Registration.VALIDATION, + true); + } + +} diff --git a/component/core/src/test/java/io/meeds/social/space/template/storage/SpaceTemplateStorageMock.java b/component/core/src/test/java/io/meeds/social/space/template/storage/SpaceTemplateStorageMock.java new file mode 100644 index 00000000000..f1fcca4349f --- /dev/null +++ b/component/core/src/test/java/io/meeds/social/space/template/storage/SpaceTemplateStorageMock.java @@ -0,0 +1,87 @@ +/** + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package io.meeds.social.space.template.storage; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.springframework.data.domain.Pageable; + +import io.meeds.social.core.space.constant.Registration; +import io.meeds.social.core.space.constant.Visibility; +import io.meeds.social.space.template.model.SpaceTemplate; + +public class SpaceTemplateStorageMock extends SpaceTemplateStorage { + + private SpaceTemplate spaceTemplate; + + public SpaceTemplateStorageMock() { + super(null); + spaceTemplate = new SpaceTemplate(2l, + "name", + "description", + 0, + "icon", + true, + false, + true, + null, + Arrays.asList("*:/platform/users"), + Arrays.asList("*:/platform/administrators"), + Arrays.asList("*:/platform/users"), + Arrays.asList("name", "invitation", "properties", "access"), + Visibility.PRIVATE, + Registration.OPEN, + false); + } + + @Override + public List getSpaceTemplates(Pageable pageable) { + return Collections.singletonList(spaceTemplate); + } + + @Override + public List getEnabledSpaceTemplates(Pageable pageable) { + return Collections.singletonList(spaceTemplate); + } + + @Override + public SpaceTemplate getSpaceTemplate(long id) { + return id == 0 || id == spaceTemplate.getId() ? spaceTemplate : null; + } + + @Override + public SpaceTemplate createSpaceTemplate(SpaceTemplate spaceTemplate) { + return updateSpaceTemplate(spaceTemplate); + } + + @Override + public SpaceTemplate updateSpaceTemplate(SpaceTemplate spaceTemplate) { + spaceTemplate.setId(this.spaceTemplate.getId()); + this.spaceTemplate = spaceTemplate; + return spaceTemplate; + } + + @Override + public void deleteSpaceTemplate(long id) { + // NoOp + } + +} diff --git a/component/core/src/test/java/io/meeds/social/space/template/storage/SpaceTemplateStorageTest.java b/component/core/src/test/java/io/meeds/social/space/template/storage/SpaceTemplateStorageTest.java new file mode 100644 index 00000000000..86ea1b0847a --- /dev/null +++ b/component/core/src/test/java/io/meeds/social/space/template/storage/SpaceTemplateStorageTest.java @@ -0,0 +1,182 @@ +/** + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package io.meeds.social.space.template.storage; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertThrows; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import java.util.Arrays; +import java.util.List; +import java.util.Optional; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; +import org.springframework.data.domain.Pageable; + +import org.exoplatform.commons.exception.ObjectNotFoundException; + +import io.meeds.social.core.space.constant.Registration; +import io.meeds.social.core.space.constant.Visibility; +import io.meeds.social.space.template.dao.SpaceTemplateDAO; +import io.meeds.social.space.template.entity.SpaceTemplateEntity; +import io.meeds.social.space.template.model.SpaceTemplate; + +@RunWith(MockitoJUnitRunner.class) +public class SpaceTemplateStorageTest { + + @Mock + private SpaceTemplateDAO spaceTemplateDAO; + + private SpaceTemplateStorage spaceTemplateStorage; + + @Before + public void init() { + spaceTemplateStorage = new SpaceTemplateStorage(spaceTemplateDAO); + } + + @Test + public void testGetSpaceTemplates() { + SpaceTemplateEntity spaceTemplateEntity = newSpaceTemplateEntity(); + when(spaceTemplateDAO.findByDeletedFalse(any())).thenAnswer(invocation -> List.of(spaceTemplateEntity)); + List spaceTemplates = spaceTemplateStorage.getSpaceTemplates(Pageable.unpaged()); + assertNotNull(spaceTemplates); + assertEquals(1l, spaceTemplates.size()); + + spaceTemplates = spaceTemplateStorage.getSpaceTemplates(Pageable.unpaged()); + SpaceTemplate spaceTemplate = spaceTemplates.get(0); + checkEntityEqualsModel(spaceTemplateEntity, spaceTemplate); + } + + @Test + public void testGetEnabledSpaceTemplates() { + SpaceTemplateEntity spaceTemplateEntity = newSpaceTemplateEntity(); + when(spaceTemplateDAO.findByDeletedFalseAndEnabledTrue(any())).thenAnswer(invocation -> List.of(spaceTemplateEntity)); + List spaceTemplates = spaceTemplateStorage.getEnabledSpaceTemplates(Pageable.unpaged()); + assertNotNull(spaceTemplates); + assertEquals(1l, spaceTemplates.size()); + + spaceTemplates = spaceTemplateStorage.getEnabledSpaceTemplates(Pageable.unpaged()); + SpaceTemplate spaceTemplate = spaceTemplates.get(0); + checkEntityEqualsModel(spaceTemplateEntity, spaceTemplate); + } + + @Test + public void testGetSpaceTemplate() { + assertNull(spaceTemplateStorage.getSpaceTemplate(3l)); + + SpaceTemplateEntity spaceTemplateEntity = newSpaceTemplateEntity(); + when(spaceTemplateDAO.findById(3l)).thenAnswer(invocation -> Optional.of(spaceTemplateEntity)); + SpaceTemplate spaceTemplate = spaceTemplateStorage.getSpaceTemplate(3l); + assertNotNull(spaceTemplate); + checkEntityEqualsModel(spaceTemplateEntity, spaceTemplate); + } + + @Test + public void testCreateSpaceTemplate() { + SpaceTemplate spaceTemplate = newSpaceTemplate(); + when(spaceTemplateDAO.save(any())).thenReturn(newSpaceTemplateEntity()); + SpaceTemplate createdSpaceTemplate = spaceTemplateStorage.createSpaceTemplate(spaceTemplate); + assertNotNull(createdSpaceTemplate); + spaceTemplate.setName(null); + spaceTemplate.setDescription(null); + spaceTemplate.setBannerFileId(0); + assertEquals(spaceTemplate, createdSpaceTemplate); + } + + @Test + public void testUpdateSpaceTemplate() throws ObjectNotFoundException { + SpaceTemplate spaceTemplate = newSpaceTemplate(); + assertThrows(ObjectNotFoundException.class, () -> spaceTemplateStorage.updateSpaceTemplate(spaceTemplate)); + when(spaceTemplateDAO.existsById(spaceTemplate.getId())).thenReturn(true); + when(spaceTemplateDAO.save(any())).thenReturn(newSpaceTemplateEntity()); + SpaceTemplate updatedSpaceTemplate = spaceTemplateStorage.updateSpaceTemplate(spaceTemplate); + assertNotNull(updatedSpaceTemplate); + spaceTemplate.setName(null); + spaceTemplate.setDescription(null); + spaceTemplate.setBannerFileId(0); + assertEquals(spaceTemplate, updatedSpaceTemplate); + } + + @Test + public void testDeleteSpaceTemplate() { + spaceTemplateStorage.deleteSpaceTemplate(2l); + verify(spaceTemplateDAO).deleteById(2l); + } + + private void checkEntityEqualsModel(SpaceTemplateEntity spaceTemplateEntity, SpaceTemplate spaceTemplate) { + assertNotNull(spaceTemplate); + assertEquals(spaceTemplateEntity.getId().longValue(), spaceTemplate.getId()); + assertEquals(spaceTemplateEntity.getIcon(), spaceTemplate.getIcon()); + assertEquals(spaceTemplateEntity.getPermissions(), spaceTemplate.getPermissions()); + assertEquals(spaceTemplateEntity.getIcon(), spaceTemplate.getIcon()); + assertEquals(spaceTemplateEntity.isEnabled(), spaceTemplate.isEnabled()); + assertEquals(spaceTemplateEntity.isDeleted(), spaceTemplate.isDeleted()); + assertEquals(spaceTemplateEntity.isSystem(), spaceTemplate.isSystem()); + assertEquals(spaceTemplateEntity.getSpaceDeletePermissions(), spaceTemplate.getSpaceDeletePermissions()); + assertEquals(spaceTemplateEntity.getSpaceLayoutPermissions(), spaceTemplate.getSpaceLayoutPermissions()); + assertEquals(spaceTemplateEntity.getSpaceFields(), spaceTemplate.getSpaceFields()); + assertEquals(spaceTemplateEntity.getSpaceDefaultVisibility(), spaceTemplate.getSpaceDefaultVisibility()); + assertEquals(spaceTemplateEntity.getSpaceDefaultRegistration(), spaceTemplate.getSpaceDefaultRegistration()); + assertEquals(spaceTemplateEntity.isSpaceAllowContentCreation(), spaceTemplate.isSpaceAllowContentCreation()); + } + + private SpaceTemplateEntity newSpaceTemplateEntity() { + return new SpaceTemplateEntity(2l, + "icon", + true, + false, + true, + "layout", + Arrays.asList("permissions"), + Arrays.asList("spaceLayoutPermissions"), + Arrays.asList("spaceDeletePermissions"), + Arrays.asList("spaceFields"), + Visibility.PRIVATE, + Registration.VALIDATION, + true); + } + + private SpaceTemplate newSpaceTemplate() { + return new SpaceTemplate(2l, + "name", + "description", + 6l, + "icon", + true, + false, + true, + "layout", + Arrays.asList("permissions"), + Arrays.asList("spaceLayoutPermissions"), + Arrays.asList("spaceDeletePermissions"), + Arrays.asList("spaceFields"), + Visibility.PRIVATE, + Registration.VALIDATION, + true); + } + +} diff --git a/component/core/src/test/java/io/meeds/social/upgrade/InitContainerTestSuite.java b/component/core/src/test/java/io/meeds/social/upgrade/InitContainerTestSuite.java index 7b3da915326..c942474e3bd 100644 --- a/component/core/src/test/java/io/meeds/social/upgrade/InitContainerTestSuite.java +++ b/component/core/src/test/java/io/meeds/social/upgrade/InitContainerTestSuite.java @@ -1,18 +1,20 @@ -/* - * Copyright (C) 2003-2012 eXo Platform SAS. +/** + * This file is part of the Meeds project (https://meeds.io/). * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ package io.meeds.social.upgrade; @@ -23,11 +25,14 @@ import org.exoplatform.commons.testing.BaseExoContainerTestSuite; import org.exoplatform.commons.testing.ConfigTestCase; +import io.meeds.social.space.service.SpaceLayoutServiceTest; + @SuiteClasses({ LayoutUpgradePluginTest.class, SpaceSettingPermissionUpgradePluginTest.class, + SpaceLayoutServiceTest.class, }) -@ConfigTestCase(LayoutUpgradePluginTest.class) +@ConfigTestCase(SpaceLayoutServiceTest.class) public class InitContainerTestSuite extends BaseExoContainerTestSuite { @BeforeClass diff --git a/component/core/src/test/java/io/meeds/social/upgrade/LayoutUpgradePluginTest.java b/component/core/src/test/java/io/meeds/social/upgrade/LayoutUpgradePluginTest.java index dab4bca388f..4f129c1470c 100644 --- a/component/core/src/test/java/io/meeds/social/upgrade/LayoutUpgradePluginTest.java +++ b/component/core/src/test/java/io/meeds/social/upgrade/LayoutUpgradePluginTest.java @@ -42,16 +42,18 @@ import io.meeds.social.upgrade.model.LayoutUpgrade; @ConfiguredBy({ - @ConfigurationUnit(scope = ContainerScope.ROOT, - path = "conf/configuration.xml"), - @ConfigurationUnit(scope = ContainerScope.ROOT, - path = "conf/exo.social.component.core-local-root-configuration.xml"), - @ConfigurationUnit(scope = ContainerScope.PORTAL, - path = "conf/portal/configuration.xml"), - @ConfigurationUnit(scope = ContainerScope.PORTAL, - path = "conf/exo.social.component.core-local-configuration.xml"), - @ConfigurationUnit(scope = ContainerScope.PORTAL, - path = "conf/social.component.core-local-portal-configuration.xml"), + @ConfigurationUnit(scope = ContainerScope.ROOT, + path = "conf/configuration.xml"), + @ConfigurationUnit(scope = ContainerScope.ROOT, + path = "conf/exo.social.component.core-local-root-configuration.xml"), + @ConfigurationUnit(scope = ContainerScope.PORTAL, + path = "conf/portal/configuration.xml"), + @ConfigurationUnit(scope = ContainerScope.PORTAL, + path = "conf/exo.social.component.core-local-configuration.xml"), + @ConfigurationUnit(scope = ContainerScope.PORTAL, + path = "conf/social.component.core-local-portal-configuration.xml"), + @ConfigurationUnit(scope = ContainerScope.PORTAL, + path = "conf/exo.portal.component.portal-configuration-local.xml"), }) public class LayoutUpgradePluginTest extends AbstractCoreTest {// NOSONAR diff --git a/component/core/src/test/java/io/meeds/social/upgrade/SpaceNavigationIconUpgradePluginTest.java b/component/core/src/test/java/io/meeds/social/upgrade/SpaceNavigationIconUpgradePluginTest.java index 499d82943dc..aa31aff4de7 100644 --- a/component/core/src/test/java/io/meeds/social/upgrade/SpaceNavigationIconUpgradePluginTest.java +++ b/component/core/src/test/java/io/meeds/social/upgrade/SpaceNavigationIconUpgradePluginTest.java @@ -1,8 +1,11 @@ package io.meeds.social.upgrade; -import org.exoplatform.commons.persistence.impl.EntityManagerService; -import org.exoplatform.commons.upgrade.UpgradePluginExecutionContext; -import org.exoplatform.container.xml.InitParams; -import org.exoplatform.container.xml.ValueParam; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; +import static org.mockito.Mockito.when; import org.junit.Before; import org.junit.Test; @@ -11,11 +14,11 @@ import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.*; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; +import org.exoplatform.commons.persistence.impl.EntityManagerService; +import org.exoplatform.commons.upgrade.UpgradePluginExecutionContext; +import org.exoplatform.container.xml.InitParams; +import org.exoplatform.container.xml.ValueParam; + import jakarta.persistence.EntityManager; import jakarta.persistence.Query; diff --git a/component/core/src/test/java/io/meeds/social/upgrade/SpaceSettingPermissionUpgradePluginTest.java b/component/core/src/test/java/io/meeds/social/upgrade/SpaceSettingPermissionUpgradePluginTest.java index 9172490cfaa..050f98e493f 100644 --- a/component/core/src/test/java/io/meeds/social/upgrade/SpaceSettingPermissionUpgradePluginTest.java +++ b/component/core/src/test/java/io/meeds/social/upgrade/SpaceSettingPermissionUpgradePluginTest.java @@ -18,6 +18,9 @@ */ package io.meeds.social.upgrade; +import java.util.ArrayList; +import java.util.Arrays; + import org.junit.Test; import org.exoplatform.commons.persistence.impl.EntityManagerService; @@ -26,14 +29,20 @@ import org.exoplatform.component.test.ContainerScope; import org.exoplatform.container.xml.InitParams; import org.exoplatform.container.xml.ValueParam; +import org.exoplatform.portal.config.model.Container; import org.exoplatform.portal.config.model.Page; +import org.exoplatform.portal.config.model.PortalConfig; +import org.exoplatform.portal.mop.SiteKey; import org.exoplatform.portal.mop.Utils; import org.exoplatform.portal.mop.dao.PageDAO; import org.exoplatform.portal.mop.dao.PageDAOImpl; import org.exoplatform.portal.mop.page.PageContext; +import org.exoplatform.portal.mop.page.PageState; import org.exoplatform.portal.mop.service.LayoutService; import org.exoplatform.portal.mop.storage.cache.CachePageStorage; import org.exoplatform.services.cache.CacheService; +import org.exoplatform.services.security.IdentityRegistry; +import org.exoplatform.social.core.manager.IdentityManager; import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.core.space.spi.SpaceService; import org.exoplatform.social.core.test.AbstractCoreTest; @@ -49,27 +58,63 @@ path = "conf/exo.social.component.core-local-configuration.xml"), @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/social.component.core-local-portal-configuration.xml"), + @ConfigurationUnit(scope = ContainerScope.PORTAL, + path = "conf/exo.portal.component.portal-configuration-local.xml"), }) public class SpaceSettingPermissionUpgradePluginTest extends AbstractCoreTest { + private static final String PAGE_NAME = "SpaceSettingPortlet"; + @Override protected void setUp() { begin(); - spaceService = getContainer().getComponentInstanceOfType(SpaceService.class); + spaceService = getService(SpaceService.class); + identityManager = getService(IdentityManager.class); + identityRegistry = getService(IdentityRegistry.class); + spaceService = getService(SpaceService.class); } @Test public void testProcessUpgrade() { - assertTrue(getContainer().getComponentInstanceOfType(PageDAO.class) instanceof PageDAOImpl); + assertTrue(getService(PageDAO.class) instanceof PageDAOImpl); Space space = createSpace("spaceWithSettings", "root"); - LayoutService layoutService = getContainer().getComponentInstanceOfType(LayoutService.class); + String[] accessPermissions = new String[] { "*:" + space.getGroupId() }; + String managerPermission = "manager:" + space.getGroupId(); + + LayoutService layoutService = getService(LayoutService.class); + PortalConfig spacePortalConfig = layoutService.getPortalConfig(SiteKey.group(space.getGroupId())); + if (spacePortalConfig == null) { + spacePortalConfig = new PortalConfig(PortalConfig.GROUP_TYPE, space.getGroupId()); + spacePortalConfig.setAccessPermissions(accessPermissions); + spacePortalConfig.setEditPermission(managerPermission); + spacePortalConfig.setPortalLayout(new Container()); + layoutService.create(spacePortalConfig); + restartTransaction(); + } + + Page page = layoutService.getPage(String.format("group::%s::%s", space.getGroupId(), PAGE_NAME)); + if (page == null) { + page = new Page(PortalConfig.GROUP_TYPE, space.getGroupId(), PAGE_NAME); + spacePortalConfig.setAccessPermissions(accessPermissions); + spacePortalConfig.setEditPermission(managerPermission); + page.setChildren(new ArrayList<>()); + layoutService.save(new PageContext(page.getPageKey(), + new PageState(PAGE_NAME, + PAGE_NAME, + false, + null, + Arrays.asList(accessPermissions), + managerPermission)), + page); + restartTransaction(); + page = layoutService.getPage("group::" + space.getGroupId() + "::SpaceSettingPortlet"); + } - Page page = layoutService.getPage("group::" + space.getGroupId() + "::SpaceSettingPortlet"); assertNotNull(page); - page.setAccessPermissions(new String[] { "*:" + space.getGroupId() }); + page.setAccessPermissions(accessPermissions); layoutService.save(new PageContext(page.getPageKey(), Utils.toPageState(page))); - getContainer().getComponentInstanceOfType(CacheService.class).getCacheInstance(CachePageStorage.PAGE_CACHE_NAME).clearCache(); + getService(CacheService.class).getCacheInstance(CachePageStorage.PAGE_CACHE_NAME).clearCache(); restartTransaction(); new SpaceSettingPermissionUpgradePlugin(getEntityManagerService(), @@ -79,11 +124,11 @@ public void testProcessUpgrade() { assertNotNull(page); assertNotNull(page.getAccessPermissions()); assertEquals(1, page.getAccessPermissions().length); - assertEquals("manager:" + space.getGroupId(), page.getAccessPermissions()[0]); + assertEquals(managerPermission, page.getAccessPermissions()[0]); } private EntityManagerService getEntityManagerService() { - return getContainer().getComponentInstanceOfType(EntityManagerService.class); + return getService(EntityManagerService.class); } private InitParams getInitParams() { @@ -102,15 +147,8 @@ private Space createSpace(String spaceName, String creator) { space.setGroupId("/spaces/" + space.getPrettyName()); space.setRegistration(Space.OPEN); space.setDescription("description of space" + spaceName); - space.setTemplate("template"); space.setVisibility(Space.PRIVATE); space.setRegistration(Space.OPEN); - space.setPriority(Space.INTERMEDIATE_PRIORITY); - String[] managers = new String[] { creator }; - String[] members = new String[] { creator }; - space.setManagers(managers); - space.setMembers(members); - spaceService.createSpace(space, creator); - return space; + return spaceService.createSpace(space, creator); } } diff --git a/component/core/src/test/java/org/exoplatform/social/attachment/AttachmentServiceTest.java b/component/core/src/test/java/org/exoplatform/social/attachment/AttachmentServiceTest.java index 22cf5663e55..d875383e6d5 100644 --- a/component/core/src/test/java/org/exoplatform/social/attachment/AttachmentServiceTest.java +++ b/component/core/src/test/java/org/exoplatform/social/attachment/AttachmentServiceTest.java @@ -26,7 +26,12 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Random; import java.util.concurrent.atomic.AtomicBoolean; import org.exoplatform.commons.exception.ObjectNotFoundException; @@ -34,7 +39,12 @@ import org.exoplatform.services.listener.Listener; import org.exoplatform.services.listener.ListenerService; import org.exoplatform.services.security.Identity; -import org.exoplatform.social.attachment.model.*; +import org.exoplatform.social.attachment.model.FileAttachmentObject; +import org.exoplatform.social.attachment.model.FileAttachmentResourceList; +import org.exoplatform.social.attachment.model.ObjectAttachmentDetail; +import org.exoplatform.social.attachment.model.ObjectAttachmentId; +import org.exoplatform.social.attachment.model.ObjectAttachmentList; +import org.exoplatform.social.attachment.model.ObjectAttachmentOperationReport; import org.exoplatform.social.core.attachment.storage.FileAttachmentStorage; import org.exoplatform.social.core.mock.MockUploadService; import org.exoplatform.social.core.test.AbstractCoreTest; diff --git a/component/core/src/test/java/org/exoplatform/social/common/lifecycle/LifeCycleCompletionServiceMock.java b/component/core/src/test/java/org/exoplatform/social/common/lifecycle/LifeCycleCompletionServiceMock.java new file mode 100644 index 00000000000..64e70a198fb --- /dev/null +++ b/component/core/src/test/java/org/exoplatform/social/common/lifecycle/LifeCycleCompletionServiceMock.java @@ -0,0 +1,40 @@ +/** + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.exoplatform.social.common.lifecycle; + +import java.util.concurrent.Callable; + +import org.exoplatform.container.xml.InitParams; + +import lombok.SneakyThrows; + +@SuppressWarnings("rawtypes") +public class LifeCycleCompletionServiceMock extends LifeCycleCompletionService { + + public LifeCycleCompletionServiceMock(InitParams params) { + super(params); + } + + @SneakyThrows + @Override + public void addTask(Callable callable) { + callable.call(); + } + +} diff --git a/component/core/src/test/java/org/exoplatform/social/core/activity/ActivityIndexingServiceConnectorTest.java b/component/core/src/test/java/org/exoplatform/social/core/activity/ActivityIndexingServiceConnectorTest.java index 4adbf66ce7e..c17a63c153e 100644 --- a/component/core/src/test/java/org/exoplatform/social/core/activity/ActivityIndexingServiceConnectorTest.java +++ b/component/core/src/test/java/org/exoplatform/social/core/activity/ActivityIndexingServiceConnectorTest.java @@ -1,6 +1,8 @@ package org.exoplatform.social.core.activity; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.fail; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; @@ -15,8 +17,10 @@ import org.exoplatform.commons.search.domain.Document; import org.exoplatform.container.xml.InitParams; import org.exoplatform.container.xml.PropertiesParam; -import org.exoplatform.social.core.activity.model.*; import org.exoplatform.social.core.activity.model.ActivityStream.Type; +import org.exoplatform.social.core.activity.model.ActivityStreamImpl; +import org.exoplatform.social.core.activity.model.ExoSocialActivity; +import org.exoplatform.social.core.activity.model.ExoSocialActivityImpl; import org.exoplatform.social.core.identity.model.Identity; import org.exoplatform.social.core.identity.model.Profile; import org.exoplatform.social.core.jpa.search.ActivityIndexingServiceConnector; diff --git a/component/core/src/test/java/org/exoplatform/social/core/activity/ActivitySearchConnectorTest.java b/component/core/src/test/java/org/exoplatform/social/core/activity/ActivitySearchConnectorTest.java index 359475ff424..7532b55fb4f 100644 --- a/component/core/src/test/java/org/exoplatform/social/core/activity/ActivitySearchConnectorTest.java +++ b/component/core/src/test/java/org/exoplatform/social/core/activity/ActivitySearchConnectorTest.java @@ -1,15 +1,24 @@ package org.exoplatform.social.core.activity; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.fail; import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.*; +import static org.mockito.Mockito.lenient; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; import java.io.ByteArrayInputStream; import java.io.IOException; -import java.util.*; +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; import org.apache.commons.lang3.StringUtils; -import org.junit.*; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.Mockito; @@ -19,10 +28,14 @@ import org.exoplatform.commons.utils.IOUtil; import org.exoplatform.commons.utils.PropertyManager; import org.exoplatform.container.configuration.ConfigurationManager; -import org.exoplatform.container.xml.*; +import org.exoplatform.container.xml.InitParams; +import org.exoplatform.container.xml.PropertiesParam; +import org.exoplatform.container.xml.ValueParam; import org.exoplatform.social.core.activity.filter.ActivitySearchFilter; -import org.exoplatform.social.core.activity.model.*; +import org.exoplatform.social.core.activity.model.ActivitySearchResult; import org.exoplatform.social.core.activity.model.ActivityStream.Type; +import org.exoplatform.social.core.activity.model.ActivityStreamImpl; +import org.exoplatform.social.core.activity.model.ExoSocialActivityImpl; import org.exoplatform.social.core.identity.model.Identity; import org.exoplatform.social.core.jpa.search.ActivitySearchConnector; import org.exoplatform.social.core.jpa.search.ActivitySearchProcessor; diff --git a/component/core/src/test/java/org/exoplatform/social/core/activity/filter/ActivityIteratorTest.java b/component/core/src/test/java/org/exoplatform/social/core/activity/filter/ActivityIteratorTest.java index ca11aaf7dd6..26b548505f9 100644 --- a/component/core/src/test/java/org/exoplatform/social/core/activity/filter/ActivityIteratorTest.java +++ b/component/core/src/test/java/org/exoplatform/social/core/activity/filter/ActivityIteratorTest.java @@ -20,11 +20,11 @@ import java.util.Iterator; import java.util.List; -import junit.framework.TestCase; - import org.exoplatform.social.core.activity.model.ExoSocialActivity; import org.exoplatform.social.core.activity.model.ExoSocialActivityImpl; +import junit.framework.TestCase; + public class ActivityIteratorTest extends TestCase { private ActivityIterator ait = null; diff --git a/component/core/src/test/java/org/exoplatform/social/core/application/SpaceActivityPublisherTest.java b/component/core/src/test/java/org/exoplatform/social/core/application/SpaceActivityPublisherTest.java deleted file mode 100644 index 03f69e49135..00000000000 --- a/component/core/src/test/java/org/exoplatform/social/core/application/SpaceActivityPublisherTest.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (C) 2003-2010 eXo Platform SAS. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License - * as published by the Free Software Foundation; either version 3 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see. - */ -package org.exoplatform.social.core.application; - -import java.util.ArrayList; -import java.util.List; - -import org.exoplatform.services.log.ExoLogger; -import org.exoplatform.services.log.Log; -import org.exoplatform.social.core.activity.model.ActivityStream; -import org.exoplatform.social.core.activity.model.ExoSocialActivity; -import org.exoplatform.social.core.identity.model.Identity; -import org.exoplatform.social.core.identity.provider.OrganizationIdentityProvider; -import org.exoplatform.social.core.identity.provider.SpaceIdentityProvider; -import org.exoplatform.social.core.manager.ActivityManager; -import org.exoplatform.social.core.space.model.Space; -import org.exoplatform.social.core.space.spi.SpaceLifeCycleEvent; -import org.exoplatform.social.core.test.AbstractCoreTest; - -/** - * Unit Tests for {@link SpaceActivityPublisher} - * - * @author hoat_le - */ -public class SpaceActivityPublisherTest extends AbstractCoreTest { - - private static final Log LOG = ExoLogger.getLogger(SpaceActivityPublisherTest.class); - - private ActivityManager activityManager; - - private SpaceActivityPublisher spaceActivityPublisher; - - private List tearDownActivityList; - - @Override - public void setUp() throws Exception { - super.setUp(); - tearDownActivityList = new ArrayList<>(); - activityManager = getContainer().getComponentInstanceOfType(ActivityManager.class); - assertNotNull("activityManager must not be null", activityManager); - spaceActivityPublisher = getContainer().getComponentInstanceOfType(SpaceActivityPublisher.class); - assertNotNull("spaceActivityPublisher must not be null", spaceActivityPublisher); - } - - @Override - public void tearDown() throws Exception { - for (ExoSocialActivity activity : tearDownActivityList) { - try { - activityManager.deleteActivity(activity.getId()); - } catch (Exception e) { - LOG.warn("can not delete activity with id: " + activity.getId()); - } - } - super.tearDown(); - } - - /** - * @throws Exception - */ - public void testSpaceCreation() throws Exception { - Identity rootIdentity = identityManager.getOrCreateIdentity(OrganizationIdentityProvider.NAME, "root"); - - Space space = new Space(); - space.setDisplayName("Toto 3"); - space.setPrettyName(space.getDisplayName()); - space.setGroupId("/platform/users"); - space.setVisibility(Space.PRIVATE); - space.setRegistration(Space.OPEN); - String[] managers = new String[] { "root" }; - String[] members = new String[] { "root" }; - space.setManagers(managers); - space.setMembers(members); - spaceService.createSpace(space); - try { - assertNotNull("space.getId() must not be null", space.getId()); - SpaceLifeCycleEvent event = new SpaceLifeCycleEvent(space, - rootIdentity.getRemoteId(), - SpaceLifeCycleEvent.Type.SPACE_CREATED); - spaceActivityPublisher.spaceCreated(event); - - Thread.sleep(3000); - - Identity identity = identityManager.getOrCreateIdentity(SpaceIdentityProvider.NAME, space.getPrettyName()); - assertEquals(1, activityManager.getActivitiesWithListAccess(identity).getSize()); - ExoSocialActivity activity = activityManager.getActivitiesWithListAccess(identity).load(0, 1)[0]; - tearDownActivityList.add(activity); - ActivityStream activityStream = activity.getActivityStream(); - - assertNotNull("activityStream.getId() must not be null", activityStream.getId()); - - assertEquals("activityStream.getPrettyId() must return: " + space.getPrettyName(), - space.getPrettyName(), - activityStream.getPrettyId()); - assertEquals(ActivityStream.Type.SPACE, activityStream.getType()); - - assertEquals(SpaceIdentityProvider.NAME, activityStream.getType().toString()); - } finally { - // clean up - spaceService.deleteSpace(space); - identityManager.deleteIdentity(rootIdentity); - } - } - -} diff --git a/component/core/src/test/java/org/exoplatform/social/core/binding/spi/GroupSpaceBindingServiceTest.java b/component/core/src/test/java/org/exoplatform/social/core/binding/spi/GroupSpaceBindingServiceTest.java index 783f378f6f3..34b456ff6e0 100644 --- a/component/core/src/test/java/org/exoplatform/social/core/binding/spi/GroupSpaceBindingServiceTest.java +++ b/component/core/src/test/java/org/exoplatform/social/core/binding/spi/GroupSpaceBindingServiceTest.java @@ -21,13 +21,12 @@ import java.util.LinkedList; import java.util.List; -import org.exoplatform.social.core.binding.model.GroupSpaceBindingReportUser; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; import org.exoplatform.commons.utils.ListAccess; import org.exoplatform.container.xml.InitParams; @@ -40,8 +39,8 @@ import org.exoplatform.social.core.binding.model.GroupSpaceBinding; import org.exoplatform.social.core.binding.model.GroupSpaceBindingQueue; import org.exoplatform.social.core.binding.model.GroupSpaceBindingReportAction; +import org.exoplatform.social.core.binding.model.GroupSpaceBindingReportUser; import org.exoplatform.social.core.binding.model.UserSpaceBinding; -import org.exoplatform.social.core.space.impl.DefaultSpaceApplicationHandler; import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.core.space.spi.SpaceService; import org.exoplatform.social.core.storage.api.GroupSpaceBindingStorage; @@ -939,30 +938,7 @@ public int getSize() throws Exception { GroupSpaceBindingReportAction.ADD_ACTION)); //todo check reports } - - private Space getSpaceInstance(int number) { - Space space = new Space(); - space.setApp("app1,app2"); - space.setDisplayName("myspacetestbinding" + number); - space.setPrettyName(space.getDisplayName()); - space.setRegistration(Space.OPEN); - space.setDescription("add new space " + number); - space.setType(DefaultSpaceApplicationHandler.NAME); - space.setVisibility(Space.PUBLIC); - space.setPriority(Space.INTERMEDIATE_PRIORITY); - space.setGroupId("/spaces/space" + number); - String[] managers = new String[] { "demo" }; - String[] members = new String[] { "john", "root" }; - String[] invitedUsers = new String[] { "mary" }; - String[] pendingUsers = new String[] { "jame" }; - space.setInvitedUsers(invitedUsers); - space.setPendingUsers(pendingUsers); - space.setManagers(managers); - space.setMembers(members); - space.setUrl(space.getPrettyName()); - return space; - } - + /** * Test * {@link GroupSpaceBindingService#bindUsersFromGroupSpaceBinding(GroupSpaceBinding)} diff --git a/component/core/src/test/java/org/exoplatform/social/core/binding/spi/RDBMSGroupSpaceBindingStorageTest.java b/component/core/src/test/java/org/exoplatform/social/core/binding/spi/RDBMSGroupSpaceBindingStorageTest.java index b27db9c5aee..b956b337bce 100644 --- a/component/core/src/test/java/org/exoplatform/social/core/binding/spi/RDBMSGroupSpaceBindingStorageTest.java +++ b/component/core/src/test/java/org/exoplatform/social/core/binding/spi/RDBMSGroupSpaceBindingStorageTest.java @@ -17,7 +17,6 @@ package org.exoplatform.social.core.binding.spi; -import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -28,12 +27,11 @@ import org.exoplatform.social.core.binding.model.GroupSpaceBindingReportUser; import org.exoplatform.social.core.binding.model.UserSpaceBinding; import org.exoplatform.social.core.identity.model.Identity; -import org.exoplatform.social.core.test.AbstractCoreTest; -import org.exoplatform.social.core.space.impl.DefaultSpaceApplicationHandler; +import org.exoplatform.social.core.jpa.storage.SpaceStorage; import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.core.storage.api.GroupSpaceBindingStorage; import org.exoplatform.social.core.storage.api.IdentityStorage; -import org.exoplatform.social.core.storage.api.SpaceStorage; +import org.exoplatform.social.core.test.AbstractCoreTest; /** * Unit Tests for @@ -124,14 +122,11 @@ protected void deleteAllBindings() { */ private Space getSpaceInstance(int number) { Space space = new Space(); - space.setApp("app1,app2"); space.setDisplayName("myspacetestbinding" + number); space.setPrettyName(space.getDisplayName()); space.setRegistration(Space.OPEN); space.setDescription("add new space " + number); - space.setType(DefaultSpaceApplicationHandler.NAME); space.setVisibility(Space.PUBLIC); - space.setPriority(Space.INTERMEDIATE_PRIORITY); space.setGroupId("/spaces/space" + number); String[] managers = new String[] { "demo" }; String[] members = new String[] { "john", "root" }; diff --git a/component/core/src/test/java/org/exoplatform/social/core/feature/SpaceLastVisitedTest.java b/component/core/src/test/java/org/exoplatform/social/core/feature/SpaceLastVisitedTest.java deleted file mode 100644 index 9a58d902a44..00000000000 --- a/component/core/src/test/java/org/exoplatform/social/core/feature/SpaceLastVisitedTest.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright (C) 2003-2013 eXo Platform SAS. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -package org.exoplatform.social.core.feature; - -import java.util.ArrayList; -import java.util.List; - -import org.exoplatform.social.core.identity.model.Identity; -import org.exoplatform.social.core.identity.provider.SpaceIdentityProvider; -import org.exoplatform.social.core.space.impl.DefaultSpaceApplicationHandler; -import org.exoplatform.social.core.space.model.Space; -import org.exoplatform.social.core.space.spi.SpaceService; -import org.exoplatform.social.core.storage.api.IdentityStorage; -import org.exoplatform.social.core.test.AbstractCoreTest; - -public class SpaceLastVisitedTest extends AbstractCoreTest { - private SpaceService spaceService; - private IdentityStorage identityStorage; - - private List tearDownSpaceList; - - private Identity rootIdentity; - private Identity johnIdentity; - private Identity maryIdentity; - private Identity demoIdentity; - - @Override - protected void setUp() throws Exception { - super.setUp(); - - spaceService = (SpaceService) getContainer().getComponentInstanceOfType(SpaceService.class); - identityStorage = (IdentityStorage) getContainer().getComponentInstanceOfType(IdentityStorage.class); - tearDownSpaceList = new ArrayList(); - - // - assertNotNull(identityStorage); - assertNotNull(tearDownSpaceList); - - rootIdentity = new Identity("organization", "root"); - johnIdentity = new Identity("organization", "john"); - maryIdentity = new Identity("organization", "mary"); - demoIdentity = new Identity("organization", "demo"); - - identityStorage.saveIdentity(rootIdentity); - identityStorage.saveIdentity(johnIdentity); - identityStorage.saveIdentity(maryIdentity); - identityStorage.saveIdentity(demoIdentity); - - assertNotNull(rootIdentity.getId()); - assertNotNull(johnIdentity.getId()); - assertNotNull(maryIdentity.getId()); - assertNotNull(demoIdentity.getId()); - } - - @Override - protected void tearDown() throws Exception { - - for (Space space : tearDownSpaceList) { - Identity spaceIdentity = identityStorage.findIdentity(SpaceIdentityProvider.NAME, space.getPrettyName()); - if (spaceIdentity != null) { - identityStorage.deleteIdentity(spaceIdentity); - } - spaceService.deleteSpace(space); - } - - identityStorage.deleteIdentity(rootIdentity); - identityStorage.deleteIdentity(johnIdentity); - identityStorage.deleteIdentity(maryIdentity); - identityStorage.deleteIdentity(demoIdentity); - - super.tearDown(); - } - -//FIXME JCR to RDBMS Migration BUG -// public void testGet10SpaceLastVisited() throws Exception { -// int numberOfSpaces = 10; -// String apps = ""; -// Space s = null; -// for(int i = 0; i < numberOfSpaces; i++) { -// apps += String.format("app%s,", i); -// s = getSpaceInstance(i, apps); -// tearDownSpaceList.add(s); -// } -// List spaces = spaceService.getLastAccessedSpace("mary", "app1", 0, 5); -// -// assertEquals(5, spaces.size()); -// -// // -// Space space4 = spaceService.getSpaceByPrettyName("space_4"); -// assertNotNull(space4); -// spaceService.updateSpaceAccessed("mary", space4); -// spaces = spaceService.getLastAccessedSpace("mary", "app1", 0, 5); -// assertEquals(5, spaces.size()); -// Space got = spaces.get(0); -// assertEquals("space_1", got.getPrettyName()); -// -// // -// Space space2 = spaceService.getSpaceByPrettyName("space_2"); -// assertNotNull(space2); -// spaceService.updateSpaceAccessed("mary", space2); -// spaces = spaceService.getLastAccessedSpace("mary", "app1", 0, 5); -// assertEquals(5, spaces.size()); -// got = spaces.get(0); -// assertEquals("space_1", got.getPrettyName()); -// -// } - -// FIXME JCR to RDBMS Migration BUG -// public void testGet10SpaceLastVisitedAppIdNull() throws Exception { -// int numberOfSpaces = 10; -// String apps = ""; -// Space s = null; -// for(int i = 0; i < numberOfSpaces; i++) { -// apps += String.format("app%s,", i); -// s = getSpaceInstance(i, apps); -// tearDownSpaceList.add(s); -// } -// List spaces = spaceService.getLastAccessedSpace("mary", null, 0, 5); -// -// assertEquals(5, spaces.size()); -// -// // -// Space space4 = spaceService.getSpaceByPrettyName("space_4"); -// assertNotNull(space4); -// spaceService.updateSpaceAccessed("mary", space4); -// spaces = spaceService.getLastAccessedSpace("mary", null, 0, 5); -// assertEquals(5, spaces.size()); -// Space got = spaces.get(0); -// assertEquals("space_0", got.getPrettyName()); -// } - -// FIXME JCR to RDBMS Migration BUG -// public void testGet10SpaceLastVisitedAppId() throws Exception { -// int numberOfSpaces = 10; -// String apps = ""; -// Space s = null; -// for(int i = 0; i < numberOfSpaces; i++) { -// apps += String.format("app%s,", i); -// s = getSpaceInstance(i, apps); -// tearDownSpaceList.add(s); -// } -// List spaces = spaceService.getLastAccessedSpace("mary", "app4", 0, 5); -// -// assertEquals(5, spaces.size()); -// Space got = spaces.get(0); -// assertEquals("space_4", got.getPrettyName()); -// -// // -// Space space2 = spaceService.getSpaceByPrettyName("space_2"); -// assertNotNull(space2); -// spaceService.updateSpaceAccessed("mary", space2); -// spaces = spaceService.getLastAccessedSpace("mary", "app4", 0, 5); -// assertEquals(5, spaces.size()); -// got = spaces.get(0); -// assertEquals("space_4", got.getPrettyName()); -// } -// - /** - * Gets an instance of the space. - * - * @param number - * @param apps - * @return - * @throws Exception - * @since 4.0 - */ - private Space getSpaceInstance(int number, String apps) throws Exception { - Space space = new Space(); - space.setDisplayName("space " + number); - space.setPrettyName(space.getDisplayName()); - space.setRegistration(Space.OPEN); - space.setDescription("add new space " + number); - space.setType(DefaultSpaceApplicationHandler.NAME); - space.setVisibility(Space.PUBLIC); - space.setRegistration(Space.VALIDATION); - space.setPriority(Space.INTERMEDIATE_PRIORITY); - space.setGroupId("/space/space" + number); - space.setApp(apps); - String[] managers = new String[] {"john", "mary"}; - String[] members = new String[] {"john", "mary","demo"}; - space.setManagers(managers); - space.setMembers(members); - space.setUrl(space.getPrettyName()); - this.spaceService.createSpace(space); - return space; - } -} diff --git a/component/core/src/test/java/org/exoplatform/social/core/feature/WhatsHotTest.java b/component/core/src/test/java/org/exoplatform/social/core/feature/WhatsHotTest.java deleted file mode 100644 index d5ab17ac768..00000000000 --- a/component/core/src/test/java/org/exoplatform/social/core/feature/WhatsHotTest.java +++ /dev/null @@ -1,372 +0,0 @@ -/* - * Copyright (C) 2003-2012 eXo Platform SAS. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -package org.exoplatform.social.core.feature; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.exoplatform.social.core.activity.model.ExoSocialActivity; -import org.exoplatform.social.core.activity.model.ExoSocialActivityImpl; -import org.exoplatform.social.core.application.RelationshipPublisher; -import org.exoplatform.social.core.identity.model.Identity; -import org.exoplatform.social.core.manager.RelationshipManager; -import org.exoplatform.social.core.manager.RelationshipManagerImpl; -import org.exoplatform.social.core.relationship.model.Relationship; -import org.exoplatform.social.core.storage.api.ActivityStorage; -import org.exoplatform.social.core.storage.api.IdentityStorage; -import org.exoplatform.social.core.test.AbstractCoreTest; - -public class WhatsHotTest extends AbstractCoreTest { - private IdentityStorage identityStorage; - private ActivityStorage activityStorage; - private RelationshipManagerImpl relationshipManager; - private RelationshipPublisher publisher; - - private List tearDownActivityList; - private List tearDownRelationshipList; - - private Identity rootIdentity; - private Identity johnIdentity; - private Identity maryIdentity; - private Identity demoIdentity; - - @Override - protected void setUp() throws Exception { - super.setUp(); - - identityStorage = (IdentityStorage) getContainer().getComponentInstanceOfType(IdentityStorage.class); - activityStorage = (ActivityStorage) getContainer().getComponentInstanceOfType(ActivityStorage.class); - relationshipManager = (RelationshipManagerImpl) getContainer().getComponentInstanceOfType(RelationshipManager.class); - - - assertNotNull(identityStorage); - assertNotNull(activityStorage); - assertNotNull(relationshipManager); - - - - - rootIdentity = new Identity("organization", "root"); - johnIdentity = new Identity("organization", "john"); - maryIdentity = new Identity("organization", "mary"); - demoIdentity = new Identity("organization", "demo"); - - identityStorage.saveIdentity(rootIdentity); - identityStorage.saveIdentity(johnIdentity); - identityStorage.saveIdentity(maryIdentity); - identityStorage.saveIdentity(demoIdentity); - - assertNotNull(rootIdentity.getId()); - assertNotNull(johnIdentity.getId()); - assertNotNull(maryIdentity.getId()); - assertNotNull(demoIdentity.getId()); - - tearDownActivityList = new ArrayList(); - tearDownRelationshipList = new ArrayList(); - } - - @Override - protected void tearDown() throws Exception { - - for (ExoSocialActivity activity : tearDownActivityList) { - activityStorage.deleteActivity(activity.getId()); - } - - for (Relationship relationship : tearDownRelationshipList) { - relationshipManager.delete(relationship); - } - - identityStorage.deleteIdentity(rootIdentity); - identityStorage.deleteIdentity(johnIdentity); - identityStorage.deleteIdentity(maryIdentity); - identityStorage.deleteIdentity(demoIdentity); - - super.tearDown(); - } -//FIXME JCR to RDBMS Migration BUG -// public void testUserActivityTab() throws Exception { -// // fill 10 activities -// for (int i = 0; i < 10; ++i) { -// ExoSocialActivity activity = new ExoSocialActivityImpl(); -// activity.setTitle("title " + i); -// activityStorage.saveActivity(rootIdentity, activity); -// -// } -// -// // remove 5 activities -// List result = activityStorage.getUserActivities(rootIdentity); -// Iterator it = result.iterator(); -// -// for (int i = 0; i < 5; ++i) { -// activityStorage.deleteActivity(it.next().getId()); -// } -// -// // fill 10 others -// for (int i = 0; i < 10; ++i) { -// ExoSocialActivity activity = new ExoSocialActivityImpl(); -// activity.setTitle("title " + i); -// activityStorage.saveActivity(rootIdentity, activity); -// tearDownActivityList.add(activity); -// } -// -// while (it.hasNext()) { -// ExoSocialActivity activity = it.next(); -// createComment(activity, rootIdentity, 1); -// tearDownActivityList.add(activity); -// } -// -// List activityies = activityStorage.getUserActivities(rootIdentity); -// int i = 0; -// int[] values = {0, 1, 2, 3, 4, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; -// for (ExoSocialActivity activity : activityies) { -// assertEquals("title " + values[i], activity.getTitle()); -// ++i; -// } -// } -// - public void testAllActivityTab() throws Exception { - // fill 5 activities - for (int i = 0; i < 5; ++i) { - ExoSocialActivity activity = new ExoSocialActivityImpl(); - activity.setTitle("title " + i); - activityStorage.saveActivity(rootIdentity, activity); - } - - Iterator it = activityStorage.getActivityFeed(rootIdentity, 0, 5).iterator(); - - // fill 10 others - for (int i = 0; i < 10; ++i) { - ExoSocialActivity activity = new ExoSocialActivityImpl(); - activity.setTitle("title " + i); - activityStorage.saveActivity(rootIdentity, activity); - tearDownActivityList.add(activity); - } - - //creates comments - while (it.hasNext()) { - ExoSocialActivity activity = it.next(); - createComment(activity, rootIdentity, 1); - tearDownActivityList.add(activity); - } - - List activityies = activityStorage.getActivityFeed(rootIdentity, 0, 15); - int i = 0; - //int[] values = {9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 4, 3, 2, 1, 0}; - int[] values = {0, 1, 2, 3, 4, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; - for (ExoSocialActivity activity : activityies) { - assertEquals("title " + values[i], activity.getTitle()); - ++i; - } - } - - public void testMySpaceTab() throws Exception { - // fill 5 activities - for (int i = 0; i < 5; ++i) { - ExoSocialActivity activity = new ExoSocialActivityImpl(); - activity.setTitle("title " + i); - activityStorage.saveActivity(rootIdentity, activity); - - } - - //5 activities - Iterator it = activityStorage.getUserActivities(rootIdentity).iterator(); - - // fill 10 others - for (int i = 0; i < 10; ++i) { - ExoSocialActivity activity = new ExoSocialActivityImpl(); - activity.setTitle("title " + i); - activityStorage.saveActivity(rootIdentity, activity); - tearDownActivityList.add(activity); - } - - //creates comments - while (it.hasNext()) { - ExoSocialActivity activity = it.next(); - createComment(activity, rootIdentity, 1); - tearDownActivityList.add(activity); - } - - List activityies = activityStorage.getUserActivities(rootIdentity); - int i = 0; - int[] values = {0, 1, 2, 3, 4, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; - for (ExoSocialActivity activity : activityies) { - assertEquals("title " + values[i], activity.getTitle()); - ++i; - } - } - - public void testConnectionsTab() throws Exception { - publisher = (RelationshipPublisher) this.getContainer().getComponentInstanceOfType(RelationshipPublisher.class); - assertNotNull(publisher); - relationshipManager.addListenerPlugin(publisher); - connectIdentities(demoIdentity, johnIdentity, true); - - List list = activityStorage.getActivitiesOfConnections(demoIdentity, 0, 2); - - assertEquals(1, list.size()); - ExoSocialActivity firstActivity = list.get(0); - - // - list = activityStorage.getActivitiesOfConnections(demoIdentity, 0, 2); - assertEquals(1, list.size()); - - assertEquals(firstActivity.getTitle(), list.get(0).getTitle()); - - tearDownActivityList.add(firstActivity); - relationshipManager.unregisterListener(publisher); - } -//FIXME JCR to RDBMS Migration BUG -// public void testViewerOwnerActivities() throws Exception { -// publisher = (RelationshipPublisher) this.getContainer().getComponentInstanceOfType(RelationshipPublisher.class); -// assertNotNull(publisher); -// relationshipManager.addListenerPlugin(publisher); -// connectIdentities(demoIdentity, johnIdentity, true); -// -// List list = activityStorage.getActivities(demoIdentity, johnIdentity, 0, 2); -// -// //only show demo's activity when John is viewer -// assertEquals(1, list.size()); -// -// tearDownActivityList.addAll(list); -// relationshipManager.unregisterListener(publisher); -// } -// -//FIXME JCR to RDBMS Migration BUG -// public void testViewerOwnerActivitiesSpecialCase() throws Exception { -// publisher = (RelationshipPublisher) this.getContainer().getComponentInstanceOfType(RelationshipPublisher.class); -// assertNotNull(publisher); -// relationshipManager.addListenerPlugin(publisher); -// connectIdentities(demoIdentity, johnIdentity, true); -// -// List list = activityStorage.getActivities(demoIdentity, johnIdentity, 0, 10); -// -// //only show demo's activity when John is viewer -// assertEquals(1, list.size()); -// -// tearDownActivityList.addAll(list); -// relationshipManager.unregisterListener(publisher); -// } -//FIXME JCR to RDBMS Migration BUG -// public void testViewerOwnerMentionerActivities() throws Exception { -// publisher = (RelationshipPublisher) this.getContainer().getComponentInstanceOfType(RelationshipPublisher.class); -// assertNotNull(publisher); -// relationshipManager.addListenerPlugin(publisher); -// connectIdentities(demoIdentity, johnIdentity, true); -// -// // -// ExoSocialActivity activity = new ExoSocialActivityImpl(); -// activity.setTitle("title @demo hi"); -// activityStorage.saveActivity(rootIdentity, activity); -// -// List list = activityStorage.getActivities(demoIdentity, johnIdentity, 0, 10); -// -// //only show demo's activity when John is viewer -// assertEquals(1, list.size()); -// -// tearDownActivityList.addAll(list); -// relationshipManager.unregisterListener(publisher); -// } -// FIXME JCR to RDBMS Migration BUG -// public void testViewerOwnerPosterActivities() throws Exception { -// -// // -// ExoSocialActivity activity1 = new ExoSocialActivityImpl(); -// activity1.setTitle("title @demo hi"); -// activityStorage.saveActivity(rootIdentity, activity1); -// -// //owner poster comment -// ExoSocialActivity activity2 = new ExoSocialActivityImpl(); -// activity2.setTitle("john title"); -// activityStorage.saveActivity(rootIdentity, activity2); -// -// createComment(activity2, demoIdentity, 2); -// -// List list = activityStorage.getActivities(demoIdentity, johnIdentity, 0, 10); -// -// //only show activity (not comment) posted by demo -// assertEquals(0, list.size()); -// -// //john view root'as --> only show activity (not comment) posted by root -// list = activityStorage.getActivities(rootIdentity, johnIdentity, 0, 10); -// assertEquals(2, list.size()); -// -// tearDownActivityList.addAll(list); -// } -// - -//FIXME JCR to RDBMS Migration BUG -// public void testViewerOwnerAllCases() throws Exception { -// publisher = (RelationshipPublisher) this.getContainer().getComponentInstanceOfType(RelationshipPublisher.class); -// assertNotNull(publisher); -// relationshipManager.addListenerPlugin(publisher); -// connectIdentities(demoIdentity, johnIdentity, true); -// -// // -// ExoSocialActivity activity1 = new ExoSocialActivityImpl(); -// activity1.setTitle("title @demo hi"); -// activityStorage.saveActivity(rootIdentity, activity1); -// -// // -// ExoSocialActivity activity2 = new ExoSocialActivityImpl(); -// activity2.setTitle("john title"); -// activityStorage.saveActivity(rootIdentity, activity2); -// -// //owner poster comment -// createComment(activity2, demoIdentity, 2); -// -// List list = activityStorage.getActivities(demoIdentity, johnIdentity, 0, 10); -// //only show demo's activity when John is viewer -// assertEquals(1, list.size()); -// -// tearDownActivityList.addAll(list); -// relationshipManager.unregisterListener(publisher); -// } - - /** - * Creates a comment to an existing activity. - * - * @param existingActivity the existing activity - * @param posterIdentity the identity who comments - * @param number the number of comments - */ - private void createComment(ExoSocialActivity existingActivity, Identity posterIdentity, int number) { - for (int i = 0; i < number; i++) { - ExoSocialActivity comment = new ExoSocialActivityImpl(); - comment.setTitle("comment " + i); - comment.setUserId(posterIdentity.getId()); - activityStorage.saveComment(existingActivity, comment); - } - } - - /** - * Connects 2 identities, if toConfirm = true, they're connected. If false, in pending connection type. - * - * @param senderIdentity the identity who sends connection request - * @param receiverIdentity the identity who receives connection request - * @param beConfirmed boolean value - */ - private void connectIdentities(Identity senderIdentity, Identity receiverIdentity, boolean beConfirmed) { - relationshipManager.inviteToConnect(senderIdentity, receiverIdentity); - if (beConfirmed) { - relationshipManager.confirm(receiverIdentity, senderIdentity); - } - - tearDownRelationshipList.add(relationshipManager.get(senderIdentity, receiverIdentity)); - } - -} diff --git a/component/core/src/test/java/org/exoplatform/social/core/identity/IdentityResultTest.java b/component/core/src/test/java/org/exoplatform/social/core/identity/IdentityResultTest.java index 84ed5bb6570..da0231e2cb5 100644 --- a/component/core/src/test/java/org/exoplatform/social/core/identity/IdentityResultTest.java +++ b/component/core/src/test/java/org/exoplatform/social/core/identity/IdentityResultTest.java @@ -20,10 +20,10 @@ import java.util.Iterator; import java.util.List; -import junit.framework.TestCase; - import org.exoplatform.social.core.identity.model.Identity; +import junit.framework.TestCase; + public class IdentityResultTest extends TestCase { Identity demoIdentity = null; diff --git a/component/core/src/test/java/org/exoplatform/social/core/identity/UserSearchServiceTest.java b/component/core/src/test/java/org/exoplatform/social/core/identity/UserSearchServiceTest.java index 6f1dcf64120..0f728e349fc 100644 --- a/component/core/src/test/java/org/exoplatform/social/core/identity/UserSearchServiceTest.java +++ b/component/core/src/test/java/org/exoplatform/social/core/identity/UserSearchServiceTest.java @@ -1,10 +1,10 @@ package org.exoplatform.social.core.identity; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.anyBoolean; -import static org.mockito.Matchers.anyLong; -import static org.mockito.Matchers.anyString; -import static org.mockito.Matchers.eq; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyBoolean; +import static org.mockito.ArgumentMatchers.anyLong; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.atLeast; import static org.mockito.Mockito.atMost; import static org.mockito.Mockito.mock; diff --git a/component/core/src/test/java/org/exoplatform/social/core/identity/provider/FakeIdentityProvider.java b/component/core/src/test/java/org/exoplatform/social/core/identity/provider/FakeIdentityProvider.java deleted file mode 100644 index 9b13dd6d30b..00000000000 --- a/component/core/src/test/java/org/exoplatform/social/core/identity/provider/FakeIdentityProvider.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2003-2010 eXo Platform SAS. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License - * as published by the Free Software Foundation; either version 3 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see. - */ -package org.exoplatform.social.core.identity.provider; - -import java.util.HashMap; -import java.util.Map; - -import org.exoplatform.social.core.identity.IdentityProvider; -import org.exoplatform.social.core.identity.model.Identity; -import org.exoplatform.social.core.identity.model.Profile; - -public class FakeIdentityProvider extends IdentityProvider { - - /** The Constant NAME. */ - public final static String NAME = "apps"; - - - private static Map appsByUrl = new HashMap(); - - @Override - public Application findByRemoteId(String remoteId) { - return appsByUrl.get(remoteId); - } - - @Override - public String getName() { - return NAME; - } - - @Override - public Identity createIdentity(Application app) { - Identity identity = new Identity(NAME, app.getId()); - return identity; - } - - - public void addApplication(Application app) { - appsByUrl.put(app.getId(), app); - } - - @Override - public void populateProfile(Profile profile, Application app) { - profile.setProperty(Profile.USERNAME, app.getName()); - profile.setProperty(Profile.FIRST_NAME, app.getName()); - profile.setAvatarUrl(app.getIcon()); - profile.setUrl(app.getUrl()); - } - -} diff --git a/component/core/src/test/java/org/exoplatform/social/core/identity/provider/OrganizationIdentityProviderTest.java b/component/core/src/test/java/org/exoplatform/social/core/identity/provider/OrganizationIdentityProviderTest.java index 889293cbec0..6dab89ce4af 100644 --- a/component/core/src/test/java/org/exoplatform/social/core/identity/provider/OrganizationIdentityProviderTest.java +++ b/component/core/src/test/java/org/exoplatform/social/core/identity/provider/OrganizationIdentityProviderTest.java @@ -1,11 +1,12 @@ package org.exoplatform.social.core.identity.provider; -import org.exoplatform.container.component.ComponentRequestLifecycle; -import org.exoplatform.services.organization.*; -import org.exoplatform.services.organization.idm.UserImpl; -import org.exoplatform.services.organization.impl.UserProfileImpl; -import org.exoplatform.social.core.identity.model.Identity; -import org.exoplatform.social.core.identity.model.Profile; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.mockito.Mockito.lenient; + +import java.util.Arrays; + import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; @@ -13,10 +14,16 @@ import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; -import java.util.Arrays; - -import static org.junit.Assert.*; -import static org.mockito.Mockito.lenient; +import org.exoplatform.container.component.ComponentRequestLifecycle; +import org.exoplatform.services.organization.OrganizationService; +import org.exoplatform.services.organization.UserHandler; +import org.exoplatform.services.organization.UserProfile; +import org.exoplatform.services.organization.UserProfileHandler; +import org.exoplatform.services.organization.UserStatus; +import org.exoplatform.services.organization.idm.UserImpl; +import org.exoplatform.services.organization.impl.UserProfileImpl; +import org.exoplatform.social.core.identity.model.Identity; +import org.exoplatform.social.core.identity.model.Profile; @RunWith(MockitoJUnitRunner.class) public class OrganizationIdentityProviderTest { diff --git a/component/core/src/test/java/org/exoplatform/social/core/image/ImageUtilsTest.java b/component/core/src/test/java/org/exoplatform/social/core/image/ImageUtilsTest.java index fbe7c048f1a..9f1b2c642e3 100644 --- a/component/core/src/test/java/org/exoplatform/social/core/image/ImageUtilsTest.java +++ b/component/core/src/test/java/org/exoplatform/social/core/image/ImageUtilsTest.java @@ -17,15 +17,17 @@ package org.exoplatform.social.core.image; -import junit.framework.TestCase; -import org.exoplatform.social.core.model.AvatarAttachment; - -import javax.imageio.ImageIO; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; +import javax.imageio.ImageIO; + +import org.exoplatform.social.core.model.AvatarAttachment; + +import junit.framework.TestCase; + public class ImageUtilsTest extends TestCase { public void testBuildFileName() { diff --git a/component/core/src/test/java/org/exoplatform/social/core/jpa/mock/DummyDependantComponent.java b/component/core/src/test/java/org/exoplatform/social/core/jpa/mock/DummyDependantComponent.java index f9cd122b85a..eac417b0428 100644 --- a/component/core/src/test/java/org/exoplatform/social/core/jpa/mock/DummyDependantComponent.java +++ b/component/core/src/test/java/org/exoplatform/social/core/jpa/mock/DummyDependantComponent.java @@ -20,9 +20,10 @@ */ package org.exoplatform.social.core.jpa.mock; -import org.exoplatform.services.naming.InitialContextInitializer; import org.picocontainer.Startable; +import org.exoplatform.services.naming.InitialContextInitializer; + /** * Dummy Startable component to make sure the datasource is bound before others components use it. */ diff --git a/component/core/src/test/java/org/exoplatform/social/core/jpa/search/ComplementaryFilterSearchConnectorTest.java b/component/core/src/test/java/org/exoplatform/social/core/jpa/search/ComplementaryFilterSearchConnectorTest.java index 98389e76770..2f295650671 100644 --- a/component/core/src/test/java/org/exoplatform/social/core/jpa/search/ComplementaryFilterSearchConnectorTest.java +++ b/component/core/src/test/java/org/exoplatform/social/core/jpa/search/ComplementaryFilterSearchConnectorTest.java @@ -1,26 +1,21 @@ package org.exoplatform.social.core.jpa.search; -import org.apache.commons.lang3.tuple.Pair; -import org.exoplatform.commons.search.es.client.ElasticSearchingClient; -import org.exoplatform.component.test.AbstractGateInTest; -import org.exoplatform.social.core.identity.model.Identity; -import org.exoplatform.social.core.identity.model.Profile; -import org.exoplatform.social.core.manager.IdentityManager; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Mockito.when; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.Mockito.when; +import org.exoplatform.commons.search.es.client.ElasticSearchingClient; @RunWith(MockitoJUnitRunner.class) public class ComplementaryFilterSearchConnectorTest { diff --git a/component/core/src/test/java/org/exoplatform/social/core/jpa/search/ProfileIndexingServiceConnectorTest.java b/component/core/src/test/java/org/exoplatform/social/core/jpa/search/ProfileIndexingServiceConnectorTest.java index 4356e143fbc..222d6d04119 100644 --- a/component/core/src/test/java/org/exoplatform/social/core/jpa/search/ProfileIndexingServiceConnectorTest.java +++ b/component/core/src/test/java/org/exoplatform/social/core/jpa/search/ProfileIndexingServiceConnectorTest.java @@ -1,5 +1,11 @@ package org.exoplatform.social.core.jpa.search; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; + import org.exoplatform.commons.search.domain.Document; import org.exoplatform.container.xml.InitParams; import org.exoplatform.container.xml.PropertiesParam; @@ -12,13 +18,6 @@ import org.exoplatform.social.core.manager.IdentityManagerImpl; import org.exoplatform.social.core.profileproperty.ProfilePropertyService; import org.exoplatform.social.core.test.AbstractCoreTest; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; - -import static org.junit.Assert.assertEquals; @RunWith(MockitoJUnitRunner.class) public class ProfileIndexingServiceConnectorTest extends AbstractCoreTest { diff --git a/component/core/src/test/java/org/exoplatform/social/core/jpa/search/ProfileSearchConnectorTest.java b/component/core/src/test/java/org/exoplatform/social/core/jpa/search/ProfileSearchConnectorTest.java index e3ff4138721..949d867a015 100644 --- a/component/core/src/test/java/org/exoplatform/social/core/jpa/search/ProfileSearchConnectorTest.java +++ b/component/core/src/test/java/org/exoplatform/social/core/jpa/search/ProfileSearchConnectorTest.java @@ -1,4 +1,25 @@ package org.exoplatform.social.core.jpa.search; +import static org.mockito.Mockito.lenient; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.mockStatic; +import static org.mockito.Mockito.when; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.MockedStatic; +import org.mockito.Mockito; +import org.mockito.junit.MockitoJUnitRunner; + import org.exoplatform.commons.search.es.client.ElasticSearchingClient; import org.exoplatform.commons.utils.CommonsUtils; import org.exoplatform.container.xml.InitParams; @@ -10,20 +31,6 @@ import org.exoplatform.social.core.profileproperty.model.ProfilePropertySetting; import org.exoplatform.social.core.relationship.model.Relationship; import org.exoplatform.social.core.search.Sorting; -import org.junit.Assert; -import org.junit.Test; - -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.mockito.MockedStatic; -import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.*; - -import static org.mockito.Mockito.*; @RunWith(MockitoJUnitRunner.class) public class ProfileSearchConnectorTest { diff --git a/component/core/src/test/java/org/exoplatform/social/core/jpa/storage/ActivityManagerRDBMSTest.java b/component/core/src/test/java/org/exoplatform/social/core/jpa/storage/ActivityManagerRDBMSTest.java deleted file mode 100644 index c9ee7f110ab..00000000000 --- a/component/core/src/test/java/org/exoplatform/social/core/jpa/storage/ActivityManagerRDBMSTest.java +++ /dev/null @@ -1,1775 +0,0 @@ -/* - * Copyright (C) 2003-2010 eXo Platform SAS. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License - * as published by the Free Software Foundation; either version 3 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see. - */ -package org.exoplatform.social.core.jpa.storage; - -import java.util.*; -import java.util.concurrent.atomic.AtomicBoolean; - -import static org.mockito.Mockito.*; - -import org.apache.commons.lang3.StringUtils; -import org.exoplatform.container.ExoContainerContext; -import org.exoplatform.social.core.ActivityTypePlugin; -import org.exoplatform.social.core.activity.ActivityFilter; -import org.exoplatform.social.core.activity.ActivityStreamType; -import org.exoplatform.social.metadata.favorite.FavoriteService; -import org.exoplatform.social.metadata.favorite.model.Favorite; -import org.mockito.*; - -import org.exoplatform.commons.utils.ListAccess; -import org.exoplatform.container.xml.*; -import org.exoplatform.portal.config.UserACL; -import org.exoplatform.services.log.ExoLogger; -import org.exoplatform.services.log.Log; -import org.exoplatform.services.organization.OrganizationService; -import org.exoplatform.services.organization.User; -import org.exoplatform.services.security.MembershipEntry; -import org.exoplatform.social.common.RealtimeListAccess; -import org.exoplatform.social.core.activity.ActivitySystemTypePlugin; -import org.exoplatform.social.core.activity.model.*; -import org.exoplatform.social.core.application.SpaceActivityPublisher; -import org.exoplatform.social.core.identity.model.Identity; -import org.exoplatform.social.core.identity.provider.OrganizationIdentityProvider; -import org.exoplatform.social.core.identity.provider.SpaceIdentityProvider; -import org.exoplatform.social.core.jpa.test.AbstractCoreTest; -import org.exoplatform.social.core.manager.*; -import org.exoplatform.social.core.profile.ProfileFilter; -import org.exoplatform.social.core.relationship.model.Relationship; -import org.exoplatform.social.core.relationship.model.Relationship.Type; -import org.exoplatform.social.core.space.SpaceUtils; -import org.exoplatform.social.core.space.impl.DefaultSpaceApplicationHandler; -import org.exoplatform.social.core.space.model.Space; -import org.exoplatform.social.core.space.spi.SpaceService; -import org.exoplatform.social.core.storage.ActivityStorageException; -import org.exoplatform.social.core.storage.api.ActivityStorage; -import org.exoplatform.social.core.storage.api.IdentityStorage; -import org.exoplatform.social.core.storage.api.SpaceStorage; -import org.exoplatform.social.core.storage.cache.CachedIdentityStorage; - -/** - * Unit Test for {@link ActivityManager}, including cache tests. - * - * @author hoat_le - */ -public class ActivityManagerRDBMSTest extends AbstractCoreTest { - private static final Log LOG = ExoLogger.getLogger(ActivityManagerRDBMSTest.class); - - private Identity rootIdentity; - - private Identity johnIdentity; - - private Identity maryIdentity; - - private Identity demoIdentity; - - private Identity ghostIdentity; - - private Identity raulIdentity; - - private Identity jameIdentity; - - private Identity paulIdentity; - - private SpaceStorage spaceStorage; - - @Override - public void setUp() throws Exception { - super.setUp(); - restartTransaction(); - - spaceStorage = getService(SpaceStorage.class); - CachedIdentityStorage identityStorage = getService(CachedIdentityStorage.class); - ((RDBMSIdentityStorageImpl) identityStorage.getStorage()).setProfileSearchConnector(mockProfileSearch); - - rootIdentity = createIdentity("root"); - johnIdentity = createIdentity("john"); - maryIdentity = createIdentity("mary"); - demoIdentity = createIdentity("demo"); - ghostIdentity = createIdentity("ghost"); - raulIdentity = createIdentity("raul"); - jameIdentity = createIdentity("jame"); - paulIdentity = createIdentity("paul"); - } - - public void testActivityEditable() { - ActivityStorage storage = Mockito.mock(ActivityStorage.class); - IdentityManager identityManager = Mockito.mock(IdentityManager.class); - UserACL acl = Mockito.mock(UserACL.class); - Mockito.when(acl.getAdminGroups()).thenReturn("/platform/administrators"); - - // prepare activity - ExoSocialActivity activity = Mockito.mock(ExoSocialActivity.class); - Mockito.when(activity.isComment()).thenReturn(false); - Mockito.when(activity.getPosterId()).thenReturn("1"); - // prepare comment - ExoSocialActivity comment = Mockito.mock(ExoSocialActivity.class); - Mockito.when(comment.isComment()).thenReturn(true); - Mockito.when(comment.getType()).thenReturn(SpaceActivityPublisher.SPACE_APP_ID); - Mockito.when(comment.getPosterId()).thenReturn("1"); - // prepare viewer - org.exoplatform.services.security.Identity owner = Mockito.mock(org.exoplatform.services.security.Identity.class); - Mockito.when(owner.getUserId()).thenReturn("demo"); - Mockito.when(identityManager.getOrCreateUserIdentity("demo")) - .thenReturn(new Identity("1")); - org.exoplatform.services.security.Identity admin = Mockito.mock(org.exoplatform.services.security.Identity.class); - Mockito.when(admin.getUserId()).thenReturn("john"); - Mockito.when(identityManager.getOrCreateUserIdentity("john")) - .thenReturn(new Identity("2")); - Mockito.when(admin.getGroups()).thenReturn(new HashSet<>(Arrays.asList("/platform/administrators"))); - org.exoplatform.services.security.Identity mary = Mockito.mock(org.exoplatform.services.security.Identity.class); - Mockito.when(mary.getUserId()).thenReturn("mary"); - Mockito.when(identityManager.getOrCreateUserIdentity("mary")) - .thenReturn(new Identity("3")); - - // no configuration - // by default: edit activity/comment are all enabled - ActivityManager manager = new ActivityManagerImpl(storage, identityManager, spaceService, relationshipManager, acl, null); - // owner - assertTrue(manager.isActivityEditable(activity, owner)); - assertTrue(manager.isActivityEditable(comment, owner)); - // do not allow edit automatic comment - Mockito.when(comment.getType()).thenReturn("TestActivityType"); - - InitParams params = new InitParams(); - ValuesParam param = new ValuesParam(); - param.setName(ActivitySystemTypePlugin.SYSTEM_TYPES_PARAM); - param.setValues(Collections.singletonList("TestActivityType")); - params.addParameter(param); - ActivitySystemTypePlugin plugin = new ActivitySystemTypePlugin(params); - manager.addSystemActivityDefinition(plugin); - - assertFalse(manager.isActivityEditable(comment, owner)); - - // manager is not able to edit other activity - assertFalse(manager.isActivityEditable(activity, admin)); - // not manager - assertFalse(manager.isActivityEditable(activity, mary)); - - // InitParams configuration - params = Mockito.mock(InitParams.class); - Mockito.when(params.containsKey(ActivityManagerImpl.ENABLE_MANAGER_EDIT_COMMENT)).thenReturn(true); - Mockito.when(params.containsKey(ActivityManagerImpl.ENABLE_EDIT_COMMENT)).thenReturn(true); - ValueParam falseVal = new ValueParam(); - falseVal.setValue("false"); - // not enable edit comment - Mockito.when(params.getValueParam(ActivityManagerImpl.ENABLE_MANAGER_EDIT_COMMENT)).thenReturn(falseVal); - Mockito.when(params.getValueParam(ActivityManagerImpl.ENABLE_EDIT_COMMENT)).thenReturn(falseVal); - manager = new ActivityManagerImpl(storage, identityManager, spaceService, relationshipManager, acl, params); - // - Mockito.when(comment.getType()).thenReturn(SpaceActivityPublisher.SPACE_APP_ID); - assertFalse(manager.isActivityEditable(comment, admin)); - assertFalse(manager.isActivityEditable(comment, owner)); - assertTrue(manager.isActivityEditable(activity, owner)); - assertFalse(manager.isActivityEditable(activity, admin)); - - // not enable edit activity - Mockito.when(params.containsKey(ActivityManagerImpl.ENABLE_MANAGER_EDIT_ACTIVITY)).thenReturn(true); - Mockito.when(params.containsKey(ActivityManagerImpl.ENABLE_EDIT_ACTIVITY)).thenReturn(true); - Mockito.when(params.getValueParam(ActivityManagerImpl.ENABLE_MANAGER_EDIT_ACTIVITY)).thenReturn(falseVal); - Mockito.when(params.getValueParam(ActivityManagerImpl.ENABLE_EDIT_ACTIVITY)).thenReturn(falseVal); - manager = new ActivityManagerImpl(storage, identityManager, spaceService, relationshipManager, acl, params); - // - assertFalse(manager.isActivityEditable(activity, owner)); - assertFalse(manager.isActivityEditable(activity, admin)); - } - - public void testActivityViewable() { - ActivityStorage storage = Mockito.mock(ActivityStorage.class); - IdentityManager identityManager = Mockito.mock(IdentityManager.class); - RelationshipManager relationshipManager = Mockito.mock(RelationshipManager.class); - UserACL acl = Mockito.mock(UserACL.class); - Mockito.when(acl.getAdminGroups()).thenReturn("/platform/administrators"); - - // prepare activity - ExoSocialActivity activity = Mockito.mock(ExoSocialActivity.class); - Mockito.when(activity.isComment()).thenReturn(false); - Mockito.when(activity.getPosterId()).thenReturn("1"); - // prepare comment - ExoSocialActivity comment = Mockito.mock(ExoSocialActivity.class); - Mockito.when(comment.isComment()).thenReturn(true); - Mockito.when(comment.getType()).thenReturn(SpaceActivityPublisher.SPACE_APP_ID); - Mockito.when(comment.getPosterId()).thenReturn("1"); - Mockito.when(identityManager.getIdentity("1")).thenReturn(rootIdentity); - - // prepare viewer - org.exoplatform.services.security.Identity owner = Mockito.mock(org.exoplatform.services.security.Identity.class); - Mockito.when(owner.getUserId()).thenReturn("demo"); - Mockito.when(identityManager.getOrCreateUserIdentity("demo")) - .thenReturn(new Identity("1")); - org.exoplatform.services.security.Identity admin = Mockito.mock(org.exoplatform.services.security.Identity.class); - Mockito.when(admin.getUserId()).thenReturn("john"); - Mockito.when(identityManager.getOrCreateUserIdentity("john")).thenReturn(johnIdentity); - Mockito.when(admin.getGroups()).thenReturn(Collections.singleton("/platform/administrators")); - Mockito.when(admin.getMemberships()).thenReturn(Collections.singleton(new MembershipEntry("/platform/administrators"))); - Mockito.when(admin.isMemberOf(acl.getAdminGroups())).thenReturn(true); - org.exoplatform.services.security.Identity mary = Mockito.mock(org.exoplatform.services.security.Identity.class); - Mockito.when(mary.getUserId()).thenReturn("mary"); - Mockito.when(identityManager.getOrCreateUserIdentity("mary")).thenReturn(maryIdentity); - - // no configuration - // by default: edit activity/comment are all enabled - ActivityManager manager = new ActivityManagerImpl(storage, identityManager, spaceService, relationshipManager, acl, null); - // owner - assertTrue(manager.isActivityViewable(activity, owner)); - assertTrue(manager.isActivityViewable(comment, owner)); - Mockito.when(comment.getType()).thenReturn("TestActivityType"); - assertTrue(manager.isActivityViewable(comment, owner)); - assertTrue(manager.isActivityViewable(activity, admin)); - assertFalse(manager.isActivityViewable(activity, mary)); - - Mockito.when(relationshipManager.getStatus(rootIdentity, maryIdentity)).thenReturn(Type.CONFIRMED); - - assertTrue(manager.isActivityViewable(activity, mary)); - } - - public void testActivityTypePlugin() { - ActivityStorage storage = Mockito.mock(ActivityStorage.class); - IdentityManager identityManager = Mockito.mock(IdentityManager.class); - UserACL acl = Mockito.mock(UserACL.class); - Mockito.when(acl.getAdminGroups()).thenReturn("/platform/administrators"); - - String specificActivityType = "SpecificActivityType"; - - // prepare activity - ExoSocialActivity activity = Mockito.mock(ExoSocialActivity.class); - Mockito.when(activity.isComment()).thenReturn(false); - Mockito.when(activity.getType()).thenReturn(specificActivityType); - Mockito.when(activity.getPosterId()).thenReturn("1"); - Mockito.when(activity.getTitle()).thenReturn("Activity title"); - // prepare viewer - org.exoplatform.services.security.Identity owner = Mockito.mock(org.exoplatform.services.security.Identity.class); - Mockito.when(owner.getUserId()).thenReturn("demo"); - Mockito.when(identityManager.getOrCreateUserIdentity("demo")) - .thenReturn(new Identity("1")); - - // no configuration - // by default: edit activity/comment are all enabled - ActivityManager manager = new ActivityManagerImpl(storage, identityManager, spaceService, relationshipManager, acl, null); - // owner - assertTrue(manager.isActivityEditable(activity, owner)); - assertTrue(manager.isActivityViewable(activity, owner)); - assertTrue(manager.isActivityDeletable(activity, owner)); - assertEquals("Activity title", manager.getActivityTitle(activity)); - - AtomicBoolean viewwable = new AtomicBoolean(false); - AtomicBoolean editable = new AtomicBoolean(false); - AtomicBoolean deletable = new AtomicBoolean(false); - manager.addActivityTypePlugin(new ActivityTypePlugin(null) { - @Override - public String getActivityType() { - return specificActivityType; - } - - @Override - public boolean isActivityEditable(ExoSocialActivity activity, org.exoplatform.services.security.Identity userAclIdentity) { - return editable.get(); - } - - @Override - public boolean isActivityDeletable(ExoSocialActivity activity, org.exoplatform.services.security.Identity userAclIdentity) { - return deletable.get(); - } - - @Override - public boolean isActivityViewable(ExoSocialActivity activity, org.exoplatform.services.security.Identity userAclIdentity) { - return viewwable.get(); - } - - @Override - public String getActivityTitle(ExoSocialActivity activity) { - return "Activity Plugin title"; - } - }); - - assertFalse(manager.isActivityEditable(activity, owner)); - editable.set(true); - assertTrue(manager.isActivityEditable(activity, owner)); - - assertFalse(manager.isActivityViewable(activity, owner)); - viewwable.set(true); - assertTrue(manager.isActivityViewable(activity, owner)); - - assertFalse(manager.isActivityDeletable(activity, owner)); - deletable.set(true); - assertTrue(manager.isActivityDeletable(activity, owner)); - assertEquals("Activity Plugin title", manager.getActivityTitle(activity)); - } - - public void testActivityNotificationEnabling() { - ActivityStorage storage = Mockito.mock(ActivityStorage.class); - IdentityManager identityManager = Mockito.mock(IdentityManager.class); - RelationshipManager relationshipManager = Mockito.mock(RelationshipManager.class); - ActivityManager activityManager = new ActivityManagerImpl(storage, - identityManager, - spaceService, - relationshipManager, - null, - null); - String activityType = "TestActivityType"; - String activityType2 = "TestActivityType2"; - String activityType3 = "TestActivityType3"; - - addActivityTypePlugin(activityManager, activityType, false); - addActivityTypePlugin(activityManager, activityType2, true); - - assertFalse(activityManager.isNotificationEnabled(null)); - assertFalse(activityManager.isNotificationEnabled(null, null)); - - ExoSocialActivity activity = mock(ExoSocialActivity.class); - assertTrue(activityManager.isNotificationEnabled(activity)); - assertTrue(activityManager.isNotificationEnabled(activity, null)); - when(activity.getType()).thenReturn(activityType); - assertFalse(activityManager.isNotificationEnabled(activity, null)); - when(activity.getType()).thenReturn(activityType2); - assertTrue(activityManager.isNotificationEnabled(activity, null)); - assertFalse(activityManager.isNotificationEnabled(activity, "root3")); - assertTrue(activityManager.isNotificationEnabled(activity, "root2")); - when(activity.getType()).thenReturn(activityType3); - assertTrue(activityManager.isNotificationEnabled(activity, null)); - when(activity.isHidden()).thenReturn(true); - assertFalse(activityManager.isNotificationEnabled(activity, null)); - } - - public void testActivityDeletable() { - ActivityStorage storage = Mockito.mock(ActivityStorage.class); - IdentityManager identityManager = Mockito.mock(IdentityManager.class); - SpaceService spaceService = Mockito.mock(SpaceService.class); - UserACL acl = Mockito.mock(UserACL.class); - - // no configuration - // by default: edit activity/comment are all enabled - ActivityManagerImpl activityManager = new ActivityManagerImpl(storage, identityManager, spaceService, relationshipManager, acl, null); - Mockito.when(acl.getAdminGroups()).thenReturn("/platform/administrators"); - - Mockito.when(spaceService.isSuperManager(Mockito.eq("john"))).thenReturn(true); - Mockito.when(spaceService.isSuperManager(Mockito.eq("mary"))).thenReturn(false); - Mockito.when(spaceService.isSuperManager(Mockito.eq("james"))).thenReturn(false); - - // prepare activity - ExoSocialActivity activity = Mockito.mock(ExoSocialActivity.class); - Mockito.when(activity.isComment()).thenReturn(false); - Mockito.when(activity.getPosterId()).thenReturn("1"); - ActivityStreamImpl activityStream = new ActivityStreamImpl(); - activityStream.setType(ActivityStream.Type.USER); - activityStream.setPrettyId("demo"); - Mockito.when(activity.getActivityStream()).thenReturn(activityStream); - - // prepare comment - ExoSocialActivity comment = Mockito.mock(ExoSocialActivity.class); - Mockito.when(comment.isComment()).thenReturn(true); - Mockito.when(comment.getType()).thenReturn(SpaceActivityPublisher.SPACE_APP_ID); - Mockito.when(comment.getPosterId()).thenReturn("1"); - - // prepare viewer - org.exoplatform.services.security.Identity owner = Mockito.mock(org.exoplatform.services.security.Identity.class); - Mockito.when(owner.getUserId()).thenReturn("demo"); - Mockito.when(identityManager.getOrCreateUserIdentity("demo")) - .thenReturn(new Identity("1")); - org.exoplatform.services.security.Identity admin = Mockito.mock(org.exoplatform.services.security.Identity.class); - Mockito.when(admin.getUserId()).thenReturn("john"); - Mockito.when(identityManager.getOrCreateUserIdentity("john")) - .thenReturn(new Identity("2")); - Mockito.when(admin.getGroups()).thenReturn(new HashSet<>(Arrays.asList("/platform/administrators"))); - org.exoplatform.services.security.Identity mary = Mockito.mock(org.exoplatform.services.security.Identity.class); - Mockito.when(mary.getUserId()).thenReturn("mary"); - Mockito.when(identityManager.getOrCreateUserIdentity("mary")) - .thenReturn(new Identity("3")); - org.exoplatform.services.security.Identity james = Mockito.mock(org.exoplatform.services.security.Identity.class); - Mockito.when(james.getUserId()).thenReturn("james"); - Mockito.when(identityManager.getOrCreateUserIdentity("james")) - .thenReturn(new Identity("4")); - - // owner - assertTrue(activityManager.isActivityDeletable(activity, owner)); - assertTrue(activityManager.isActivityDeletable(comment, owner)); - - // manager is able to delete other user's activity - assertTrue(activityManager.isActivityDeletable(activity, admin)); - - // member is not able to delete other user's activity - assertFalse(activityManager.isActivityDeletable(activity, mary)); - assertFalse(activityManager.isActivityDeletable(comment, mary)); - - // Test on space activity - activityStream.setType(ActivityStream.Type.SPACE); - activityStream.setPrettyId("demo_space"); - - Space space = new Space(); - Mockito.when(spaceService.getSpaceByPrettyName("demo_space")).thenReturn(space); - - Mockito.when(spaceService.canManageSpace(space, "john")).thenReturn(true); - Mockito.when(spaceService.canManageSpace(space, "mary")).thenReturn(true); - Mockito.when(spaceService.canManageSpace(space, "james")).thenReturn(false); - - assertTrue(activityManager.isActivityDeletable(activity, owner)); - assertTrue(activityManager.isActivityDeletable(activity, mary)); - assertTrue(activityManager.isActivityDeletable(activity, admin)); - assertFalse(activityManager.isActivityDeletable(activity, james)); - - Map templateParams = new HashMap<>(); - when(activity.getTemplateParams()).thenReturn(templateParams); - templateParams.put(ActivityManagerImpl.REMOVABLE, "false"); - assertFalse(activityManager.isActivityDeletable(activity, owner)); - assertTrue(activityManager.isActivityDeletable(activity, admin)); - assertTrue(activityManager.isActivityDeletable(activity, mary)); - assertFalse(activityManager.isActivityDeletable(activity, james)); - - templateParams.put(ActivityManagerImpl.REMOVABLE, "true"); - assertTrue(activityManager.isActivityDeletable(activity, owner)); - assertTrue(activityManager.isActivityDeletable(activity, admin)); - assertTrue(activityManager.isActivityDeletable(activity, mary)); - assertFalse(activityManager.isActivityDeletable(activity, james)); - } - - /** - * Test - * {@link ActivityManager#saveActivityNoReturn(Identity, ExoSocialActivity)} - * - * @throws Exception - * @since 1.2.0-Beta3 - */ - public void testSaveActivityNoReturn() throws Exception { - String activityTitle = "activity title"; - String userId = johnIdentity.getId(); - ExoSocialActivity activity = new ExoSocialActivityImpl(); - // test for reserving order of map values for i18n activity - Map templateParams = new LinkedHashMap(); - templateParams.put("key1", "value 1"); - templateParams.put("key2", "value 2"); - templateParams.put("key3", "value 3"); - activity.setTemplateParams(templateParams); - activity.setTitle(activityTitle); - activity.setUserId(userId); - - // - activity.isHidden(false); - activity.isLocked(true); - activityManager.saveActivityNoReturn(johnIdentity, activity); - - activity = activityManager.getActivity(activity.getId()); - assertNotNull("activity must not be null", activity); - assertEquals("activity.getTitle() must return: " + activityTitle, activityTitle, activity.getTitle()); - assertEquals("activity.getUserId() must return: " + userId, userId, activity.getUserId()); - Map gotTemplateParams = activity.getTemplateParams(); - assertEquals("value 1", gotTemplateParams.get("key1")); - assertEquals("value 2", gotTemplateParams.get("key2")); - assertEquals("value 3", gotTemplateParams.get("key3")); - - // - assertTrue(activity.isLocked()); - assertFalse(activity.isHidden()); - } - - /** - * Test {@link ActivityManager#saveActivity(ExoSocialActivity)} - * - * @throws Exception - * @since 1.2.0-Beta3 - */ - public void testSaveActivityNoReturnNotStreamOwner() throws Exception { - String activityTitle = "activity title"; - String userId = johnIdentity.getId(); - ExoSocialActivity activity = new ExoSocialActivityImpl(); - activity.setTitle(activityTitle); - activity.setUserId(userId); - activityManager.saveActivityNoReturn(activity); - - activity = activityManager.getActivity(activity.getId()); - assertNotNull("activity must not be null", activity); - assertEquals("activity.getTitle() must return: " + activityTitle, activityTitle, activity.getTitle()); - assertEquals("activity.getUserId() must return: " + userId, userId, activity.getUserId()); - } - - /** - * Tests {@link ActivityManager#getParentActivity(ExoSocialActivity)}. - */ - public void testGetParentActivity() { - populateActivityMass(demoIdentity, 1); - ExoSocialActivity demoActivity = activityManager.getActivitiesWithListAccess(demoIdentity).load(0, 1)[0]; - assertNotNull("demoActivity must be false", demoActivity); - assertNull(activityManager.getParentActivity(demoActivity)); - - // comment - ExoSocialActivityImpl comment = new ExoSocialActivityImpl(); - comment.setTitle("comment"); - comment.setUserId(demoIdentity.getId()); - activityManager.saveComment(demoActivity, comment); - ExoSocialActivity gotComment = activityManager.getCommentsWithListAccess(demoActivity).load(0, 1)[0]; - assertNotNull("gotComment must not be null", gotComment); - // - ExoSocialActivity parentActivity = activityManager.getParentActivity(gotComment); - assertNotNull(parentActivity); - assertEquals("parentActivity.getId() must return: " + demoActivity.getId(), - demoActivity.getId(), - parentActivity.getId()); - assertEquals("parentActivity.getTitle() must return: " + demoActivity.getTitle(), - demoActivity.getTitle(), - parentActivity.getTitle()); - assertEquals("parentActivity.getUserId() must return: " + demoActivity.getUserId(), - demoActivity.getUserId(), - parentActivity.getUserId()); - } - - public void testGetActivitiiesByUser() throws ActivityStorageException { - String activityTitle = "title"; - String userId = rootIdentity.getId(); - ExoSocialActivity activity = new ExoSocialActivityImpl(); - activity.setTitle(activityTitle); - activity.setUserId(userId); - activityManager.saveActivityNoReturn(rootIdentity, activity); - // - activity = activityManager.getActivity(String.valueOf(activity.getId())); - - assertNotNull(activity); - assertEquals(activityTitle, activity.getTitle()); - assertEquals(userId, activity.getUserId()); - - RealtimeListAccess activities = activityManager.getActivitiesWithListAccess(rootIdentity); - - assertEquals(1, activities.load(0, 10).length); - LOG.info("Create 100 activities..."); - // - for (int i = 0; i < 100; i++) { - activity = new ExoSocialActivityImpl(); - activity.setTitle(activityTitle + " " + i); - activity.setUserId(userId); - // - activityManager.saveActivityNoReturn(rootIdentity, activity); - } - activities = activityManager.getActivitiesWithListAccess(rootIdentity); - // - LOG.info("Loadding 20 activities..."); - assertEquals(20, activities.load(0, 20).length); - // - List exoActivities = Arrays.asList(activities.load(0, activities.getSize())); - LOG.info("Loadding 101 activities..."); - assertEquals(101, exoActivities.size()); - } - - /** - * Test {@link ActivityManager#updateActivity(ExoSocialActivity)} - * - * @throws Exception - * @since 1.2.0-Beta3 - */ - public void testUpdateActivity() throws Exception { - String activityTitle = "activity title"; - String userId = johnIdentity.getId(); - ExoSocialActivity activity = new ExoSocialActivityImpl(); - activity.setTitle(activityTitle); - activity.setUserId(userId); - activityManager.saveActivityNoReturn(johnIdentity, activity); - - activity = activityManager.getActivity(activity.getId()); - assertNotNull("activity must not be null", activity); - assertEquals("activity.getTitle() must return: " + activityTitle, activityTitle, activity.getTitle()); - assertEquals("activity.getUserId() must return: " + userId, userId, activity.getUserId()); - - String newTitle = "new activity title"; - activity.setTitle(newTitle); - activityManager.updateActivity(activity); - - activity = activityManager.getActivity(activity.getId()); - assertNotNull("activity must not be null", activity); - assertEquals("activity.getTitle() must return: " + newTitle, newTitle, activity.getTitle()); - assertEquals("activity.getUserId() must return: " + userId, userId, activity.getUserId()); - } - - /** - * Unit Test for: - *

- * {@link ActivityManager#deleteActivity(org.exoplatform.social.core.activity.model.ExoSocialActivity)} - * - * @throws Exception - */ - public void testDeleteActivity() throws Exception { - String activityTitle = "activity title"; - String userId = johnIdentity.getId(); - ExoSocialActivity activity = new ExoSocialActivityImpl(); - activity.setTitle(activityTitle); - activity.setUserId(userId); - activityManager.saveActivityNoReturn(johnIdentity, activity); - - activity = activityManager.getActivity(activity.getId()); - - assertNotNull("activity must not be null", activity); - assertEquals("activity.getTitle() must return: " + activityTitle, activityTitle, activity.getTitle()); - assertEquals("activity.getUserId() must return: " + userId, userId, activity.getUserId()); - - activityManager.deleteActivity(activity); - } - - public void testIsActivityExists() throws Exception { - String activityTitle = "activity title"; - String userId = johnIdentity.getId(); - ExoSocialActivity activity = new ExoSocialActivityImpl(); - activity.setTitle(activityTitle); - activity.setUserId(userId); - activityManager.saveActivityNoReturn(johnIdentity, activity); - - assertTrue(activityManager.isActivityExists(activity.getId())); - - activity = activityManager.getActivity(activity.getId()); - activityManager.deleteActivity(activity); - - assertFalse(activityManager.isActivityExists(activity.getId())); - } - - /** - * Test {@link ActivityManager#deleteActivity(String)} - * - * @throws Exception - * @since 1.2.0-Beta3 - */ - public void testDeleteActivityWithId() throws Exception { - String activityTitle = "activity title"; - String userId = johnIdentity.getId(); - ExoSocialActivity activity = new ExoSocialActivityImpl(); - activity.setTitle(activityTitle); - activity.setUserId(userId); - activityManager.saveActivityNoReturn(johnIdentity, activity); - - activity = activityManager.getActivity(activity.getId()); - - assertNotNull("activity must not be null", activity); - assertEquals("activity.getTitle() must return: " + activityTitle, activityTitle, activity.getTitle()); - assertEquals("activity.getUserId() must return: " + userId, userId, activity.getUserId()); - - activityManager.deleteActivity(activity.getId()); - } - - /** - * Test - * {@link ActivityManager#saveComment(ExoSocialActivity, ExoSocialActivity)} - * - * @throws Exception - * @since 1.2.0-Beta3 - */ - public void testSaveSubComment() throws Exception { - String activityTitle = "activity title"; - String userId = johnIdentity.getId(); - ExoSocialActivity activity = new ExoSocialActivityImpl(); - activity.setTitle(activityTitle); - activity.setUserId(userId); - activityManager.saveActivityNoReturn(johnIdentity, activity); - - String commentTitle = "Comment title"; - - // demo comments on john's activity - ExoSocialActivity comment = new ExoSocialActivityImpl(); - comment.setTitle(commentTitle); - comment.setUserId(demoIdentity.getId()); - activityManager.saveComment(activity, comment); - assertEquals(activity.getId(), comment.getParentId()); - - assertTrue(StringUtils.isNotBlank(comment.getId())); - - ExoSocialActivity subComment = new ExoSocialActivityImpl(); - subComment.setTitle(commentTitle); - subComment.setUserId(maryIdentity.getId()); - subComment.setParentCommentId(comment.getId()); - activityManager.saveComment(activity, subComment); - assertEquals(activity.getId(), subComment.getParentId()); - assertEquals(comment.getId(), subComment.getParentCommentId()); - assertNotNull(subComment.getId()); - - List subComments = activityManager.getSubComments(comment); - assertEquals(1, subComments.size()); - assertEquals(subComment.getId(), subComments.get(0).getId()); - - ExoSocialActivity gotParentActivity = activityManager.getParentActivity(subComment); - assertNotNull(gotParentActivity); - assertEquals(activity.getId(), gotParentActivity.getId()); - String[] replyToIds = gotParentActivity.getReplyToId(); - assertEquals(2, replyToIds.length); - for (String replyToId : replyToIds) { - assertTrue(replyToId.equals(comment.getId()) || replyToId.equals(subComment.getId())); - } - } - - /** - * Test {@link ActivityManager#getCommentsWithListAccess(ExoSocialActivity)} - * - * @throws Exception - * @since 1.2.0-Beta3 - */ - public void testGetCommentsWithListAccess() throws Exception { - ExoSocialActivity demoActivity = new ExoSocialActivityImpl(); - demoActivity.setTitle("demo activity"); - demoActivity.setUserId(demoActivity.getId()); - activityManager.saveActivityNoReturn(demoIdentity, demoActivity); - - int total = 10; - - for (int i = 0; i < total; i++) { - ExoSocialActivity maryComment = new ExoSocialActivityImpl(); - maryComment.setUserId(maryIdentity.getId()); - maryComment.setTitle("mary comment"); - activityManager.saveComment(demoActivity, maryComment); - } - - RealtimeListAccess maryComments = activityManager.getCommentsWithListAccess(demoActivity); - assertNotNull("maryComments must not be null", maryComments); - assertEquals("maryComments.getSize() must return: 10", total, maryComments.getSize()); - - } - - /** - * Test {@link ActivityManager#getCommentsWithListAccess(ExoSocialActivity)} - * - * @throws Exception - * @since 1.2.0-Beta3 - */ - public void testGetCommentsAndSubCommentsWithListAccess() throws Exception { - ExoSocialActivity demoActivity = new ExoSocialActivityImpl(); - demoActivity.setTitle("demo activity"); - demoActivity.setUserId(demoActivity.getId()); - activityManager.saveActivityNoReturn(demoIdentity, demoActivity); - - int total = 10; - int totalWithSubComments = total + total * total; - - for (int i = 0; i < total; i++) { - ExoSocialActivity maryComment = new ExoSocialActivityImpl(); - maryComment.setUserId(maryIdentity.getId()); - maryComment.setTitle("mary comment"); - activityManager.saveComment(demoActivity, maryComment); - for (int j = 0; j < total; j++) { - ExoSocialActivity johnComment = new ExoSocialActivityImpl(); - johnComment.setUserId(johnIdentity.getId()); - johnComment.setTitle("john comment" + i + j); - johnComment.setParentCommentId(maryComment.getId()); - activityManager.saveComment(demoActivity, johnComment); - } - } - - RealtimeListAccess maryComments = activityManager.getCommentsWithListAccess(demoActivity); - assertNotNull("maryComments must not be null", maryComments); - assertEquals("maryComments.getSize() must return: 10", total, maryComments.getSize()); - - RealtimeListAccess comments = activityManager.getCommentsWithListAccess(demoActivity, true); - assertNotNull("comments must not be null", comments); - assertEquals("comments.getSize() must return: 10", total, comments.getSize()); - - ExoSocialActivity[] commentsArray = comments.load(0, total); - assertEquals("commentsArray.length must return: 110", totalWithSubComments, commentsArray.length); - int index = 0; - for (int i = 0; i < total; i++) { - ExoSocialActivity maryComment = commentsArray[index++]; - assertEquals("Title of comment should be 'mary comment', iteration = " + i, "mary comment", maryComment.getTitle()); - for (int j = 0; j < total; j++) { - ExoSocialActivity johnComment = commentsArray[index++]; - assertEquals("Title of comment should be 'john comment " + i + j + "'", "john comment" + i + j, johnComment.getTitle()); - } - } - } - - /** - * Test {@link ActivityManager#getCommentsWithListAccess(ExoSocialActivity, boolean, boolean)} - * - * @throws Exception - * @since 1.2.0-Beta3 - */ - public void testGetCommentsAndSubCommentsWithListAccessDescending() throws Exception { - ExoSocialActivity demoActivity = new ExoSocialActivityImpl(); - demoActivity.setTitle("demo activity"); - demoActivity.setUserId(demoActivity.getId()); - activityManager.saveActivityNoReturn(demoIdentity, demoActivity); - - int total = 10; - int totalWithSubComments = total + total * total; - - for (int i = 0; i < total; i++) { - ExoSocialActivity maryComment = new ExoSocialActivityImpl(); - maryComment.setUserId(maryIdentity.getId()); - maryComment.setTitle("mary comment"); - activityManager.saveComment(demoActivity, maryComment); - for (int j = 0; j < total; j++) { - ExoSocialActivity johnComment = new ExoSocialActivityImpl(); - johnComment.setUserId(johnIdentity.getId()); - johnComment.setTitle("john comment" + i + j); - johnComment.setParentCommentId(maryComment.getId()); - activityManager.saveComment(demoActivity, johnComment); - } - } - - RealtimeListAccess maryComments = activityManager.getCommentsWithListAccess(demoActivity); - assertNotNull("maryComments must not be null", maryComments); - assertEquals("maryComments.getSize() must return: 10", total, maryComments.getSize()); - - RealtimeListAccess comments = activityManager.getCommentsWithListAccess(demoActivity, true, true); - assertNotNull("comments must not be null", comments); - assertEquals("comments.getSize() must return: 10", total, comments.getSize()); - - ExoSocialActivity[] commentsArray = comments.load(0, total); - assertEquals("commentsArray.length must return: 110", totalWithSubComments, commentsArray.length); - int index = 0; - for (int i = 0; i < total; i++) { - ExoSocialActivity maryComment = commentsArray[index++]; - assertEquals("Title of comment should be 'mary comment', iteration = " + (total - i - 1), "mary comment", maryComment.getTitle()); - for (int j = 0; j < total; j++) { - ExoSocialActivity johnComment = commentsArray[index++]; - assertEquals("Title of comment should be 'john comment " + (total - i - 1) + j + "'", "john comment" + (total - i - 1) + j, johnComment.getTitle()); - } - } - } - - /** - * Test {@link ActivityManager#saveLike(ExoSocialActivity, Identity)} - * - * @throws Exception - * @since 1.2.0-Beta3s - */ - public void testSaveLike() throws Exception { - ExoSocialActivity demoActivity = new ExoSocialActivityImpl(); - demoActivity.setTitle("&\"demo activity"); - demoActivity.setUserId(demoActivity.getId()); - activityManager.saveActivityNoReturn(demoIdentity, demoActivity); - - demoActivity = activityManager.getActivity(demoActivity.getId()); - assertEquals("demoActivity.getLikeIdentityIds() must return: 0", - 0, - demoActivity.getLikeIdentityIds().length); - - activityManager.saveLike(demoActivity, johnIdentity); - - demoActivity = activityManager.getActivity(demoActivity.getId()); - assertEquals("demoActivity.getLikeIdentityIds().length must return: 1", 1, demoActivity.getLikeIdentityIds().length); - assertEquals("&"demo activity", demoActivity.getTitle()); - } - - /** - * Test {@link ActivityManager#saveLike(ExoSocialActivity, Identity)} for case - * not change the template param after liked. - * - * @throws Exception - * @since 4.0.5 - */ - public void testSaveLikeNotChangeTemplateParam() throws Exception { - ExoSocialActivity demoActivity = new ExoSocialActivityImpl(); - demoActivity.setTitle("title"); - demoActivity.setUserId(demoActivity.getId()); - - Map templateParams = new HashMap(); - templateParams.put("link", "http://exoplatform.com?test= 100")); - assertEquals("The filter should keep wildcard *,? and %","% * '?", Utils.removeSpecialCharacterInSpaceFilter("( ) %{ } * [ ] \'? \"")); + assertEquals("The filter should only filter special characters only", + "script alert 'Hello' script 100", + Utils.removeSpecialCharacterInSpaceFilter(" 100")); + assertEquals("The filter should keep wildcard *,? and %", + "% * '?", + Utils.removeSpecialCharacterInSpaceFilter("( ) %{ } * [ ] \'? \"")); } - public void testIsInstalledApp() { - Space space = new Space(); - String apps = "ForumPortlet:Forums:true:active,WikiPortlet:Wiki:true:active,FileExplorerPortlet:Documents:true:active," - + "CalendarPortlet:Agenda:true:active,SpaceSettingPortlet:Space Settings:false:active," - + "AnswersPortlet:Answer:true:active,FAQPortlet:FAQ:true:active,MembersPortlet:Members:true:active"; - space.setApp(apps); - boolean isInstalledApp = SpaceUtils.isInstalledApp(space, "Agenda"); - assertTrue(isInstalledApp); - isInstalledApp = SpaceUtils.isInstalledApp(space, "CalendarPortlet"); - assertTrue(isInstalledApp); - } - public void testProcessUnifiedSearchCondition() { String input = "spa~ce~0.5"; assertEquals("spa~ce", Utils.processUnifiedSearchCondition(input)); @@ -154,78 +65,10 @@ public void testProcessUnifiedSearchCondition() { assertEquals("space test", Utils.processUnifiedSearchCondition(input)); } - public void testchangeAppPageTitle() throws Exception { - Space space1 = tearDown.get(0); - - ConversationState.setCurrent(new ConversationState(identity)); - List childNodes = SpaceUtils.getSpaceUserNodeChildren(space1); - - PageService pageService = (PageService) getContainer().getComponentInstanceOfType(PageService.class); - PageContext pc = null; - String AppName =""; - - for (UserNode childNode : childNodes) - { - if (childNode.getPageRef() != null) { - pc = pageService.loadPage(childNode.getPageRef()); - AppName = pc.getState().getDisplayName().split("-")[0].trim(); - - assertEquals("Space1", AppName); - SpaceUtils.changeAppPageTitle(childNode,"newspacetitle"); - pc = pageService.loadPage(childNode.getPageRef()); - AppName = pc.getState().getDisplayName().split("-")[0].trim(); - - assertEquals("newspacetitle", AppName); - } - } - - } - - public void testUpdateDefaultSpaceAvatar() throws Exception { - Space space = tearDown.get(0); - Identity identity = new Identity(SpaceIdentityProvider.NAME, space.getPrettyName()); - identityStorage.saveIdentity(identity); - Profile profile = new Profile(identity); - profile.setProperty(Profile.FULL_NAME, space.getDisplayName()); - identityStorage.saveProfile(profile); - identity.setProfile(profile); - String identityId = identity.getId(); - assertNotNull(identityId); - FileItem avatarFile = identityStorage.getAvatarFile(identity); - profile = identityStorage.loadProfile(profile); - assertEquals(EntityConverterUtils.DEFAULT_AVATAR, avatarFile.getFileInfo().getName()); - assertTrue(profile.isDefaultAvatar()); - - Long avatarFileId = avatarFile.getFileInfo().getId(); - assertNotNull(avatarFileId); - - profile.setProperty("test", "test"); - identityStorage.updateProfile(profile); - - profile = identityStorage.loadProfile(profile); - assertEquals(EntityConverterUtils.DEFAULT_AVATAR, avatarFile.getFileInfo().getName()); - assertTrue(profile.isDefaultAvatar()); - - assertEquals("Avatar File shouldn't change if Space not renamed", avatarFileId, avatarFile.getFileInfo().getId()); - - // Rename space - String JOHN = "john"; - String newSpaceName = "newname"; - spaceService.renameSpace(space, newSpaceName, JOHN); - space = spaceService.getSpaceById(space.getId()); - assertEquals(newSpaceName, space.getDisplayName()); - - SpaceUtils.updateDefaultSpaceAvatar(space); - identity = identityManager.getOrCreateIdentity(SpaceIdentityProvider.NAME, space.getDisplayName()); - avatarFile = identityManager.getAvatarFile(identity); - Long updatedAvatarId = avatarFile.getFileInfo().getId(); - assertNotNull(updatedAvatarId); - assertNotEquals(avatarFileId, updatedAvatarId); - } - - public void testUpdateDefaultUserAvatar() throws Exception { - FileItem avatarFile = identityStorage.getAvatarFile(rootIdentity); - Profile profile = identityStorage.loadProfile(rootIdentity.getProfile()); + public void testUpdateDefaultUserAvatar() { + Identity jamesIdentity = identityManager.getOrCreateUserIdentity("james"); + FileItem avatarFile = identityStorage.getAvatarFile(jamesIdentity); + Profile profile = identityStorage.loadProfile(jamesIdentity.getProfile()); assertEquals(EntityConverterUtils.DEFAULT_AVATAR, avatarFile.getFileInfo().getName()); assertTrue(profile.isDefaultAvatar()); diff --git a/component/core/src/test/java/org/exoplatform/social/core/space/SpaceUtilsWildCardMembershipTest.java b/component/core/src/test/java/org/exoplatform/social/core/space/SpaceUtilsWildCardMembershipTest.java index 260978c45e5..7eb880b4371 100644 --- a/component/core/src/test/java/org/exoplatform/social/core/space/SpaceUtilsWildCardMembershipTest.java +++ b/component/core/src/test/java/org/exoplatform/social/core/space/SpaceUtilsWildCardMembershipTest.java @@ -19,13 +19,13 @@ import java.util.ArrayList; import java.util.List; -import org.exoplatform.services.organization.*; +import org.exoplatform.services.organization.User; +import org.exoplatform.services.organization.UserHandler; import org.exoplatform.social.core.identity.model.Identity; import org.exoplatform.social.core.identity.model.Profile; -import org.exoplatform.social.core.space.impl.DefaultSpaceApplicationHandler; +import org.exoplatform.social.core.jpa.storage.SpaceStorage; import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.core.storage.api.IdentityStorage; -import org.exoplatform.social.core.storage.api.SpaceStorage; import org.exoplatform.social.core.test.AbstractCoreTest; /** @@ -94,14 +94,11 @@ private User populateUser(String name) { private Space populateSpace(String name, String creator) throws Exception { Space space = new Space(); - space.setApp("app"); space.setDisplayName(name); space.setPrettyName(space.getDisplayName()); space.setRegistration(Space.OPEN); space.setDescription("add new space "); - space.setType(DefaultSpaceApplicationHandler.NAME); space.setVisibility(Space.PUBLIC); - space.setPriority(Space.INTERMEDIATE_PRIORITY); space.setGroupId(SpaceUtils.createGroup(space.getPrettyName(), creator)); space.setUrl(space.getPrettyName()); String[] managers = new String[] {}; diff --git a/component/core/src/test/java/org/exoplatform/social/core/space/mock/MockSpaceApplicationHandler.java b/component/core/src/test/java/org/exoplatform/social/core/space/mock/MockSpaceApplicationHandler.java deleted file mode 100644 index c0188a2c68f..00000000000 --- a/component/core/src/test/java/org/exoplatform/social/core/space/mock/MockSpaceApplicationHandler.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * This file is part of the Meeds project (https://meeds.io/). - - * Copyright (C) 2020 - 2023 Meeds Association contact@meeds.io - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.exoplatform.social.core.space.mock; - -import org.exoplatform.container.xml.InitParams; -import org.exoplatform.portal.config.UserPortalConfigService; -import org.exoplatform.portal.config.model.Page; -import org.exoplatform.portal.config.model.PortalConfig; -import org.exoplatform.portal.mop.service.LayoutService; -import org.exoplatform.portal.mop.service.NavigationService; -import org.exoplatform.portal.mop.storage.PageStorage; -import org.exoplatform.portal.pom.spi.portlet.Portlet; -import org.exoplatform.social.core.space.Application; -import org.exoplatform.social.core.space.impl.DefaultSpaceApplicationHandler; -import org.exoplatform.social.core.space.model.Space; -import org.exoplatform.social.core.space.spi.SpaceTemplateService; - -public class MockSpaceApplicationHandler extends DefaultSpaceApplicationHandler { - - public MockSpaceApplicationHandler(InitParams params, - LayoutService layoutService, - NavigationService navigationService, - PageStorage pageStorage, - SpaceTemplateService spaceTemplateService) { - super(params, layoutService, navigationService, pageStorage, spaceTemplateService); - } - - @Override - protected Page createSpacePage(UserPortalConfigService userPortalConfigService, - Space space, - Application app, - org.exoplatform.portal.config.model.Application portletApplication, - boolean isRoot) throws Exception { - Page page = userPortalConfigService.createPageTemplate("space", - PortalConfig.GROUP_TYPE, - space.getGroupId()); - // setting some data to page. - setPage(space, app, portletApplication, page); - return page; - } - -} diff --git a/component/core/src/test/java/org/exoplatform/social/core/space/spi/SpaceServiceTest.java b/component/core/src/test/java/org/exoplatform/social/core/space/spi/SpaceServiceTest.java index a350784b21e..9db7497e37d 100644 --- a/component/core/src/test/java/org/exoplatform/social/core/space/spi/SpaceServiceTest.java +++ b/component/core/src/test/java/org/exoplatform/social/core/space/spi/SpaceServiceTest.java @@ -1,30 +1,34 @@ /* - * Copyright (C) 2003-2011 eXo Platform SAS. + * This file is part of the Meeds project (https://meeds.io/). * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . */ package org.exoplatform.social.core.space.spi; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertThrows; +import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; -import java.util.HashSet; import java.util.List; import java.util.regex.Pattern; @@ -35,18 +39,6 @@ import org.exoplatform.commons.file.model.FileItem; import org.exoplatform.commons.utils.ListAccess; import org.exoplatform.container.ExoContainerContext; -import org.exoplatform.portal.config.model.ModelObject; -import org.exoplatform.portal.config.model.Page; -import org.exoplatform.portal.config.model.PortalConfig; -import org.exoplatform.portal.mop.navigation.NavigationContext; -import org.exoplatform.portal.mop.navigation.NodeContext; -import org.exoplatform.portal.mop.navigation.NodeModel; -import org.exoplatform.portal.mop.navigation.Scope; -import org.exoplatform.portal.mop.page.PageKey; -import org.exoplatform.portal.mop.service.LayoutService; -import org.exoplatform.portal.mop.service.NavigationService; -import org.exoplatform.services.log.ExoLogger; -import org.exoplatform.services.log.Log; import org.exoplatform.services.organization.Group; import org.exoplatform.services.organization.GroupHandler; import org.exoplatform.services.organization.Membership; @@ -66,93 +58,132 @@ import org.exoplatform.social.core.identity.provider.OrganizationIdentityProvider; import org.exoplatform.social.core.identity.provider.SpaceIdentityProvider; import org.exoplatform.social.core.jpa.storage.EntityConverterUtils; -import org.exoplatform.social.core.manager.ActivityManager; import org.exoplatform.social.core.manager.IdentityManager; import org.exoplatform.social.core.mock.SpaceListenerPluginMock; import org.exoplatform.social.core.model.AvatarAttachment; import org.exoplatform.social.core.model.SpaceExternalInvitation; import org.exoplatform.social.core.space.SpaceException; import org.exoplatform.social.core.space.SpaceFilter; -import org.exoplatform.social.core.space.SpaceTemplate; import org.exoplatform.social.core.space.SpaceUtils; import org.exoplatform.social.core.space.SpacesAdministrationService; -import org.exoplatform.social.core.space.impl.DefaultSpaceApplicationHandler; import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.core.space.spi.SpaceLifeCycleEvent.Type; -import org.exoplatform.social.core.storage.IdentityStorageException; import org.exoplatform.social.core.storage.api.IdentityStorage; import org.exoplatform.social.core.test.AbstractCoreTest; import org.exoplatform.social.metadata.favorite.FavoriteService; import org.exoplatform.social.metadata.favorite.model.Favorite; +import io.meeds.social.core.space.service.SpaceLayoutService; +import io.meeds.social.space.template.model.SpaceTemplate; +import io.meeds.social.space.template.service.SpaceTemplateService; + import lombok.SneakyThrows; public class SpaceServiceTest extends AbstractCoreTest { - private static final String EXTERNAL_USER = "externalUser"; + private static final String EXTERNAL3_USER_EMAIL = "external3@external3.com"; - private IdentityStorage identityStorage; + private static final String EXTERNAL2_USER_EMAIL = "external2@external2.com"; - private OrganizationService organizationService; + private static final String EXTERNAL1_USER_EMAIL = "external1@external1.com"; - protected SpacesAdministrationService spacesAdministrationService; + private static final String EXTERNAL_USER_EMAIL = "external@external.com"; - private List tearDownSpaceList; + private static final String OTHER_USER_NAME = "otherUser"; - private List tearDownUserList; + private static final String MY_SPACE_0_PRETTY_NAME = "my_space_0"; - private final Log LOG = ExoLogger.getLogger(SpaceServiceTest.class); + private static final String MY_SPACE_DISPLAY_NAME_PREFIX = "my space "; - private Identity demo; + private static final String TEST_SPACE_DESCRIPTION = "Space Description for Testing"; - private Identity tom; + private static final String TEST_SPACE_DISPLAY_NAME = "testSpace"; - private Identity raul; + private static final String SPACES_GROUP_PREFIX = "/spaces/"; - private Identity ghost; + private static final String SPACE_DESCRIPTION = "add new space "; - private Identity dragon; + private static final String SPACE2_DISPLAY_NAME = "Space2"; - private Identity register1; + private static final String SPACE1_DISPLAY_NAME = "Space1"; - private Identity john; + private static final String SPACE1_NAME = "space1"; - private Identity mary; + private static final String JAMES_NAME = "james"; - private Identity harry; + private static final String PLATFORM_ADMINISTRATORS = "/platform/administrators"; - private Identity root; + private static final String MEMBER3_NAME = "member3"; - private Identity jame; + private static final String NEW_PENDING_USER_NAME = "newPendingUser"; - private Identity paul; + private static final String NEW_INVITED_USER_NAME = "newInvitedUser"; - private Identity hacker; + private static final String HEAR_BREAKER_NAME = "hearBreaker"; - private Identity hearBreaker; + private static final String PAUL_NAME = "paul"; - private Identity newInvitedUser; + private static final String JAME_NAME = "jame"; - private Identity newPendingUser; + private static final String ROOT_NAME = "root"; - private Identity user_new; + private static final String JOHN_NAME = "john"; - private Identity user_new1; + private static final String MARY_NAME = "mary"; - private Identity user_new_dot; + private static final String REGISTER1_NAME = "register1"; - private Identity creator; + private static final String DRAGON_NAME = "dragon"; - private Identity manager; + private static final String GHOST_NAME = "ghost"; - private Identity member1; + private static final String RAUL_NAME = "raul"; - private Identity member2; + private static final String TOM_NAME = "tom"; - private Identity member3; + private static final String DEMO_NAME = "demo"; - private Identity externalUser; + private static final String USER_DOT_NEW_NAME = "user.new"; + + private static final String USER_NEW_1_NAME = "user-new.1"; + + private static final String USER_NEW_NAME = "user-new"; + + private static final String MEMBER2_NAME = "member2"; + + private static final String MEMBER1_NAME = "member1"; + + private static final String MANAGER_NAME = "manager"; + + private static final String HACKER_NAME = "hacker"; + + private static final String EXTERNAL_USER_NAME = "externalUser"; + + private IdentityStorage identityStorage; + + private OrganizationService organizationService; + + protected SpacesAdministrationService spacesAdministrationService; + + protected SpaceLayoutService spaceLayoutService; + + private Identity tom; + + private Identity dragon; + + private Identity john; + + private Identity mary; + + private Identity root; + + private Identity hearBreaker; + + private Identity newInvitedUser; + + private Identity newPendingUser; + private Identity externalUser; @Override public void setUp() throws Exception { @@ -160,34 +191,31 @@ public void setUp() throws Exception { identityStorage = getContainer().getComponentInstanceOfType(IdentityStorage.class); organizationService = getContainer().getComponentInstanceOfType(OrganizationService.class); spacesAdministrationService = getContainer().getComponentInstanceOfType(SpacesAdministrationService.class); - tearDownSpaceList = new ArrayList(); - tearDownUserList = new ArrayList(); - - user_new = new Identity(OrganizationIdentityProvider.NAME, "user-new"); - user_new1 = new Identity(OrganizationIdentityProvider.NAME, "user-new.1"); - user_new_dot = new Identity(OrganizationIdentityProvider.NAME, "user.new"); - demo = new Identity(OrganizationIdentityProvider.NAME, "demo"); - tom = new Identity(OrganizationIdentityProvider.NAME, "tom"); - raul = new Identity(OrganizationIdentityProvider.NAME, "raul"); - ghost = new Identity(OrganizationIdentityProvider.NAME, "ghost"); - dragon = new Identity(OrganizationIdentityProvider.NAME, "dragon"); - register1 = new Identity(OrganizationIdentityProvider.NAME, "register1"); - mary = new Identity(OrganizationIdentityProvider.NAME, "mary"); - john = new Identity(OrganizationIdentityProvider.NAME, "john"); - harry = new Identity(OrganizationIdentityProvider.NAME, "harry"); - root = new Identity(OrganizationIdentityProvider.NAME, "root"); - jame = new Identity(OrganizationIdentityProvider.NAME, "jame"); - paul = new Identity(OrganizationIdentityProvider.NAME, "paul"); - hacker = new Identity(OrganizationIdentityProvider.NAME, "hacker"); - hearBreaker = new Identity(OrganizationIdentityProvider.NAME, "hearBreaker"); - newInvitedUser = new Identity(OrganizationIdentityProvider.NAME, "newInvitedUser"); - newPendingUser = new Identity(OrganizationIdentityProvider.NAME, "newPendingUser"); - manager = new Identity(OrganizationIdentityProvider.NAME, "manager"); - creator = new Identity(OrganizationIdentityProvider.NAME, "creator"); - member1 = new Identity(OrganizationIdentityProvider.NAME, "member1"); - member2 = new Identity(OrganizationIdentityProvider.NAME, "member2"); - member3 = new Identity(OrganizationIdentityProvider.NAME, "member3"); - externalUser = new Identity(OrganizationIdentityProvider.NAME, EXTERNAL_USER); + spaceLayoutService = getContainer().getComponentInstanceOfType(SpaceLayoutService.class); + + Identity userNew = new Identity(OrganizationIdentityProvider.NAME, USER_NEW_NAME); + Identity userNew1 = new Identity(OrganizationIdentityProvider.NAME, USER_NEW_1_NAME); + Identity userNewDot = new Identity(OrganizationIdentityProvider.NAME, USER_DOT_NEW_NAME); + Identity demo = new Identity(OrganizationIdentityProvider.NAME, DEMO_NAME); + tom = new Identity(OrganizationIdentityProvider.NAME, TOM_NAME); + Identity raul = new Identity(OrganizationIdentityProvider.NAME, RAUL_NAME); + Identity ghost = new Identity(OrganizationIdentityProvider.NAME, GHOST_NAME); + dragon = new Identity(OrganizationIdentityProvider.NAME, DRAGON_NAME); + Identity register1 = new Identity(OrganizationIdentityProvider.NAME, REGISTER1_NAME); + mary = new Identity(OrganizationIdentityProvider.NAME, MARY_NAME); + john = new Identity(OrganizationIdentityProvider.NAME, JOHN_NAME); + root = new Identity(OrganizationIdentityProvider.NAME, ROOT_NAME); + Identity jame = new Identity(OrganizationIdentityProvider.NAME, JAME_NAME); + Identity paul = new Identity(OrganizationIdentityProvider.NAME, PAUL_NAME); + Identity hacker = new Identity(OrganizationIdentityProvider.NAME, HACKER_NAME); + hearBreaker = new Identity(OrganizationIdentityProvider.NAME, HEAR_BREAKER_NAME); + newInvitedUser = new Identity(OrganizationIdentityProvider.NAME, NEW_INVITED_USER_NAME); + newPendingUser = new Identity(OrganizationIdentityProvider.NAME, NEW_PENDING_USER_NAME); + Identity manager = new Identity(OrganizationIdentityProvider.NAME, MANAGER_NAME); + Identity member1 = new Identity(OrganizationIdentityProvider.NAME, MEMBER1_NAME); + Identity member2 = new Identity(OrganizationIdentityProvider.NAME, MEMBER2_NAME); + Identity member3 = new Identity(OrganizationIdentityProvider.NAME, MEMBER3_NAME); + externalUser = new Identity(OrganizationIdentityProvider.NAME, EXTERNAL_USER_NAME); checkExternalUserMemberships(); identityStorage.saveIdentity(demo); @@ -197,7 +225,6 @@ public void setUp() throws Exception { identityStorage.saveIdentity(dragon); identityStorage.saveIdentity(register1); identityStorage.saveIdentity(mary); - identityStorage.saveIdentity(harry); identityStorage.saveIdentity(john); identityStorage.saveIdentity(root); identityStorage.saveIdentity(jame); @@ -206,64 +233,17 @@ public void setUp() throws Exception { identityStorage.saveIdentity(hearBreaker); identityStorage.saveIdentity(newInvitedUser); identityStorage.saveIdentity(newPendingUser); - identityStorage.saveIdentity(user_new1); - identityStorage.saveIdentity(user_new); - identityStorage.saveIdentity(user_new_dot); + identityStorage.saveIdentity(userNew1); + identityStorage.saveIdentity(userNew); + identityStorage.saveIdentity(userNewDot); identityStorage.saveIdentity(manager); - identityStorage.saveIdentity(creator); identityStorage.saveIdentity(member1); identityStorage.saveIdentity(member2); identityStorage.saveIdentity(member3); - tearDownUserList.add(demo); - tearDownUserList.add(tom); - tearDownUserList.add(raul); - tearDownUserList.add(ghost); - tearDownUserList.add(dragon); - tearDownUserList.add(register1); - tearDownUserList.add(mary); - tearDownUserList.add(harry); - tearDownUserList.add(john); - tearDownUserList.add(root); - tearDownUserList.add(jame); - tearDownUserList.add(paul); - tearDownUserList.add(hacker); - tearDownUserList.add(hearBreaker); - tearDownUserList.add(newInvitedUser); - tearDownUserList.add(newPendingUser); - tearDownUserList.add(user_new1); - tearDownUserList.add(user_new); - tearDownUserList.add(user_new_dot); - tearDownUserList.add(manager); - tearDownUserList.add(creator); - tearDownUserList.add(member1); - tearDownUserList.add(member2); - tearDownUserList.add(member3); - } - - @Override - public void tearDown() throws Exception { - end(); begin(); - - for (Identity identity : tearDownUserList) { - identityRegistry.unregister(identity.getRemoteId()); - try { - identityStorage.deleteIdentity(identity); - } catch (IdentityStorageException e) { - // It's expected on some identities that could be deleted in tests - } - } - - super.tearDown(); } - /** - * Test {@link SpaceService#getAllSpacesWithListAccess()} - * - * @throws Exception - * @since 1.2.0-GA - */ public void testGetAllSpacesWithListAccess() throws Exception { int count = 5; for (int i = 0; i < count; i++) { @@ -276,34 +256,14 @@ public void testGetAllSpacesWithListAccess() throws Exception { assertEquals("allSpaces.load(0, count).length must return: " + count, count, allSpaces.load(0, count).length); } - public void testGetSpaceMembershipDate() throws Exception { + public void testGetSpaceMembershipDate() { Space space = populateData(); - assertNotNull(spaceService.getSpaceMembershipDate(Long.parseLong(space.getId()), "root")); - assertNotNull(spaceService.getSpaceMembershipDate(Long.parseLong(space.getId()), "john")); + assertNotNull(spaceService.getSpaceMembershipDate(Long.parseLong(space.getId()), ROOT_NAME)); + assertNotNull(spaceService.getSpaceMembershipDate(Long.parseLong(space.getId()), JOHN_NAME)); assertNull(spaceService.getSpaceMembershipDate(Long.parseLong(space.getId()), "notExistingUser")); } - /** - * Test {@link SpaceService#getSpaceByDisplayName(String)} - * - * @throws Exception - */ - public void testGetSpaceByDisplayName() throws Exception { - Space space = populateData(); - Space gotSpace1 = spaceService.getSpaceByDisplayName("Space1"); - - assertNotNull("gotSpace1 must not be null", gotSpace1); - - assertEquals(space.getDisplayName(), gotSpace1.getDisplayName()); - } - - /** - * Test {@link SpaceService#getSpaceByPrettyName(String)} - * - * @throws Exception - * @since 1.2.0-GA - */ - public void testGetSpaceByPrettyName() throws Exception { + public void testGetSpaceByPrettyName() { int count = 5; for (int i = 0; i < count; i++) { this.getSpaceInstance(i); @@ -313,22 +273,21 @@ public void testGetSpaceByPrettyName() throws Exception { assertEquals("foundSpace.getDisplayName() must return: my space 4", "my space 4", foundSpace.getDisplayName()); assertEquals("foundSpace.getPrettyName() must return: my_space_4", "my_space_4", foundSpace.getPrettyName()); - foundSpace = spaceService.getSpaceByPrettyName("my_space_0"); + foundSpace = spaceService.getSpaceByPrettyName(MY_SPACE_0_PRETTY_NAME); assertNotNull("foundSpace must not be null", foundSpace); assertEquals("foundSpace.getDisplayName() must return: my space 0", "my space 0", foundSpace.getDisplayName()); - assertEquals("foundSpace.getPrettyName() must return: my_space_0", "my_space_0", foundSpace.getPrettyName()); + assertEquals("foundSpace.getPrettyName() must return: my_space_0", MY_SPACE_0_PRETTY_NAME, foundSpace.getPrettyName()); foundSpace = spaceService.getSpaceByPrettyName("my_space_5"); assertNull("foundSpace must be null", foundSpace); } - public void testDefaultSpaceAvatar() throws Exception { + public void testDefaultSpaceAvatar() { this.getSpaceInstance(0); - Space space = spaceService.getSpaceByPrettyName("my_space_0"); + Space space = spaceService.getSpaceByPrettyName(MY_SPACE_0_PRETTY_NAME); assertNotNull("space must not be null", space); Identity identity = new Identity(SpaceIdentityProvider.NAME, space.getPrettyName()); identityStorage.saveIdentity(identity); - tearDownUserList.add(identity); Profile profile = new Profile(identity); profile.setProperty(Profile.FULL_NAME, space.getDisplayName()); @@ -346,13 +305,12 @@ public void testDefaultSpaceAvatar() throws Exception { assertTrue(profile.isDefaultAvatar()); } - public void testUpdateSpaceAvatar() throws Exception { + public void testUpdateSpaceAvatar() throws IOException { this.getSpaceInstance(0); - Space space = spaceService.getSpaceByPrettyName("my_space_0"); + Space space = spaceService.getSpaceByPrettyName(MY_SPACE_0_PRETTY_NAME); assertNotNull("space must not be null", space); Identity identity = new Identity(SpaceIdentityProvider.NAME, space.getPrettyName()); identityStorage.saveIdentity(identity); - tearDownUserList.add(identity); FileItem avatarFile = identityStorage.getAvatarFile(identity); assertNotNull(avatarFile); assertEquals(EntityConverterUtils.DEFAULT_AVATAR, avatarFile.getFileInfo().getName()); @@ -364,7 +322,7 @@ public void testUpdateSpaceAvatar() throws Exception { InputStream inputStream = getClass().getResourceAsStream("/eXo-Social.png"); AvatarAttachment avatarAttachment = - new AvatarAttachment(null, "space-avatar", "png", inputStream, System.currentTimeMillis()); + new AvatarAttachment(null, "space-avatar", "png", inputStream, System.currentTimeMillis()); space.setAvatarAttachment(avatarAttachment); spaceService.updateSpaceAvatar(space, space.getManagers()[0]); profile = new Profile(identity); @@ -378,7 +336,7 @@ public void testUpdateSpaceAvatar() throws Exception { assertFalse(profile.isDefaultAvatar()); } - public void testRenameSpaceWithDefaultAvatar() throws Exception { + public void testRenameSpaceWithDefaultAvatar() throws SpaceException { Space space = this.getSpaceInstance(0); assertNotNull(space); @@ -386,7 +344,6 @@ public void testRenameSpaceWithDefaultAvatar() throws Exception { assertNotNull(identity); identityStorage.saveIdentity(identity); - tearDownUserList.add(identity); String newDisplayName = "new display name"; SpaceListenerPluginMock spaceListenerPlugin = new SpaceListenerPluginMock(); spaceService.registerSpaceListenerPlugin(spaceListenerPlugin); @@ -401,15 +358,21 @@ public void testRenameSpaceWithDefaultAvatar() throws Exception { } public void testGetBookmarkedSpace() throws Exception { - Space space1 = createSpace("Space1", john.getRemoteId()); - createSpace("Space2", john.getRemoteId()); + Space space1 = createSpace(SPACE1_DISPLAY_NAME, john.getRemoteId()); + createSpace(SPACE2_DISPLAY_NAME, john.getRemoteId()); Space space3 = createSpace("Space3", john.getRemoteId()); createSpace("Space4", john.getRemoteId()); FavoriteService favoriteService = ExoContainerContext.getService(FavoriteService.class); - Favorite space1Favorite = new Favorite(Space.DEFAULT_SPACE_METADATA_OBJECT_TYPE, space1.getId(), null, Long.parseLong(john.getId())); + Favorite space1Favorite = new Favorite(Space.DEFAULT_SPACE_METADATA_OBJECT_TYPE, + space1.getId(), + null, + Long.parseLong(john.getId())); favoriteService.createFavorite(space1Favorite); - Favorite space2Favorite = new Favorite(Space.DEFAULT_SPACE_METADATA_OBJECT_TYPE, space3.getId(), null, Long.parseLong(john.getId())); + Favorite space2Favorite = new Favorite(Space.DEFAULT_SPACE_METADATA_OBJECT_TYPE, + space3.getId(), + null, + Long.parseLong(john.getId())); favoriteService.createFavorite(space2Favorite); SpaceFilter spaceFilter = new SpaceFilter(); @@ -443,24 +406,28 @@ public void testGetBookmarkedSpace() throws Exception { assertEquals(0, spacesList.length); assertEquals(0, spaceService.getAccessibleSpacesByFilter(john.getRemoteId(), spaceFilter).getSize()); } - - /** - * Test {@link SpaceService#getMemberSpacesByFilter(String, SpaceFilter)} - * - * @throws Exception - */ + public void testGetFavoriteSpacesByFilter() throws Exception { - Space space1 = createSpace("Space1", john.getRemoteId()); - createSpace("Space2", john.getRemoteId()); + Space space1 = createSpace(SPACE1_DISPLAY_NAME, john.getRemoteId()); + createSpace(SPACE2_DISPLAY_NAME, john.getRemoteId()); Space space3 = createSpace("Space3", john.getRemoteId()); createSpace("Space4", john.getRemoteId()); FavoriteService favoriteService = ExoContainerContext.getService(FavoriteService.class); - Favorite space1Favorite = new Favorite(Space.DEFAULT_SPACE_METADATA_OBJECT_TYPE, space1.getId(), null, Long.parseLong(john.getId())); + Favorite space1Favorite = new Favorite(Space.DEFAULT_SPACE_METADATA_OBJECT_TYPE, + space1.getId(), + null, + Long.parseLong(john.getId())); favoriteService.createFavorite(space1Favorite); - Favorite space3Favorite = new Favorite(Space.DEFAULT_SPACE_METADATA_OBJECT_TYPE, space3.getId(), null, Long.parseLong(john.getId())); + Favorite space3Favorite = new Favorite(Space.DEFAULT_SPACE_METADATA_OBJECT_TYPE, + space3.getId(), + null, + Long.parseLong(john.getId())); favoriteService.createFavorite(space3Favorite); - favoriteService.createFavorite(new Favorite(Space.DEFAULT_SPACE_METADATA_OBJECT_TYPE, space3.getId(), null, Long.parseLong(root.getId()))); + favoriteService.createFavorite(new Favorite(Space.DEFAULT_SPACE_METADATA_OBJECT_TYPE, + space3.getId(), + null, + Long.parseLong(root.getId()))); SpaceFilter spaceFilter = new SpaceFilter(); assertEquals(4, spaceService.getAccessibleSpacesByFilter(john.getRemoteId(), spaceFilter).getSize()); @@ -485,154 +452,29 @@ public void testGetFavoriteSpacesByFilter() throws Exception { assertEquals(0, spacesList.length); } - /** - * Test {@link SpaceService#getAllSpacesByFilter(SpaceFilter)} - * - * @throws Exception - * @since 1.2.0-GA - */ -//FIXME regression JCR to RDBMS migration -// public void testGetAllSpacesByFilterWithSpaceNameSearchCondition() throws Exception { -// int count = 5; -// for (int i = 0; i < count; i++) { -// this.getSpaceInstance(i); -// } -// -// ListAccess foundSpaceListAccess = spaceService.getAllSpacesByFilter(new SpaceFilter("my space")); -// assertNotNull("foundSpaceListAccess must not be null", foundSpaceListAccess); -// assertEquals("foundSpaceListAccess.getSize() must return: " + count, count, foundSpaceListAccess.getSize()); -// assertEquals("foundSpaceListAccess.load(0, 1).length must return: 1", 1, foundSpaceListAccess.load(0, 1).length); -// assertEquals("foundSpaceListAccess.load(0, count).length must return: " + count, -// count, -// foundSpaceListAccess.load(0, count).length); -// -// foundSpaceListAccess = spaceService.getAllSpacesByFilter(new SpaceFilter("1")); -// assertEquals("foundSpaceListAccess.getSize() must return 11", 11, foundSpaceListAccess.getSize()); -// assertEquals("foundSpaceListAccess.load(0, 10).length must return 10", -// 10, -// foundSpaceListAccess.load(0, 10).length); -// -// foundSpaceListAccess = spaceService.getAllSpacesByFilter(new SpaceFilter("add new space")); -// assertNotNull("foundSpaceListAccess must not be null", foundSpaceListAccess); -// assertEquals("foundSpaceListAccess.getSize() must return: " + count, count, foundSpaceListAccess.getSize()); -// -// foundSpaceListAccess = spaceService.getAllSpacesByFilter(new SpaceFilter("space")); -// assertNotNull("foundSpaceListAccess must not be null", foundSpaceListAccess); -// assertEquals("foundSpaceListAccess.getSize() must return: " + count, count, foundSpaceListAccess.getSize()); -// -// foundSpaceListAccess = spaceService.getAllSpacesByFilter(new SpaceFilter("*space")); -// assertNotNull("foundSpaceListAccess must not be null", foundSpaceListAccess); -// assertEquals("foundSpaceListAccess.getSize() must return: " + count, count, foundSpaceListAccess.getSize()); -// -// foundSpaceListAccess = spaceService.getAllSpacesByFilter(new SpaceFilter("*space*")); -// assertNotNull("foundSpaceListAccess must not be null", foundSpaceListAccess); -// assertEquals("foundSpaceListAccess.getSize() must return: " + count, count, foundSpaceListAccess.getSize()); -// -// foundSpaceListAccess = spaceService.getAllSpacesByFilter(new SpaceFilter("*a*e*")); -// assertNotNull("foundSpaceListAccess must not be null", foundSpaceListAccess); -// assertEquals("foundSpaceListAccess.getSize() must return: " + count, count, foundSpaceListAccess.getSize()); -// -// foundSpaceListAccess = spaceService.getAllSpacesByFilter(new SpaceFilter("*a*e")); -// assertNotNull("foundSpaceListAccess must not be null", foundSpaceListAccess); -// assertEquals("foundSpaceListAccess.getSize() must return: " + count, count, foundSpaceListAccess.getSize()); -// -// foundSpaceListAccess = spaceService.getAllSpacesByFilter(new SpaceFilter("a*e")); -// assertNotNull("foundSpaceListAccess must not be null", foundSpaceListAccess); -// assertEquals("foundSpaceListAccess.getSize() must return: " + count, count, foundSpaceListAccess.getSize()); -// -// foundSpaceListAccess = spaceService.getAllSpacesByFilter(new SpaceFilter("a*")); -// assertNotNull("foundSpaceListAccess must not be null", foundSpaceListAccess); -// assertEquals("foundSpaceListAccess.getSize() must return: " + count, count, foundSpaceListAccess.getSize()); -// -// foundSpaceListAccess = spaceService.getAllSpacesByFilter(new SpaceFilter("%a%e%")); -// assertNotNull("foundSpaceListAccess must not be null", foundSpaceListAccess); -// assertEquals("foundSpaceListAccess.getSize() must return: " + count, count, foundSpaceListAccess.getSize()); -// -// foundSpaceListAccess = spaceService.getAllSpacesByFilter(new SpaceFilter("%a*e%")); -// assertNotNull("foundSpaceListAccess must not be null", foundSpaceListAccess); -// assertEquals("foundSpaceListAccess.getSize() must return: " + count, count, foundSpaceListAccess.getSize()); -// -// foundSpaceListAccess = spaceService.getAllSpacesByFilter(new SpaceFilter("%a*e*")); -// assertNotNull("foundSpaceListAccess must not be null", foundSpaceListAccess); -// assertEquals("foundSpaceListAccess.getSize() must return: " + count, count, foundSpaceListAccess.getSize()); -// -// foundSpaceListAccess = spaceService.getAllSpacesByFilter(new SpaceFilter("***")); -// assertNotNull("foundSpaceListAccess must not be null", foundSpaceListAccess); -// assertEquals("foundSpaceListAccess.getSize() must return: " + 0, 0, foundSpaceListAccess.getSize()); -// -// foundSpaceListAccess = spaceService.getAllSpacesByFilter(new SpaceFilter("%%%%%")); -// assertNotNull("foundSpaceListAccess must not be null", foundSpaceListAccess); -// assertEquals("foundSpaceListAccess.getSize() must return: " + 0, 0, foundSpaceListAccess.getSize()); -// -// foundSpaceListAccess = spaceService.getAllSpacesByFilter(new SpaceFilter("new")); -// assertNotNull("foundSpaceListAccess must not be null", foundSpaceListAccess); -// assertEquals("foundSpaceListAccess.getSize() must return: " + count, count, foundSpaceListAccess.getSize()); -// -// foundSpaceListAccess = spaceService.getAllSpacesByFilter(new SpaceFilter("new(\"new\")")); -// assertNotNull("foundSpaceListAccess must not be null", foundSpaceListAccess); -// // correct test case : the term "new new new new" should not match the -// // result -// assertEquals("foundSpaceListAccess.getSize() must return: " + 0, 0, foundSpaceListAccess.getSize()); -// -// foundSpaceListAccess = spaceService.getAllSpacesByFilter(new SpaceFilter("what new space add")); -// assertNotNull("foundSpaceListAccess must not be null", foundSpaceListAccess); -// assertEquals("foundSpaceListAccess.getSize() must return: " + 0, 0, foundSpaceListAccess.getSize()); -// } - - /** - * Test {@link SpaceService#getSpaceByGroupId(String)} - * - * @throws Exception - * @since 1.2.0-GA - */ -//FIXME regression JCR to RDBMS migration -// public void testGetSpaceByGroupId() throws Exception { -// int count = 5; -// for (int i = 0; i < count; i++) { -// this.getSpaceInstance(i); -// } -// Space foundSpace = spaceService.getSpaceByGroupId("/space/space0"); -// assertNotNull("foundSpace must not be null", foundSpace); -// assertEquals("foundSpace.getDisplayName() must return: my space 0", "my space 0", foundSpace.getDisplayName()); -// assertEquals("foundSpace.getGroupId() must return: /space/space0", "/space/space0", foundSpace.getGroupId()); -// } - - /** - * Test {@link SpaceService#getSpaceById(String)} - * - * @throws Exception - */ - public void testGetSpaceById() throws Exception { + public void testGetSpaceById() { Space space = populateData(); - createMoreSpace("Space2"); + createMoreSpace(SPACE2_DISPLAY_NAME); assertEquals(space.getDisplayName(), spaceService.getSpaceById(space.getId()).getDisplayName()); } - /** - * Test {@link SpaceService#getSpaceByUrl(String)} - * - * @throws Exception - */ - public void testGetSpaceByUrl() throws Exception { - Space space = populateData(); - assertEquals(space.getDisplayName(), spaceService.getSpaceByUrl("space1").getDisplayName()); - } - - public void testCanRedact() throws Exception { - org.exoplatform.services.security.Identity rootACLIdentity = new org.exoplatform.services.security.Identity("root"); - org.exoplatform.services.security.Identity johnACLIdentity = new org.exoplatform.services.security.Identity("john", - Collections.singleton(new MembershipEntry("/platform/administrators", + public void testCanRedact() { + org.exoplatform.services.security.Identity rootACLIdentity = new org.exoplatform.services.security.Identity(ROOT_NAME); + org.exoplatform.services.security.Identity johnACLIdentity = new org.exoplatform.services.security.Identity(JOHN_NAME, + Collections.singleton(new MembershipEntry(PLATFORM_ADMINISTRATORS, "*"))); - org.exoplatform.services.security.Identity demoACLIdentity = new org.exoplatform.services.security.Identity("demo"); - org.exoplatform.services.security.Identity jamesACLIdentity = new org.exoplatform.services.security.Identity("james"); - org.exoplatform.services.security.Identity maryACLIdentity = new org.exoplatform.services.security.Identity("mary"); - org.exoplatform.services.security.Identity raulACLIdentity = new org.exoplatform.services.security.Identity("raul"); + org.exoplatform.services.security.Identity demoACLIdentity = new org.exoplatform.services.security.Identity(DEMO_NAME); + org.exoplatform.services.security.Identity jamesACLIdentity = new org.exoplatform.services.security.Identity(JAMES_NAME); + org.exoplatform.services.security.Identity maryACLIdentity = new org.exoplatform.services.security.Identity(MARY_NAME); + org.exoplatform.services.security.Identity raulACLIdentity = new org.exoplatform.services.security.Identity(RAUL_NAME); ConversationState.setCurrent(new ConversationState(demoACLIdentity)); - Space space = createSpace("spaceTestRedact", "demo"); - space.setMembers(new String[]{"demo", "james", "raul"}); - spaceService.updateSpace(space); + Space space = createSpace("spaceTestRedact", DEMO_NAME); + Arrays.stream(new String[] { DEMO_NAME, JAMES_NAME, RAUL_NAME }).forEach(u -> spaceService.addMember(space, u)); + if (ArrayUtils.isNotEmpty(space.getRedactors())) { + Arrays.stream(space.getRedactors()).forEach(u -> spaceService.removeRedactor(space, u)); + } // Super Manager can redact assertTrue(spaceService.canRedactOnSpace(space, rootACLIdentity)); @@ -646,10 +488,9 @@ public void testCanRedact() throws Exception { // Non Member can't redact assertFalse(spaceService.canRedactOnSpace(space, maryACLIdentity)); - space.setMembers(new String[]{"demo", "james", "raul", "mary"}); - space.setRedactors(new String[]{"james"}); - space.setPublishers(new String[]{"mary"}); - spaceService.updateSpace(space); + spaceService.addMember(space, MARY_NAME); + spaceService.addRedactor(space, JAMES_NAME); + spaceService.addPublisher(space, MARY_NAME); // Super Manager can redact assertTrue(spaceService.canRedactOnSpace(space, rootACLIdentity)); @@ -665,19 +506,19 @@ public void testCanRedact() throws Exception { assertFalse(spaceService.canRedactOnSpace(space, raulACLIdentity)); } - public void testCanView() throws Exception { - org.exoplatform.services.security.Identity rootACLIdentity = new org.exoplatform.services.security.Identity("root"); - org.exoplatform.services.security.Identity johnACLIdentity = new org.exoplatform.services.security.Identity("john", - Collections.singleton(new MembershipEntry("/platform/administrators", + public void testCanView() { + org.exoplatform.services.security.Identity rootACLIdentity = new org.exoplatform.services.security.Identity(ROOT_NAME); + org.exoplatform.services.security.Identity johnACLIdentity = new org.exoplatform.services.security.Identity(JOHN_NAME, + Collections.singleton(new MembershipEntry(PLATFORM_ADMINISTRATORS, "*"))); - org.exoplatform.services.security.Identity demoACLIdentity = new org.exoplatform.services.security.Identity("demo"); - org.exoplatform.services.security.Identity jamesACLIdentity = new org.exoplatform.services.security.Identity("james"); - org.exoplatform.services.security.Identity maryACLIdentity = new org.exoplatform.services.security.Identity("mary"); + org.exoplatform.services.security.Identity demoACLIdentity = new org.exoplatform.services.security.Identity(DEMO_NAME); + org.exoplatform.services.security.Identity jamesACLIdentity = new org.exoplatform.services.security.Identity(JAMES_NAME); + org.exoplatform.services.security.Identity maryACLIdentity = new org.exoplatform.services.security.Identity(MARY_NAME); ConversationState.setCurrent(new ConversationState(demoACLIdentity)); - Space space = createSpace("spaceTestView", "demo"); - space.setMembers(new String[]{"demo", "james"}); + Space space = createSpace("spaceTestView", DEMO_NAME); + space.setMembers(new String[] { DEMO_NAME, JAMES_NAME }); spaceService.updateSpace(space); // Super Manager can view space content @@ -690,24 +531,24 @@ public void testCanView() throws Exception { assertFalse(spaceService.canViewSpace(space, maryACLIdentity.getUserId())); } - public void testCanManage() throws Exception { - org.exoplatform.services.security.Identity rootACLIdentity = new org.exoplatform.services.security.Identity("root"); - org.exoplatform.services.security.Identity johnACLIdentity = new org.exoplatform.services.security.Identity("john", - Collections.singleton(new MembershipEntry("/platform/administrators", + public void testCanManage() { + org.exoplatform.services.security.Identity rootACLIdentity = new org.exoplatform.services.security.Identity(ROOT_NAME); + org.exoplatform.services.security.Identity johnACLIdentity = new org.exoplatform.services.security.Identity(JOHN_NAME, + Collections.singleton(new MembershipEntry(PLATFORM_ADMINISTRATORS, "*"))); - org.exoplatform.services.security.Identity demoACLIdentity = new org.exoplatform.services.security.Identity("demo"); - org.exoplatform.services.security.Identity jamesACLIdentity = new org.exoplatform.services.security.Identity("james"); - org.exoplatform.services.security.Identity maryACLIdentity = new org.exoplatform.services.security.Identity("mary"); - org.exoplatform.services.security.Identity raulACLIdentity = new org.exoplatform.services.security.Identity("raul"); - org.exoplatform.services.security.Identity paulACLIdentity = new org.exoplatform.services.security.Identity("paul"); + org.exoplatform.services.security.Identity demoACLIdentity = new org.exoplatform.services.security.Identity(DEMO_NAME); + org.exoplatform.services.security.Identity jamesACLIdentity = new org.exoplatform.services.security.Identity(JAMES_NAME); + org.exoplatform.services.security.Identity maryACLIdentity = new org.exoplatform.services.security.Identity(MARY_NAME); + org.exoplatform.services.security.Identity raulACLIdentity = new org.exoplatform.services.security.Identity(RAUL_NAME); + org.exoplatform.services.security.Identity paulACLIdentity = new org.exoplatform.services.security.Identity(PAUL_NAME); ConversationState.setCurrent(new ConversationState(demoACLIdentity)); - Space space = createSpace("spaceTestManage", "demo"); - space.setMembers(new String[]{"demo", "james", "mary", "raul"}); - space.setManagers(new String[]{"mary"}); - space.setPublishers(new String[]{"raul"}); - space.setRedactors(new String[]{"james"}); + Space space = createSpace("spaceTestManage", DEMO_NAME); + space.setMembers(new String[] { DEMO_NAME, JAMES_NAME, MARY_NAME, RAUL_NAME }); + space.setManagers(new String[] { MARY_NAME }); + space.setPublishers(new String[] { RAUL_NAME }); + space.setRedactors(new String[] { JAMES_NAME }); spaceService.updateSpace(space); // Super Manager can manage space content @@ -726,24 +567,24 @@ public void testCanManage() throws Exception { assertFalse(spaceService.canManageSpace(space, paulACLIdentity.getUserId())); } - public void testCanPublish() throws Exception { - org.exoplatform.services.security.Identity rootACLIdentity = new org.exoplatform.services.security.Identity("root"); - org.exoplatform.services.security.Identity johnACLIdentity = new org.exoplatform.services.security.Identity("john", - Collections.singleton(new MembershipEntry("/platform/administrators", + public void testCanPublish() { + org.exoplatform.services.security.Identity rootACLIdentity = new org.exoplatform.services.security.Identity(ROOT_NAME); + org.exoplatform.services.security.Identity johnACLIdentity = new org.exoplatform.services.security.Identity(JOHN_NAME, + Collections.singleton(new MembershipEntry(PLATFORM_ADMINISTRATORS, "*"))); - org.exoplatform.services.security.Identity demoACLIdentity = new org.exoplatform.services.security.Identity("demo"); - org.exoplatform.services.security.Identity jamesACLIdentity = new org.exoplatform.services.security.Identity("james"); - org.exoplatform.services.security.Identity maryACLIdentity = new org.exoplatform.services.security.Identity("mary"); - org.exoplatform.services.security.Identity raulACLIdentity = new org.exoplatform.services.security.Identity("raul"); - org.exoplatform.services.security.Identity paulACLIdentity = new org.exoplatform.services.security.Identity("paul"); + org.exoplatform.services.security.Identity demoACLIdentity = new org.exoplatform.services.security.Identity(DEMO_NAME); + org.exoplatform.services.security.Identity jamesACLIdentity = new org.exoplatform.services.security.Identity(JAMES_NAME); + org.exoplatform.services.security.Identity maryACLIdentity = new org.exoplatform.services.security.Identity(MARY_NAME); + org.exoplatform.services.security.Identity raulACLIdentity = new org.exoplatform.services.security.Identity(RAUL_NAME); + org.exoplatform.services.security.Identity paulACLIdentity = new org.exoplatform.services.security.Identity(PAUL_NAME); ConversationState.setCurrent(new ConversationState(demoACLIdentity)); - Space space = createSpace("spaceTestPublish", "demo"); - space.setMembers(new String[]{"demo", "james", "mary", "raul"}); - space.setManagers(new String[]{"mary"}); - space.setPublishers(new String[]{"raul"}); - space.setRedactors(new String[]{"james"}); + Space space = createSpace("spaceTestPublish", DEMO_NAME); + space.setMembers(new String[] { DEMO_NAME, JAMES_NAME, MARY_NAME, RAUL_NAME }); + space.setManagers(new String[] { MARY_NAME }); + space.setPublishers(new String[] { RAUL_NAME }); + space.setRedactors(new String[] { JAMES_NAME }); spaceService.updateSpace(space); // Super Manager can publish space content @@ -762,41 +603,31 @@ public void testCanPublish() throws Exception { assertFalse(spaceService.canPublishOnSpace(space, paulACLIdentity.getUserId())); } - /** - * Test {@link SpaceService#getInvitedSpacesWithListAccess(String)} - * - * @throws Exception - * @since 1.2.0-GA - */ public void testGetInvitedSpacesWithListAccess() throws Exception { int count = 5; for (int i = 0; i < count; i++) { this.getSpaceInstance(i); } - ListAccess invitedSpaces = spaceService.getInvitedSpacesWithListAccess("register1"); - assertNotNull("invitedSpaces must not be null", invitedSpaces); - assertEquals("invitedSpaces.getSize() must return: " + count, count, invitedSpaces.getSize()); - assertEquals("invitedSpaces.load(0, 1).length must return: " + 1, 1, invitedSpaces.load(0, 1).length); - assertEquals("invitedSpaces.load(0, count).length must return: " + count, - count, - invitedSpaces.load(0, count).length); - invitedSpaces = spaceService.getInvitedSpacesWithListAccess("mary"); - assertNotNull("invitedSpaces must not be null", invitedSpaces); - assertEquals("invitedSpaces.getSize() must return: " + count, count, invitedSpaces.getSize()); - - invitedSpaces = spaceService.getInvitedSpacesWithListAccess("demo"); - assertNotNull("invitedSpaces must not be null", invitedSpaces); - assertEquals("invitedSpaces.getSize() must return: " + 0, 0, invitedSpaces.getSize()); + ListAccess invitedSpaces = spaceService.getInvitedSpacesWithListAccess(REGISTER1_NAME); + assertNotNull(invitedSpaces); + assertEquals(count, invitedSpaces.getSize()); + assertEquals(1, invitedSpaces.load(0, 1).length); + assertEquals(count, invitedSpaces.load(0, count).length); + invitedSpaces = spaceService.getInvitedSpacesWithListAccess(MARY_NAME); + assertNotNull(invitedSpaces); + assertEquals(count, invitedSpaces.getSize()); + invitedSpaces = spaceService.getInvitedSpacesWithListAccess(DEMO_NAME); + assertNotNull(invitedSpaces); + assertEquals(0, invitedSpaces.getSize()); } public void testCountPendingSpaceRequestsToManage() throws Exception { - populateData(); - Space space = spaceService.getSpaceByDisplayName("Space1"); - spaceService.addPendingUser(space, "paul"); - spaceService.addPendingUser(space, "james"); + Space space = populateData(); + spaceService.addPendingUser(space, PAUL_NAME); + spaceService.addPendingUser(space, JAMES_NAME); - ListAccess listAccess = spaceService.getPendingSpaceRequestsToManage("root"); + ListAccess listAccess = spaceService.getPendingSpaceRequestsToManage(ROOT_NAME); assertNotNull(listAccess); assertEquals(2, listAccess.getSize()); @@ -809,83 +640,65 @@ public void testCountPendingSpaceRequestsToManage() throws Exception { pendingSpaceRequestsToManage = listAccess.load(0, 10); assertEquals(2, pendingSpaceRequestsToManage.length); - boolean hasPaul = pendingSpaceRequestsToManage[0].getPendingUsers()[0].equals("paul") || pendingSpaceRequestsToManage[1].getPendingUsers()[0].equals("paul"); - boolean hasJames = pendingSpaceRequestsToManage[0].getPendingUsers()[0].equals("james") || pendingSpaceRequestsToManage[1].getPendingUsers()[0].equals("james"); + boolean hasPaul = pendingSpaceRequestsToManage[0].getPendingUsers()[0].equals(PAUL_NAME) + || pendingSpaceRequestsToManage[1].getPendingUsers()[0].equals(PAUL_NAME); + boolean hasJames = pendingSpaceRequestsToManage[0].getPendingUsers()[0].equals(JAMES_NAME) + || pendingSpaceRequestsToManage[1].getPendingUsers()[0].equals(JAMES_NAME); assertTrue(hasJames && hasPaul); } - /** - * Test {@link SpaceService#getPendingSpacesWithListAccess(String)} - * - * @throws Exception - * @since 1.2.0-GA - */ public void testGetPendingSpacesWithListAccess() throws Exception { int count = 5; for (int i = 0; i < count; i++) { this.getSpaceInstance(i); } - ListAccess foundSpaces = spaceService.getPendingSpacesWithListAccess("jame"); - assertNotNull("foundSpaces must not be null", foundSpaces); - assertEquals("foundSpaces.getSize() must return: " + count, count, foundSpaces.getSize()); - assertEquals("foundSpaces.load(0, 1).length must return: 1", - 1, - foundSpaces.load(0, 1).length); - assertEquals("foundSpaces.load(0, count).length must return: " + count, - count, - foundSpaces.load(0, count).length); - - foundSpaces = spaceService.getPendingSpacesWithListAccess("paul"); - assertNotNull("foundSpaces must not be null", foundSpaces); - assertEquals("foundSpaces.getSize() must return: " + count, count, foundSpaces.getSize()); - - foundSpaces = spaceService.getPendingSpacesWithListAccess("hacker"); - assertNotNull("foundSpaces must not be null", foundSpaces); - assertEquals("foundSpaces.getSize() must return: " + count, count, foundSpaces.getSize()); - - foundSpaces = spaceService.getPendingSpacesWithListAccess("ghost"); - assertNotNull("foundSpaces must not be null", foundSpaces); - assertEquals("foundSpaces.getSize() must return: " + 0, 0, foundSpaces.getSize()); + ListAccess foundSpaces = spaceService.getPendingSpacesWithListAccess(JAME_NAME); + assertNotNull(foundSpaces); + assertEquals(count, foundSpaces.getSize()); + assertEquals(1, foundSpaces.load(0, 1).length); + assertEquals(count, foundSpaces.load(0, count).length); + + foundSpaces = spaceService.getPendingSpacesWithListAccess(PAUL_NAME); + assertNotNull(foundSpaces); + assertEquals(count, foundSpaces.getSize()); + + foundSpaces = spaceService.getPendingSpacesWithListAccess(HACKER_NAME); + assertNotNull(foundSpaces); + assertEquals(count, foundSpaces.getSize()); + + foundSpaces = spaceService.getPendingSpacesWithListAccess(GHOST_NAME); + assertNotNull(foundSpaces); + assertEquals(0, foundSpaces.getSize()); foundSpaces = spaceService.getPendingSpacesWithListAccess("hellgate"); - assertNotNull("foundSpaces must not be null", foundSpaces); - assertEquals("foundSpaces.getSize() must return: " + 0, 0, foundSpaces.getSize()); + assertNotNull(foundSpaces); + assertEquals(0, foundSpaces.getSize()); } - /** - * Test {@link SpaceService#createSpace(Space, String)} - * - * @throws Exception - */ public void testCreateSpace() throws Exception { populateData(); - createMoreSpace("Space2"); + createMoreSpace(SPACE2_DISPLAY_NAME); ListAccess spaceListAccess = spaceService.getAllSpacesWithListAccess(); assertNotNull("spaceListAccess must not be null", spaceListAccess); assertEquals("spaceListAccess.getSize() must return: 2", 2, spaceListAccess.getSize()); } - public void testCreateSpaceWithManagersAndMembers() throws SpaceException { - String[] managers = { "manager" }; - String[] members = { "manager", "member1", "member2", "member3" }; - String creator = "root"; - String invitedGroup = "invited"; + public void testCreateSpaceWithManagersAndMembers() { Space space = new Space(); - space.setDisplayName("testSpace"); - space.setDescription("Space Description for Testing"); + space.setDisplayName(TEST_SPACE_DISPLAY_NAME); + space.setDescription(TEST_SPACE_DESCRIPTION); String shortName = Utils.cleanString(space.getDisplayName()); - space.setGroupId("/spaces/" + shortName); - space.setManagers(managers); - space.setMembers(members); space.setPrettyName(space.getDisplayName()); - space.setPriority("3"); - space.setRegistration("validation"); - space.setTag("Space Tag for Testing"); - space.setType("classic"); + space.setRegistration(Space.VALIDATION); space.setUrl(shortName); - space.setVisibility("public"); - spaceService.createSpace(space, creator); - tearDownSpaceList.add(space); + space.setVisibility(Space.PUBLIC); + Space createdSpace = spaceService.createSpace(space, ROOT_NAME); + String[] managers = { JOHN_NAME }; + String[] members = { JOHN_NAME, MARY_NAME, PAUL_NAME, JAME_NAME }; + Arrays.stream(members).forEach(u -> spaceService.addMember(createdSpace, u)); + Arrays.stream(managers).forEach(u -> spaceService.setManager(createdSpace, u, true)); + + space = spaceService.getSpaceById(createdSpace.getId()); // 2 = 1 creator + 1 managers assertEquals(2, space.getManagers().length); // 4 = 1 creator + 3 members @@ -893,29 +706,23 @@ public void testCreateSpaceWithManagersAndMembers() throws SpaceException { } public void testCreateSpaceEvent() throws SpaceException { - String[] managers = { "manager" }; - String creator = "root"; - String[] users = { "member1", "member2" }; + String[] managers = { MANAGER_NAME }; + String creator = ROOT_NAME; List invitedIdentities = new ArrayList<>(Arrays.asList(tom, dragon, hearBreaker)); Space space = new Space(); - space.setDisplayName("testSpace"); - space.setDescription("Space Description for Testing"); + space.setDisplayName(TEST_SPACE_DISPLAY_NAME); + space.setDescription(TEST_SPACE_DESCRIPTION); String shortName = Utils.cleanString(space.getDisplayName()); - space.setGroupId("/spaces/" + shortName); space.setManagers(managers); space.setPrettyName(space.getDisplayName()); - space.setPriority("3"); - space.setRegistration("validation"); - space.setTag("Space Tag for Testing"); - space.setType("classic"); + space.setRegistration(Space.VALIDATION); space.setUrl(shortName); - space.setVisibility("public"); + space.setVisibility(Space.PUBLIC); SpaceListenerPluginMock spaceListenerPlugin = new SpaceListenerPluginMock(); spaceService.registerSpaceListenerPlugin(spaceListenerPlugin); try { spaceService.createSpace(space, creator, invitedIdentities); - tearDownSpaceList.add(space); } finally { spaceService.unregisterSpaceListenerPlugin(spaceListenerPlugin); } @@ -927,15 +734,14 @@ public void testCreateSpaceEvent() throws SpaceException { assertEquals(Type.ADD_INVITED_USER, spaceListenerPlugin.getEvents().get(3)); } - public void testUpdateSpaceDescription() throws Exception { - Space space = createSpace("spaceUpdateDescription", "demo"); + public void testUpdateSpaceDescription() { + Space space = createSpace("spaceUpdateDescription", DEMO_NAME); SpaceListenerPluginMock spaceListenerPlugin = new SpaceListenerPluginMock(); spaceService.registerSpaceListenerPlugin(spaceListenerPlugin); try { space.setDescription("Updated Description"); spaceService.updateSpace(space); - tearDownSpaceList.add(space); } finally { spaceService.unregisterSpaceListenerPlugin(spaceListenerPlugin); } @@ -944,15 +750,14 @@ public void testUpdateSpaceDescription() throws Exception { assertEquals(Type.SPACE_DESCRIPTION_EDITED, spaceListenerPlugin.getEvents().get(0)); } - public void testUpdateSpaceAccess() throws Exception { - Space space = createSpace("spaceUpdateAccess", "demo"); + public void testUpdateSpaceAccess() { + Space space = createSpace("spaceUpdateAccess", DEMO_NAME); SpaceListenerPluginMock spaceListenerPlugin = new SpaceListenerPluginMock(); spaceService.registerSpaceListenerPlugin(spaceListenerPlugin); try { space.setVisibility(Space.HIDDEN); spaceService.updateSpace(space); - tearDownSpaceList.add(space); } finally { spaceService.unregisterSpaceListenerPlugin(spaceListenerPlugin); } @@ -961,15 +766,14 @@ public void testUpdateSpaceAccess() throws Exception { assertEquals(Type.SPACE_HIDDEN, spaceListenerPlugin.getEvents().get(0)); } - public void testUpdateSpaceRegistration() throws Exception { - Space space = createSpace("spaceUpdateRegistration", "demo"); + public void testUpdateSpaceRegistration() { + Space space = createSpace("spaceUpdateRegistration", DEMO_NAME); SpaceListenerPluginMock spaceListenerPlugin = new SpaceListenerPluginMock(); spaceService.registerSpaceListenerPlugin(spaceListenerPlugin); try { space.setRegistration(Space.VALIDATION); spaceService.updateSpace(space); - tearDownSpaceList.add(space); } finally { spaceService.unregisterSpaceListenerPlugin(spaceListenerPlugin); } @@ -978,14 +782,13 @@ public void testUpdateSpaceRegistration() throws Exception { assertEquals(Type.SPACE_REGISTRATION, spaceListenerPlugin.getEvents().get(0)); } - public void testSpaceUserInvitation() throws Exception { - Space space = createSpace("spaceUserInvitation", "demo"); + public void testSpaceUserInvitation() { + Space space = createSpace("spaceUserInvitation", DEMO_NAME); SpaceListenerPluginMock spaceListenerPlugin = new SpaceListenerPluginMock(); spaceService.registerSpaceListenerPlugin(spaceListenerPlugin); try { spaceService.addInvitedUser(space, john.getRemoteId()); - tearDownSpaceList.add(space); } finally { spaceService.unregisterSpaceListenerPlugin(spaceListenerPlugin); } @@ -994,15 +797,14 @@ public void testSpaceUserInvitation() throws Exception { assertEquals(Type.ADD_INVITED_USER, spaceListenerPlugin.getEvents().get(0)); } - public void testSpaceUserInvitationDeny() throws Exception { - Space space = createSpace("spaceUserInvitationDeny", "demo"); + public void testSpaceUserInvitationDeny() { + Space space = createSpace("spaceUserInvitationDeny", DEMO_NAME); spaceService.addInvitedUser(space, john.getRemoteId()); SpaceListenerPluginMock spaceListenerPlugin = new SpaceListenerPluginMock(); spaceService.registerSpaceListenerPlugin(spaceListenerPlugin); try { spaceService.removeInvitedUser(space, john.getRemoteId()); - tearDownSpaceList.add(space); } finally { spaceService.unregisterSpaceListenerPlugin(spaceListenerPlugin); } @@ -1011,79 +813,111 @@ public void testSpaceUserInvitationDeny() throws Exception { assertEquals(Type.DENY_INVITED_USER, spaceListenerPlugin.getEvents().get(0)); } - /** - * Test - * {@link SpaceService#createSpace(org.exoplatform.social.core.space.model.Space, String, List)} - */ - public void testCreateSpaceWithInvitation() throws Exception { - String[] managers = { "manager" }; - String creator = "root"; + public void testCreateSpaceWithInvitation() throws SpaceException { + String[] managers = { MANAGER_NAME }; Space spaceCreated = createMoreSpace("invitedSpace"); - String[] users = { "member1", "member2" }; + String[] users = { MEMBER1_NAME, MEMBER2_NAME }; spaceCreated.setMembers(users); spaceService.updateSpace(spaceCreated); - Identity spaceIdentity = getService(IdentityManager.class).getOrCreateIdentity(SpaceIdentityProvider.NAME, - "invitedspace", - false); + Identity spaceIdentity = getService(IdentityManager.class).getOrCreateSpaceIdentity("invitedspace"); List invitedIdentities = new ArrayList<>(Arrays.asList(tom, dragon, hearBreaker, spaceIdentity)); Space space = new Space(); - space.setDisplayName("testSpace"); - space.setDescription("Space Description for Testing"); + space.setDisplayName(TEST_SPACE_DISPLAY_NAME); + space.setDescription(TEST_SPACE_DESCRIPTION); String shortName = Utils.cleanString(space.getDisplayName()); - space.setGroupId("/spaces/" + shortName); space.setManagers(managers); space.setPrettyName(space.getDisplayName()); - space.setPriority("3"); space.setRegistration("validation"); - space.setTag("Space Tag for Testing"); - space.setType("classic"); space.setUrl(shortName); - space.setVisibility("public"); - spaceService.createSpace(space, creator, invitedIdentities); - tearDownSpaceList.add(space); - // 2 = 1 creator + 1 managers - assertEquals(2, space.getManagers().length); + space.setVisibility(Space.PUBLIC); + space = spaceService.createSpace(space, ROOT_NAME, invitedIdentities); // 5 = member1, member2 from invitedSpace + tom + dragon + hearBreaker assertEquals(5, space.getInvitedUsers().length); } - public void testCreateSpaceExceedingNameLimit() throws RuntimeException { + public void testCreateSpaceExceedingNameLimit() { Space space = new Space(); String spaceDisplayName = - "zzz0123456791011121314151617181920012345679101112131415161718192001234567910111213141516171819200123456791011121314151617181920012345679101112131415161718192001234567910111213141516171819200123456791011121314151617181920012345679101112131415161718192001234567910111213141516171819200123456791011121314151617181920"; - String shortName = "zzz"; + "zzz0123456791011121314151617181920012345679101112131415161718192001234567910111213141516171819200123456791011121314151617181920012345679101112131415161718192001234567910111213141516171819200123456791011121314151617181920012345679101112131415161718192001234567910111213141516171819200123456791011121314151617181920"; + space.setDisplayName(spaceDisplayName); + space.setRegistration(Space.OPEN); + space.setDescription(SPACE_DESCRIPTION); + space.setVisibility(Space.PUBLIC); + space.setRegistration(Space.VALIDATION); + assertThrows(SpaceException.class, () -> spaceService.createSpace(space, ROOT_NAME)); + } + + public void testCreateSpaceNameTooShort() { + Space space = new Space(); + String spaceDisplayName = "zz"; space.setDisplayName(spaceDisplayName); - space.setPrettyName(shortName); space.setRegistration(Space.OPEN); - space.setDescription("add new space "); - space.setType(DefaultSpaceApplicationHandler.NAME); + space.setDescription(SPACE_DESCRIPTION); space.setVisibility(Space.PUBLIC); space.setRegistration(Space.VALIDATION); - space.setPriority(Space.INTERMEDIATE_PRIORITY); - String creator = "root"; - space.setGroupId("/spaces/" + shortName); + assertThrows(SpaceException.class, () -> spaceService.createSpace(space, ROOT_NAME)); + } + + public void testCreateSpaceWithNoNameWhenSpaceTemplateAllowsIt() throws ObjectNotFoundException { + SpaceTemplateService spaceTemplateService = getService(SpaceTemplateService.class); + SpaceTemplate spaceTemplate = spaceTemplateService.getSpaceTemplates().getFirst(); + List originalSpaceFields = spaceTemplate.getSpaceFields(); + + try { + Space space = new Space(); + space.setRegistration(Space.OPEN); + space.setDescription(SPACE_DESCRIPTION); + space.setVisibility(Space.PUBLIC); + space.setRegistration(Space.VALIDATION); + assertThrows(SpaceException.class, () -> spaceService.createSpace(space, ROOT_NAME)); + + spaceTemplate.setSpaceFields(Collections.singletonList("invitation")); + spaceTemplateService.updateSpaceTemplate(spaceTemplate); + + Space createdSpace = spaceService.createSpace(space, DRAGON_NAME); + assertNotNull(createdSpace); + assertEquals("Dragon Ball", createdSpace.getDisplayName()); + } finally { + spaceTemplate.setSpaceFields(originalSpaceFields); + spaceTemplateService.updateSpaceTemplate(spaceTemplate); + } + } + + public void testCreateSpaceWithTemplateCharacteristics() throws ObjectNotFoundException, SpaceException { + SpaceTemplateService spaceTemplateService = getService(SpaceTemplateService.class); + SpaceTemplate spaceTemplate = spaceTemplateService.getSpaceTemplates().getFirst(); + List originalSpaceFields = spaceTemplate.getSpaceFields(); + spaceTemplate.setSpaceFields(Collections.singletonList("invitation")); + spaceTemplateService.updateSpaceTemplate(spaceTemplate); + try { - spaceService.createSpace(space, creator); - fail("Should have thrown an RuntimeException because Name length exceeds limits"); - } catch (RuntimeException e) { - assertTrue(e.getMessage().contains("space name cannot exceed 200 characters")); + Space createdSpace = spaceService.createSpace(new Space(), RAUL_NAME, Arrays.asList(dragon, john)); + assertNotNull(createdSpace); + assertTrue(createdSpace.getDisplayName().contains("Dragon Ball")); + assertTrue(createdSpace.getDisplayName().contains("and 1 more")); + assertTrue(createdSpace.getDisplayName().contains(", ")); + assertEquals(spaceTemplate.getSpaceDefaultVisibility().name().toLowerCase(), createdSpace.getVisibility()); + assertEquals(spaceTemplate.getSpaceDefaultRegistration().name().toLowerCase(), createdSpace.getRegistration()); + assertEquals(spaceTemplate.getSpaceDeletePermissions(), createdSpace.getDeletePermissions()); + assertEquals(spaceTemplate.getSpaceLayoutPermissions(), createdSpace.getLayoutPermissions()); + } finally { + spaceTemplate.setSpaceFields(originalSpaceFields); + spaceTemplateService.updateSpaceTemplate(spaceTemplate); } } - public void testCreateSpaceWithInvalidSpaceName() throws RuntimeException { + public void testCreateSpaceWithInvalidSpaceName() { Space space = new Space(); String spaceDisplayName = "%zzz:^!/<>😁"; space.setDisplayName(spaceDisplayName); - String creator = "root"; + String creator = ROOT_NAME; String shortName = "zzz"; space.setDisplayName(spaceDisplayName); space.setPrettyName(shortName); space.setRegistration(Space.OPEN); - space.setDescription("add new space "); - space.setType(DefaultSpaceApplicationHandler.NAME); + space.setDescription(SPACE_DESCRIPTION); space.setVisibility(Space.PUBLIC); space.setRegistration(Space.VALIDATION); - space.setPriority(Space.INTERMEDIATE_PRIORITY); space = spaceService.createSpace(space, creator); assertEquals(spaceDisplayName, space.getDisplayName()); assertFalse(space.getPrettyName().contains("%")); @@ -1096,37 +930,24 @@ public void testCreateSpaceWithInvalidSpaceName() throws RuntimeException { assertFalse(space.getPrettyName().contains("😁")); } - /** - * Test {@link SpaceService#createSpace(Space)} - * - * @throws Exception - * @since 1.2.0-GA - */ - public void testCreateSpaceNoUser() throws Exception { + public void testCreateSpaceNoUser() { Space space = this.getSpaceInstance(0); String spaceDisplayName = space.getDisplayName(); String spaceDescription = space.getDescription(); String groupId = space.getGroupId(); - Space savedSpace = spaceService.getSpaceByDisplayName(spaceDisplayName); - assertNotNull("savedSpace must not be null", savedSpace); - assertEquals("savedSpace.getDisplayName() must return: " + spaceDisplayName, spaceDisplayName, savedSpace.getDisplayName()); - assertEquals("savedSpace.getDescription() must return: " + spaceDescription, spaceDescription, savedSpace.getDescription()); - assertEquals("savedSpace.getGroupId() must return: " + groupId, groupId, savedSpace.getGroupId()); + Space savedSpace = spaceService.getSpaceById(space.getId()); + assertNotNull(savedSpace); + assertEquals(spaceDisplayName, savedSpace.getDisplayName()); + assertEquals(spaceDescription, savedSpace.getDescription()); + assertEquals(groupId, savedSpace.getGroupId()); assertNotNull(savedSpace.getAvatarUrl()); } - /** - * Test {@link SpaceService#renameSpace(Space, String)} - * - * @throws Exception - * @since 1.2.8 - */ - public void testRenameSpace() throws Exception { + public void testRenameSpace() throws SpaceException { Space space = this.getSpaceInstance(0); Identity identity = new Identity(SpaceIdentityProvider.NAME, space.getPrettyName()); identityStorage.saveIdentity(identity); - tearDownUserList.add(identity); String newDisplayName = "new display name"; @@ -1135,15 +956,13 @@ public void testRenameSpace() throws Exception { Space got = spaceService.getSpaceById(space.getId()); assertEquals(newDisplayName, got.getDisplayName()); - { - newDisplayName = "new display name with super admin"; + newDisplayName = "new display name with super admin"; - // - spaceService.renameSpace(space, newDisplayName, root.getRemoteId()); + // + spaceService.renameSpace(space, newDisplayName, root.getRemoteId()); - got = spaceService.getSpaceById(space.getId()); - assertEquals(newDisplayName, got.getDisplayName()); - } + got = spaceService.getSpaceById(space.getId()); + assertEquals(newDisplayName, got.getDisplayName()); assertThrows(SpaceException.class, () -> spaceService.renameSpace(space, @@ -1153,577 +972,460 @@ public void testRenameSpace() throws Exception { assertNotNull(identityManager.getOrCreateSpaceIdentity(space.getPrettyName())); String oldPrettyName = space.getPrettyName(); - { - newDisplayName = "new display name with null remoteId"; + newDisplayName = "new display name with null remoteId"; - // - spaceService.renameSpace(space, newDisplayName); + // + spaceService.renameSpace(space, newDisplayName); - got = spaceService.getSpaceById(space.getId()); - assertEquals(newDisplayName, got.getDisplayName()); - } + got = spaceService.getSpaceById(space.getId()); + assertEquals(newDisplayName, got.getDisplayName()); assertNotNull(identityManager.getOrCreateSpaceIdentity(space.getPrettyName())); assertNull(identityManager.getOrCreateSpaceIdentity(oldPrettyName)); } - /** - * Test {@link SpaceService#deleteSpace(Space)} - * - * @throws Exception - * @since 1.2.0-GA - */ public void testDeleteSpace() throws Exception { Space space = this.getSpaceInstance(0); String spaceDisplayName = space.getDisplayName(); String spaceDescription = space.getDescription(); String groupId = space.getGroupId(); - Space savedSpace = spaceService.getSpaceByDisplayName(spaceDisplayName); - assertNotNull("savedSpace must not be null", savedSpace); - assertEquals("savedSpace.getDisplayName() must return: " + spaceDisplayName, spaceDisplayName, savedSpace.getDisplayName()); - assertEquals("savedSpace.getDescription() must return: " + spaceDescription, spaceDescription, savedSpace.getDescription()); - assertEquals("savedSpace.getGroupId() must return: " + groupId, groupId, savedSpace.getGroupId()); - assertNotNull("the group " +groupId + " must exist", organizationService.getGroupHandler().findGroupById(groupId)); + Space savedSpace = spaceService.getSpaceById(space.getId()); + assertNotNull(savedSpace); + assertEquals(spaceDisplayName, savedSpace.getDisplayName()); + assertEquals(spaceDescription, savedSpace.getDescription()); + assertEquals(groupId, savedSpace.getGroupId()); + assertNotNull(organizationService.getGroupHandler().findGroupById(groupId)); spaceService.deleteSpace(space); - savedSpace = spaceService.getSpaceByDisplayName(spaceDisplayName); + savedSpace = spaceService.getSpaceById(space.getId()); assertNull("savedSpace must be null", savedSpace); - assertNull("the group " +groupId + " must be deleted after space deletion ", organizationService.getGroupHandler().findGroupById(groupId)); + assertNull("the group " + groupId + " must be deleted after space deletion ", + organizationService.getGroupHandler().findGroupById(groupId)); } - - public void testDeleteSpaceWithoutDelitingGroup() throws Exception { + public void testDeleteSpaceWithoutDeletingGroup() throws Exception { Space space = this.getSpaceInstance(0); String spaceDisplayName = space.getDisplayName(); String spaceDescription = space.getDescription(); String groupId = space.getGroupId(); - Space savedSpace = spaceService.getSpaceByDisplayName(spaceDisplayName); - assertNotNull("savedSpace must not be null", savedSpace); - assertEquals("savedSpace.getDisplayName() must return: " + spaceDisplayName, spaceDisplayName, savedSpace.getDisplayName()); - assertEquals("savedSpace.getDescription() must return: " + spaceDescription, spaceDescription, savedSpace.getDescription()); - assertEquals("savedSpace.getGroupId() must return: " + groupId, groupId, savedSpace.getGroupId()); - assertNotNull("the group " +groupId + " must exist", organizationService.getGroupHandler().findGroupById(groupId)); + Space savedSpace = spaceService.getSpaceById(space.getId()); + assertNotNull(savedSpace); + assertEquals(spaceDisplayName, savedSpace.getDisplayName()); + assertEquals(spaceDescription, savedSpace.getDescription()); + assertEquals(groupId, savedSpace.getGroupId()); + assertNotNull(organizationService.getGroupHandler().findGroupById(groupId)); spaceService.deleteSpace(space, false); - savedSpace = spaceService.getSpaceByDisplayName(spaceDisplayName); + savedSpace = spaceService.getSpaceById(space.getId()); assertNull("savedSpace must be null", savedSpace); - assertNotNull("the group " +groupId + " must exist after space deletion", organizationService.getGroupHandler().findGroupById(groupId)); + assertNotNull("the group " + groupId + " must exist after space deletion", + organizationService.getGroupHandler().findGroupById(groupId)); Group group = organizationService.getGroupHandler().findGroupById(groupId); organizationService.getGroupHandler().removeGroup(group, true); } - public void testUpdateSpacePermissions() throws Exception { + public void testUpdateSpacePermissions() { Space space = this.getSpaceInstance(0); try { - spaceService.updateSpaceBanner(space, "raul"); + spaceService.updateSpaceBanner(space, RAUL_NAME); fail("Space member shouldn't be able to update space banner"); } catch (Exception e) { // Expected } try { - spaceService.updateSpaceAvatar(space, "raul"); + spaceService.updateSpaceAvatar(space, RAUL_NAME); fail("Space member shouldn't be able to update space avatar"); } catch (Exception e) { // Expected } } - /** - * Test {@link SpaceService#updateSpace(Space)} - * - * @throws Exception - * @since 1.2.0-GA - */ - public void testUpdateSpace() throws Exception { + public void testUpdateSpace() { Space space = this.getSpaceInstance(0); String spaceDisplayName = space.getDisplayName(); String spaceDescription = space.getDescription(); String groupId = space.getGroupId(); - Space savedSpace = spaceService.getSpaceByDisplayName(spaceDisplayName); - assertNotNull("savedSpace must not be null", savedSpace); - assertEquals("savedSpace.getDisplayName() must return: " + spaceDisplayName, spaceDisplayName, savedSpace.getDisplayName()); - assertEquals("savedSpace.getDescription() must return: " + spaceDescription, spaceDescription, savedSpace.getDescription()); - assertEquals("savedSpace.getGroupId() must return: " + groupId, groupId, savedSpace.getGroupId()); + Space savedSpace = spaceService.getSpaceById(space.getId()); + assertNotNull(savedSpace); + assertEquals(spaceDisplayName, savedSpace.getDisplayName()); + assertEquals(spaceDescription, savedSpace.getDescription()); + assertEquals(groupId, savedSpace.getGroupId()); String updateSpaceDisplayName = "update new space display name"; space.setDisplayName(updateSpaceDisplayName); space.setPrettyName(space.getDisplayName()); spaceService.updateSpace(space); - savedSpace = spaceService.getSpaceByDisplayName(updateSpaceDisplayName); - assertNotNull("savedSpace must not be null", savedSpace); + savedSpace = spaceService.getSpaceById(space.getId()); + assertNotNull(savedSpace); assertEquals("savedSpace.getDisplayName() must return: " + updateSpaceDisplayName, updateSpaceDisplayName, savedSpace.getDisplayName()); - assertEquals("savedSpace.getDescription() must return: " + spaceDescription, spaceDescription, savedSpace.getDescription()); - assertEquals("savedSpace.getGroupId() must return: " + groupId, groupId, savedSpace.getGroupId()); + assertEquals(spaceDescription, savedSpace.getDescription()); + assertEquals(groupId, savedSpace.getGroupId()); } - /** - * Test {@link SpaceService#addPendingUser(Space, String)} - * - * @throws Exception - * @since 1.2.0-GA - */ - public void testAddPendingUser() throws Exception { + public void testAddPendingUser() { Space space = this.getSpaceInstance(0); int pendingUsersCount = space.getPendingUsers().length; assertFalse("ArrayUtils.contains(space.getPendingUsers(), newPendingUser.getRemoteId()) must be false", ArrayUtils.contains(space.getPendingUsers(), newPendingUser.getRemoteId())); spaceService.addPendingUser(space, newPendingUser.getRemoteId()); - space = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertEquals("space.getPendingUsers().length must return: " + pendingUsersCount + 1, - pendingUsersCount + 1, + space = spaceService.getSpaceById(space.getId()); + assertEquals(pendingUsersCount + 1, space.getPendingUsers().length); - assertTrue("ArrayUtils.contains(space.getPendingUsers(), newPendingUser.getRemoteId()) must be true", + assertTrue( ArrayUtils.contains(space.getPendingUsers(), newPendingUser.getRemoteId())); } - /** - * Test {@link SpaceService#removePendingUser(Space, String)} - * - * @throws Exception - * @since 1.2.0-GA - */ - public void testRemovePendingUser() throws Exception { + public void testRemovePendingUser() { Space space = this.getSpaceInstance(0); int pendingUsersCount = space.getPendingUsers().length; assertFalse("ArrayUtils.contains(space.getPendingUsers(), newPendingUser.getRemoteId()) must be false", ArrayUtils.contains(space.getPendingUsers(), newPendingUser.getRemoteId())); spaceService.addPendingUser(space, newPendingUser.getRemoteId()); - space = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertEquals("space.getPendingUsers().length must return: " + pendingUsersCount + 1, - pendingUsersCount + 1, + space = spaceService.getSpaceById(space.getId()); + assertEquals(pendingUsersCount + 1, space.getPendingUsers().length); - assertTrue("ArrayUtils.contains(space.getPendingUsers(), newPendingUser.getRemoteId()) must be true", + assertTrue( ArrayUtils.contains(space.getPendingUsers(), newPendingUser.getRemoteId())); spaceService.removePendingUser(space, newPendingUser.getRemoteId()); - space = spaceService.getSpaceByDisplayName(space.getDisplayName()); + space = spaceService.getSpaceById(space.getId()); assertEquals("space.getPendingUsers().length must return: " + pendingUsersCount, pendingUsersCount, space.getPendingUsers().length); - assertFalse("ArrayUtils.contains(space.getPendingUsers(), newPendingUser.getRemoteId()) must be true", + assertFalse( ArrayUtils.contains(space.getPendingUsers(), newPendingUser.getRemoteId())); } - /** - * Test {@link SpaceService#isPendingUser(Space, String)} - * - * @throws Exception@since 1.2.0-GA - * @since 1.2.0-GA - */ - public void testIsPendingUser() throws Exception { + public void testIsPendingUser() { Space space = this.getSpaceInstance(0); - Space savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertNotNull("savedSpace must not be null", savedSpace); + Space savedSpace = spaceService.getSpaceById(space.getId()); + assertNotNull(savedSpace); assertTrue("spaceService.isPendingUser(savedSpace, \"jame\") must return true", - spaceService.isPendingUser(savedSpace, "jame")); + spaceService.isPendingUser(savedSpace, JAME_NAME)); assertTrue("spaceService.isPendingUser(savedSpace, \"paul\") must return true", - spaceService.isPendingUser(savedSpace, "paul")); + spaceService.isPendingUser(savedSpace, PAUL_NAME)); assertTrue("spaceService.isPendingUser(savedSpace, \"hacker\") must return true", - spaceService.isPendingUser(savedSpace, "hacker")); + spaceService.isPendingUser(savedSpace, HACKER_NAME)); assertFalse("spaceService.isPendingUser(savedSpace, \"newpendinguser\") must return false", spaceService.isPendingUser(savedSpace, "newpendinguser")); } - /** - * Test {@link SpaceService#addInvitedUser(Space, String)} - * - * @throws Exception - */ - public void testAddInvitedUser() throws Exception { + public void testAddInvitedUser() { Space space = this.getSpaceInstance(0); - Space savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertNotNull("savedSpace must not be null", savedSpace); + Space savedSpace = spaceService.getSpaceById(space.getId()); + assertNotNull(savedSpace); int invitedUsersCount = savedSpace.getInvitedUsers().length; - assertFalse("ArrayUtils.contains(savedSpace.getInvitedUsers(), newInvitedUser.getRemoteId()) must return false", - ArrayUtils.contains(savedSpace.getInvitedUsers(), newInvitedUser.getRemoteId())); + assertFalse(ArrayUtils.contains(savedSpace.getInvitedUsers(), newInvitedUser.getRemoteId())); spaceService.addInvitedUser(savedSpace, newInvitedUser.getRemoteId()); - savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertEquals("savedSpace.getInvitedUsers().length must return: " + invitedUsersCount + 1, - invitedUsersCount + 1, + savedSpace = spaceService.getSpaceById(space.getId()); + assertEquals(invitedUsersCount + 1, savedSpace.getInvitedUsers().length); assertTrue("ArrayUtils.contains(savedSpace.getInvitedUsers(), newInvitedUser.getRemoteId()) must return true", ArrayUtils.contains(savedSpace.getInvitedUsers(), newInvitedUser.getRemoteId())); } - /** - * Test {@link SpaceService#removeInvitedUser(Space, String)} - * - * @throws Exception - * @since 1.2.0-GA - */ - public void testRemoveInvitedUser() throws Exception { + public void testRemoveInvitedUser() { Space space = this.getSpaceInstance(0); - Space savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertNotNull("savedSpace must not be null", savedSpace); + Space savedSpace = spaceService.getSpaceById(space.getId()); + assertNotNull(savedSpace); int invitedUsersCount = savedSpace.getInvitedUsers().length; - assertFalse("ArrayUtils.contains(savedSpace.getInvitedUsers(), newInvitedUser.getRemoteId()) must return false", - ArrayUtils.contains(savedSpace.getInvitedUsers(), newInvitedUser.getRemoteId())); + assertFalse(ArrayUtils.contains(savedSpace.getInvitedUsers(), newInvitedUser.getRemoteId())); spaceService.addInvitedUser(savedSpace, newInvitedUser.getRemoteId()); - savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertEquals("savedSpace.getInvitedUsers().length must return: " + invitedUsersCount + 1, - invitedUsersCount + 1, + savedSpace = spaceService.getSpaceById(space.getId()); + assertEquals(invitedUsersCount + 1, savedSpace.getInvitedUsers().length); assertTrue("ArrayUtils.contains(savedSpace.getInvitedUsers(), newInvitedUser.getRemoteId()) must return true", ArrayUtils.contains(savedSpace.getInvitedUsers(), newInvitedUser.getRemoteId())); spaceService.removeInvitedUser(savedSpace, newInvitedUser.getRemoteId()); - savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); + savedSpace = spaceService.getSpaceById(space.getId()); assertEquals("savedSpace.getInvitedUsers().length must return: " + invitedUsersCount, invitedUsersCount, savedSpace.getInvitedUsers().length); - assertFalse("ArrayUtils.contains(savedSpace.getInvitedUsers(), newInvitedUser.getRemoteId()) must return false", - ArrayUtils.contains(savedSpace.getInvitedUsers(), newInvitedUser.getRemoteId())); + assertFalse(ArrayUtils.contains(savedSpace.getInvitedUsers(), newInvitedUser.getRemoteId())); } - /** - * Test {@link SpaceService#isInvitedUser(Space, String)} - * - * @throws Exception - * @since 1.2.0-GA - */ - public void testIsInvitedUser() throws Exception { + public void testIsInvitedUser() { Space space = this.getSpaceInstance(0); - Space savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertNotNull("savedSpace must not be null", savedSpace); + Space savedSpace = spaceService.getSpaceById(space.getId()); + assertNotNull(savedSpace); assertTrue("spaceService.isInvitedUser(savedSpace, \"register1\") must return true", - spaceService.isInvitedUser(savedSpace, "register1")); + spaceService.isInvitedUser(savedSpace, REGISTER1_NAME)); assertTrue("spaceService.isInvitedUser(savedSpace, \"mary\") must return true", - spaceService.isInvitedUser(savedSpace, "mary")); + spaceService.isInvitedUser(savedSpace, MARY_NAME)); assertFalse("spaceService.isInvitedUser(savedSpace, \"hacker\") must return false", - spaceService.isInvitedUser(savedSpace, "hacker")); + spaceService.isInvitedUser(savedSpace, HACKER_NAME)); assertFalse("spaceService.isInvitedUser(savedSpace, \"nobody\") must return false", spaceService.isInvitedUser(savedSpace, "nobody")); } - /** - * Test {@link SpaceService#setManager(Space, String, boolean)} - * - * @throws Exception - * @since 1.2.0-GA - */ - public void testSetManager() throws Exception { + public void testSetManager() { int number = 0; Space space = new Space(); - space.setDisplayName("my space " + number); + space.setDisplayName(MY_SPACE_DISPLAY_NAME_PREFIX + number); space.setPrettyName(space.getDisplayName()); space.setRegistration(Space.OPEN); - space.setDescription("add new space " + number); - space.setType(DefaultSpaceApplicationHandler.NAME); + space.setDescription(SPACE_DESCRIPTION + number); space.setVisibility(Space.PUBLIC); space.setRegistration(Space.VALIDATION); - space.setPriority(Space.INTERMEDIATE_PRIORITY); - space.setGroupId("/space/space" + number); space.setUrl(space.getPrettyName()); - String[] spaceManagers = new String[] { "demo", "tom" }; - String[] members = new String[] { "demo", "tom" , "raul", "ghost", "dragon" }; - String[] invitedUsers = new String[] { "register1", "mary" }; - String[] pendingUsers = new String[] { "jame", "paul", "hacker" }; + String[] spaceManagers = new String[] { DEMO_NAME, TOM_NAME }; + String[] members = new String[] { DEMO_NAME, TOM_NAME, RAUL_NAME, GHOST_NAME, DRAGON_NAME }; + String[] invitedUsers = new String[] { REGISTER1_NAME, MARY_NAME }; + String[] pendingUsers = new String[] { JAME_NAME, PAUL_NAME, HACKER_NAME }; space.setInvitedUsers(invitedUsers); space.setPendingUsers(pendingUsers); space.setManagers(spaceManagers); space.setMembers(members); - space = this.createSpaceNonInitApps(space, "demo", null); + space = this.createSpaceNonInitApps(space, DEMO_NAME, null); - // Space space = this.getSpaceInstance(0); - Space savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertNotNull("savedSpace must not be null", savedSpace); + Space savedSpace = spaceService.getSpaceById(space.getId()); + assertNotNull(savedSpace); int managers = savedSpace.getManagers().length; - spaceService.setManager(savedSpace, "demo", true); - savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertEquals("savedSpace.getManagers().length must return: " + managers, managers, savedSpace.getManagers().length); + spaceService.setManager(savedSpace, DEMO_NAME, true); + savedSpace = spaceService.getSpaceById(space.getId()); + assertEquals(managers, savedSpace.getManagers().length); - spaceService.setManager(savedSpace, "john", true); - savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); + spaceService.setManager(savedSpace, JOHN_NAME, true); + savedSpace = spaceService.getSpaceById(space.getId()); assertEquals("savedSpace.getManagers().length must return: " + managers + 1, managers + 1, savedSpace.getManagers().length); - spaceService.setManager(savedSpace, "demo", false); - savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertEquals("savedSpace.getManagers().length must return: " + managers, managers, savedSpace.getManagers().length); + spaceService.setManager(savedSpace, DEMO_NAME, false); + savedSpace = spaceService.getSpaceById(space.getId()); + assertEquals(managers, savedSpace.getManagers().length); } - /** - * Test {@link SpaceService#isManager(Space, String)} - * - * @throws Exception - * @since 1.2.0-GA - */ - public void testIsManager() throws Exception { + public void testIsManager() { Space space = this.getSpaceInstance(0); - Space savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertNotNull("savedSpace must not be null", savedSpace); - assertTrue("spaceService.isManager(savedSpace, \"demo\") must return true", spaceService.isManager(savedSpace, "demo")); - assertTrue("spaceService.isManager(savedSpace, \"tom\") must return true", spaceService.isManager(savedSpace, "tom")); - assertFalse("spaceService.isManager(savedSpace, \"mary\") must return false", spaceService.isManager(savedSpace, "mary")); - assertFalse("spaceService.isManager(savedSpace, \"john\") must return false", spaceService.isManager(savedSpace, "john")); - } - - /** - * Test {@link SpaceService#setRedactor(Space, String, boolean)} - * - * @throws Exception - */ - public void testSetRedactor() throws Exception { + Space savedSpace = spaceService.getSpaceById(space.getId()); + assertNotNull(savedSpace); + assertTrue("spaceService.isManager(savedSpace, \"demo\") must return true", spaceService.isManager(savedSpace, DEMO_NAME)); + assertTrue("spaceService.isManager(savedSpace, \"tom\") must return true", spaceService.isManager(savedSpace, TOM_NAME)); + assertFalse("spaceService.isManager(savedSpace, \"mary\") must return false", spaceService.isManager(savedSpace, MARY_NAME)); + assertFalse("spaceService.isManager(savedSpace, \"john\") must return false", spaceService.isManager(savedSpace, JOHN_NAME)); + } + + public void testSetRedactor() { Space space = new Space(); - space.setDisplayName("space1"); + space.setDisplayName(SPACE1_NAME); space.setPrettyName(space.getDisplayName()); space.setRegistration(Space.OPEN); space.setDescription("add new space1"); - space.setType(DefaultSpaceApplicationHandler.NAME); space.setVisibility(Space.PUBLIC); space.setRegistration(Space.VALIDATION); - space.setPriority(Space.INTERMEDIATE_PRIORITY); - space.setGroupId("/space/space1"); - space.setUrl(space.getPrettyName()); - space = spaceService.createSpace(space, "root"); - String[] members = new String[] { "ghost", "john" }; - space.setMembers(members); + Space createdSpace = spaceService.createSpace(space, ROOT_NAME); + String[] members = new String[] { GHOST_NAME, JOHN_NAME }; + Arrays.stream(members).forEach(u -> spaceService.addMember(createdSpace, u)); + assertEquals(0, createdSpace.getRedactors().length); + MembershipType redactorMembershipType = organizationService.getMembershipTypeHandler().createMembershipTypeInstance(); redactorMembershipType.setName("redactor"); - spaceService.addRedactor(space, "ghost"); - spaceService.addRedactor(space, "john"); + spaceService.addRedactor(createdSpace, GHOST_NAME); + spaceService.addRedactor(createdSpace, JOHN_NAME); + + space = spaceService.getSpaceById(createdSpace.getId()); assertEquals(2, space.getRedactors().length); - spaceService.removeRedactor(space, "john"); + + spaceService.removeRedactor(createdSpace, JOHN_NAME); + space = spaceService.getSpaceById(createdSpace.getId()); assertEquals(1, space.getRedactors().length); - assertTrue(spaceService.isRedactor(space, "ghost")); - assertFalse(spaceService.isRedactor(space, "john")); + assertTrue(spaceService.isRedactor(createdSpace, GHOST_NAME)); + assertFalse(spaceService.isRedactor(createdSpace, JOHN_NAME)); } - - /** - * Test {@link SpaceService#addPublisher(Space, String, boolean)} - * Test {@link SpaceService#removePublisher(Space, String)} - * Test {@link SpaceService#isPublisher(Space, String)} - * - * @throws Exception - */ - public void testSetPublisher() throws Exception { + + public void testSetPublisher() { Space space = new Space(); - space.setDisplayName("space1"); + space.setDisplayName(SPACE1_NAME); space.setPrettyName(space.getDisplayName()); space.setRegistration(Space.OPEN); space.setDescription("add new space1"); - space.setType(DefaultSpaceApplicationHandler.NAME); space.setVisibility(Space.PUBLIC); space.setRegistration(Space.VALIDATION); - space.setPriority(Space.INTERMEDIATE_PRIORITY); - space.setGroupId("/space/space1"); space.setUrl(space.getPrettyName()); - space = spaceService.createSpace(space, "root"); - String[] members = new String[] { "ghost", "john" }; - space.setMembers(members); + Space createdSpace = spaceService.createSpace(space, ROOT_NAME); + String[] members = new String[] { GHOST_NAME, JOHN_NAME }; + Arrays.stream(members).forEach(u -> spaceService.addMember(createdSpace, u)); + MembershipType publisherMembershipType = organizationService.getMembershipTypeHandler().createMembershipTypeInstance(); publisherMembershipType.setName("publisher"); - spaceService.addPublisher(space, "ghost"); - spaceService.addPublisher(space, "john"); - assertEquals(2, space.getPublishers().length); - spaceService.removePublisher(space, "john"); - assertEquals(1, space.getPublishers().length); - assertTrue(spaceService.isPublisher(space, "ghost")); - assertFalse(spaceService.isPublisher(space, "john")); + spaceService.addPublisher(createdSpace, GHOST_NAME); + spaceService.addPublisher(createdSpace, JOHN_NAME); + assertEquals(2, createdSpace.getPublishers().length); + spaceService.removePublisher(createdSpace, JOHN_NAME); + assertEquals(1, createdSpace.getPublishers().length); + assertTrue(spaceService.isPublisher(createdSpace, GHOST_NAME)); + assertFalse(spaceService.isPublisher(createdSpace, JOHN_NAME)); } - /** - * Test {@link SpaceService#isOnlyManager(Space, String)} - * - * @throws Exception - * @since 1.2.0-GA - */ - public void testIsOnlyManager() throws Exception { + public void testIsOnlyManager() { Space space = this.getSpaceInstance(0); - Space savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertNotNull("savedSpace must not be null", savedSpace); + Space savedSpace = spaceService.getSpaceById(space.getId()); + assertNotNull(savedSpace); assertFalse("spaceService.isOnlyManager(savedSpace, \"tom\") must return false", - spaceService.isOnlyManager(savedSpace, "tom")); + spaceService.isOnlyManager(savedSpace, TOM_NAME)); assertFalse("spaceService.isOnlyManager(savedSpace, \"demo\") must return false", - spaceService.isOnlyManager(savedSpace, "demo")); + spaceService.isOnlyManager(savedSpace, DEMO_NAME)); - savedSpace.setManagers(new String[] { "demo" }); + savedSpace.setManagers(new String[] { DEMO_NAME }); spaceService.updateSpace(savedSpace); assertTrue("spaceService.isOnlyManager(savedSpace, \"demo\") must return true", - spaceService.isOnlyManager(savedSpace, "demo")); + spaceService.isOnlyManager(savedSpace, DEMO_NAME)); assertFalse("spaceService.isOnlyManager(savedSpace, \"tom\") must return false", - spaceService.isOnlyManager(savedSpace, "tom")); + spaceService.isOnlyManager(savedSpace, TOM_NAME)); - savedSpace.setManagers(new String[] { "tom" }); + savedSpace.setManagers(new String[] { TOM_NAME }); spaceService.updateSpace(savedSpace); assertFalse("spaceService.isOnlyManager(savedSpace, \"demo\") must return false", - spaceService.isOnlyManager(savedSpace, "demo")); - assertTrue("spaceService.isOnlyManager(savedSpace, \"tom\") must return true", spaceService.isOnlyManager(savedSpace, "tom")); + spaceService.isOnlyManager(savedSpace, DEMO_NAME)); + assertTrue("spaceService.isOnlyManager(savedSpace, \"tom\") must return true", + spaceService.isOnlyManager(savedSpace, TOM_NAME)); } - /** - * Test {@link SpaceService#addMember(Space, String)} - * - * @throws Exception - * @since 1.2.0-GA - */ - public void testAddMember() throws Exception { + public void testAddMember() { int number = 0; Space space = new Space(); - space.setDisplayName("my space " + number); + space.setDisplayName(MY_SPACE_DISPLAY_NAME_PREFIX + number); space.setPrettyName(space.getDisplayName()); space.setRegistration(Space.OPEN); - space.setDescription("add new space " + number); - space.setType(DefaultSpaceApplicationHandler.NAME); + space.setDescription(SPACE_DESCRIPTION + number); space.setVisibility(Space.PUBLIC); space.setRegistration(Space.VALIDATION); - space.setPriority(Space.INTERMEDIATE_PRIORITY); - space.setGroupId("/space/space" + number); space.setUrl(space.getPrettyName()); - String[] spaceManagers = new String[] { "demo" }; + String[] spaceManagers = new String[] { DEMO_NAME }; String[] members = new String[] {}; - String[] invitedUsers = new String[] { "register1", "mary" }; - String[] pendingUsers = new String[] { "jame", "paul", "hacker" }; + String[] invitedUsers = new String[] { REGISTER1_NAME, MARY_NAME }; + String[] pendingUsers = new String[] { JAME_NAME, PAUL_NAME, HACKER_NAME }; space.setInvitedUsers(invitedUsers); space.setPendingUsers(pendingUsers); space.setManagers(spaceManagers); space.setMembers(members); - space = this.createSpaceNonInitApps(space, "demo", null); + space = this.createSpaceNonInitApps(space, DEMO_NAME, null); - Space savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertNotNull("savedSpace must not be null", savedSpace); + Space savedSpace = spaceService.getSpaceById(space.getId()); + assertNotNull(savedSpace); - spaceService.addMember(savedSpace, "root"); - spaceService.addMember(savedSpace, "mary"); - spaceService.addMember(savedSpace, "john"); - savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); + spaceService.addMember(savedSpace, ROOT_NAME); + spaceService.addMember(savedSpace, MARY_NAME); + spaceService.addMember(savedSpace, JOHN_NAME); + savedSpace = spaceService.getSpaceById(space.getId()); assertEquals("savedSpace.getMembers().length must return 4", 4, savedSpace.getMembers().length); } - /** - * Test {@link SpaceService#addMember(Space, String)} - * - * @throws Exception - * @since 1.2.0-GA - */ public void testAddMemberSpecialCharacter() throws Exception { String reg = "^\\p{L}[\\p{L}\\d\\s._,-]+$"; Pattern pattern = Pattern.compile(reg); - assertTrue(pattern.matcher("user-new.1").matches()); - assertTrue(pattern.matcher("user.new").matches()); - assertTrue(pattern.matcher("user-new").matches()); + assertTrue(pattern.matcher(USER_NEW_1_NAME).matches()); + assertTrue(pattern.matcher(USER_DOT_NEW_NAME).matches()); + assertTrue(pattern.matcher(USER_NEW_NAME).matches()); int number = 0; Space space = new Space(); - space.setDisplayName("my space " + number); + space.setDisplayName(MY_SPACE_DISPLAY_NAME_PREFIX + number); space.setPrettyName(space.getDisplayName()); space.setRegistration(Space.OPEN); - space.setDescription("add new space " + number); - space.setType(DefaultSpaceApplicationHandler.NAME); + space.setDescription(SPACE_DESCRIPTION + number); space.setVisibility(Space.PUBLIC); space.setRegistration(Space.VALIDATION); - space.setPriority(Space.INTERMEDIATE_PRIORITY); - space.setGroupId("/space/space" + number); space.setUrl(space.getPrettyName()); - String[] spaceManagers = new String[] { "demo" }; + String[] spaceManagers = new String[] { DEMO_NAME }; String[] members = new String[] {}; - String[] invitedUsers = new String[] { "register1", "mary" }; - String[] pendingUsers = new String[] { "jame", "paul", "hacker" }; + String[] invitedUsers = new String[] { REGISTER1_NAME, MARY_NAME }; + String[] pendingUsers = new String[] { JAME_NAME, PAUL_NAME, HACKER_NAME }; space.setInvitedUsers(invitedUsers); space.setPendingUsers(pendingUsers); space.setManagers(spaceManagers); space.setMembers(members); - space = this.createSpaceNonInitApps(space, "demo", null); + space = this.createSpaceNonInitApps(space, DEMO_NAME, null); - Space savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertNotNull("savedSpace must not be null", savedSpace); + Space savedSpace = spaceService.getSpaceById(space.getId()); + assertNotNull(savedSpace); - User user = organizationService.getUserHandler().createUserInstance("user-new.1"); + User user = organizationService.getUserHandler().createUserInstance(USER_NEW_1_NAME); organizationService.getUserHandler().createUser(user, false); - user = organizationService.getUserHandler().createUserInstance("user.new"); + user = organizationService.getUserHandler().createUserInstance(USER_DOT_NEW_NAME); organizationService.getUserHandler().createUser(user, false); - user = organizationService.getUserHandler().createUserInstance("user-new"); + user = organizationService.getUserHandler().createUserInstance(USER_NEW_NAME); organizationService.getUserHandler().createUser(user, false); - spaceService.addMember(savedSpace, "user-new.1"); - spaceService.addMember(savedSpace, "user.new"); - spaceService.addMember(savedSpace, "user-new"); - savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); + spaceService.addMember(savedSpace, USER_NEW_1_NAME); + spaceService.addMember(savedSpace, USER_DOT_NEW_NAME); + spaceService.addMember(savedSpace, USER_NEW_NAME); + savedSpace = spaceService.getSpaceById(space.getId()); assertEquals(4, savedSpace.getMembers().length); } - /** - * Test {@link SpaceService#removeMember(Space, String)} - * - * @throws Exception - * @since 1.2.0-GA - */ public void testRemoveMember() throws Exception { int number = 0; Space space = new Space(); - space.setDisplayName("my space " + number); + space.setDisplayName(MY_SPACE_DISPLAY_NAME_PREFIX + number); space.setPrettyName(space.getDisplayName()); space.setRegistration(Space.OPEN); - space.setDescription("add new space " + number); - space.setType(DefaultSpaceApplicationHandler.NAME); + space.setDescription(SPACE_DESCRIPTION + number); space.setVisibility(Space.PUBLIC); space.setRegistration(Space.VALIDATION); - space.setPriority(Space.INTERMEDIATE_PRIORITY); - space.setGroupId("/space/space" + number); space.setUrl(space.getPrettyName()); - String[] spaceManagers = new String[] { "demo" }; + String[] spaceManagers = new String[] { DEMO_NAME }; String[] members = new String[] {}; - String[] invitedUsers = new String[] { "register1", "mary" }; - String[] pendingUsers = new String[] { "jame", "paul", "hacker" }; + String[] invitedUsers = new String[] { REGISTER1_NAME, MARY_NAME }; + String[] pendingUsers = new String[] { JAME_NAME, PAUL_NAME, HACKER_NAME }; space.setInvitedUsers(invitedUsers); space.setPendingUsers(pendingUsers); space.setManagers(spaceManagers); space.setMembers(members); - space = this.createSpaceNonInitApps(space, "demo", null); - Space savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertNotNull("savedSpace must not be null", savedSpace); + space = this.createSpaceNonInitApps(space, DEMO_NAME, null); + Space savedSpace = spaceService.getSpaceById(space.getId()); + assertNotNull(savedSpace); - spaceService.addMember(savedSpace, "root"); - spaceService.addMember(savedSpace, "mary"); - spaceService.addMember(savedSpace, "john"); - spaceService.setManager(savedSpace, "john", true); - spaceService.addRedactor(savedSpace, "john"); + spaceService.addMember(savedSpace, ROOT_NAME); + spaceService.addMember(savedSpace, MARY_NAME); + spaceService.addMember(savedSpace, JOHN_NAME); + spaceService.setManager(savedSpace, JOHN_NAME, true); + spaceService.addRedactor(savedSpace, JOHN_NAME); GroupHandler groupHandler = organizationService.getGroupHandler(); UserHandler userHandler = organizationService.getUserHandler(); MembershipType mbShipTypeMember = organizationService.getMembershipTypeHandler() .findMembershipType(MembershipTypeHandler.ANY_MEMBERSHIP_TYPE); - User user = userHandler.findUserByName("john"); + User user = userHandler.findUserByName(JOHN_NAME); organizationService.getMembershipHandler() .linkMembership(user, groupHandler.findGroupById(space.getGroupId()), mbShipTypeMember, true); - savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); + savedSpace = spaceService.getSpaceById(space.getId()); assertEquals("savedSpace.getMembers().length must return 4", 4, savedSpace.getMembers().length); - spaceService.removeMember(savedSpace, "root"); - spaceService.removeMember(savedSpace, "mary"); - spaceService.removeMember(savedSpace, "john"); + spaceService.removeMember(savedSpace, ROOT_NAME); + spaceService.removeMember(savedSpace, MARY_NAME); + spaceService.removeMember(savedSpace, JOHN_NAME); Membership any = organizationService.getMembershipHandler() - .findMembershipByUserGroupAndType("john", + .findMembershipByUserGroupAndType(JOHN_NAME, space.getGroupId(), MembershipTypeHandler.ANY_MEMBERSHIP_TYPE); assertNull(any); - assertFalse(spaceService.isManager(savedSpace, "john")); - assertFalse(spaceService.isRedactor(savedSpace, "john")); - assertFalse(spaceService.isMember(savedSpace, "john")); + assertFalse(spaceService.isManager(savedSpace, JOHN_NAME)); + assertFalse(spaceService.isRedactor(savedSpace, JOHN_NAME)); + assertFalse(spaceService.isMember(savedSpace, JOHN_NAME)); assertEquals("savedSpace.getMembers().length must return 1", 1, savedSpace.getMembers().length); } public void testDeleteSpaceWithBoundMember() throws Exception { - String userToBind = "paul"; + String userToBind = PAUL_NAME; int number = 17; Space space = new Space(); - space.setDisplayName("my space " + number); + space.setDisplayName(MY_SPACE_DISPLAY_NAME_PREFIX + number); space.setPrettyName(space.getDisplayName()); space.setRegistration(Space.OPEN); - space.setDescription("add new space " + number); + space.setDescription(SPACE_DESCRIPTION + number); space.setVisibility(Space.PUBLIC); space.setRegistration(Space.VALIDATION); - space.setPriority(Space.INTERMEDIATE_PRIORITY); - space.setGroupId("/space/space" + number); space.setUrl(space.getPrettyName()); - space.setMembers(new String[] { "john", "mary" }); - space = this.createSpaceNonInitApps(space, "john", null); - Space savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); + space.setMembers(new String[] { JOHN_NAME, MARY_NAME }); + space = this.createSpaceNonInitApps(space, JOHN_NAME, null); + Space savedSpace = spaceService.getSpaceById(space.getId()); spaceService.addMember(savedSpace, userToBind); Group groupToBind = organizationService.getGroupHandler().createGroupInstance(); @@ -1775,22 +1477,20 @@ public void testDeleteSpaceWithBoundMember() throws Exception { } public void testRemoveBoundMember() throws Exception { - String userToBind = "paul"; + String userToBind = PAUL_NAME; int number = 0; Space space = new Space(); - space.setDisplayName("my space " + number); + space.setDisplayName(MY_SPACE_DISPLAY_NAME_PREFIX + number); space.setPrettyName(space.getDisplayName()); space.setRegistration(Space.OPEN); - space.setDescription("add new space " + number); + space.setDescription(SPACE_DESCRIPTION + number); space.setVisibility(Space.PUBLIC); space.setRegistration(Space.VALIDATION); - space.setPriority(Space.INTERMEDIATE_PRIORITY); - space.setGroupId("/space/space" + number); space.setUrl(space.getPrettyName()); - space.setMembers(new String[] { "john", "mary" }); - space = this.createSpaceNonInitApps(space, "john", null); - Space savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); + space.setMembers(new String[] { JOHN_NAME, MARY_NAME }); + space = this.createSpaceNonInitApps(space, JOHN_NAME, null); + Space savedSpace = spaceService.getSpaceById(space.getId()); spaceService.addMember(savedSpace, userToBind); Group groupToBind = organizationService.getGroupHandler().createGroupInstance(); @@ -1868,22 +1568,16 @@ public void testRemoveBoundMember() throws Exception { assertNull(membership); } - /** - * Test {@link SpaceService#getMemberSpacesIds(String, int, int)} - * - * @throws Exception - * @since 6.4.0-GA - */ - public void testGetMemberSpaces() throws Exception { + public void testGetMemberSpaces() { Space[] listSpace = new Space[10]; - for (int i = 0; i < listSpace.length; i ++) { + for (int i = 0; i < listSpace.length; i++) { listSpace[i] = this.getSpaceInstance(i); } restartTransaction(); - String raulUsername = "raul"; - String jameUsername = "jame"; + String raulUsername = RAUL_NAME; + String jameUsername = JAME_NAME; List spaceIds = spaceService.getMemberSpacesIds(raulUsername, 0, -1); assertNotNull(spaceIds); @@ -1916,273 +1610,58 @@ public void testGetMemberSpaces() throws Exception { assertEquals(0, spaceIds.size()); } - /** - * Test {@link SpaceService#isMember(Space, String)} - * - * @throws Exception - * @since 1.2.0-GA - */ - public void testIsMember() throws Exception { + public void testIsMember() { Space space = this.getSpaceInstance(0); - Space savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertNotNull("savedSpace must not be null", savedSpace); + Space savedSpace = spaceService.getSpaceById(space.getId()); + assertNotNull(savedSpace); - assertTrue("spaceService.isMember(savedSpace, \"raul\") must return true", spaceService.isMember(savedSpace, "raul")); - assertTrue("spaceService.isMember(savedSpace, \"ghost\") must return true", spaceService.isMember(savedSpace, "ghost")); - assertTrue("spaceService.isMember(savedSpace, \"dragon\") must return true", spaceService.isMember(savedSpace, "dragon")); + assertTrue("spaceService.isMember(savedSpace, \"raul\") must return true", spaceService.isMember(savedSpace, RAUL_NAME)); + assertTrue("spaceService.isMember(savedSpace, \"ghost\") must return true", spaceService.isMember(savedSpace, GHOST_NAME)); + assertTrue("spaceService.isMember(savedSpace, \"dragon\") must return true", spaceService.isMember(savedSpace, DRAGON_NAME)); assertFalse("spaceService.isMember(savedSpace, \"stranger\") must return true", spaceService.isMember(savedSpace, "stranger")); } - /** - * Test {@link SpaceService#activateApplication(Space, String)} - * - * @throws Exception - * @since 1.2.0-GA - */ - public void testActivateApplication() throws Exception { - startSessionAs("root"); - String spaceName = "testSpace"; - String creator = "john"; - Space space = new Space(); - space.setDisplayName(spaceName); - space.setPrettyName(spaceName); - space.setGroupId("/spaces/" + space.getPrettyName()); - space.setRegistration(Space.OPEN); - space.setDescription("description of space" + spaceName); - space.setType(DefaultSpaceApplicationHandler.NAME); - space.setVisibility(Space.PRIVATE); - space.setRegistration(Space.OPEN); - space.setPriority(Space.INTERMEDIATE_PRIORITY); - space.setManagers(new String[] { creator }); - space.setMembers(new String[] { creator }); - space = spaceService.createSpace(space, "root"); - tearDownSpaceList.add(space); - - assertTrue(space.getApp().contains("DashboardPortlet")); - spaceService.removeApplication(space, "DashboardPortlet", "Dashboard"); - assertFalse(space.getApp().contains("DashboardPortlet")); - spaceService.activateApplication(space, "DashboardPortlet"); - assertTrue(space.getApp().contains("DashboardPortlet")); - - NavigationContext navContext = SpaceUtils.getGroupNavigationContext(space.getGroupId()); - NodeContext> homeNodeCtx = SpaceUtils.getHomeNodeWithChildren(navContext, space.getUrl()); - boolean found = homeNodeCtx.getNodes() - .stream() - .filter(node -> "dashboard".equals(node.getName())) - .findAny() - .isPresent(); - assertTrue(found); - } - - public void testRequestJoin() throws Exception { - Space space = this.getSpaceInstance(0); - int pendingUsersCount = space.getPendingUsers().length; - assertFalse("ArrayUtils.contains(space.getPendingUsers(), newPendingUser.getRemoteId()) must be false", - ArrayUtils.contains(space.getPendingUsers(), newPendingUser.getRemoteId())); - spaceService.addPendingUser(space, newPendingUser.getRemoteId()); - space = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertEquals("space.getPendingUsers().length must return: " + pendingUsersCount + 1, - pendingUsersCount + 1, - space.getPendingUsers().length); - assertTrue("ArrayUtils.contains(space.getPendingUsers(), newPendingUser.getRemoteId()) must be true", - ArrayUtils.contains(space.getPendingUsers(), newPendingUser.getRemoteId())); - } - - /** - * Test {@link SpaceService#removePendingUser(Space, String)} - * - * @throws Exception - * @since 1.2.0-GA - */ - public void testRevokeRequestJoin() throws Exception { + public void testRevokeRequestJoin() { Space space = this.getSpaceInstance(0); int pendingUsersCount = space.getPendingUsers().length; assertFalse("ArrayUtils.contains(space.getPendingUsers(), newPendingUser) must be false", ArrayUtils.contains(space.getPendingUsers(), newPendingUser.getRemoteId())); spaceService.addPendingUser(space, newPendingUser.getRemoteId()); - space = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertEquals("space.getPendingUsers().length must return: " + pendingUsersCount + 1, - pendingUsersCount + 1, + space = spaceService.getSpaceById(space.getId()); + assertEquals(pendingUsersCount + 1, space.getPendingUsers().length); - assertTrue("ArrayUtils.contains(space.getPendingUsers(), newPendingUser.getRemoteId()) must be true", + assertTrue( ArrayUtils.contains(space.getPendingUsers(), newPendingUser.getRemoteId())); spaceService.removePendingUser(space, newPendingUser.getRemoteId()); - space = spaceService.getSpaceByDisplayName(space.getDisplayName()); + space = spaceService.getSpaceById(space.getId()); assertEquals("space.getPendingUsers().length must return: " + pendingUsersCount, pendingUsersCount, space.getPendingUsers().length); - assertFalse("ArrayUtils.contains(space.getPendingUsers(), newPendingUser.getRemoteId()) must be true", - ArrayUtils.contains(space.getPendingUsers(), newPendingUser.getRemoteId())); - } - - /** - * Test {@link SpaceService#addInvitedUser(Space, String)} - * - * @throws Exception - * @since 1.2.0-GA - */ - public void testInviteMember() throws Exception { - Space space = this.getSpaceInstance(0); - Space savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertNotNull("savedSpace must not be null", savedSpace); - int invitedUsersCount = savedSpace.getInvitedUsers().length; - assertFalse("ArrayUtils.contains(savedSpace.getInvitedUsers(), newInvitedUser.getRemoteId()) must return false", - ArrayUtils.contains(savedSpace.getInvitedUsers(), newInvitedUser.getRemoteId())); - spaceService.addInvitedUser(savedSpace, newInvitedUser.getRemoteId()); - savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertEquals("savedSpace.getInvitedUsers().length must return: " + invitedUsersCount + 1, - invitedUsersCount + 1, - savedSpace.getInvitedUsers().length); - assertTrue("ArrayUtils.contains(savedSpace.getInvitedUsers(), newInvitedUser.getRemoteId()) must return true", - ArrayUtils.contains(savedSpace.getInvitedUsers(), newInvitedUser.getRemoteId())); - } - - /** - * Test {@link SpaceService#removeInvitedUser(Space, String)} - * - * @throws Exception - * @since 1.2.0-GA - */ - public void testRevokeInvitation() throws Exception { - Space space = this.getSpaceInstance(0); - Space savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertNotNull("savedSpace must not be null", savedSpace); - int invitedUsersCount = savedSpace.getInvitedUsers().length; - assertFalse("ArrayUtils.contains(savedSpace.getInvitedUsers(), newInvitedUser.getRemoteId()) must return false", - ArrayUtils.contains(savedSpace.getInvitedUsers(), newInvitedUser.getRemoteId())); - spaceService.addInvitedUser(savedSpace, newInvitedUser.getRemoteId()); - savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertEquals("savedSpace.getInvitedUsers().length must return: " + invitedUsersCount + 1, - invitedUsersCount + 1, - savedSpace.getInvitedUsers().length); - assertTrue("ArrayUtils.contains(savedSpace.getInvitedUsers(), newInvitedUser.getRemoteId()) must return true", - ArrayUtils.contains(savedSpace.getInvitedUsers(), newInvitedUser.getRemoteId())); - spaceService.removeInvitedUser(savedSpace, newInvitedUser.getRemoteId()); - savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertEquals("savedSpace.getInvitedUsers().length must return: " + invitedUsersCount, - invitedUsersCount, - savedSpace.getInvitedUsers().length); - assertFalse("ArrayUtils.contains(savedSpace.getInvitedUsers(), newInvitedUser.getRemoteId()) must return false", - ArrayUtils.contains(savedSpace.getInvitedUsers(), newInvitedUser.getRemoteId())); - } - - /** - * Test {@link SpaceService#addMember(Space, String)} - * - * @throws Exception - * @since 1.2.0-GA - */ - public void testAcceptInvitation() throws Exception { - int number = 0; - Space space = new Space(); - space.setDisplayName("my space " + number); - space.setPrettyName(space.getDisplayName()); - space.setRegistration(Space.OPEN); - space.setDescription("add new space " + number); - space.setType(DefaultSpaceApplicationHandler.NAME); - space.setVisibility(Space.PUBLIC); - space.setRegistration(Space.VALIDATION); - space.setPriority(Space.INTERMEDIATE_PRIORITY); - space.setGroupId("/space/space" + number); - space.setUrl(space.getPrettyName()); - String[] spaceManagers = new String[] { "demo" }; - String[] members = new String[] {}; - String[] invitedUsers = new String[] { "register1", "mary" }; - String[] pendingUsers = new String[] { "jame", "paul", "hacker" }; - space.setInvitedUsers(invitedUsers); - space.setPendingUsers(pendingUsers); - space.setManagers(spaceManagers); - space.setMembers(members); - - space = this.createSpaceNonInitApps(space, "demo", null); - - Space savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertNotNull("savedSpace must not be null", savedSpace); - - spaceService.addMember(savedSpace, "root"); - spaceService.addMember(savedSpace, "mary"); - spaceService.addMember(savedSpace, "john"); - savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertEquals("savedSpace.getMembers().length must return 4", 4, savedSpace.getMembers().length); - IdentityManager identityManager = (IdentityManager) getContainer().getComponentInstanceOfType(IdentityManager.class); - ActivityManager activityManager = (ActivityManager) getContainer().getComponentInstanceOfType(ActivityManager.class); + assertFalse(ArrayUtils.contains(space.getPendingUsers(), newPendingUser.getRemoteId())); } - /** - * Test {@link SpaceService#removeInvitedUser(Space, String)} - * - * @throws Exception - * @since 1.2.0-GA - */ - public void testDenyInvitation() throws Exception { + public void testDenyInvitation() { Space space = this.getSpaceInstance(0); - Space savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertNotNull("savedSpace must not be null", savedSpace); + Space savedSpace = spaceService.getSpaceById(space.getId()); + assertNotNull(savedSpace); spaceService.removeInvitedUser(savedSpace, "new member 1"); spaceService.removeInvitedUser(savedSpace, "new member 2"); spaceService.removeInvitedUser(savedSpace, "new member 3"); assertEquals("savedSpace.getMembers().length must return 2", 2, savedSpace.getInvitedUsers().length); - spaceService.removeInvitedUser(savedSpace, "raul"); - spaceService.removeInvitedUser(savedSpace, "ghost"); - spaceService.removeInvitedUser(savedSpace, "dragon"); + spaceService.removeInvitedUser(savedSpace, RAUL_NAME); + spaceService.removeInvitedUser(savedSpace, GHOST_NAME); + spaceService.removeInvitedUser(savedSpace, DRAGON_NAME); assertEquals("savedSpace.getMembers().length must return 2", 2, savedSpace.getInvitedUsers().length); - spaceService.removeInvitedUser(savedSpace, "register1"); - spaceService.removeInvitedUser(savedSpace, "mary"); + spaceService.removeInvitedUser(savedSpace, REGISTER1_NAME); + spaceService.removeInvitedUser(savedSpace, MARY_NAME); assertEquals("savedSpace.getMembers().length must return 0", 0, savedSpace.getInvitedUsers().length); } - /** - * Test {@link SpaceService#addMember(Space, String)} - * - * @throws Exception - * @since 1.2.0-GA - */ - public void testValidateRequest() throws Exception { - int number = 0; - Space space = new Space(); - space.setDisplayName("my space " + number); - space.setPrettyName(space.getDisplayName()); - space.setRegistration(Space.OPEN); - space.setDescription("add new space " + number); - space.setType(DefaultSpaceApplicationHandler.NAME); - space.setVisibility(Space.PUBLIC); - space.setRegistration(Space.VALIDATION); - space.setPriority(Space.INTERMEDIATE_PRIORITY); - space.setGroupId("/space/space" + number); - space.setUrl(space.getPrettyName()); - String[] spaceManagers = new String[] { "demo" }; - String[] members = new String[] {}; - String[] invitedUsers = new String[] { "register1", "mary" }; - String[] pendingUsers = new String[] { "jame", "paul", "hacker" }; - space.setInvitedUsers(invitedUsers); - space.setPendingUsers(pendingUsers); - space.setManagers(spaceManagers); - space.setMembers(members); - - space = this.createSpaceNonInitApps(space, "demo", null); - - Space savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertNotNull("savedSpace must not be null", savedSpace); - - spaceService.addMember(savedSpace, "root"); - spaceService.addMember(savedSpace, "mary"); - spaceService.addMember(savedSpace, "john"); - savedSpace = spaceService.getSpaceByDisplayName(space.getDisplayName()); - assertEquals("savedSpace.getMembers().length must return 4", 4, savedSpace.getMembers().length); - } - - /** - * Test - * {@link SpaceStorage#getVisibleSpaces(java.lang.String, org.exoplatform.social.core.space.SpaceFilter)(String)} - * - * @throws Exception - * @since 1.2.5-GA - */ public void testGetVisibleSpaces() throws Exception { int countSpace = 10; Space[] listSpace = new Space[10]; @@ -2192,18 +1671,18 @@ public void testGetVisibleSpaces() throws Exception { if (i < 6) // [0->5] :: there are 6 spaces with visible = 'private' - listSpace[i] = this.getSpaceInstance(i, Space.PRIVATE, Space.OPEN, "demo"); + listSpace[i] = this.getSpaceInstance(i, Space.PRIVATE, Space.OPEN, DEMO_NAME); else // [6->9]:: there are 4 spaces with visible = 'hidden' - listSpace[i] = this.getSpaceInstance(i, Space.HIDDEN, Space.OPEN, "demo"); + listSpace[i] = this.getSpaceInstance(i, Space.HIDDEN, Space.OPEN, DEMO_NAME); spaceService.createSpace(listSpace[i]); } // visible with remoteId = 'demo' return 10 spaces - Space[] visibleAllSpaces = spaceService.getVisibleSpacesWithListAccess("demo", null).load(0, countSpace * 2); - assertNotNull("visibleSpaces must not be null", visibleAllSpaces); - assertEquals("visibleSpaces() must return: " + countSpace, countSpace, visibleAllSpaces.length); + Space[] visibleAllSpaces = spaceService.getVisibleSpacesWithListAccess(DEMO_NAME, null).load(0, countSpace * 2); + assertNotNull(visibleAllSpaces); + assertEquals(countSpace, visibleAllSpaces.length); } /** @@ -2222,40 +1701,30 @@ public void testGetVisibleSpacesCloseRegistration() throws Exception { if (i < 6) // [0->5] :: there are 6 spaces with visible = 'private' - listSpace[i] = this.getSpaceInstance(i, Space.PRIVATE, Space.CLOSED, "demo"); + listSpace[i] = this.getSpaceInstance(i, Space.PRIVATE, Space.CLOSED, DEMO_NAME); else // [6->9]:: there are 4 spaces with visible = 'hidden' - listSpace[i] = this.getSpaceInstance(i, Space.HIDDEN, Space.CLOSED, "demo"); + listSpace[i] = this.getSpaceInstance(i, Space.HIDDEN, Space.CLOSED, DEMO_NAME); spaceService.createSpace(listSpace[i]); } // visible with remoteId = 'demo' return 10 spaces - { - Space[] visibleAllSpaces = spaceService.getVisibleSpacesWithListAccess("demo", null).load(0, countSpace * 2); - assertNotNull("visibleSpaces must not be null", visibleAllSpaces); - assertEquals("visibleSpaces() must return: " + countSpace, countSpace, visibleAllSpaces.length); - } + Space[] visibleAllSpaces = spaceService.getVisibleSpacesWithListAccess(DEMO_NAME, null).load(0, countSpace * 2); + assertNotNull(visibleAllSpaces); + assertEquals(countSpace, visibleAllSpaces.length); // visible with remoteId = 'mary' return 6 spaces: can see - { - int registrationCloseSpaceCount = 6; - Space[] visibleAllSpaces = spaceService.getVisibleSpacesWithListAccess("mary", null).load(0, registrationCloseSpaceCount * 2); - assertNotNull("registrationCloseSpaces must not be null", visibleAllSpaces); - assertEquals("registrationCloseSpaces must return: " + registrationCloseSpaceCount, - registrationCloseSpaceCount, - visibleAllSpaces.length); - } + int registrationCloseSpaceCount = 6; + visibleAllSpaces = spaceService.getVisibleSpacesWithListAccess(MARY_NAME, null) + .load(0, registrationCloseSpaceCount * 2); + assertNotNull("registrationCloseSpaces must not be null", visibleAllSpaces); + assertEquals("registrationCloseSpaces must return: " + registrationCloseSpaceCount, + registrationCloseSpaceCount, + visibleAllSpaces.length); } - /** - * Test - * {@link org.exoplatform.social.core.storage.SpaceStorage#getVisibleSpaces(String)} - * - * @throws Exception - * @since 1.2.5-GA - */ public void testGetVisibleSpacesInvitedMember() throws Exception { int countSpace = 10; Space[] listSpace = new Space[10]; @@ -2269,50 +1738,42 @@ public void testGetVisibleSpacesInvitedMember() throws Exception { this.getSpaceInstanceInvitedMember(i, Space.PRIVATE, Space.CLOSED, - new String[] { "mary", "hacker" }, - "demo"); + new String[] { MARY_NAME, HACKER_NAME }, + DEMO_NAME); else // [6->9]:: there are 4 spaces with visible = 'hidden' - listSpace[i] = this.getSpaceInstance(i, Space.HIDDEN, Space.CLOSED, "demo"); + listSpace[i] = this.getSpaceInstance(i, Space.HIDDEN, Space.CLOSED, DEMO_NAME); spaceService.createSpace(listSpace[i]); } // visible with remoteId = 'demo' return 10 spaces - { - Space[] visibleAllSpaces = spaceService.getVisibleSpacesWithListAccess("demo", null).load(0, countSpace * 2); - assertNotNull("visibleSpaces must not be null", visibleAllSpaces); - assertEquals("visibleSpaces() must return: " + countSpace, countSpace, visibleAllSpaces.length); - } + Space[] visibleAllSpaces = spaceService.getVisibleSpacesWithListAccess(DEMO_NAME, null).load(0, countSpace * 2); + assertNotNull(visibleAllSpaces); + assertEquals(countSpace, visibleAllSpaces.length); // visible with invited = 'mary' return 6 spaces - { - int invitedSpaceCount1 = 6; - Space[] invitedSpaces1 = spaceService.getVisibleSpacesWithListAccess("mary", null).load(0, invitedSpaceCount1 * 2); - assertNotNull("invitedSpaces must not be null", invitedSpaces1); - assertEquals("invitedSpaces must return: " + invitedSpaceCount1, invitedSpaceCount1, invitedSpaces1.length); - } + int invitedSpaceCount1 = 6; + Space[] invitedSpaces1 = spaceService.getVisibleSpacesWithListAccess(MARY_NAME, null).load(0, invitedSpaceCount1 * 2); + assertNotNull(invitedSpaces1); + assertEquals(invitedSpaceCount1, invitedSpaces1.length); // visible with invited = 'hacker' return 6 spaces - { - int invitedSpaceCount1 = 6; - Space[] invitedSpaces1 = spaceService.getVisibleSpacesWithListAccess("hacker", null).load(0, invitedSpaceCount1 * 2); - assertNotNull("invitedSpaces must not be null", invitedSpaces1); - assertEquals("invitedSpaces must return: " + invitedSpaceCount1, invitedSpaceCount1, invitedSpaces1.length); - } + invitedSpaceCount1 = 6; + invitedSpaces1 = spaceService.getVisibleSpacesWithListAccess(HACKER_NAME, null).load(0, invitedSpaceCount1 * 2); + assertNotNull(invitedSpaces1); + assertEquals(invitedSpaceCount1, invitedSpaces1.length); // visible with invited = 'paul' return 6 spaces - { - int invitedSpaceCount2 = 6; - Space[] invitedSpaces2 = spaceService.getVisibleSpacesWithListAccess("paul", null).load(0, invitedSpaceCount2 * 2); - assertNotNull("invitedSpaces must not be null", invitedSpaces2); - assertEquals("invitedSpaces must return: " + invitedSpaceCount2, invitedSpaceCount2, invitedSpaces2.length); - } + int invitedSpaceCount2 = 6; + Space[] invitedSpaces2 = spaceService.getVisibleSpacesWithListAccess(PAUL_NAME, null).load(0, invitedSpaceCount2 * 2); + assertNotNull(invitedSpaces2); + assertEquals(invitedSpaceCount2, invitedSpaces2.length); } - public void testGetLastSpaces() throws Exception { + public void testGetLastSpaces() throws SpaceException { populateData(); - createMoreSpace("Space2"); + createMoreSpace(SPACE2_DISPLAY_NAME); List lastSpaces = spaceService.getLastSpaces(1); assertEquals(1, lastSpaces.size()); Space sp1 = lastSpaces.get(0); @@ -2355,6 +1816,7 @@ public void testInviteSuperManager() throws Exception { organizationService.getUserHandler().createUser(superManager, false); Identity superManagerIdentity = identityManager.getOrCreateUserIdentity(username); assertFalse(spaceService.isSuperManager(username)); + // Create Super managers group Group group = organizationService.getGroupHandler().createGroupInstance(); group.setGroupName("space-managers"); @@ -2362,50 +1824,50 @@ public void testInviteSuperManager() throws Exception { MembershipType msType = organizationService.getMembershipTypeHandler().createMembershipTypeInstance(); msType.setName("test-ms"); organizationService.getMembershipTypeHandler().createMembershipType(msType, true); - //Add user to super managers + // Add user to super managers organizationService.getMembershipHandler().linkMembership(superManager, group, msType, true); // Register group as super administrators spacesAdministrationService.updateSpacesAdministratorsMemberships(Arrays.asList(new MembershipEntry("/space-managers", - "test-ms"))); + "test-ms"))); assertTrue(spaceService.isSuperManager(username)); - Space space = createSpace("spacename1", "root"); - space.setVisibility(Space.PUBLIC); - space.setRegistration(Space.OPEN); + Space space = createSpace("spacename1", ROOT_NAME); spaceService.inviteIdentities(space, Collections.singletonList(superManagerIdentity)); + + space = spaceService.getSpaceById(space.getId()); assertTrue(spaceService.isInvitedUser(space, username)); } public void testExternalSpaceInvitations() { - spaceService.saveSpaceExternalInvitation("5", "external@external.com","test"); - spaceService.saveSpaceExternalInvitation("5", "external1@external1.com","test"); - spaceService.saveSpaceExternalInvitation("6", "external@external.com","test"); - spaceService.saveSpaceExternalInvitation("7", "external2@external2.com","test"); - spaceService.saveSpaceExternalInvitation("7", "external3@external3.com","test"); + spaceService.saveSpaceExternalInvitation("5", EXTERNAL_USER_EMAIL, "test"); + spaceService.saveSpaceExternalInvitation("5", EXTERNAL1_USER_EMAIL, "test"); + spaceService.saveSpaceExternalInvitation("6", EXTERNAL_USER_EMAIL, "test"); + spaceService.saveSpaceExternalInvitation("7", EXTERNAL2_USER_EMAIL, "test"); + spaceService.saveSpaceExternalInvitation("7", EXTERNAL3_USER_EMAIL, "test"); List spaceExternalInvitationEntities = spaceService.findSpaceExternalInvitationsBySpaceId("5"); assertNotNull(spaceExternalInvitationEntities); assertEquals(2, spaceExternalInvitationEntities.size()); - List spaceIds = spaceService.findExternalInvitationsSpacesByEmail("external@external.com"); + List spaceIds = spaceService.findExternalInvitationsSpacesByEmail(EXTERNAL_USER_EMAIL); assertNotNull(spaceIds); assertEquals(2, spaceExternalInvitationEntities.size()); - spaceService.deleteExternalUserInvitations("external@external.com"); + spaceService.deleteExternalUserInvitations(EXTERNAL_USER_EMAIL); List spaceExternalInvitationEntities1 = spaceService.findSpaceExternalInvitationsBySpaceId("5"); assertNotNull(spaceExternalInvitationEntities); assertEquals(1, spaceExternalInvitationEntities1.size()); - List spaceIds2 = spaceService.findExternalInvitationsSpacesByEmail("external2@external2.com"); + List spaceIds2 = spaceService.findExternalInvitationsSpacesByEmail(EXTERNAL2_USER_EMAIL); assertEquals(1, spaceIds2.size()); } public void testDeleteSpaceExternalInvitation() { - spaceService.saveSpaceExternalInvitation("8", "external@external.com","token"); - spaceService.saveSpaceExternalInvitation("8", "external1@external1.com","token1"); - spaceService.saveSpaceExternalInvitation("8", "external2@external2.com","token2"); + spaceService.saveSpaceExternalInvitation("8", EXTERNAL_USER_EMAIL, "token"); + spaceService.saveSpaceExternalInvitation("8", EXTERNAL1_USER_EMAIL, "token1"); + spaceService.saveSpaceExternalInvitation("8", EXTERNAL2_USER_EMAIL, "token2"); List spaceExternalInvitationEntities = spaceService.findSpaceExternalInvitationsBySpaceId("8"); assertNotNull(spaceExternalInvitationEntities); @@ -2427,32 +1889,32 @@ public void testDeleteSpaceExternalInvitation() { } public void testIsSuperManager() throws Exception { - Space space = createSpace("spacename1", "root"); + Space space = createSpace("spacename1", ROOT_NAME); space.setVisibility(Space.PUBLIC); space.setRegistration(Space.OPEN); spaceService.updateSpace(space); - space = createSpace("spacename2", "root"); + space = createSpace("spacename2", ROOT_NAME); space.setVisibility(Space.PUBLIC); space.setRegistration(Space.CLOSED); spaceService.updateSpace(space); - space = createSpace("spacename3", "root"); + space = createSpace("spacename3", ROOT_NAME); space.setVisibility(Space.PRIVATE); space.setRegistration(Space.OPEN); spaceService.updateSpace(space); - space = createSpace("spacename4", "root"); + space = createSpace("spacename4", ROOT_NAME); space.setVisibility(Space.PRIVATE); space.setRegistration(Space.CLOSED); spaceService.updateSpace(space); - space = createSpace("spacename5", "root"); + space = createSpace("spacename5", ROOT_NAME); space.setVisibility(Space.HIDDEN); space.setRegistration(Space.OPEN); spaceService.updateSpace(space); - space = createSpace("spacename6", "root"); + space = createSpace("spacename6", ROOT_NAME); space.setVisibility(Space.HIDDEN); space.setRegistration(Space.CLOSED); spaceService.updateSpace(space); @@ -2473,51 +1935,104 @@ public void testIsSuperManager() throws Exception { assertEquals(6, spaceService.getAllSpacesWithListAccess().getSize()); assertFalse(spaceService.isSuperManager(userName)); spacesAdministrationService.updateSpacesAdministratorsMemberships(Arrays.asList(new MembershipEntry("/testgroup", - "mstypetest"))); + "mstypetest"))); assertTrue(spaceService.isSuperManager(userName)); } - private Space populateData() throws Exception { - String spaceDisplayName = "Space1"; + @SneakyThrows + public void testCanAccessSpacePublicSite() { + checkExternalUserMemberships(); + + Space space = getSpaceInstance(20); + String spaceId = space.getId(); + + assertFalse(spaceService.canAccessSpacePublicSite(null, DEMO_NAME)); + assertFalse(spaceService.canAccessSpacePublicSite(space, null)); + assertFalse(spaceService.canAccessSpacePublicSite(space, DEMO_NAME)); + assertFalse(spaceService.canAccessSpacePublicSite(space, JOHN_NAME)); + assertFalse(spaceService.canAccessSpacePublicSite(space, EXTERNAL_USER_NAME)); + assertFalse(spaceService.canAccessSpacePublicSite(space, IdentityConstants.ANONIM)); + + spaceLayoutService.saveSpacePublicSite(spaceId, SpaceUtils.MANAGER, DEMO_NAME); + space = spaceService.getSpaceById(spaceId); + assertTrue(spaceService.canAccessSpacePublicSite(space, JOHN_NAME)); + assertTrue(spaceService.canAccessSpacePublicSite(space, DEMO_NAME)); + assertFalse(spaceService.canAccessSpacePublicSite(space, RAUL_NAME)); + assertFalse(spaceService.canAccessSpacePublicSite(space, MARY_NAME)); + assertFalse(spaceService.canAccessSpacePublicSite(space, PAUL_NAME)); + assertFalse(spaceService.canAccessSpacePublicSite(space, EXTERNAL_USER_NAME)); + assertFalse(spaceService.canAccessSpacePublicSite(space, null)); + assertFalse(spaceService.canAccessSpacePublicSite(space, IdentityConstants.ANONIM)); + + spaceLayoutService.saveSpacePublicSite(spaceId, SpaceUtils.MEMBER, DEMO_NAME); + space = spaceService.getSpaceById(spaceId); + assertTrue(spaceService.canAccessSpacePublicSite(space, JOHN_NAME)); + assertTrue(spaceService.canAccessSpacePublicSite(space, DEMO_NAME)); + assertTrue(spaceService.canAccessSpacePublicSite(space, RAUL_NAME)); + assertFalse(spaceService.canAccessSpacePublicSite(space, MARY_NAME)); + assertFalse(spaceService.canAccessSpacePublicSite(space, PAUL_NAME)); + assertFalse(spaceService.canAccessSpacePublicSite(space, EXTERNAL_USER_NAME)); + assertFalse(spaceService.canAccessSpacePublicSite(space, null)); + assertFalse(spaceService.canAccessSpacePublicSite(space, IdentityConstants.ANONIM)); + + spaceLayoutService.saveSpacePublicSite(spaceId, SpaceUtils.INTERNAL, DEMO_NAME); + space = spaceService.getSpaceById(spaceId); + assertTrue(spaceService.canAccessSpacePublicSite(space, JOHN_NAME)); + assertTrue(spaceService.canAccessSpacePublicSite(space, RAUL_NAME)); + assertTrue(spaceService.canAccessSpacePublicSite(space, MARY_NAME)); + assertTrue(spaceService.canAccessSpacePublicSite(space, PAUL_NAME)); + assertFalse(spaceService.canAccessSpacePublicSite(space, EXTERNAL_USER_NAME)); + assertFalse(spaceService.canAccessSpacePublicSite(space, null)); + assertFalse(spaceService.canAccessSpacePublicSite(space, IdentityConstants.ANONIM)); + + spaceLayoutService.saveSpacePublicSite(spaceId, SpaceUtils.AUTHENTICATED, DEMO_NAME); + space = spaceService.getSpaceById(spaceId); + assertTrue(spaceService.canAccessSpacePublicSite(space, JOHN_NAME)); + assertTrue(spaceService.canAccessSpacePublicSite(space, DEMO_NAME)); + assertTrue(spaceService.canAccessSpacePublicSite(space, RAUL_NAME)); + assertTrue(spaceService.canAccessSpacePublicSite(space, MARY_NAME)); + assertTrue(spaceService.canAccessSpacePublicSite(space, PAUL_NAME)); + assertTrue(spaceService.canAccessSpacePublicSite(space, EXTERNAL_USER_NAME)); + assertFalse(spaceService.canAccessSpacePublicSite(space, null)); + assertFalse(spaceService.canAccessSpacePublicSite(space, IdentityConstants.ANONIM)); + + spaceLayoutService.saveSpacePublicSite(spaceId, SpaceUtils.EVERYONE, DEMO_NAME); + space = spaceService.getSpaceById(spaceId); + assertTrue(spaceService.canAccessSpacePublicSite(space, ROOT_NAME)); + assertTrue(spaceService.canAccessSpacePublicSite(space, JOHN_NAME)); + assertTrue(spaceService.canAccessSpacePublicSite(space, DEMO_NAME)); + assertTrue(spaceService.canAccessSpacePublicSite(space, RAUL_NAME)); + assertTrue(spaceService.canAccessSpacePublicSite(space, MARY_NAME)); + assertTrue(spaceService.canAccessSpacePublicSite(space, PAUL_NAME)); + assertTrue(spaceService.canAccessSpacePublicSite(space, EXTERNAL_USER_NAME)); + assertTrue(spaceService.canAccessSpacePublicSite(space, null)); + assertTrue(spaceService.canAccessSpacePublicSite(space, IdentityConstants.ANONIM)); + } + + private Space populateData() { + String spaceDisplayName = SPACE1_DISPLAY_NAME; Space space1 = new Space(); - space1.setApp("Calendar;FileSharing"); space1.setDisplayName(spaceDisplayName); - space1.setPrettyName(space1.getDisplayName()); - String shortName = Utils.cleanString(spaceDisplayName); - space1.setGroupId("/spaces/" + shortName); - space1.setUrl(shortName); space1.setRegistration("validation"); space1.setDescription("This is my first space for testing"); - space1.setType("classic"); - space1.setVisibility("public"); - space1.setPriority("2"); - String[] manager = new String[] { "root" }; - String[] members = new String[] { "demo", "john", "mary", "tom", "harry" }; - space1.setManagers(manager); - space1.setMembers(members); + space1.setVisibility(Space.PUBLIC); + space1.setEditor(ROOT_NAME); + + Space createdSpace = spaceService.createSpace(space1); + String[] members = new String[] { DEMO_NAME, JOHN_NAME, MARY_NAME, TOM_NAME }; + Arrays.stream(members).forEach(u -> spaceService.addMember(createdSpace, u)); - spaceService.createSpace(space1); - tearDownSpaceList.add(space1); - return space1; + return createdSpace; } - private Space createSpace(String spaceName, String creator) throws Exception { + private Space createSpace(String spaceName, String username) { Space space = new Space(); space.setDisplayName(spaceName); space.setPrettyName(spaceName); - space.setGroupId("/spaces/" + space.getPrettyName()); space.setRegistration(Space.OPEN); space.setDescription("description of space" + spaceName); - space.setType(DefaultSpaceApplicationHandler.NAME); space.setVisibility(Space.PRIVATE); - space.setPriority(Space.INTERMEDIATE_PRIORITY); - String[] managers = new String[] { creator }; - String[] members = new String[] { creator }; - space.setManagers(managers); - space.setMembers(members); - spaceService.createSpace(space); - tearDownSpaceList.add(space); - return space; + return spaceService.createSpace(space, username); } /** @@ -2530,40 +2045,23 @@ private Space createSpace(String spaceName, String creator) throws Exception { */ private Space getSpaceInstance(int number) { Space space = new Space(); - space.setDisplayName("my space " + number); + space.setDisplayName(MY_SPACE_DISPLAY_NAME_PREFIX + number); space.setPrettyName(space.getDisplayName()); space.setRegistration(Space.OPEN); - space.setDescription("add new space " + number); - space.setType(DefaultSpaceApplicationHandler.NAME); + space.setDescription(SPACE_DESCRIPTION + number); space.setVisibility(Space.PUBLIC); space.setRegistration(Space.VALIDATION); - space.setPriority(Space.INTERMEDIATE_PRIORITY); - space.setGroupId("/space/space" + number); - String[] managers = new String[] { "demo", "tom" }; - String[] members = new String[] { "demo", "raul", "ghost", "dragon" }; - String[] invitedUsers = new String[] { "register1", "mary" }; - String[] pendingUsers = new String[] { "jame", "paul", "hacker" }; - space.setInvitedUsers(invitedUsers); - space.setPendingUsers(pendingUsers); - space.setManagers(managers); - space.setMembers(members); - space.setUrl(space.getPrettyName()); - this.spaceService.createSpace(space, "root"); - tearDownSpaceList.add(space); - return space; - } - - /** - * Gets an instance of Space. - * - * @param number - * @return an instance of space - */ - @Override - public Space getSpaceInstance(int number, String visible, String registration, String manager, String... members) { - Space space = super.getSpaceInstance(number, visible, registration, manager, members); - tearDownSpaceList.add(space); - return space; + String[] managers = new String[] { DEMO_NAME, TOM_NAME }; + String[] members = new String[] { DEMO_NAME, RAUL_NAME, GHOST_NAME, DRAGON_NAME }; + String[] invitedUsers = new String[] { REGISTER1_NAME, MARY_NAME }; + String[] pendingUsers = new String[] { JAME_NAME, PAUL_NAME, HACKER_NAME }; + Space createdSpace = this.spaceService.createSpace(space, ROOT_NAME); + Arrays.stream(pendingUsers).forEach(u -> spaceService.addPendingUser(createdSpace, u)); + Arrays.stream(invitedUsers).forEach(u -> spaceService.addInvitedUser(createdSpace, u)); + Arrays.stream(members).forEach(u -> spaceService.addMember(createdSpace, u)); + Arrays.stream(managers).forEach(u -> spaceService.addMember(createdSpace, u)); + Arrays.stream(managers).forEach(u -> spaceService.setManager(createdSpace, u, true)); + return createdSpace; } /** @@ -2579,43 +2077,35 @@ private Space getSpaceInstanceInvitedMember(int number, String manager, String... members) { Space space = new Space(); - space.setApp("app"); - space.setDisplayName("my space " + number); + space.setDisplayName(MY_SPACE_DISPLAY_NAME_PREFIX + number); space.setPrettyName(space.getDisplayName()); space.setRegistration(registration); - space.setDescription("add new space " + number); - space.setType(DefaultSpaceApplicationHandler.NAME); + space.setDescription(SPACE_DESCRIPTION + number); space.setVisibility(visible); - space.setPriority(Space.INTERMEDIATE_PRIORITY); - space.setGroupId("/spaces/space" + number); space.setUrl(space.getPrettyName()); String[] managers = new String[] { manager }; - // String[] invitedUsers = new String[] {invitedMember}; String[] pendingUsers = new String[] {}; space.setInvitedUsers(invitedMember); space.setPendingUsers(pendingUsers); space.setManagers(managers); space.setMembers(members); - tearDownSpaceList.add(space); return space; } - private Space createMoreSpace(String spaceName) throws Exception { + @SneakyThrows + private Space createMoreSpace(String spaceName) { Space space2 = new Space(); - space2.setApp("Contact,Forum"); space2.setDisplayName(spaceName); space2.setPrettyName(space2.getDisplayName()); String shortName = Utils.cleanString(spaceName); - space2.setGroupId("/spaces/" + shortName); + space2.setGroupId(SPACES_GROUP_PREFIX + shortName); space2.setUrl(shortName); - space2.setRegistration("open"); + space2.setRegistration(Space.OPEN); space2.setDescription("This is my second space for testing"); - space2.setType("classic"); - space2.setVisibility("public"); - space2.setPriority("2"); + space2.setVisibility(Space.PUBLIC); + space2.setEditor(ROOT_NAME); spaceService.createSpace(space2); - tearDownSpaceList.add(space2); // sleep 1ms to be sure that 2 spaces created in a row // have not the same createdDate @@ -2630,7 +2120,7 @@ public void testSpaceContainsExternalMembers() { Space space = getSpaceInstance(10); assertFalse(spaceService.isSpaceContainsExternals(Long.valueOf(space.getId()))); - spaceService.addMember(space, EXTERNAL_USER); + spaceService.addMember(space, EXTERNAL_USER_NAME); assertTrue(spaceService.isSpaceContainsExternals(Long.valueOf(space.getId()))); } @@ -2643,273 +2133,52 @@ public void testGetCommonSpaces() throws Exception { Space space4 = getSpaceInstance(15); Space space5 = getSpaceInstance(16); - User otherUser = organizationService.getUserHandler().createUserInstance("otherUser"); + User otherUser = organizationService.getUserHandler().createUserInstance(OTHER_USER_NAME); organizationService.getUserHandler().createUser(otherUser, false); - spaceService.addMember(space1,"otherUser"); - spaceService.addMember(space2,"otherUser"); - spaceService.addMember(space3,"otherUser"); - spaceService.addMember(space4,"otherUser"); - spaceService.addMember(space5,"otherUser"); + spaceService.addMember(space1, OTHER_USER_NAME); + spaceService.addMember(space2, OTHER_USER_NAME); + spaceService.addMember(space3, OTHER_USER_NAME); + spaceService.addMember(space4, OTHER_USER_NAME); + spaceService.addMember(space5, OTHER_USER_NAME); - ListAccess resultListCommonSpacesAccessList1 = spaceService.getCommonSpaces("root","otherUser"); - assertEquals(5,resultListCommonSpacesAccessList1.getSize()); - Space[] spaceArray = resultListCommonSpacesAccessList1.load(0,2); - assertEquals(2,spaceArray.length); + ListAccess resultListCommonSpacesAccessList1 = spaceService.getCommonSpaces(ROOT_NAME, OTHER_USER_NAME); + assertEquals(5, resultListCommonSpacesAccessList1.getSize()); + Space[] spaceArray = resultListCommonSpacesAccessList1.load(0, 2); + assertEquals(2, spaceArray.length); Space testSpace1 = spaceArray[0]; - assertEquals(space1,testSpace1); + assertEquals(space1, testSpace1); Space testSpace2 = spaceArray[1]; - assertEquals(space2,testSpace2); + assertEquals(space2, testSpace2); - spaceArray = resultListCommonSpacesAccessList1.load(2,2); - assertEquals(2,spaceArray.length); + spaceArray = resultListCommonSpacesAccessList1.load(2, 2); + assertEquals(2, spaceArray.length); Space testSpace3 = spaceArray[0]; - assertEquals(space3,testSpace3); + assertEquals(space3, testSpace3); Space testSpace4 = spaceArray[1]; - assertEquals(space4,testSpace4); + assertEquals(space4, testSpace4); - spaceArray = resultListCommonSpacesAccessList1.load(4,2); - assertEquals(1,spaceArray.length); + spaceArray = resultListCommonSpacesAccessList1.load(4, 2); + assertEquals(1, spaceArray.length); Space testSpace5 = spaceArray[0]; - assertEquals(space5,testSpace5); - - } - - public void testRestoreSpacePageLayout() throws Exception { - org.exoplatform.services.security.Identity rootACLIdentity = new org.exoplatform.services.security.Identity("root"); - ConversationState.setCurrent(new ConversationState(rootACLIdentity)); - - Space space = new Space(); - space.setDisplayName("testSpaceHomeLayout"); - space.setDescription("Space Description for Testing"); - String shortName = Utils.cleanString(space.getDisplayName()); - space.setGroupId("/spaces/" + shortName); - String[] managers = new String[] { - rootACLIdentity.getUserId() - }; - space.setManagers(managers); - space.setPrettyName(space.getDisplayName()); - space.setPriority("3"); - space.setRegistration("validation"); - space.setTag("Space Tag for Testing"); - String template = "classic"; - space.setTemplate(template); - space.setUrl(shortName); - space.setVisibility("public"); - space = spaceService.createSpace(space, rootACLIdentity.getUserId()); + assertEquals(space5, testSpace5); - SpaceTemplateService spaceTemplateService = getContainer().getComponentInstanceOfType(SpaceTemplateService.class); - String spaceTemplateName = space.getTemplate(); - SpaceTemplate spaceTemplate = spaceTemplateService.getSpaceTemplateByName(spaceTemplateName); - assertNotNull(spaceTemplate); - assertEquals(template, spaceTemplate.getName()); - - NavigationService navService = getContainer().getComponentInstanceOfType(NavigationService.class); - NavigationContext navContext = SpaceUtils.getGroupNavigationContext(space.getGroupId()); - assertNotNull(navContext); - NodeContext> parentNodeCtx = navService.loadNode(NodeModel.SELF_MODEL, navContext, Scope.CHILDREN, null); - assertNotNull(parentNodeCtx); - - NodeContext> homeNodeContext = parentNodeCtx.get(0); - assertNotNull(homeNodeContext); - - PageKey homePageKey = homeNodeContext.getState().getPageRef(); - assertNotNull(homePageKey); - - LayoutService layoutService = getContainer().getComponentInstanceOfType(LayoutService.class); - Page page = layoutService.getPage(homePageKey.format()); - assertNotNull(page); - assertEquals(5, countPageApplications(page.getChildren(), 0)); - - space.setTemplate("meeds"); - space = spaceService.updateSpace(space); - - String spaceId = space.getId(); - assertThrows(IllegalAccessException.class, () -> spaceService.restoreSpacePageLayout(spaceId, "home", new org.exoplatform.services.security.Identity("demo"))); - - spaceService.restoreSpacePageLayout(spaceId, "home", rootACLIdentity); - page = layoutService.getPage(homePageKey.format()); - assertNotNull(page); - assertEquals(2, countPageApplications(page.getChildren(), 0)); - } - - @SneakyThrows - public void testSaveSpacePublicSite() { - Space space = getSpaceInstance(18); - String spaceId = space.getId(); - - assertThrows(ObjectNotFoundException.class, - () -> spaceService.saveSpacePublicSite("15587688", SpaceUtils.AUTHENTICATED, "demo")); - assertThrows(IllegalAccessException.class, - () -> spaceService.saveSpacePublicSite(spaceId, SpaceUtils.AUTHENTICATED, "raul")); - - spaceService.saveSpacePublicSite(spaceId, SpaceUtils.AUTHENTICATED, "demo"); - space = spaceService.getSpaceById(space.getId()); - assertEquals(SpaceUtils.AUTHENTICATED, space.getPublicSiteVisibility()); - long publicSiteId = space.getPublicSiteId(); - assertTrue(publicSiteId > 0); - - LayoutService layoutService = getContainer().getComponentInstanceOfType(LayoutService.class); - PortalConfig publicSitePortalConfig = layoutService.getPortalConfig(publicSiteId); - assertNotNull(publicSitePortalConfig); - assertEquals(space.getPrettyName(), publicSitePortalConfig.getName()); - assertEquals(space.getDisplayName(), publicSitePortalConfig.getLabel()); - assertEquals(2, publicSitePortalConfig.getAccessPermissions().length); - assertEquals(new HashSet(Arrays.asList("member:/platform/externals", - "member:/platform/users")), - new HashSet(Arrays.asList(publicSitePortalConfig.getAccessPermissions()))); - assertEquals(SpaceUtils.MANAGER + ":" + space.getGroupId(), publicSitePortalConfig.getEditPermission()); - assertEquals(spaceId, publicSitePortalConfig.getProperty("SPACE_ID")); - assertEquals("true", publicSitePortalConfig.getProperty("IS_SPACE_PUBLIC_SITE")); - } - - @SneakyThrows - public void testChangeSpacePublicSiteVisibility() { - Space space = getSpaceInstance(18); - String spaceId = space.getId(); - - assertThrows(ObjectNotFoundException.class, - () -> spaceService.saveSpacePublicSite("15587688", SpaceUtils.AUTHENTICATED, "demo")); - assertThrows(IllegalAccessException.class, - () -> spaceService.saveSpacePublicSite(spaceId, SpaceUtils.AUTHENTICATED, "raul")); - - spaceService.saveSpacePublicSite(spaceId, SpaceUtils.AUTHENTICATED, "demo"); - space = spaceService.getSpaceById(space.getId()); - assertEquals(SpaceUtils.AUTHENTICATED, space.getPublicSiteVisibility()); - long publicSiteId = space.getPublicSiteId(); - assertTrue(publicSiteId > 0); - - space.setVisibility(Space.HIDDEN); - spaceService.updateSpace(space); - space = spaceService.getSpaceById(space.getId()); - - assertEquals(SpaceUtils.MEMBER, space.getPublicSiteVisibility()); - assertEquals(space.getPrettyName(), spaceService.getSpacePublicSiteName(space)); - - LayoutService layoutService = getContainer().getComponentInstanceOfType(LayoutService.class); - PortalConfig publicSitePortalConfig = layoutService.getPortalConfig(publicSiteId); - assertNotNull(publicSitePortalConfig); - assertEquals(space.getPrettyName(), publicSitePortalConfig.getName()); - assertEquals(space.getDisplayName(), publicSitePortalConfig.getLabel()); - assertFalse(publicSitePortalConfig.isDefaultSite()); - assertEquals(1, publicSitePortalConfig.getAccessPermissions().length); - assertEquals(new HashSet(Arrays.asList(SpaceUtils.MEMBER + ":" + space.getGroupId())), - new HashSet(Arrays.asList(publicSitePortalConfig.getAccessPermissions()))); - assertEquals(SpaceUtils.MANAGER + ":" + space.getGroupId(), publicSitePortalConfig.getEditPermission()); - } - - @SneakyThrows - public void testSpaceWithPublicSiteRemoved() { - Space space = getSpaceInstance(19); - String spaceId = space.getId(); - spaceService.saveSpacePublicSite(spaceId, SpaceUtils.AUTHENTICATED, "demo"); - space = spaceService.getSpaceById(space.getId()); - long publicSiteId = space.getPublicSiteId(); - assertTrue(publicSiteId > 0); - - LayoutService layoutService = getContainer().getComponentInstanceOfType(LayoutService.class); - PortalConfig publicSitePortalConfig = layoutService.getPortalConfig(publicSiteId); - assertNotNull(publicSitePortalConfig); - - spaceService.deleteSpace(space); - assertNull(layoutService.getPortalConfig(publicSiteId)); - } - - @SneakyThrows - public void testCanAccessSpacePublicSite() { - checkExternalUserMemberships(); - - Space space = getSpaceInstance(20); - String spaceId = space.getId(); - - assertFalse(spaceService.canAccessSpacePublicSite(null, "demo")); - assertFalse(spaceService.canAccessSpacePublicSite(space, null)); - assertFalse(spaceService.canAccessSpacePublicSite(space, "demo")); - assertFalse(spaceService.canAccessSpacePublicSite(space, "john")); - assertFalse(spaceService.canAccessSpacePublicSite(space, EXTERNAL_USER)); - assertFalse(spaceService.canAccessSpacePublicSite(space, IdentityConstants.ANONIM)); - - spaceService.saveSpacePublicSite(spaceId, SpaceUtils.MANAGER, "demo"); - space = spaceService.getSpaceById(spaceId); - assertTrue(spaceService.canAccessSpacePublicSite(space, "john")); - assertTrue(spaceService.canAccessSpacePublicSite(space, "demo")); - assertFalse(spaceService.canAccessSpacePublicSite(space, "raul")); - assertFalse(spaceService.canAccessSpacePublicSite(space, "mary")); - assertFalse(spaceService.canAccessSpacePublicSite(space, "paul")); - assertFalse(spaceService.canAccessSpacePublicSite(space, EXTERNAL_USER)); - assertFalse(spaceService.canAccessSpacePublicSite(space, null)); - assertFalse(spaceService.canAccessSpacePublicSite(space, IdentityConstants.ANONIM)); - - spaceService.saveSpacePublicSite(spaceId, SpaceUtils.MEMBER, "demo"); - space = spaceService.getSpaceById(spaceId); - assertTrue(spaceService.canAccessSpacePublicSite(space, "john")); - assertTrue(spaceService.canAccessSpacePublicSite(space, "demo")); - assertTrue(spaceService.canAccessSpacePublicSite(space, "raul")); - assertFalse(spaceService.canAccessSpacePublicSite(space, "mary")); - assertFalse(spaceService.canAccessSpacePublicSite(space, "paul")); - assertFalse(spaceService.canAccessSpacePublicSite(space, EXTERNAL_USER)); - assertFalse(spaceService.canAccessSpacePublicSite(space, null)); - assertFalse(spaceService.canAccessSpacePublicSite(space, IdentityConstants.ANONIM)); - - spaceService.saveSpacePublicSite(spaceId, SpaceUtils.INTERNAL, "demo"); - space = spaceService.getSpaceById(spaceId); - assertTrue(spaceService.canAccessSpacePublicSite(space, "john")); - assertTrue(spaceService.canAccessSpacePublicSite(space, "raul")); - assertTrue(spaceService.canAccessSpacePublicSite(space, "mary")); - assertTrue(spaceService.canAccessSpacePublicSite(space, "paul")); - assertFalse(spaceService.canAccessSpacePublicSite(space, EXTERNAL_USER)); - assertFalse(spaceService.canAccessSpacePublicSite(space, null)); - assertFalse(spaceService.canAccessSpacePublicSite(space, IdentityConstants.ANONIM)); - - spaceService.saveSpacePublicSite(spaceId, SpaceUtils.AUTHENTICATED, "demo"); - space = spaceService.getSpaceById(spaceId); - assertTrue(spaceService.canAccessSpacePublicSite(space, "john")); - assertTrue(spaceService.canAccessSpacePublicSite(space, "demo")); - assertTrue(spaceService.canAccessSpacePublicSite(space, "raul")); - assertTrue(spaceService.canAccessSpacePublicSite(space, "mary")); - assertTrue(spaceService.canAccessSpacePublicSite(space, "paul")); - assertTrue(spaceService.canAccessSpacePublicSite(space, EXTERNAL_USER)); - assertFalse(spaceService.canAccessSpacePublicSite(space, null)); - assertFalse(spaceService.canAccessSpacePublicSite(space, IdentityConstants.ANONIM)); - - spaceService.saveSpacePublicSite(spaceId, SpaceUtils.EVERYONE, "demo"); - space = spaceService.getSpaceById(spaceId); - assertTrue(spaceService.canAccessSpacePublicSite(space, "root")); - assertTrue(spaceService.canAccessSpacePublicSite(space, "john")); - assertTrue(spaceService.canAccessSpacePublicSite(space, "demo")); - assertTrue(spaceService.canAccessSpacePublicSite(space, "raul")); - assertTrue(spaceService.canAccessSpacePublicSite(space, "mary")); - assertTrue(spaceService.canAccessSpacePublicSite(space, "paul")); - assertTrue(spaceService.canAccessSpacePublicSite(space, EXTERNAL_USER)); - assertTrue(spaceService.canAccessSpacePublicSite(space, null)); - assertTrue(spaceService.canAccessSpacePublicSite(space, IdentityConstants.ANONIM)); - } - - private int countPageApplications(ArrayList children, int size) { - for (ModelObject modelObject : children) { - if (modelObject instanceof org.exoplatform.portal.config.model.Application) { - size++; - } else if (modelObject instanceof org.exoplatform.portal.config.model.Container container) { - size = countPageApplications(container.getChildren(), size); - } - } - return size; } @SneakyThrows private void checkExternalUserMemberships() { Collection internalMemberships = organizationService.getMembershipHandler() - .findMembershipsByUserAndGroup(EXTERNAL_USER, + .findMembershipsByUserAndGroup(EXTERNAL_USER_NAME, "/platform/users"); if (CollectionUtils.isNotEmpty(internalMemberships)) { internalMemberships.forEach(this::removeMembership); } Collection externalMemberships = organizationService.getMembershipHandler() - .findMembershipsByUserAndGroup(EXTERNAL_USER, + .findMembershipsByUserAndGroup(EXTERNAL_USER_NAME, "/platform/externals"); if (CollectionUtils.isEmpty(externalMemberships)) { organizationService.getMembershipHandler() - .linkMembership(organizationService.getUserHandler().findUserByName(EXTERNAL_USER), + .linkMembership(organizationService.getUserHandler().findUserByName(EXTERNAL_USER_NAME), organizationService.getGroupHandler().findGroupById("/platform/externals"), organizationService.getMembershipTypeHandler().findMembershipType("member"), true); diff --git a/component/core/src/test/java/org/exoplatform/social/core/space/spi/SpaceTemplateServiceTest.java b/component/core/src/test/java/org/exoplatform/social/core/space/spi/SpaceTemplateServiceTest.java deleted file mode 100644 index eb2cac6d92b..00000000000 --- a/component/core/src/test/java/org/exoplatform/social/core/space/spi/SpaceTemplateServiceTest.java +++ /dev/null @@ -1,253 +0,0 @@ -package org.exoplatform.social.core.space.spi; - -import java.util.*; - -import org.exoplatform.commons.utils.CommonsUtils; -import org.exoplatform.container.xml.*; -import org.exoplatform.portal.config.model.Page; -import org.exoplatform.portal.mop.service.LayoutService; -import org.exoplatform.social.core.identity.model.Identity; -import org.exoplatform.social.core.identity.provider.SpaceIdentityProvider; -import org.exoplatform.social.core.space.*; -import org.exoplatform.social.core.space.impl.DefaultSpaceApplicationHandler; -import org.exoplatform.social.core.space.impl.SpaceTemplateServiceImpl; -import org.exoplatform.social.core.space.model.Space; -import org.exoplatform.social.core.storage.IdentityStorageException; -import org.exoplatform.social.core.storage.api.IdentityStorage; -import org.exoplatform.social.core.test.AbstractCoreTest; - -public class SpaceTemplateServiceTest extends AbstractCoreTest { - private SpaceTemplateService spaceTemplateService; - - private IdentityStorage identityStorage; - - private List tearDownSpaceList; - - @Override - public void setUp() throws Exception { - super.setUp(); - spaceTemplateService = CommonsUtils.getService(SpaceTemplateService.class); - identityStorage = CommonsUtils.getService(IdentityStorage.class); - spaceService = CommonsUtils.getService(SpaceService.class); - tearDownSpaceList = new ArrayList<>(); - } - - @Override - public void tearDown() throws Exception { - end(); - begin(); - - for (Space space : tearDownSpaceList) { - Identity spaceIdentity = identityStorage.findIdentity(SpaceIdentityProvider.NAME, space.getPrettyName()); - if (spaceIdentity != null) { - try { - identityStorage.deleteIdentity(spaceIdentity); - } catch (IdentityStorageException e) { - // It's expected on some identities that could be deleted in tests - } - } - try { - spaceService.deleteSpace(space); - } catch (Exception e) { - // It's expected on some entities that could be deleted in tests - } - } - super.tearDown(); - } - - /** - * Test {@link SpaceTemplateService#getSpaceTemplates()} - */ - public void testGetSpaceTemplates() { - // When - List templates = spaceTemplateService.getSpaceTemplates(); - // Then - assertTrue(Collections.unmodifiableList(Collections.EMPTY_LIST).getClass().isInstance(templates)); - } - - public void testCreateSpaceWithRolesAndProfilesInApplication() { - Space space = createSpace("Space Settings Test", "root"); - assertNotNull(space); - - LayoutService layoutService = getContainer().getComponentInstanceOfType(LayoutService.class); - Page page = layoutService.getPage("group::" + space.getGroupId() + "::SpaceSettingPortlet"); - assertNotNull(page); - assertNotNull(page.getAccessPermissions()); - assertEquals(1, page.getAccessPermissions().length); - assertEquals("manager:" + space.getGroupId(), page.getAccessPermissions()[0]); - assertEquals("test", page.getProfiles()); - - page = layoutService.getPage("group::" + space.getGroupId() + "::MembersPortlet"); - assertNotNull(page); - assertNotNull(page.getAccessPermissions()); - assertEquals(1, page.getAccessPermissions().length); - assertEquals("*:" + space.getGroupId(), page.getAccessPermissions()[0]); - assertNull(page.getProfiles()); - } - - /** - * Test {@link SpaceTemplateService#getSpaceTemplates(String)} ()} - */ - public void testGetAllSpaceTemplatesWithNoPermissions() throws Exception { - // When - List templates = spaceTemplateService.getSpaceTemplates("toto"); - // Then - assertEquals(0, templates.size()); - } - - /** - * Test {@link SpaceTemplateService#getSpaceTemplateByName(String)} - */ - public void testGetSpaceTemplateByName() { - // When - SpaceTemplate template = spaceTemplateService.getSpaceTemplateByName("classic"); - SpaceTemplate templateFake = spaceTemplateService.getSpaceTemplateByName("fake"); - // Then - assertEquals(template.getName(), "classic"); - assertNotNull(templateFake); - assertEquals(templateFake.getName(), "classic"); - } - - /** - * Test - * {@link SpaceTemplateService#registerSpaceTemplatePlugin(SpaceTemplateConfigPlugin)} - */ - public void testRegisterSpaceTemplatePlugin() { - SpaceApplication homeApplication = new SpaceApplication(); - homeApplication.setAppTitle("fakeHome"); - homeApplication.setPortletApp("fakeHomeApp"); - homeApplication.setPortletName("fakeHomeName"); - - List applicationList = new ArrayList<>(); - for (int i = 0; i < 3; i++) { - SpaceApplication app = new SpaceApplication(); - app.setAppTitle("fakeTitle" + i); - app.setPortletApp("fakeApp" + i); - app.setPortletName("fakeName" + i); - applicationList.add(app); - } - SpaceTemplate spaceTemplate = new SpaceTemplate(); - spaceTemplate.setName("custom"); - spaceTemplate.setVisibility("private"); - spaceTemplate.setRegistration("open"); - spaceTemplate.setHomeApplication(homeApplication); - spaceTemplate.setSpaceApplicationList(applicationList); - InitParams params = new InitParams(); - ObjectParameter objParam = new ObjectParameter(); - objParam.setName("template"); - objParam.setObject(spaceTemplate); - params.addParameter(objParam); - // Given - int initialSize = spaceTemplateService.getSpaceTemplates().size(); - // when - spaceTemplateService.registerSpaceTemplatePlugin(new SpaceTemplateConfigPlugin(params)); - // Then - assertEquals(initialSize + 1, spaceTemplateService.getSpaceTemplates().size()); - } - - /** - * Test - * {@link SpaceTemplateService#extendSpaceTemplatePlugin(SpaceTemplateConfigPlugin)} - */ - public void testExtendSpaceTemplatePlugin() { - List applicationList = new ArrayList<>(); - SpaceTemplateConfigPlugin spaceTemplateConfigPlugin = getSpaceTemplateList(applicationList, 3, 6); - - // Given - SpaceTemplate template = spaceTemplateService.getSpaceTemplateByName("classic"); - assertEquals(3, template.getSpaceApplicationList().size()); - // when - spaceTemplateService.extendSpaceTemplatePlugin(spaceTemplateConfigPlugin); - // Then - ((SpaceTemplateServiceImpl) spaceTemplateService).start(); - template = spaceTemplateService.getSpaceTemplateByName("classic"); - assertEquals(6, template.getSpaceApplicationList().size()); - - spaceTemplateConfigPlugin = getSpaceTemplateList(applicationList, 0, 3); - - // when - spaceTemplateService.extendSpaceTemplatePlugin(spaceTemplateConfigPlugin); - // Then - ((SpaceTemplateServiceImpl) spaceTemplateService).start(); - template = spaceTemplateService.getSpaceTemplateByName("classic"); - assertEquals(9, template.getSpaceApplicationList().size()); - } - - private SpaceTemplateConfigPlugin getSpaceTemplateList(List applicationList, int from, int to) { - for (int i = from; i < to; i++) { - SpaceApplication app = new SpaceApplication(); - app.setAppTitle("fakeTitle" + i); - app.setPortletApp("fakeApp" + i); - app.setPortletName("fakeName" + i); - app.setOrder(4 + i); - applicationList.add(app); - } - SpaceTemplate spaceTemplate = new SpaceTemplate(); - spaceTemplate.setName("classic"); - spaceTemplate.setSpaceApplicationList(applicationList); - InitParams params = new InitParams(); - ObjectParameter objParam = new ObjectParameter(); - objParam.setName("template"); - objParam.setObject(spaceTemplate); - params.addParameter(objParam); - return new SpaceTemplateConfigPlugin(params); - } - - /** - * Test - * {@link SpaceTemplateService#registerSpaceApplicationHandler(SpaceApplicationHandler)} - */ - public void testRegisterSpaceApplicationHandler() { - // Given - Map handlerMap = spaceTemplateService.getSpaceApplicationHandlers(); - int initialSize = handlerMap.size(); - InitParams params = new InitParams(); - ValueParam valueParam = new ValueParam(); - valueParam.setName("templateName"); - valueParam.setValue("custom"); - params.addParameter(valueParam); - SpaceApplicationHandler applicationHandler = new DefaultSpaceApplicationHandler(params, null, null, null, null); - // when - spaceTemplateService.registerSpaceApplicationHandler(applicationHandler); - // then - handlerMap = spaceTemplateService.getSpaceApplicationHandlers(); - assertEquals(initialSize + 1, handlerMap.size()); - } - - /** - * Test {@link SpaceTemplateService#getSpaceApplicationHandlers()} - */ - public void testGetSpaceApplicationHandlers() { - // When - Map handlers = spaceTemplateService.getSpaceApplicationHandlers(); - // Then - assertTrue(Collections.unmodifiableMap(Collections.EMPTY_MAP).getClass().isInstance(handlers)); - } - - /** - * Test {@link SpaceTemplateService#getDefaultSpaceTemplate()} - */ - public void testGetDefaultSpaceTemplate() { - assertEquals("classic", spaceTemplateService.getDefaultSpaceTemplate()); - } - - private Space createSpace(String spaceName, String creator) { - Space space = new Space(); - space.setDisplayName(spaceName); - space.setPrettyName(spaceName); - space.setGroupId("/spaces/" + space.getPrettyName()); - space.setRegistration(Space.OPEN); - space.setDescription("description of space" + spaceName); - space.setTemplate("template"); - space.setVisibility(Space.PRIVATE); - space.setRegistration(Space.OPEN); - space.setPriority(Space.INTERMEDIATE_PRIORITY); - String[] managers = new String[] { creator }; - String[] members = new String[] { creator }; - space.setManagers(managers); - space.setMembers(members); - spaceService.createSpace(space, creator); - tearDownSpaceList.add(space); - return space; - } -} diff --git a/component/core/src/test/java/org/exoplatform/social/core/space/spi/SpacesAdministrationServiceTest.java b/component/core/src/test/java/org/exoplatform/social/core/space/spi/SpacesAdministrationServiceTest.java deleted file mode 100644 index cd5a64e0868..00000000000 --- a/component/core/src/test/java/org/exoplatform/social/core/space/spi/SpacesAdministrationServiceTest.java +++ /dev/null @@ -1,65 +0,0 @@ -package org.exoplatform.social.core.space.spi; - - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import org.exoplatform.commons.utils.CommonsUtils; -import org.exoplatform.services.organization.OrganizationService; -import org.exoplatform.services.security.MembershipEntry; -import org.exoplatform.social.core.space.SpacesAdministrationService; -import org.exoplatform.social.core.test.AbstractCoreTest; - -public class SpacesAdministrationServiceTest extends AbstractCoreTest { - - private SpacesAdministrationService spacesAdministrationService; - - public void setUp() { - spacesAdministrationService = CommonsUtils.getService(SpacesAdministrationService.class); - } - - public void tearDown() { - } - - public void testShouldReturnTrueWhenUserIsSuperUser() { - // Given - startSessionAs("root"); - - // When - boolean spaceCreator = spacesAdministrationService.canCreateSpace("root"); - - // Then - assertTrue(spaceCreator); - } - - public void testReturnTrueWhenUserIsMemberofSecondGroup() { - //Given - startSessionAs("mary"); - spacesAdministrationService.updateSpacesAdministratorsMemberships(Arrays.asList(new MembershipEntry("/organization/management", - "manager"), - new MembershipEntry("/platform/users", - "*"))); - - // When - boolean spaceCreator = spacesAdministrationService.canCreateSpace("mary"); - - //Then - assertTrue(spaceCreator); - } - - public void testReturnFalseWhenUserIsNotMember() { - //Given - startSessionAs("leo"); - List spaceCreatorsMemberships = new ArrayList<>(); - spaceCreatorsMemberships.add(new MembershipEntry("/organization/management", "*")); - - // When - spacesAdministrationService.updateSpacesCreatorsMemberships(spaceCreatorsMemberships); - boolean spaceCreator = spacesAdministrationService.canCreateSpace("leo"); - - //Then - assertFalse(spaceCreator); - } - -} diff --git a/component/core/src/test/java/org/exoplatform/social/core/storage/StorageUtilsTest.java b/component/core/src/test/java/org/exoplatform/social/core/storage/StorageUtilsTest.java index 3b2f816964c..dd8b272aa53 100644 --- a/component/core/src/test/java/org/exoplatform/social/core/storage/StorageUtilsTest.java +++ b/component/core/src/test/java/org/exoplatform/social/core/storage/StorageUtilsTest.java @@ -17,89 +17,14 @@ package org.exoplatform.social.core.storage; import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.LinkedList; import java.util.List; -import java.util.Map; -import junit.framework.TestCase; - -import org.exoplatform.social.core.identity.model.Identity; -import org.exoplatform.social.core.identity.model.Profile; -import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.core.storage.impl.StorageUtils; -public class StorageUtilsTest extends TestCase { - - public void testProcessUnifiedSearchCondition() throws Exception { - List result = new ArrayList(); - result.add("first"); - result.add("*two"); - result.add("three%"); - result.add("%four*"); - result.add("*five*"); - assertEquals(result, StorageUtils.processUnifiedSearchCondition("first *two three% %four* *five*")); - } - - public void testSortMapByValue() throws Exception { - Map map = new HashMap(); - map.put("value1", 1); - map.put("value12", 12); - map.put("value10", 10); - map.put("value9", 9); - map.put("value3", 3); - map.put("value5", 0); - - Map ascMap = new LinkedHashMap(); - ascMap.put("value5", 0); - ascMap.put("value1", 1); - ascMap.put("value3", 3); - ascMap.put("value9", 9); - ascMap.put("value10", 10); - ascMap.put("value12", 12); - - Map descMap = new LinkedHashMap(); - descMap.put("value12", 12); - descMap.put("value10", 10); - descMap.put("value9", 9); - descMap.put("value3", 3); - descMap.put("value1", 1); - descMap.put("value5", 0); +import junit.framework.TestCase; - assertEquals(ascMap, StorageUtils.sortMapByValue(map, true)); - assertEquals(descMap, StorageUtils.sortMapByValue(map, false)); +public class StorageUtilsTest extends TestCase { - } - - public void testGetCommonItemNumber() throws Exception { - List list1 = new ArrayList(); - list1.add("a"); - list1.add("b"); - list1.add("c"); - list1.add("d"); - list1.add("e"); - List list2 = new ArrayList(); - list2.add("b"); - list2.add("d"); - list2.add("x"); - list2.add("y"); - List list3 = new ArrayList(); - list3.add("m"); - list3.add("e"); - list3.add("p"); - - assertEquals(2, StorageUtils.getCommonItemNumber(list1, list2)); - assertEquals(2, StorageUtils.getCommonItemNumber(list2, list1)); - - assertEquals(1, StorageUtils.getCommonItemNumber(list1, list3)); - assertEquals(1, StorageUtils.getCommonItemNumber(list3, list1)); - - assertEquals(0, StorageUtils.getCommonItemNumber(list2, list3)); - assertEquals(0, StorageUtils.getCommonItemNumber(list3, list2)); - - } - public void testSubList() throws Exception { List list = new ArrayList(); @@ -140,61 +65,5 @@ public void testSubList() throws Exception { assertEquals(0, loaded.size()); } - - public void testSortSpaceByName() { - Space space1 = new Space(); - space1.setDisplayName("XYZ"); - Space space2 = new Space(); - space2.setDisplayName("ABC"); - Space space3 = new Space(); - space3.setDisplayName("GHE"); - - List list = new LinkedList(); - list.add(space1); - list.add(space2); - list.add(space3); - - assertEquals("XYZ", list.get(0).getDisplayName()); - assertEquals("ABC", list.get(1).getDisplayName()); - assertEquals("GHE", list.get(2).getDisplayName()); - - StorageUtils.sortSpaceByName(list, true); - - assertEquals("ABC", list.get(0).getDisplayName()); - assertEquals("GHE", list.get(1).getDisplayName()); - assertEquals("XYZ", list.get(2).getDisplayName()); - - } - - public void testSortIdentitiesByFullName() { - Identity id1 = new Identity("id1"); - Profile profile = id1.getProfile(); - profile.setProperty(Profile.FULL_NAME, "Xyz"); - - Identity id2 = new Identity("id2"); - profile = id2.getProfile(); - profile.setProperty(Profile.FULL_NAME, "BCD"); - - Identity id3 = new Identity("id3"); - profile = id3.getProfile(); - profile.setProperty(Profile.FULL_NAME, "Abc"); - - // - List list = new LinkedList(); - list.add(id1); - list.add(id2); - list.add(id3); - - //before sort - assertEquals("Xyz", list.get(0).getProfile().getFullName()); - assertEquals("Abc", list.get(2).getProfile().getFullName()); - - // - StorageUtils.sortIdentitiesByFullName(list, true); - - //after sort - assertEquals("Abc", list.get(0).getProfile().getFullName()); - assertEquals("Xyz", list.get(2).getProfile().getFullName()); - } } diff --git a/component/core/src/test/java/org/exoplatform/social/core/storage/impl/ActivityStorageImplTestCase.java b/component/core/src/test/java/org/exoplatform/social/core/storage/impl/ActivityStorageImplTestCase.java index 967124a05e9..58a8a1856df 100644 --- a/component/core/src/test/java/org/exoplatform/social/core/storage/impl/ActivityStorageImplTestCase.java +++ b/component/core/src/test/java/org/exoplatform/social/core/storage/impl/ActivityStorageImplTestCase.java @@ -17,7 +17,14 @@ package org.exoplatform.social.core.storage.impl; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Calendar; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; @@ -29,11 +36,13 @@ import org.exoplatform.social.core.application.RelationshipPublisher.TitleId; import org.exoplatform.social.core.identity.model.Identity; import org.exoplatform.social.core.identity.provider.SpaceIdentityProvider; -import org.exoplatform.social.core.space.impl.DefaultSpaceApplicationHandler; +import org.exoplatform.social.core.jpa.storage.SpaceStorage; import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.core.storage.ActivityStorageException; -import org.exoplatform.social.core.storage.api.*; -import org.exoplatform.social.core.test.*; +import org.exoplatform.social.core.storage.api.ActivityStorage; +import org.exoplatform.social.core.storage.api.IdentityStorage; +import org.exoplatform.social.core.storage.api.RelationshipStorage; +import org.exoplatform.social.core.test.AbstractCoreTest; /** * @author Alain Defrance @@ -942,9 +951,7 @@ private Space getSpaceInstance() { space.setPrettyName(space.getDisplayName()); space.setRegistration(Space.OPEN); space.setDescription("add new space"); - space.setType(DefaultSpaceApplicationHandler.NAME); space.setVisibility(Space.PUBLIC); - space.setPriority(Space.INTERMEDIATE_PRIORITY); space.setGroupId("/space/space"); space.setUrl(space.getPrettyName()); String[] managers = new String[] { "john", "demo" }; @@ -985,14 +992,11 @@ public void processActivity(final ExoSocialActivity activity) { private Space getSpaceInstance(int number) { Space space = new Space(); - space.setApp("app"); space.setDisplayName("myspace " + number); space.setPrettyName(space.getDisplayName()); space.setRegistration(Space.OPEN); space.setDescription("add new space " + number); - space.setType(DefaultSpaceApplicationHandler.NAME); space.setVisibility(Space.PUBLIC); - space.setPriority(Space.INTERMEDIATE_PRIORITY); space.setGroupId("/spaces/space" + number); String[] managers = new String[] { "demo", "tom" }; String[] members = new String[] { "raul", "ghost", "dragon" }; diff --git a/component/core/src/test/java/org/exoplatform/social/core/storage/impl/DynamicSpacePortalLayoutMatcherTest.java b/component/core/src/test/java/org/exoplatform/social/core/storage/impl/DynamicSpacePortalLayoutMatcherTest.java deleted file mode 100644 index 2fb3c6d5d70..00000000000 --- a/component/core/src/test/java/org/exoplatform/social/core/storage/impl/DynamicSpacePortalLayoutMatcherTest.java +++ /dev/null @@ -1,73 +0,0 @@ -package org.exoplatform.social.core.storage.impl; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.mockito.Matchers.eq; -import static org.mockito.Mockito.*; - -import org.junit.Test; - -import org.exoplatform.portal.mop.SiteKey; -import org.exoplatform.social.core.space.SpaceUtils; -import org.exoplatform.social.core.space.impl.DynamicSpacePortalLayoutMatcher; -import org.exoplatform.social.core.space.model.Space; -import org.exoplatform.social.core.space.spi.SpaceService; - -public class DynamicSpacePortalLayoutMatcherTest { - - @Test - public void testMatchSpaceLayout() { - SpaceService spaceService = mock(SpaceService.class); - String spacePrefix = "testMatchSpaceLayout"; - String templateName = spacePrefix + " Template"; - String groupId = SpaceUtils.SPACE_GROUP + "/" + spacePrefix; - - mockSpaceService(spaceService, spacePrefix, groupId, templateName); - - DynamicSpacePortalLayoutMatcher dynamicSpacePortalLayoutMatcher = new DynamicSpacePortalLayoutMatcher(); - dynamicSpacePortalLayoutMatcher.setSpaceService(spaceService); - dynamicSpacePortalLayoutMatcher.setSpaceTemplateRegex(".+Template.*"); - - assertFalse("Portal site shouldn't match", - dynamicSpacePortalLayoutMatcher.matches(SiteKey.portal(spacePrefix), "currentSite")); - assertTrue("Group site with temmplate name matching should match", - dynamicSpacePortalLayoutMatcher.matches(SiteKey.group(groupId), "currentSite")); - assertFalse("Super Dynamic layout Matcher class should fail when no current site name", - dynamicSpacePortalLayoutMatcher.matches(SiteKey.group(groupId), null)); - assertFalse("Non existing space shouldn't match", - dynamicSpacePortalLayoutMatcher.matches(SiteKey.group(groupId + "1"), "currentSite")); - } - - @Test - public void testEmptySpaceLayoutMatcher() { - SpaceService spaceService = mock(SpaceService.class); - String spacePrefix = "testMatchSpaceLayout"; - String templateName = spacePrefix + " Template"; - String groupId = SpaceUtils.SPACE_GROUP + "/" + spacePrefix; - - mockSpaceService(spaceService, spacePrefix, groupId, templateName); - - DynamicSpacePortalLayoutMatcher dynamicSpacePortalLayoutMatcher = new DynamicSpacePortalLayoutMatcher(); - dynamicSpacePortalLayoutMatcher.setSpaceService(spaceService); - - assertFalse("Portal site shouldn't match", - dynamicSpacePortalLayoutMatcher.matches(SiteKey.portal(spacePrefix), "currentSite")); - assertTrue("Group site with any temmplate name matching should match", - dynamicSpacePortalLayoutMatcher.matches(SiteKey.group(groupId), "currentSite")); - assertFalse("Super Dynamic layout Matcher class should fail when no current site name", - dynamicSpacePortalLayoutMatcher.matches(SiteKey.group(groupId), null)); - assertFalse("Non existing space shouldn't match", - dynamicSpacePortalLayoutMatcher.matches(SiteKey.group(groupId + "1"), "currentSite")); - } - - private void mockSpaceService(SpaceService spaceService, String spacePrefix, String groupId, String templateName) { - Space space = new Space(); - space.setDisplayName(spacePrefix + " Display Name"); - space.setPrettyName(spacePrefix + " Pretty Name"); - space.setGroupId(groupId); - space.setTemplate(templateName); - - reset(spaceService); - when(spaceService.getSpaceByGroupId(eq(groupId))).thenReturn(space); - } -} diff --git a/component/core/src/test/java/org/exoplatform/social/core/test/AbstractCoreTest.java b/component/core/src/test/java/org/exoplatform/social/core/test/AbstractCoreTest.java index 490895ac8ef..57328035306 100644 --- a/component/core/src/test/java/org/exoplatform/social/core/test/AbstractCoreTest.java +++ b/component/core/src/test/java/org/exoplatform/social/core/test/AbstractCoreTest.java @@ -16,27 +16,49 @@ */ package org.exoplatform.social.core.test; -import java.lang.reflect.*; -import java.util.*; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.List; import org.apache.commons.lang3.ArrayUtils; import org.exoplatform.commons.testing.BaseExoTestCase; -import org.exoplatform.commons.utils.*; -import org.exoplatform.component.test.*; +import org.exoplatform.commons.utils.ListAccess; +import org.exoplatform.commons.utils.PageList; +import org.exoplatform.component.test.ConfigurationUnit; +import org.exoplatform.component.test.ConfiguredBy; +import org.exoplatform.component.test.ContainerScope; import org.exoplatform.container.ExoContainerContext; import org.exoplatform.services.log.ExoLogger; import org.exoplatform.services.log.Log; -import org.exoplatform.services.organization.*; -import org.exoplatform.services.security.*; +import org.exoplatform.services.organization.Group; +import org.exoplatform.services.organization.GroupHandler; +import org.exoplatform.services.organization.Membership; +import org.exoplatform.services.organization.MembershipHandler; +import org.exoplatform.services.organization.MembershipType; +import org.exoplatform.services.organization.OrganizationService; +import org.exoplatform.services.organization.User; +import org.exoplatform.services.security.ConversationState; +import org.exoplatform.services.security.Identity; +import org.exoplatform.services.security.IdentityRegistry; +import org.exoplatform.services.security.MembershipEntry; import org.exoplatform.social.core.identity.provider.OrganizationIdentityProvider; +import org.exoplatform.social.core.jpa.storage.SpaceStorage; +import org.exoplatform.social.core.jpa.storage.dao.ActivityDAO; import org.exoplatform.social.core.manager.IdentityManager; +import org.exoplatform.social.core.manager.RelationshipManager; +import org.exoplatform.social.core.profile.ProfileFilter; +import org.exoplatform.social.core.relationship.model.Relationship; import org.exoplatform.social.core.space.SpaceException; import org.exoplatform.social.core.space.SpaceUtils; -import org.exoplatform.social.core.space.impl.DefaultSpaceApplicationHandler; import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.core.space.spi.SpaceService; -import org.exoplatform.social.core.storage.api.SpaceStorage; +import org.exoplatform.social.core.storage.api.ActivityStorage; +import org.exoplatform.social.core.storage.cache.CachedActivityStorage; import org.exoplatform.social.core.storage.cache.CachedSpaceStorage; import junit.framework.AssertionFailedError; @@ -71,21 +93,43 @@ protected void setUp() throws Exception { begin(); // - spaceService = getContainer().getComponentInstanceOfType(SpaceService.class); - identityManager = getContainer().getComponentInstanceOfType(IdentityManager.class); - identityRegistry = getContainer().getComponentInstanceOfType(IdentityRegistry.class); + spaceService = getService(SpaceService.class); + identityManager = getService(IdentityManager.class); + identityRegistry = getService(IdentityRegistry.class); + deleteAllRelationships(); + deleteAllActivities(); deleteAllSpaces(); + restartTransaction(); } @Override protected void tearDown() throws Exception { + deleteAllRelationships(); + deleteAllActivities(); deleteAllSpaces(); + restartTransaction(); wantCount = false; end(); } + protected void deleteAllRelationships() throws Exception { + RelationshipManager relationshipManager = getService(RelationshipManager.class); + ListAccess identities = identityManager.getIdentitiesByProfileFilter(OrganizationIdentityProvider.NAME, new ProfileFilter(), true); + for(org.exoplatform.social.core.identity.model.Identity identity : identities.load(0, identities.getSize())) { + ListAccess relationships = relationshipManager.getAllWithListAccess(identity); + Arrays.stream(relationships.load(0, relationships.getSize())) + .forEach(relationship -> relationshipManager.delete(new Relationship(identity, relationship))); + } + } + + protected void deleteAllActivities() { + ActivityDAO activityDAO = getService(ActivityDAO.class); + activityDAO.deleteAll(); + ((CachedActivityStorage) getService(ActivityStorage.class)).clearCache(); + } + @SneakyThrows protected void deleteAllSpaces() { ListAccess allSpacesListAccess = spaceService.getAllSpacesWithListAccess(); @@ -176,14 +220,11 @@ protected Identity startSessionAs(String user, Collection membe public Space getSpaceInstance(int number, String visible, String registration, String manager, String... members) { Space space = new Space(); - space.setApp("app"); space.setDisplayName("my space " + number); space.setPrettyName(space.getDisplayName()); space.setRegistration(registration); space.setDescription("add new space " + number); - space.setType(DefaultSpaceApplicationHandler.NAME); space.setVisibility(visible); - space.setPriority(Space.INTERMEDIATE_PRIORITY); space.setGroupId("/spaces/space" + number); String[] managers = new String[] { manager }; String[] invitedUsers = new String[] {}; diff --git a/component/core/src/test/java/org/exoplatform/social/core/test/NoContainerTestSuite.java b/component/core/src/test/java/org/exoplatform/social/core/test/NoContainerTestSuite.java index b66c52d6271..88d893529fe 100644 --- a/component/core/src/test/java/org/exoplatform/social/core/test/NoContainerTestSuite.java +++ b/component/core/src/test/java/org/exoplatform/social/core/test/NoContainerTestSuite.java @@ -37,6 +37,10 @@ import io.meeds.social.authorization.AuthorizationManagerTest; import io.meeds.social.core.search.SpaceSearchConnectorTest; import io.meeds.social.image.plugin.ImageAttachmentPluginTest; +import io.meeds.social.space.template.plugin.attachment.SpaceTemplateBannerAttachmentPluginTest; +import io.meeds.social.space.template.plugin.translation.SpaceTemplateTranslationPluginTest; +import io.meeds.social.space.template.service.SpaceTemplateServiceTest; +import io.meeds.social.space.template.storage.SpaceTemplateStorageTest; import io.meeds.social.upgrade.SpaceNavigationIconUpgradePluginTest; @RunWith(Suite.class) @@ -58,6 +62,10 @@ SpaceNavigationIconUpgradePluginTest.class, AuthorizationManagerTest.class, SpaceSearchConnectorTest.class, + SpaceTemplateBannerAttachmentPluginTest.class, + SpaceTemplateTranslationPluginTest.class, + SpaceTemplateStorageTest.class, + SpaceTemplateServiceTest.class, }) public class NoContainerTestSuite { diff --git a/component/core/src/test/java/org/exoplatform/social/core/thumbnail/ImageThumbnailServiceImplTest.java b/component/core/src/test/java/org/exoplatform/social/core/thumbnail/ImageThumbnailServiceImplTest.java index 14fcd6b9de0..4a116017ec7 100644 --- a/component/core/src/test/java/org/exoplatform/social/core/thumbnail/ImageThumbnailServiceImplTest.java +++ b/component/core/src/test/java/org/exoplatform/social/core/thumbnail/ImageThumbnailServiceImplTest.java @@ -15,6 +15,12 @@ */ package org.exoplatform.social.core.thumbnail; +import java.io.ByteArrayInputStream; +import java.io.File; +import java.nio.file.Files; +import java.util.Date; +import java.util.List; + import org.exoplatform.commons.file.model.FileInfo; import org.exoplatform.commons.file.model.FileItem; import org.exoplatform.commons.file.services.FileService; @@ -28,12 +34,6 @@ import org.exoplatform.social.metadata.model.MetadataType; import org.exoplatform.social.metadata.thumbnail.model.ThumbnailObject; -import java.io.ByteArrayInputStream; -import java.io.File; -import java.nio.file.Files; -import java.util.Date; -import java.util.List; - public class ImageThumbnailServiceImplTest extends AbstractCoreTest { private MetadataService metadataService; diff --git a/component/core/src/test/java/org/exoplatform/social/metadata/MetadataServiceTest.java b/component/core/src/test/java/org/exoplatform/social/metadata/MetadataServiceTest.java index 6cbdaf37524..6a4f28fd78f 100644 --- a/component/core/src/test/java/org/exoplatform/social/metadata/MetadataServiceTest.java +++ b/component/core/src/test/java/org/exoplatform/social/metadata/MetadataServiceTest.java @@ -34,9 +34,7 @@ import org.exoplatform.container.xml.ObjectParameter; import org.exoplatform.social.common.ObjectAlreadyExistsException; import org.exoplatform.social.core.identity.model.Identity; -import org.exoplatform.social.core.identity.provider.SpaceIdentityProvider; import org.exoplatform.social.core.jpa.storage.dao.jpa.MetadataDAO; -import org.exoplatform.social.core.manager.IdentityManager; import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.core.test.AbstractCoreTest; import org.exoplatform.social.metadata.model.Metadata; @@ -58,8 +56,6 @@ public class MetadataServiceTest extends AbstractCoreTest { private Identity maryIdentity; - private IdentityManager identityManager; - private MetadataService metadataService; private MetadataDAO metadataDAO; @@ -68,17 +64,14 @@ public class MetadataServiceTest extends AbstractCoreTest { private MetadataType spaceMetadataType; - private List tearDownSpaceList; @Override public void setUp() throws Exception { super.setUp(); - identityManager = getContainer().getComponentInstanceOfType(IdentityManager.class); metadataService = getContainer().getComponentInstanceOfType(MetadataService.class); metadataDAO = getContainer().getComponentInstanceOfType(MetadataDAO.class); userMetadataType = new MetadataType(1000, "user"); spaceMetadataType = new MetadataType(2000, "space"); - tearDownSpaceList = new ArrayList<>(); if (metadataService.getMetadataTypeByName(userMetadataType.getName()) == null) { MetadataTypePlugin userMetadataTypePlugin = new MetadataTypePlugin(newParam(1000, "user")) { @@ -113,21 +106,12 @@ public boolean isAllowMultipleItemsPerObject() { @Override public void tearDown() throws Exception { - end(); - begin(); + restartTransaction(); identityManager.deleteIdentity(rootIdentity); identityManager.deleteIdentity(johnIdentity); identityManager.deleteIdentity(maryIdentity); metadataDAO.deleteAll(); - for (Space space : tearDownSpaceList) { - Identity spaceIdentity = identityManager.getOrCreateIdentity(SpaceIdentityProvider.NAME, space.getPrettyName()); - if (spaceIdentity != null) { - identityManager.deleteIdentity(spaceIdentity); - } - spaceService.deleteSpace(space); - } - super.tearDown(); } @@ -398,7 +382,12 @@ public void testGetMetadataItemsByMetadataNameAndTypeAndObjectAndSpaceId() throw restartTransaction(); - List metadataItems = metadataService.getMetadataItemsByMetadataNameAndTypeAndObjectAndSpaceId(name, type, objectType, spaceId, 0, 10); + List metadataItems = metadataService.getMetadataItemsByMetadataNameAndTypeAndObjectAndSpaceId(name, + type, + objectType, + spaceId, + 0, + 10); assertNotNull(metadataItems); assertEquals(1, metadataItems.size()); assertEquals(storedMetadataItem.getId(), metadataItems.get(0).getId()); @@ -1880,8 +1869,7 @@ private Metadata newMetadataInstance(long audienceId, return metadata; } - @SuppressWarnings("deprecation") - private Space createSpace(String spaceName, String creator, String... members) throws Exception { + private Space createSpace(String spaceName, String creator, String... members) { Space space = new Space(); space.setDisplayName(spaceName); space.setPrettyName(spaceName); @@ -1890,13 +1878,10 @@ private Space createSpace(String spaceName, String creator, String... members) t space.setDescription("description of space" + spaceName); space.setVisibility(Space.PRIVATE); space.setRegistration(Space.OPEN); - space.setPriority(Space.INTERMEDIATE_PRIORITY); String[] managers = new String[] { creator }; String[] spaceMembers = members == null ? new String[] { creator } : members; space.setManagers(managers); space.setMembers(spaceMembers); - spaceService.createSpace(space); // NOSONAR - tearDownSpaceList.add(space); - return space; + return spaceService.createSpace(space); } } diff --git a/component/core/src/test/java/org/exoplatform/social/metadata/favorite/FavoriteServiceTest.java b/component/core/src/test/java/org/exoplatform/social/metadata/favorite/FavoriteServiceTest.java index 0f407c695c1..3a3ed49aee9 100644 --- a/component/core/src/test/java/org/exoplatform/social/metadata/favorite/FavoriteServiceTest.java +++ b/component/core/src/test/java/org/exoplatform/social/metadata/favorite/FavoriteServiceTest.java @@ -21,6 +21,7 @@ import java.util.List; import org.apache.commons.collections.CollectionUtils; + import org.exoplatform.commons.exception.ObjectNotFoundException; import org.exoplatform.container.xml.InitParams; import org.exoplatform.container.xml.ObjectParameter; @@ -83,8 +84,7 @@ public boolean isShareable() { @Override public void tearDown() throws Exception { - end(); - begin(); + restartTransaction(); identityManager.deleteIdentity(johnIdentity); metadataDAO.deleteAll(); diff --git a/component/core/src/test/java/org/exoplatform/social/metadata/tag/TagServiceTest.java b/component/core/src/test/java/org/exoplatform/social/metadata/tag/TagServiceTest.java index 7b396229260..29f4ab027dc 100644 --- a/component/core/src/test/java/org/exoplatform/social/metadata/tag/TagServiceTest.java +++ b/component/core/src/test/java/org/exoplatform/social/metadata/tag/TagServiceTest.java @@ -18,17 +18,28 @@ */ package org.exoplatform.social.metadata.tag; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; import java.util.stream.Collectors; +import org.apache.commons.lang3.ArrayUtils; + import org.exoplatform.social.core.identity.model.Identity; import org.exoplatform.social.core.identity.provider.SpaceIdentityProvider; import org.exoplatform.social.core.jpa.storage.dao.jpa.MetadataDAO; import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.core.test.AbstractCoreTest; import org.exoplatform.social.metadata.MetadataService; -import org.exoplatform.social.metadata.model.*; -import org.exoplatform.social.metadata.tag.model.*; +import org.exoplatform.social.metadata.model.Metadata; +import org.exoplatform.social.metadata.model.MetadataItem; +import org.exoplatform.social.metadata.model.MetadataKey; +import org.exoplatform.social.metadata.tag.model.TagFilter; +import org.exoplatform.social.metadata.tag.model.TagName; +import org.exoplatform.social.metadata.tag.model.TagObject; /** * Test class for {@link TagService} @@ -88,8 +99,8 @@ public void testDetectTagNames() { assertEquals(0, tagNames.size()); String content = - "

Test tag #NoTagHere test test" - + "  .
"; + "
Test tag #NoTagHere test test" + + "  .
"; tagNames = tagService.detectTagNames(content); assertNotNull(tagNames); assertEquals(1, tagNames.size()); @@ -165,10 +176,10 @@ public void testSaveTags() { // NOSONAR assertNotNull(metadataItems); assertEquals(2, metadataItems.size()); Set storedTagNames = metadataItems.stream() - .map(MetadataItem::getMetadata) - .map(Metadata::getName) - .map(TagName::new) - .collect(Collectors.toSet()); + .map(MetadataItem::getMetadata) + .map(Metadata::getName) + .map(TagName::new) + .collect(Collectors.toSet()); assertTrue(storedTagNames.contains(new TagName(tagName1))); assertTrue(storedTagNames.contains(new TagName(tagName2))); @@ -211,7 +222,7 @@ public void testSaveTags() { // NOSONAR assertEquals(tagNames2, storedTagNames); } - public void testFindTags() throws Exception { + public void testFindTags() throws IllegalAccessException { List spaces = new ArrayList<>(); List spaceIdentityIds = new ArrayList<>(); List spaceCreators = new ArrayList<>(); @@ -273,7 +284,7 @@ public void testFindTags() throws Exception { "tagJohnMary2", "tagMary1", "tagMary2"), - marySavedTags.stream().map(TagName::getName).sorted().collect(Collectors.toList())); + marySavedTags.stream().map(TagName::getName).sorted().toList()); marySavedTags = tagService.findTags(new TagFilter("mar", 0), Long.parseLong(maryIdentity.getId())); assertNotNull(marySavedTags); @@ -281,7 +292,7 @@ public void testFindTags() throws Exception { "tagJohnMary2", "tagMary1", "tagMary2"), - marySavedTags.stream().map(TagName::getName).sorted().collect(Collectors.toList())); + marySavedTags.stream().map(TagName::getName).sorted().toList()); marySavedTags = tagService.findTags(new TagFilter("mar", 3), Long.parseLong(maryIdentity.getId())); assertNotNull(marySavedTags); @@ -291,13 +302,13 @@ public void testFindTags() throws Exception { assertNotNull(johnSavedTags); assertEquals(Arrays.asList("tagJohnMary1", "tagJohnMary2"), - johnSavedTags.stream().map(TagName::getName).sorted().collect(Collectors.toList())); + johnSavedTags.stream().map(TagName::getName).sorted().toList()); johnSavedTags = tagService.findTags(new TagFilter("mar", 2), Long.parseLong(johnIdentity.getId())); assertNotNull(johnSavedTags); assertEquals(Arrays.asList("tagJohnMary1", "tagJohnMary2"), - johnSavedTags.stream().map(TagName::getName).sorted().collect(Collectors.toList())); + johnSavedTags.stream().map(TagName::getName).sorted().toList()); johnSavedTags = tagService.findTags(new TagFilter("joh", 10), Long.parseLong(johnIdentity.getId())); assertNotNull(johnSavedTags); @@ -305,10 +316,10 @@ public void testFindTags() throws Exception { "tagJohn2", "tagJohnMary1", "tagJohnMary2"), - johnSavedTags.stream().map(TagName::getName).sorted().collect(Collectors.toList())); + johnSavedTags.stream().map(TagName::getName).sorted().toList()); } - public void testFindTagsCaseInsensitive() throws Exception { + public void testFindTagsCaseInsensitive() throws IllegalAccessException { Set tagNames = new HashSet<>(); tagNames.add(new TagName("tagMary1")); tagNames.add(new TagName("tagMary2")); @@ -343,8 +354,7 @@ public void testFindTagsCaseInsensitive() throws Exception { assertEquals(tagNames, savedTagNames); } - @SuppressWarnings("deprecation") - private Space createSpace(String spaceName, String creator, String... members) throws Exception { + private Space createSpace(String spaceName, String creator, String... members) { Space space = new Space(); space.setDisplayName(spaceName); space.setPrettyName(spaceName); @@ -353,13 +363,13 @@ private Space createSpace(String spaceName, String creator, String... members) t space.setDescription("description of space" + spaceName); space.setVisibility(Space.PRIVATE); space.setRegistration(Space.OPEN); - space.setPriority(Space.INTERMEDIATE_PRIORITY); String[] managers = new String[] { creator }; - String[] spaceMembers = members == null ? new String[] { creator } : members; space.setManagers(managers); - space.setMembers(spaceMembers); - spaceService.createSpace(space); // NOSONAR - tearDownSpaceList.add(space); - return space; + Space createdSpace = spaceService.createSpace(space); + if (ArrayUtils.isNotEmpty(members)) { + Arrays.stream(members).forEach(u -> spaceService.addMember(createdSpace, u)); + } + tearDownSpaceList.add(createdSpace); + return createdSpace; } } diff --git a/component/core/src/test/resources/conf/exo.social.component.core-configuration.xml b/component/core/src/test/resources/conf/exo.social.component.core-configuration.xml index d98b6de3f55..e22029cbf63 100644 --- a/component/core/src/test/resources/conf/exo.social.component.core-configuration.xml +++ b/component/core/src/test/resources/conf/exo.social.component.core-configuration.xml @@ -64,13 +64,8 @@ - org.exoplatform.social.common.lifecycle.LifeCycleCompletionService - - - async-execution - false - - + org.exoplatform.social.common.lifecycle.LifeCycleCompletionService + org.exoplatform.social.common.lifecycle.LifeCycleCompletionServiceMock @@ -249,7 +244,7 @@ - org.exoplatform.social.core.storage.api.SpaceStorage + org.exoplatform.social.core.jpa.storage.SpaceStorage org.exoplatform.social.core.storage.cache.CachedSpaceStorage @@ -347,43 +342,37 @@ org.exoplatform.social.core.space.spi.SpaceService - org.exoplatform.social.core.space.impl.SpaceServiceImpl + io.meeds.social.core.space.service.SpaceServiceImpl - org.exoplatform.social.core.space.spi.SpaceTemplateService - org.exoplatform.social.core.space.impl.SpaceTemplateServiceImpl - - - defaultSpaceTemplate - classic - - + io.meeds.social.core.space.service.SpaceLayoutService - org.exoplatform.social.core.space.SpacesAdministrationService - org.exoplatform.social.core.space.impl.SpacesAdministrationServiceImpl + io.meeds.social.space.template.storage.SpaceTemplateStorage + io.meeds.social.space.template.storage.SpaceTemplateStorageMock - org.exoplatform.social.core.processor.MentionsProcessor + io.meeds.social.space.template.service.SpaceTemplateService - org.exoplatform.social.core.processor.TemplateParamsProcessor + org.exoplatform.social.core.space.SpacesAdministrationService + org.exoplatform.social.core.space.impl.SpacesAdministrationServiceImpl - org.exoplatform.social.core.application.ProfileUpdatesPublisher + org.exoplatform.social.core.processor.MentionsProcessor - org.exoplatform.social.core.application.RelationshipPublisher + org.exoplatform.social.core.processor.TemplateParamsProcessor - org.exoplatform.social.core.application.SpaceActivityPublisher + org.exoplatform.social.core.application.ProfileUpdatesPublisher @@ -479,6 +468,18 @@ + + io.meeds.social.permlink.plugin.ActivityPermanentLinkPlugin + + + + io.meeds.social.permlink.plugin.SpacePermanentLinkPlugin + + + + io.meeds.social.permlink.plugin.UserProfilePermanentLinkPlugin + + org.exoplatform.social.core.profilelabel.ProfileLabelService org.exoplatform.social.core.profilelabel.ProfileLabelServiceImpl @@ -1301,152 +1302,6 @@ - - org.exoplatform.social.core.space.spi.SpaceService - - SpaceActivityPublisher - addSpaceListener - org.exoplatform.social.core.application.SpaceActivityPublisher - - - - - org.exoplatform.social.core.space.spi.SpaceTemplateService - - DefaultSpaceApplicationHandler - registerSpaceApplicationHandler - org.exoplatform.social.core.space.impl.DefaultSpaceApplicationHandler - - - templateName - classic - - - - - - Space Template Configuration - registerSpaceTemplatePlugin - org.exoplatform.social.core.space.SpaceTemplateConfigPlugin - - - template - Space Template - - - classic - - - private - - - open - - - classpath:/eXo-Social.png - - - - - social-portlet - - - SpaceActivityStreamPortlet - - - Home - - - - - - - - - dashboard - - - DashboardPortlet - - - Dashboard - - - true - - - 1 - - - dashboard - - - - - - - - social-portlet - - - SpaceSettingPortlet - - - Space Settings - - - false - - - 2 - - - settings - - - test - - - - - manager - - - - - - - - - - social-portlet - - - MembersPortlet - - - Members - - - true - - - 3 - - - members - - - - - - - - - - - - org.exoplatform.services.listener.ListenerService diff --git a/component/core/src/test/resources/conf/exo.social.component.core-local-configuration.xml b/component/core/src/test/resources/conf/exo.social.component.core-local-configuration.xml index af909974165..93d96260b60 100644 --- a/component/core/src/test/resources/conf/exo.social.component.core-local-configuration.xml +++ b/component/core/src/test/resources/conf/exo.social.component.core-local-configuration.xml @@ -175,114 +175,6 @@ - - org.exoplatform.social.core.space.spi.SpaceTemplateService - - DefaultSpaceApplicationHandler - registerSpaceApplicationHandler - org.exoplatform.social.core.space.mock.MockSpaceApplicationHandler - - - templateName - meeds - - - - - Space Template Configuration - registerSpaceTemplatePlugin - org.exoplatform.social.core.space.SpaceTemplateConfigPlugin - - - template - Space Template - - - meeds - - - private - - - open - - - classpath:/eXo-Social.png - - - - - dashboard - - - DashboardPortlet - - - Home - - - - - - - - - social-portlet - - - SpaceSettingPortlet - - - Space Settings - - - false - - - 2 - - - settings - - - - - manager - - - - - - - - - social-portlet - - - MembersPortlet - - - Members - - - true - - - 3 - - - members - - - - - - - - - - - org.exoplatform.social.core.profileproperty.ProfilePropertyService @@ -1166,7 +1058,14 @@ - jar:/conf/exo.portal.component.portal-configuration-local.xml + + org.exoplatform.social.core.manager.RelationshipManager + + RelationshipPublisher + addListenerPlugin + org.exoplatform.social.core.application.RelationshipPublisher + + org.exoplatform.portal.resource.SkinResourceRequestHandler org.exoplatform.web.WebAppController diff --git a/component/core/src/test/resources/portal/config/portal/portal/template/spacePublic/navigation.xml b/component/core/src/test/resources/portal/config/portal/portal/template/spacePublic/navigation.xml index 09101d04b6f..6c5122d32de 100644 --- a/component/core/src/test/resources/portal/config/portal/portal/template/spacePublic/navigation.xml +++ b/component/core/src/test/resources/portal/config/portal/portal/template/spacePublic/navigation.xml @@ -3,7 +3,7 @@ This file is part of the Meeds project (https://meeds.io/). - Copyright (C) 2020 - 2023 Meeds Association contact@meeds.io + Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -24,25 +24,12 @@ xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_6 http://www.gatein.org/xml/ns/gatein_objects_1_6" xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_6"> 1 - node_name node_icon - 2000-03-21T01:33:00 - 2009-03-21T01:33:00 - TEMPORAL - portal::meeds::test2 - - - node_name2 - - node_icon2 - 2000-03-21T01:33:00 - 2009-03-21T01:33:00 - TEMPORAL - portal::meeds::test2 + portal::@owner@::test1 diff --git a/component/core/src/test/resources/portal/config/portal/portal/template/spacePublic/pages.xml b/component/core/src/test/resources/portal/config/portal/portal/template/spacePublic/pages.xml index f9d45aa3262..8e25d7c548b 100644 --- a/component/core/src/test/resources/portal/config/portal/portal/template/spacePublic/pages.xml +++ b/component/core/src/test/resources/portal/config/portal/portal/template/spacePublic/pages.xml @@ -3,7 +3,7 @@ This file is part of the Meeds project (https://meeds.io/). - Copyright (C) 2020 - 2023 Meeds Association contact@meeds.io + Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -53,23 +53,4 @@ container_2_description
- - test55 - test_title - test_factory_id - test_access_permissions - test_edit_permission - true - - container_2 - container_2_title - container_2_icon - container_2_access_permissions - container_2_factory_id - container_2_description - - diff --git a/component/core/src/test/resources/portal/template/pages/space/page.xml b/component/core/src/test/resources/portal/template/pages/space/page.xml index d11da263741..f86df1d7db4 100644 --- a/component/core/src/test/resources/portal/template/pages/space/page.xml +++ b/component/core/src/test/resources/portal/template/pages/space/page.xml @@ -20,7 +20,7 @@ - social-portlet + social SpaceBannerPortlet *:/platform/users diff --git a/component/core/src/test/resources/portal/template/pages/spaceHomePage/page.xml b/component/core/src/test/resources/portal/template/pages/spaceHomePage/page.xml index 3dd5f4cb3f2..77021f12d38 100644 --- a/component/core/src/test/resources/portal/template/pages/spaceHomePage/page.xml +++ b/component/core/src/test/resources/portal/template/pages/spaceHomePage/page.xml @@ -25,7 +25,7 @@ - social-portlet + social SpaceBannerPortlet *:/platform/users @@ -36,7 +36,7 @@ - social-portlet + social SpaceActivityStreamPortlet false @@ -46,7 +46,7 @@ - social-portlet + social SpaceInfos false @@ -55,7 +55,7 @@ - social-portlet + social WhoIsOnLinePortlet false @@ -64,7 +64,7 @@ - social-portlet + social HomePageCalendarPortlet false diff --git a/component/notification/src/main/java/org/exoplatform/social/notification/impl/SpaceNotificationImpl.java b/component/notification/src/main/java/org/exoplatform/social/notification/impl/SpaceNotificationImpl.java index 273f3d64ed6..dfcb926fedf 100644 --- a/component/notification/src/main/java/org/exoplatform/social/notification/impl/SpaceNotificationImpl.java +++ b/component/notification/src/main/java/org/exoplatform/social/notification/impl/SpaceNotificationImpl.java @@ -19,12 +19,16 @@ package org.exoplatform.social.notification.impl; import org.apache.commons.lang3.StringUtils; +import java.util.HashMap; +import java.util.List; + import org.exoplatform.commons.api.notification.NotificationContext; -import org.exoplatform.commons.api.notification.model.*; +import org.exoplatform.commons.api.notification.model.NotificationInfo; +import org.exoplatform.commons.api.notification.model.PluginKey; +import org.exoplatform.commons.api.notification.model.WebNotificationFilter; import org.exoplatform.commons.api.notification.plugin.BaseNotificationPlugin; import org.exoplatform.commons.api.notification.service.WebNotificationService; import org.exoplatform.commons.notification.impl.NotificationContextImpl; -import org.exoplatform.commons.notification.net.WebNotificationSender; import org.exoplatform.commons.utils.CommonsUtils; import org.exoplatform.services.log.ExoLogger; import org.exoplatform.services.log.Log; @@ -36,8 +40,6 @@ import org.exoplatform.social.notification.plugin.RequestJoinSpacePlugin; import org.exoplatform.social.notification.plugin.SocialNotificationUtils; import org.exoplatform.social.notification.plugin.SpaceInvitationPlugin; -import java.util.HashMap; -import java.util.List; public class SpaceNotificationImpl extends SpaceListenerPlugin { @@ -90,6 +92,10 @@ public void addInvitedUser(SpaceLifeCycleEvent event) { String userId = event.getTarget(); String senderRemoteId = space.getEditor(); Identity identity = Utils.getIdentityManager().getOrCreateUserIdentity(senderRemoteId); + if (identity == null) { + LOG.warn("Can't send Invitation notification since the inviter isn't known"); + return; + } String senderName = identity.getProfile().getFullName(); NotificationContext ctx = NotificationContextImpl.cloneInstance() .append(SocialNotificationUtils.REMOTE_ID, userId) diff --git a/component/notification/src/test/java/org/exoplatform/social/notification/AbstractPluginTest.java b/component/notification/src/test/java/org/exoplatform/social/notification/AbstractPluginTest.java index e90cd999440..0f64e423f66 100644 --- a/component/notification/src/test/java/org/exoplatform/social/notification/AbstractPluginTest.java +++ b/component/notification/src/test/java/org/exoplatform/social/notification/AbstractPluginTest.java @@ -40,7 +40,6 @@ import org.exoplatform.social.core.activity.model.ExoSocialActivityImpl; import org.exoplatform.social.core.identity.model.Identity; import org.exoplatform.social.core.relationship.model.Relationship; -import org.exoplatform.social.core.space.impl.DefaultSpaceApplicationHandler; import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.notification.plugin.ActivityCommentPlugin; import org.exoplatform.social.notification.plugin.ActivityCommentWatchPlugin; @@ -324,10 +323,8 @@ protected Space getSpaceInstance(int number) throws Exception { space.setPrettyName(space.getDisplayName()); space.setRegistration(Space.OPEN); space.setDescription("add new space " + number); - space.setType(DefaultSpaceApplicationHandler.NAME); space.setVisibility(Space.PUBLIC); space.setRegistration(Space.VALIDATION); - space.setPriority(Space.INTERMEDIATE_PRIORITY); space.setGroupId("/space/space" + number); space.setAvatarUrl("my-avatar-url"); String[] managers = new String[] { diff --git a/component/notification/src/test/java/org/exoplatform/social/notification/LinkProviderUtilsTest.java b/component/notification/src/test/java/org/exoplatform/social/notification/LinkProviderUtilsTest.java index b799a5b5448..300889ba98e 100644 --- a/component/notification/src/test/java/org/exoplatform/social/notification/LinkProviderUtilsTest.java +++ b/component/notification/src/test/java/org/exoplatform/social/notification/LinkProviderUtilsTest.java @@ -135,7 +135,6 @@ public void testGetOpenLinkAnswer() { String openUrl1 = LinkProviderUtils.getOpenLink(comment1); assertEquals(expected, openUrl1); - //case 2: comment created by AnswersSpaceActivityPublisher ExoSocialActivity comment2 = new ExoSocialActivityImpl(); comment2.setTitle("comment2"); comment2.setType("ks-answer:spaces"); diff --git a/component/notification/src/test/java/org/exoplatform/social/notification/UtilsTestCase.java b/component/notification/src/test/java/org/exoplatform/social/notification/UtilsTestCase.java index 5a737e2dbc1..cfb0dd7666b 100644 --- a/component/notification/src/test/java/org/exoplatform/social/notification/UtilsTestCase.java +++ b/component/notification/src/test/java/org/exoplatform/social/notification/UtilsTestCase.java @@ -2,9 +2,9 @@ import org.exoplatform.commons.utils.CommonsUtils; -import org.exoplatform.social.core.space.impl.DefaultSpaceApplicationHandler; import org.exoplatform.social.core.space.model.Space; +import java.util.Arrays; import java.util.HashSet; import java.util.Set; @@ -19,23 +19,20 @@ public void setUp() throws Exception { space.setPrettyName(space.getDisplayName()); space.setRegistration(Space.OPEN); space.setDescription("new space "); - space.setType(DefaultSpaceApplicationHandler.NAME); space.setVisibility(Space.PUBLIC); space.setRegistration(Space.VALIDATION); - space.setPriority(Space.INTERMEDIATE_PRIORITY); - space.setGroupId("/space/space"); - String[] managers = new String[] {rootIdentity.getRemoteId()}; - String[] members = new String[] { rootIdentity.getRemoteId(), demoIdentity.getRemoteId(), johnIdentity.getRemoteId() }; - space.setManagers(managers); - space.setMembers(members); - space.setUrl(space.getPrettyName()); + space.setEditor(rootIdentity.getRemoteId()); space.setAvatarLastUpdated(System.currentTimeMillis()); - space = spaceService.createSpace(space, rootIdentity.getRemoteId()); - tearDownSpaceList.add(space); + Space createdSpace = spaceService.createSpace(space, rootIdentity.getRemoteId()); + + Arrays.asList(rootIdentity.getRemoteId(), demoIdentity.getRemoteId(), johnIdentity.getRemoteId()) + .forEach(u -> spaceService.addMember(createdSpace, u)); + + tearDownSpaceList.add(createdSpace); System.setProperty(CommonsUtils.CONFIGURED_DOMAIN_URL_KEY, "http://test.com"); } - public void testProcessLinkInActivityTitle() throws Exception { + public void testProcessLinkInActivityTitle() { String title = "Yahoo Site is better than Hotmail Site"; title = Utils.processLinkTitle(title); assertEquals("Yahoo Site is better than Hotmail Site", title); @@ -61,7 +58,6 @@ public void testGetMentioners() { public void testSendToCommenters() { Set receivers = new HashSet<>(); - ; String[] commenters = new String[] { demoIdentity.getId()}; Utils.sendToCommeters(receivers, commenters, rootIdentity.getId(), space.getId()); assertEquals(1, receivers.size()); diff --git a/component/notification/src/test/java/org/exoplatform/social/notification/channel/template/ActivityCommentReplyMailBuilderTest.java b/component/notification/src/test/java/org/exoplatform/social/notification/channel/template/ActivityCommentReplyMailBuilderTest.java index d4e222c34ef..9dd005ac864 100644 --- a/component/notification/src/test/java/org/exoplatform/social/notification/channel/template/ActivityCommentReplyMailBuilderTest.java +++ b/component/notification/src/test/java/org/exoplatform/social/notification/channel/template/ActivityCommentReplyMailBuilderTest.java @@ -77,8 +77,7 @@ public void testSimpleCase() throws Exception { //STEP 3 add comment reply (notif sent to root) makeCommentReply(activity, demoIdentity, SUB_COMMENT_TITLE, comment.getId()); - end(); - begin(); + restartTransaction(); List list = assertMadeMailDigestNotifications(rootIdentity.getRemoteId(), 1); NotificationInfo commentReplyNotification = list.get(0); @@ -107,8 +106,7 @@ public void testDigest() throws Exception { //demo add comment reply to maryActivity ==> notify to root and mary makeCommentReply(maryActivity, demoIdentity, "demo add reply", comment.getId()); - end(); - begin(); + restartTransaction(); List list1 = assertMadeMailDigestNotifications(rootIdentity.getRemoteId(), 1); toRoot.add(list1.get(0)); diff --git a/component/notification/src/test/java/org/exoplatform/social/notification/channel/template/ActivityMentionMailBuilderTest.java b/component/notification/src/test/java/org/exoplatform/social/notification/channel/template/ActivityMentionMailBuilderTest.java index 8ea45e1f80d..1d87d67b20d 100644 --- a/component/notification/src/test/java/org/exoplatform/social/notification/channel/template/ActivityMentionMailBuilderTest.java +++ b/component/notification/src/test/java/org/exoplatform/social/notification/channel/template/ActivityMentionMailBuilderTest.java @@ -189,8 +189,7 @@ public void testDigestWithDeletedActivity() throws Exception { //root add comment to maryActivity and mention john makeComment(activityManager.getActivity(maryActivity.getId()), rootIdentity, "root mention @john"); - end(); - begin(); + restartTransaction(); assertMadeMailDigestNotifications(3); List list2 = assertMadeMailDigestNotifications(johnIdentity.getRemoteId(), 1); diff --git a/component/oauth-auth/pom.xml b/component/oauth-auth/pom.xml index 9bbb196df6e..b490054ab6f 100644 --- a/component/oauth-auth/pom.xml +++ b/component/oauth-auth/pom.xml @@ -29,7 +29,7 @@ social-component-oauth-auth jar - Meeds:: PLF:: Social Oauth authentication and authorization + Meeds:: PLF:: Social OAuth Oauth authentication and authorization services to integrate with social identity model 0.24 diff --git a/component/service/src/main/java/io/meeds/social/space/template/rest/SpaceTemplateRest.java b/component/service/src/main/java/io/meeds/social/space/template/rest/SpaceTemplateRest.java new file mode 100644 index 00000000000..4ab25ddf0b5 --- /dev/null +++ b/component/service/src/main/java/io/meeds/social/space/template/rest/SpaceTemplateRest.java @@ -0,0 +1,165 @@ +/** + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package io.meeds.social.space.template.rest; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Pageable; +import org.springframework.http.HttpStatus; +import org.springframework.security.access.annotation.Secured; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.server.ResponseStatusException; + +import org.exoplatform.commons.exception.ObjectNotFoundException; + +import io.meeds.social.space.template.model.SpaceTemplate; +import io.meeds.social.space.template.model.SpaceTemplateFilter; +import io.meeds.social.space.template.service.SpaceTemplateService; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.servlet.http.HttpServletRequest; + +@RestController +@RequestMapping("/space/templates") +@Tag(name = "/social/rest/space/templates", description = "Managing space templates") +public class SpaceTemplateRest { + + @Autowired + private SpaceTemplateService spaceTemplateService; + + @GetMapping + @Secured("users") + @Operation(summary = "Retrieve space templates", method = "GET", description = "This retrieves space templates") + @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Request fulfilled"), }) + public List getSpaceTemplates(HttpServletRequest request, + Pageable pageable, + @Parameter(description = "Whether include disabled templates or not") + @RequestParam("includeDisabled") + boolean includeDisabled) { + SpaceTemplateFilter spaceTemplateFilter = new SpaceTemplateFilter(request.getRemoteUser(), + request.getLocale(), + includeDisabled); + return spaceTemplateService.getSpaceTemplates(spaceTemplateFilter, pageable, true); + } + + @GetMapping("{id}") + @Secured("users") + @Operation(summary = "Retrieve a Space template designated by its id", method = "GET", + description = "This will retrieve a Space template designated by its id") + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "Request fulfilled"), + @ApiResponse(responseCode = "403", description = "Forbidden"), + @ApiResponse(responseCode = "404", description = "Not found"), + }) + public SpaceTemplate getSpaceTemplate(HttpServletRequest request, + @Parameter(description = "Space template identifier") + @PathVariable("id") + long id) { + try { + SpaceTemplate spaceTemplate = spaceTemplateService.getSpaceTemplate(id, request.getRemoteUser(), request.getLocale(), true); + if (spaceTemplate == null) { + throw new ResponseStatusException(HttpStatus.NOT_FOUND); + } + return spaceTemplate; + } catch (IllegalAccessException e) { + throw new ResponseStatusException(HttpStatus.FORBIDDEN, e.getMessage()); + } + } + + @PostMapping + @Secured("users") + @Operation(summary = "Create a Space template", method = "POST", description = "This creates a new Space template") + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "Request fulfilled"), + @ApiResponse(responseCode = "403", description = "Forbidden"), + }) + public SpaceTemplate createSpaceTemplate(HttpServletRequest request, + @RequestBody + SpaceTemplate spaceTemplate) { + try { + spaceTemplate = spaceTemplateService.createSpaceTemplate(spaceTemplate, request.getRemoteUser()); + return getSpaceTemplate(request, spaceTemplate.getId()); + } catch (IllegalArgumentException e) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, e.getMessage()); + } catch (IllegalAccessException e) { + throw new ResponseStatusException(HttpStatus.FORBIDDEN, e.getMessage()); + } + } + + @PutMapping("{id}") + @Secured("users") + @Operation(summary = "Update a Space template", method = "PUT", description = "This updates an existing Space template") + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "Request fulfilled"), + @ApiResponse(responseCode = "403", description = "Forbidden"), + @ApiResponse(responseCode = "404", description = "Not found"), + }) + public void updateSpaceTemplate(HttpServletRequest request, + @Parameter(description = "Space template identifier") + @PathVariable("id") + long id, + @RequestBody + SpaceTemplate spaceTemplate) { + try { + spaceTemplate.setId(id); + spaceTemplateService.updateSpaceTemplate(spaceTemplate, request.getRemoteUser()); + } catch (IllegalArgumentException e) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, e.getMessage()); + } catch (ObjectNotFoundException e) { + throw new ResponseStatusException(HttpStatus.NOT_FOUND, e.getMessage()); + } catch (IllegalAccessException e) { + throw new ResponseStatusException(HttpStatus.FORBIDDEN, e.getMessage()); + } + } + + @DeleteMapping("{id}") + @Secured("users") + @Operation(summary = "Deletes a Space template", method = "DELETE", description = "This deletes an existing Space template") + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "Request fulfilled"), + @ApiResponse(responseCode = "403", description = "Forbidden"), + @ApiResponse(responseCode = "404", description = "Not found"), + }) + public void deleteSpaceTemplate(HttpServletRequest request, + @Parameter(description = "Space template identifier") + @PathVariable("id") + long id) { + try { + spaceTemplateService.deleteSpaceTemplate(id, request.getRemoteUser()); + } catch (ObjectNotFoundException e) { + throw new ResponseStatusException(HttpStatus.NOT_FOUND, e.getMessage()); + } catch (IllegalAccessException e) { + throw new ResponseStatusException(HttpStatus.FORBIDDEN, e.getMessage()); + } + } + +} diff --git a/component/service/src/main/java/org/exoplatform/social/rest/api/EntityBuilder.java b/component/service/src/main/java/org/exoplatform/social/rest/api/EntityBuilder.java index a3329092f4b..e7a34551e3f 100644 --- a/component/service/src/main/java/org/exoplatform/social/rest/api/EntityBuilder.java +++ b/component/service/src/main/java/org/exoplatform/social/rest/api/EntityBuilder.java @@ -845,7 +845,6 @@ public static SpaceEntity buildEntityFromSpace(Space space, String userId, Strin spaceEntity.setIdentity(identity); spaceEntity.setIdentityId(spaceIdentity.getId()); spaceEntity.setTotalBoundUsers(groupSpaceBindingService.countBoundUsers(space.getId())); - spaceEntity.setApplications(getSpaceApplications(space)); boolean hasBindings = groupSpaceBindingService.isBoundSpace(space.getId()); spaceEntity.setHasBindings(hasBindings); @@ -923,6 +922,7 @@ public static SpaceEntity buildEntityFromSpace(Space space, String userId, Strin spaceEntity.setIsInvited(spaceService.isInvitedUser(space, userId)); spaceEntity.setIsMember(spaceService.isMember(space, userId)); spaceEntity.setCanEdit(canEdit); + spaceEntity.setCanDelete(spaceService.canDeleteSpace(space, userId)); spaceEntity.setCanRedactOnSpace(spaceService.canRedactOnSpace(space, getCurrentUserIdentity())); spaceEntity.setIsManager(isManager); spaceEntity.setIsRedactor(spaceService.isRedactor(space, userId)); @@ -933,12 +933,13 @@ public static SpaceEntity buildEntityFromSpace(Space space, String userId, Strin } PortalConfig portalConfig = getLayoutService().getPortalConfig(new SiteKey(PortalConfig.GROUP_TYPE, space.getGroupId())); - spaceEntity.setSiteId((portalConfig.getStorageId().split("_"))[1]); + if (portalConfig != null) { + spaceEntity.setSiteId((portalConfig.getStorageId().split("_"))[1]); + } spaceEntity.setDisplayName(space.getDisplayName()); spaceEntity.setLastUpdatedTime(space.getLastUpdatedTime()); spaceEntity.setCreatedTime(String.valueOf(space.getCreatedTime())); - spaceEntity.setTemplate(space.getTemplate()); spaceEntity.setPrettyName(space.getPrettyName()); spaceEntity.setGroupId(space.getGroupId()); spaceEntity.setDescription(StringEscapeUtils.unescapeHtml4(space.getDescription())); @@ -1708,21 +1709,6 @@ private static Identity getStreamOwnerIdentity(ExoSocialActivity activity) { return owner; } - private static List getSpaceApplications(Space space) { - List spaceApplications = new ArrayList<>(); - String installedApps = space.getApp(); - if (installedApps != null) { - String[] appStatuses = installedApps.split(","); - for (String appStatus : appStatuses) { - String[] apps = appStatus.split(":"); - BaseEntity app = new BaseEntity(apps[0]); - app.setProperty(RestProperties.DISPLAY_NAME, apps.length > 1 ? apps[1] : ""); - spaceApplications.add(app.getDataEntity()); - } - } - return spaceApplications; - } - private static void updateCachedEtagValue(int etagValue) { ApplicationContext ac = ApplicationContextImpl.getCurrent(); Map properties = ac.getProperties(); diff --git a/component/service/src/main/java/org/exoplatform/social/rest/api/ProfileSettingsRest.java b/component/service/src/main/java/org/exoplatform/social/rest/api/ProfileSettingsRest.java index a74ada13147..7638090d5ca 100644 --- a/component/service/src/main/java/org/exoplatform/social/rest/api/ProfileSettingsRest.java +++ b/component/service/src/main/java/org/exoplatform/social/rest/api/ProfileSettingsRest.java @@ -36,7 +36,6 @@ import org.exoplatform.services.security.ConversationState; import org.exoplatform.social.core.profileproperty.ProfilePropertyService; import org.exoplatform.social.core.profileproperty.model.ProfilePropertySetting; -import org.exoplatform.social.rest.entity.ProfileEntity; import org.exoplatform.social.rest.entity.ProfilePropertySettingEntity; import org.exoplatform.social.service.rest.api.VersionResources; @@ -48,7 +47,6 @@ import java.util.*; - @Path(VersionResources.VERSION_ONE + "/social/profile/settings") @Tag(name = VersionResources.VERSION_ONE + "/social/profile/settings\"", description = "Operations on profile settings") public class ProfileSettingsRest implements ResourceContainer { @@ -59,15 +57,10 @@ public class ProfileSettingsRest implements ResourceContainer { private final ProfilePropertyService profilePropertyService; - private static final int CACHE_IN_SECONDS = 604800; - - private static final int CACHE_IN_MILLI_SECONDS = 604800 * 1000; - - private static final CacheControl CACHE_CONTROL = new CacheControl(); + private static final CacheControl CACHE_CONTROL = new CacheControl(); static { - CACHE_CONTROL.setMaxAge(CACHE_IN_SECONDS); - CACHE_CONTROL.setMustRevalidate(true); + CACHE_CONTROL.setNoCache(true); } public ProfileSettingsRest(ProfilePropertyService profilePropertyService) { diff --git a/component/service/src/main/java/org/exoplatform/social/rest/entity/SpaceEntity.java b/component/service/src/main/java/org/exoplatform/social/rest/entity/SpaceEntity.java index e4807105def..0c52cb5f9f5 100644 --- a/component/service/src/main/java/org/exoplatform/social/rest/entity/SpaceEntity.java +++ b/component/service/src/main/java/org/exoplatform/social/rest/entity/SpaceEntity.java @@ -20,6 +20,8 @@ import java.util.List; import java.util.Map; +import org.apache.commons.lang3.StringUtils; + import org.exoplatform.social.core.identity.model.Identity; import lombok.EqualsAndHashCode; @@ -54,13 +56,14 @@ public String getDisplayName() { return getString("displayName"); } - public SpaceEntity setTemplate(String displayName) { - setProperty("template", displayName); + public SpaceEntity setTemplateId(Long templateId) { + setProperty("templateId", templateId == null ? "0" : templateId.toString()); return this; } - public String getTemplate() { - return getString("template"); + public long getTemplateId() { + String templateId = getString("templateId"); + return StringUtils.isBlank(templateId) ? 0l : Long.parseLong(templateId); } public SpaceEntity setUrl(String url) { @@ -171,11 +174,6 @@ public String getBannerUrl() { return getString("bannerUrl"); } - public SpaceEntity setApplications(List applications) { - setProperty("applications", applications); - return this; - } - public SpaceEntity setVisibility(String visibility) { setProperty("visibility", visibility); return this; @@ -238,16 +236,25 @@ public SpaceEntity setCreatedTime(String creationTime) { public String getCreatedTime() { return (String) getProperty("createdTime"); } - + public SpaceEntity setCanEdit(boolean canEdit) { setProperty("canEdit", canEdit); return this; } - + public Boolean getCanEdit() { return (Boolean) getProperty("canEdit"); } + public SpaceEntity setCanDelete(boolean canDelete) { + setProperty("canDelete", canDelete); + return this; + } + + public Boolean getCanDelete() { + return (Boolean) getProperty("canDelete"); + } + public SpaceEntity setCanRedactOnSpace(boolean canRedactOnSpace) { setProperty("canRedactOnSpace", canRedactOnSpace); return this; diff --git a/component/service/src/main/java/org/exoplatform/social/rest/impl/space/SpaceRest.java b/component/service/src/main/java/org/exoplatform/social/rest/impl/space/SpaceRest.java index 698593feb58..dd640d1685d 100644 --- a/component/service/src/main/java/org/exoplatform/social/rest/impl/space/SpaceRest.java +++ b/component/service/src/main/java/org/exoplatform/social/rest/impl/space/SpaceRest.java @@ -49,7 +49,6 @@ import javax.ws.rs.core.Response.Status; import javax.ws.rs.core.UriInfo; -import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.exoplatform.commons.utils.CommonsUtils; @@ -57,9 +56,6 @@ import org.exoplatform.commons.utils.ListAccess; import org.exoplatform.container.PortalContainer; import org.exoplatform.deprecation.DeprecatedAPI; -import org.exoplatform.portal.config.model.Page; -import org.exoplatform.portal.mop.PageType; -import org.exoplatform.portal.mop.user.UserNode; import org.exoplatform.services.log.ExoLogger; import org.exoplatform.services.log.Log; import org.exoplatform.services.resources.LocaleConfigService; @@ -88,7 +84,6 @@ import org.exoplatform.social.rest.api.EntityBuilder; import org.exoplatform.social.rest.api.RestUtils; import org.exoplatform.social.rest.entity.ActivityEntity; -import org.exoplatform.social.rest.entity.BaseEntity; import org.exoplatform.social.rest.entity.CollectionEntity; import org.exoplatform.social.rest.entity.DataEntity; import org.exoplatform.social.rest.entity.SpaceEntity; @@ -100,6 +95,7 @@ import io.meeds.portal.security.constant.UserRegistrationType; import io.meeds.portal.security.service.SecuritySettingService; +import io.meeds.social.core.space.service.SpaceLayoutService; import io.meeds.social.util.JsonUtils; import io.swagger.v3.oas.annotations.Operation; @@ -109,7 +105,6 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.servlet.http.HttpServletRequest; import lombok.SneakyThrows; @Path(VersionResources.VERSION_ONE + "/social/spaces") @@ -157,6 +152,8 @@ public class SpaceRest implements ResourceContainer { private final SpaceService spaceService; + private final SpaceLayoutService spaceLayoutService; + private final SecuritySettingService securitySettingService; private final ImageThumbnailService imageThumbnailService; @@ -167,20 +164,21 @@ public class SpaceRest implements ResourceContainer { public SpaceRest(ActivityRest activityRestResourcesV1, SpaceService spaceService, + SpaceLayoutService spaceLayoutService, IdentityManager identityManager, UploadService uploadService, ImageThumbnailService imageThumbnailService, SecuritySettingService securitySettingService) { this.activityRestResourcesV1 = activityRestResourcesV1; this.spaceService = spaceService; + this.spaceLayoutService = spaceLayoutService; this.identityManager = identityManager; this.uploadService = uploadService; this.imageThumbnailService = imageThumbnailService; this.securitySettingService = securitySettingService; CACHE_CONTROL.setMaxAge(CACHE_IN_SECONDS); - CACHE_REVALIDATE_CONTROL.setMaxAge(CACHE_IN_SECONDS); - CACHE_REVALIDATE_CONTROL.setMustRevalidate(true); + CACHE_REVALIDATE_CONTROL.setNoCache(true); } @GET @@ -214,6 +212,9 @@ public Response getSpaces( // NOSONAR @Schema(defaultValue = "20") @QueryParam("limit") int limit, + @Parameter(description = "Space Template identifier, if equals to 0, it will not be used", required = false) + @QueryParam("templateId") + long templateId, @Parameter(description = "Sort", required = false) @QueryParam("sort") String sort, @@ -229,9 +230,8 @@ public Response getSpaces( // NOSONAR @QueryParam("favorites") boolean favorites, @Parameter(description = "Tag names used to search spaces", required = true) - @QueryParam( - "tags" - ) List tagNames, + @QueryParam("tags") + List tagNames, @Parameter(description = "Asking for a full representation of a specific subresource, ex: members or managers", required = false) @QueryParam("expand") @@ -251,6 +251,7 @@ public Response getSpaces( // NOSONAR spaceFilter.setSpaceNameSearchCondition(StringUtils.trim(q)); } spaceFilter.setTagNames(tagNames); + spaceFilter.setTemplateId(templateId); if (StringUtils.isNotBlank(sort)) { SortBy sortBy = Sorting.SortBy.valueOf(sort.toUpperCase()); @@ -289,7 +290,12 @@ public Response getSpaces( // NOSONAR } else { spaces = Collections.emptyList(); } - CollectionEntity collectionSpace = EntityBuilder.buildEntityFromSpaces(spaces, authenticatedUser, offset, limit, expand, uriInfo); + CollectionEntity collectionSpace = EntityBuilder.buildEntityFromSpaces(spaces, + authenticatedUser, + offset, + limit, + expand, + uriInfo); if (returnSize) { collectionSpace.setSize(listAccess.getSize()); } @@ -330,40 +336,17 @@ public Response createSpace( "
\"visibility\": \"private\"," + "
\"subscription\": \"validation\"
}", required = true) SpaceEntity model) { - if (model == null || model.getDisplayName() == null - || model.getDisplayName().length() < 3 - || model.getDisplayName().length() > 200) { - throw new WebApplicationException(Response.status(Status.BAD_REQUEST) - .entity(SpaceException.Code.INVALID_SPACE_NAME.name()) - .build()); - } - - // validate the display name - if (spaceService.getSpaceByDisplayName(model.getDisplayName()) != null) { - throw new WebApplicationException(Response.status(Status.BAD_REQUEST) - .entity(SpaceException.Code.SPACE_ALREADY_EXIST.name()) - .build()); - } - String authenticatedUser = ConversationState.getCurrent().getIdentity().getUserId(); - // Space space = new Space(); fillSpaceFromModel(space, model); space.setEditor(authenticatedUser); - - String[] managers = new String[] { authenticatedUser }; - String[] members = new String[] { authenticatedUser }; - space.setManagers(managers); - space.setMembers(members); - try { - spaceService.createSpace(space, authenticatedUser, model.getInvitedMembers()); + space = spaceService.createSpace(space, authenticatedUser, model.getInvitedMembers()); } catch (SpaceException e) { throw new WebApplicationException(Response.status(Status.BAD_REQUEST) .entity(e.getCode().name()) .build()); } - return EntityBuilder.getResponse(EntityBuilder.buildEntityFromSpace(space, authenticatedUser, uriInfo.getPath(), expand), uriInfo, RestUtils.getJsonMediaType(), @@ -432,11 +415,24 @@ public Response getSpaceById( @Parameter(description = "Asking for a full representation of a specific subresource, ex: members or managers", required = false) @QueryParam("expand") - String expand) throws Exception { + String expand) { Space space = spaceService.getSpaceById(id); return buildSpaceResponse(space, expand, uriInfo, request); } + @GET + @Path("countByTemplate") + @Produces(MediaType.APPLICATION_JSON) + @RolesAllowed("administrators") + @Operation( + summary = "Gets the spaces count by Space Template", + method = "GET", + description = "This returns the spaces count by Space template identifier") + @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Request fulfilled") }) + public Response countSpacesByTemplate() { + return Response.ok(JsonUtils.toJsonString(spaceService.countSpacesByTemplate())).build(); + } + @GET @Path("byPrettyName/{prettyName}") @RolesAllowed("users") @@ -461,7 +457,7 @@ public Response getSpaceByPrettyName( description = "Asking for a full representation of a specific subresource, ex: members or managers", required = false) @QueryParam("expand") - String expand) throws Exception { + String expand) { Space space = spaceService.getSpaceByPrettyName(prettyName); return buildSpaceResponse(space, expand, uriInfo, request); @@ -495,36 +491,6 @@ public Response getSpaceByGroupSuffix( return buildSpaceResponse(space, expand, uriInfo, request); } - @GET - @Path("byDisplayName/{displayName}") - @RolesAllowed("users") - @Operation( - summary = "Gets a specific space by display name", - method = "GET", - description = "This returns the space in the following cases:
  • the authenticated user is a member of the space
  • the space is \"public\"
  • the authenticated user is a spaces super manager
") - @ApiResponses( - value = { - @ApiResponse(responseCode = "200", description = "Request fulfilled"), - @ApiResponse(responseCode = "500", description = "Internal server error"), - @ApiResponse(responseCode = "400", description = "Invalid query input") }) - public Response getSpaceByDisplayName( - @Context - UriInfo uriInfo, - @Context - Request request, - @Parameter(description = "Space id", required = true) - @PathParam("displayName") - String displayName, - @Parameter( - description = "Asking for a full representation of a specific subresource, ex: members or managers", - required = false) - @QueryParam("expand") - String expand) throws Exception { - - Space space = spaceService.getSpaceByDisplayName(displayName); - return buildSpaceResponse(space, expand, uriInfo, request); - } - @GET @Path("{id}/avatar") @Operation( @@ -673,10 +639,10 @@ public Response getSpaceBannerById( if (!isDefault && RestUtils.isAnonymous() && !LinkProvider.isAttachmentTokenValid(token, - SpaceIdentityProvider.NAME, - id, - BannerAttachment.TYPE, - lastModified)) { + SpaceIdentityProvider.NAME, + id, + BannerAttachment.TYPE, + lastModified)) { LOG.warn("An anonymous user attempts to access banner of space {} without a valid access token", id); return Response.status(Status.NOT_FOUND).build(); } @@ -715,9 +681,9 @@ public Response getSpaceBannerById( } /* * As recommended in the the RFC1341 - * (https://www.w3.org/Protocols/rfc1341/4_Content-Type.html), we set the - * banner content-type to "image/png". So, its data would be recognized as - * "image" by the user-agent. + * (https://www.w3.org/Protocols/rfc1341/4_Content-Type.html), we set + * the banner content-type to "image/png". So, its data would be + * recognized as "image" by the user-agent. */ builder = Response.ok(stream, "image/png"); builder.tag(eTag); @@ -735,9 +701,6 @@ public Response getSpaceBannerById( return builder.build(); } - /** - * {@inheritDoc} - */ @PUT @Path("{id}") @Produces(MediaType.APPLICATION_JSON) @@ -778,9 +741,9 @@ public Response updateSpaceById( } if (StringUtils.isNotBlank(model.getPublicSiteVisibility())) { - spaceService.saveSpacePublicSite(id, - model.getPublicSiteVisibility(), - authenticatedUser); + spaceLayoutService.saveSpacePublicSite(id, + model.getPublicSiteVisibility(), + authenticatedUser); space = spaceService.getSpaceById(id); } @@ -820,9 +783,9 @@ public Response updateSpaceById( fillSpaceFromModel(space, model); space.setEditor(authenticatedUser); - spaceService.updateSpace(space, model.getInvitedMembers()); + space = spaceService.updateSpace(space, model.getInvitedMembers()); - return EntityBuilder.getResponse(EntityBuilder.buildEntityFromSpace(spaceService.getSpaceById(id), + return EntityBuilder.getResponse(EntityBuilder.buildEntityFromSpace(space, authenticatedUser, uriInfo.getPath(), expand), @@ -831,9 +794,6 @@ public Response updateSpaceById( Response.Status.OK); } - /** - * {@inheritDoc} - */ @DELETE @Path("{id}") @RolesAllowed("users") @@ -854,16 +814,22 @@ public Response deleteSpaceById( @Parameter(description = "Asking for a full representation of a specific subresource if any", required = false) @QueryParam("expand") - String expand) throws Exception { + String expand) { String authenticatedUser = ConversationState.getCurrent().getIdentity().getUserId(); // Space space = spaceService.getSpaceById(id); - if (!spaceService.canManageSpace(space, authenticatedUser)) { + if (!spaceService.canDeleteSpace(space, authenticatedUser)) { throw new WebApplicationException(Response.Status.UNAUTHORIZED); } space.setEditor(authenticatedUser); - spaceService.deleteSpace(space); + try { + spaceService.deleteSpace(space); + } catch (SpaceException e) { + throw new WebApplicationException(Response.status(Status.BAD_REQUEST) + .entity(e.getCode().name()) + .build()); + } return Response.ok().build(); } @@ -968,14 +934,6 @@ public Response getSpaceMembers( return builder.build(); } - /** - * Checks if is the given userId is a space member. - * - * @param uriInfo the uri info - * @param id the space id - * @param userId the user id - * @return the response - */ @GET @Produces(MediaType.APPLICATION_JSON) @Path("{id}/users/{userId}") @@ -1007,87 +965,6 @@ public Response isSpaceMember( return Response.ok().entity("{\"isMember\":\"" + isMember + "\"}").build(); } - @GET - @Path("{id}/navigations") - @RolesAllowed("users") - @Produces(MediaType.APPLICATION_JSON) - @Operation(summary = "Return list of navigations of a space", method = "GET", - description = "Return list of navigations of a space") - @ApiResponses(value = { @ApiResponse(responseCode = "204", description = "Request fulfilled"), - @ApiResponse(responseCode = "500", description = "Internal server error"), - @ApiResponse(responseCode = "401", description = "Unauthorized") }) - @Deprecated(forRemoval = true, since = "7.0") - @DeprecatedAPI(value = "Use NavigationRest.getSiteTypeNavigations instead", insist = true) - public Response getSpaceNavigations( - @Context - HttpServletRequest httpRequest, - @Context - Request request, - @Parameter(description = "Space id", required = true) - @PathParam("id") - String spaceId) { - String authenticatedUser = ConversationState.getCurrent().getIdentity().getUserId(); - Space space = spaceService.getSpaceById(spaceId); - if (!spaceService.canViewSpace(space, authenticatedUser)) { - return Response.status(Response.Status.UNAUTHORIZED).build(); - } - List navigations = SpaceUtils.getSpaceNavigations(space, httpRequest.getLocale(), authenticatedUser); - if (CollectionUtils.isEmpty(navigations)) { - return Response.ok(Collections.emptyList()).build(); - } - List spaceNavigations = navigations.stream().map(node -> { - BaseEntity app = new BaseEntity(node.getId()); - app.setProperty("label", node.getResolvedLabel()); - app.setProperty("icon", node.getIcon()); - app.setProperty("uri", node.getURI()); - app.setProperty("target", node.getTarget()); - if (node.getPageRef() != null) { - Page navigationNodePage = SpaceUtils.getLayoutService().getPage(node.getPageRef()); - if (PageType.LINK.equals(PageType.valueOf(navigationNodePage.getType()))) { - app.setProperty("link", navigationNodePage.getLink()); - } - } - return app.getDataEntity(); - }).toList(); - return Response.ok(spaceNavigations, MediaType.APPLICATION_JSON).build(); - } - - @PUT - @Path("layout/{appId}/{spaceId}") - @RolesAllowed("users") - @Operation( - summary = "Restores space Page Layout switch associated space template", - method = "PUT", - description = "This operation will restores the default page layout of a designated space switch its space template as if it was a new space creation." + - "The applications data will not be change, only the layout definition and structure of the page." + - "This endpoint is accessible only for spaces managers.") - @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "Request fulfilled"), - @ApiResponse(responseCode = "401", description = "User not authorized to call this endpoint"), - @ApiResponse(responseCode = "500", description = "Internal server error") }) - public Response restoreSpacePageLayout( - @Context - UriInfo uriInfo, - @Parameter(description = "Space application identifier to reset. Can be 'home' or any page name.", - required = true) - @PathParam("appId") - String appId, - @Parameter(description = "Space technical identifier", required = true) - @PathParam("spaceId") - String spaceId) { - try { - spaceService.restoreSpacePageLayout(spaceId, appId, ConversationState.getCurrent().getIdentity()); - return Response.ok().build(); - } catch (IllegalAccessException e) { - return Response.status(Status.UNAUTHORIZED).build(); - } catch (SpaceException e) { - return Response.serverError().entity(e.getLocalizedMessage()).build(); - } - } - - /** - * {@inheritDoc} - */ @GET @Path("{id}/activities") @RolesAllowed("users") @@ -1131,9 +1008,6 @@ public Response getSpaceActivitiesById( return activityRestResourcesV1.getActivities(uriInfo, id, before, after, offset, limit, returnSize, expand, null); } - /** - * {@inheritDoc} - */ @POST @Path("{id}/activities") @Produces(MediaType.APPLICATION_JSON) @@ -1165,8 +1039,6 @@ public Response postActivityOnSpace( @SneakyThrows private void fillSpaceFromModel(Space space, SpaceEntity model) { - space.setPriority(Space.INTERMEDIATE_PRIORITY); - if (StringUtils.isNotBlank(model.getDisplayName())) { space.setDisplayName(model.getDisplayName()); space.setDescription(model.getDescription()); @@ -1183,8 +1055,8 @@ private void fillSpaceFromModel(Space space, SpaceEntity model) { } } - if (StringUtils.isNotBlank(model.getTemplate())) { - space.setTemplate(model.getTemplate()); + if (model.getTemplateId() > 0) { + space.setTemplateId(model.getTemplateId()); } if (StringUtils.isNotBlank(model.getBannerId())) { diff --git a/component/service/src/main/java/org/exoplatform/social/rest/impl/spacesadministration/SpacesAdministrationRest.java b/component/service/src/main/java/org/exoplatform/social/rest/impl/spacesadministration/SpacesAdministrationRest.java index ed1bd18011a..dd509d6d8b1 100644 --- a/component/service/src/main/java/org/exoplatform/social/rest/impl/spacesadministration/SpacesAdministrationRest.java +++ b/component/service/src/main/java/org/exoplatform/social/rest/impl/spacesadministration/SpacesAdministrationRest.java @@ -18,13 +18,11 @@ import java.util.Arrays; import java.util.List; -import java.util.stream.Collectors; import javax.annotation.security.RolesAllowed; import javax.ws.rs.GET; import javax.ws.rs.PUT; import javax.ws.rs.Path; -import javax.ws.rs.PathParam; import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriInfo; @@ -39,7 +37,6 @@ import org.exoplatform.social.service.rest.api.VersionResources; import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.parameters.RequestBody; import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponses; @@ -69,11 +66,7 @@ public SpacesAdministrationRest(SpacesAdministrationService spacesAdministration @ApiResponse (responseCode = "500", description = "Internal server error"), @ApiResponse (responseCode = "400", description = "Invalid query input") }) public Response getAllSettings(@Context UriInfo uriInfo) { - List settings = Arrays.asList( - new SpacesAdministrationMembershipsEntity("spacesAdministrators", spacesAdministrationService.getSpacesAdministratorsMemberships()), - new SpacesAdministrationMembershipsEntity("spacesCreators", spacesAdministrationService.getSpacesCreatorsMemberships()) - ); - + List settings = Arrays.asList(new SpacesAdministrationMembershipsEntity("spacesAdministrators", spacesAdministrationService.getSpacesAdministratorsMemberships())); return EntityBuilder.getResponse(settings, uriInfo, RestUtils.getJsonMediaType(), Response.Status.OK); } @@ -96,45 +89,6 @@ public Response getSpacesAdministrators(@Context UriInfo uriInfo) { return EntityBuilder.getResponse(new SpacesAdministrationMembershipsEntity("spacesAdministrators", memberships), uriInfo, RestUtils.getJsonMediaType(), Response.Status.OK); } - @GET - @Path("permissions/spacesCreators") - @RolesAllowed("administrators") - @Operation( - summary = "Gets spaces creators memberships", - method = "GET", - description = "This returns space memberships in the following cases:
  • the sender of the space membership is the authenticated user
  • the authenticated user is a manager of the space
  • the authenticated user is the super user
") - @ApiResponses(value = { - @ApiResponse (responseCode = "200", description = "Request fulfilled"), - @ApiResponse (responseCode = "401", description = "User not authorized to call this endpoint"), - @ApiResponse (responseCode = "404", description = "Resource not found"), - @ApiResponse (responseCode = "500", description = "Internal server error"), - @ApiResponse (responseCode = "400", description = "Invalid query input") }) - public Response getSpacesCreators(@Context UriInfo uriInfo) { - List memberships = spacesAdministrationService.getSpacesCreatorsMemberships(); - - return EntityBuilder.getResponse(new SpacesAdministrationMembershipsEntity("spacesCreators", memberships), uriInfo, RestUtils.getJsonMediaType(), Response.Status.OK); - } - - - @GET - @Path("permissions/canCreatespaces/{username}") - @RolesAllowed("users") - @Operation( - summary = "Check if members can create spaces", - method = "GET", - description = "This returns if members can add spaces") - @ApiResponses(value = { - @ApiResponse (responseCode = "200", description = "Request fulfilled"), - @ApiResponse (responseCode = "401", description = "User not authorized to call this endpoint"), - @ApiResponse (responseCode = "404", description = "Resource not found"), - @ApiResponse (responseCode = "500", description = "Internal server error")}) - public Response canCreatespaces(@Context UriInfo uriInfo, @Parameter(description = "Username", required = true) @PathParam("username") String username) { - - Boolean canCreateSpaces = spacesAdministrationService.canCreateSpace(username); - - return EntityBuilder.getResponse(canCreateSpaces.toString(), uriInfo, RestUtils.getJsonMediaType(), Response.Status.OK); - } - @PUT @Path("permissions/spacesAdministrators") @RolesAllowed("administrators") @@ -150,32 +104,8 @@ public Response updateSpacesAdministrators(@Context UriInfo uriInfo, @RequestBody(description = "Space membership object to be updated", required = true) List model) { List memberships = model.stream() .map(m -> new MembershipEntry(m.getGroup(), m.getMembershipType())) - .collect(Collectors.toList()); - + .toList(); spacesAdministrationService.updateSpacesAdministratorsMemberships(memberships); - - return EntityBuilder.getResponse("", uriInfo, RestUtils.getJsonMediaType(), Response.Status.OK); - } - - @PUT - @Path("permissions/spacesCreators") - @RolesAllowed("administrators") - @Operation( - summary = "Updates spaces creators memberships", - method = "PUT", - description = "This updates the space membership in the following cases:
  • the user of the space membership is the authenticated user but he cannot update his own membership to \"approved\" for a space with a \"validation\" subscription
  • the authenticated user is a manager of the space
  • the authenticated user is a spaces super manager
") - @ApiResponses(value = { - @ApiResponse (responseCode = "200", description = "Request fulfilled"), - @ApiResponse (responseCode = "401", description = "User not authorized to call this endpoint"), - @ApiResponse (responseCode = "500", description = "Internal server error") }) - public Response updateSpacesCreators(@Context UriInfo uriInfo, - @RequestBody(description = "Space membership object to be updated", required = true) List model) { - List memberships = model.stream() - .map(m -> new MembershipEntry(m.getGroup(), m.getMembershipType())) - .collect(Collectors.toList()); - - spacesAdministrationService.updateSpacesCreatorsMemberships(memberships); - return EntityBuilder.getResponse("", uriInfo, RestUtils.getJsonMediaType(), Response.Status.OK); } } diff --git a/component/service/src/main/java/org/exoplatform/social/rest/impl/spacetemplates/SpaceTemplatesRest.java b/component/service/src/main/java/org/exoplatform/social/rest/impl/spacetemplates/SpaceTemplatesRest.java deleted file mode 100644 index 68d918bf7f1..00000000000 --- a/component/service/src/main/java/org/exoplatform/social/rest/impl/spacetemplates/SpaceTemplatesRest.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (C) 2003-2019 eXo Platform SAS. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -package org.exoplatform.social.rest.impl.spacetemplates; - -import java.io.InputStream; -import java.util.Date; -import java.util.List; -import java.util.Locale; - -import javax.annotation.security.RolesAllowed; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.QueryParam; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.CacheControl; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.EntityTag; -import javax.ws.rs.core.Request; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; - -import org.apache.commons.lang3.StringUtils; - -import org.exoplatform.container.configuration.ConfigurationManager; -import org.exoplatform.services.log.ExoLogger; -import org.exoplatform.services.log.Log; -import org.exoplatform.services.rest.resource.ResourceContainer; -import org.exoplatform.services.security.ConversationState; -import org.exoplatform.services.security.Identity; -import org.exoplatform.social.core.space.SpaceTemplate; -import org.exoplatform.social.core.space.spi.SpaceTemplateService; -import org.exoplatform.social.rest.api.EntityBuilder; -import org.exoplatform.social.rest.api.ErrorResource; -import org.exoplatform.social.rest.api.RestUtils; -import org.exoplatform.social.service.rest.api.VersionResources; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.responses.ApiResponse; -import io.swagger.v3.oas.annotations.responses.ApiResponses; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.servlet.http.HttpServletRequest; - -/** - * - * Provides REST Services for manipulating space templates. - * - */ -@Path(VersionResources.VERSION_ONE + "/social/spaceTemplates") -@Tag(name = VersionResources.VERSION_ONE + "/social/spaceTemplates", description = "Managing Spaces Templates") -public class SpaceTemplatesRest implements ResourceContainer { - - private static final Log LOG = ExoLogger.getLogger(SpaceTemplatesRest.class); - - private static final CacheControl CACHE_CONTROL = new CacheControl(); - - private static final Date DEFAULT_IMAGES_LAST_MODIFED = new Date(); - - // 1 year - private static final int CACHE_IN_SECONDS = 365 * 86400; - - private static final int CACHE_IN_MILLI_SECONDS = CACHE_IN_SECONDS * 1000; - - static { - CACHE_CONTROL.setMaxAge(CACHE_IN_SECONDS); - } - - private SpaceTemplateService spaceTemplateService; - - private ConfigurationManager configurationManager; - - public SpaceTemplatesRest(SpaceTemplateService spaceTemplateService, ConfigurationManager configurationManager) { - this.spaceTemplateService = spaceTemplateService; - this.configurationManager = configurationManager; - } - - @GET - @Path("templates") - @RolesAllowed("users") - @Operation( - summary = "Gets all spaces templates", - method = "GET", - description = "This returns space templates details") - @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "Request fulfilled"), - @ApiResponse (responseCode = "500", description = "Internal server error")}) - public Response getAllTemplates(@Context UriInfo uriInfo, - @Context HttpServletRequest request) { - Identity identity = ConversationState.getCurrent().getIdentity(); - String userId = identity.getUserId(); - String lang = request.getLocale() == null ? Locale.ENGLISH.getLanguage() : request.getLocale().getLanguage(); - try { - List list = spaceTemplateService.getLabelledSpaceTemplates(userId, lang); - return EntityBuilder.getResponse(list, uriInfo, RestUtils.getJsonMediaType(), Response.Status.OK); - } catch (Exception e) { - LOG.error("Cannot get list of templates for user {}, with lang {}", userId, lang, e); - return EntityBuilder.getResponse(new ErrorResource("Error occurred while getting list of space templates", "space templates permissions not extracted"), - uriInfo, RestUtils.getJsonMediaType(), Response.Status.INTERNAL_SERVER_ERROR); - } - } - - @GET - @Path("{templateName}/banner") - @RolesAllowed("users") - @Operation( - summary = "Gets space template banner", - method = "GET", - description = "This returns space template banner input stream") - @ApiResponses(value = { - @ApiResponse (responseCode = "200", description = "Request fulfilled"), - @ApiResponse (responseCode = "404", description = "Resource not found"), - @ApiResponse (responseCode = "500", description = "Internal server error")}) - public Response getBannerStream(@Context UriInfo uriInfo, - @Context Request request, - @Parameter(description = "Space template name", required = true) - @PathParam("templateName") String templateName, - @Parameter(description = "The value of lastModified parameter will determine whether the query should be cached by browser or not. If not set, no 'expires HTTP Header will be sent'") - @QueryParam("lastModified") String lastModified) { - SpaceTemplate spaceTemplate = spaceTemplateService.getSpaceTemplateByName(templateName); - if (spaceTemplate == null) { - LOG.debug("Cannot find space template: {}", templateName); - return EntityBuilder.getResponse(new ErrorResource("space template does not exist: " + templateName, "space template not found"), - uriInfo, RestUtils.getJsonMediaType(), Response.Status.NOT_FOUND); - } - String bannerPath = spaceTemplate.getBannerPath(); - if (StringUtils.isNotBlank(bannerPath)) { - // change once the image will be dynamically loaded from DB, - // currently, a constant is used instead of last modified date because the banner doesn't change in sources. - EntityTag eTag = new EntityTag(Integer.toString(templateName.hashCode())); - Response.ResponseBuilder builder = request.evaluatePreconditions(eTag); - if (builder == null) { - InputStream bannerStream = null; - try { - bannerStream = configurationManager.getInputStream(bannerPath); - } catch (Exception e) { - LOG.warn("Error retrieving banner image of template {}", templateName, e); - return EntityBuilder.getResponse(new ErrorResource("inputStream could not be extracted from path: " + bannerPath, "inputStream not extracted"), - uriInfo, RestUtils.getJsonMediaType(), Response.Status.INTERNAL_SERVER_ERROR); - } - if (bannerStream == null) { - throw new WebApplicationException(Response.Status.NOT_FOUND); - } - builder = Response.ok(bannerStream, "image/png"); - builder.tag(eTag); - builder.cacheControl(CACHE_CONTROL); - builder.lastModified(DEFAULT_IMAGES_LAST_MODIFED); - builder.expires(new Date(System.currentTimeMillis() + CACHE_IN_MILLI_SECONDS)); - } - return builder.build(); - } - return EntityBuilder.getResponse(new ErrorResource("image does not exist in path: " + bannerPath, "banner not found"), - uriInfo, RestUtils.getJsonMediaType(), Response.Status.NOT_FOUND); - } -} diff --git a/component/service/src/main/java/org/exoplatform/social/service/rest/NotificationsRestService.java b/component/service/src/main/java/org/exoplatform/social/service/rest/NotificationsRestService.java index a6d3a67eecb..2f6ca810c80 100644 --- a/component/service/src/main/java/org/exoplatform/social/service/rest/NotificationsRestService.java +++ b/component/service/src/main/java/org/exoplatform/social/service/rest/NotificationsRestService.java @@ -433,7 +433,7 @@ public Response redirectUrl(@Context UriInfo uriInfo, break; } case connections_request: { - userIdentity = getIdentityManager().getOrCreateIdentity(OrganizationIdentityProvider.NAME, objectId, true); + userIdentity = getIdentityManager().getOrCreateUserIdentity(objectId); targetURL = Util.getBaseUrl() + LinkProvider.getRedirectUri("people/receivedInvitations/" + userIdentity.getRemoteId()); break; } @@ -442,8 +442,7 @@ public Response redirectUrl(@Context UriInfo uriInfo, break; } case notification_settings: { - userIdentity = getIdentityManager().getOrCreateIdentity(OrganizationIdentityProvider.NAME, objectId, true); - targetURL = Util.getBaseUrl() + LinkProvider.getUserNotificationSettingUri(userIdentity.getRemoteId()); + targetURL = Util.getBaseUrl() + LinkProvider.getUserNotificationSettingUri(); break; } default: { diff --git a/component/service/src/main/java/org/exoplatform/social/service/rest/PeopleRestService.java b/component/service/src/main/java/org/exoplatform/social/service/rest/PeopleRestService.java index 8db918226b6..08c3a5a6250 100644 --- a/component/service/src/main/java/org/exoplatform/social/service/rest/PeopleRestService.java +++ b/component/service/src/main/java/org/exoplatform/social/service/rest/PeopleRestService.java @@ -124,25 +124,6 @@ public class PeopleRestService implements ResourceContainer{ private RelationshipManager relationshipManager; private SpaceService spaceService; - public PeopleRestService() { - } - - /** - * Gets users' names that match the input string for suggestion. - * - * @param uriInfo The requested URI information. - * @param name The provided characters to be searched. - * @param currentUser The user who sends request. - * @param activityId the Id of the activity where we want to mention a user in its comment - * @param typeOfRelation The relationship status such as "confirmed", "pending", "incoming", "member_of_space", "mention_activity_stream", "mention_comment" or "user_to_invite" - * @param spaceUrl The URL of the related space. - * @param spacePrettyName The prettyName of the related space. - * @param format The format of the returned result, for example, JSON, or XML. - * @return A list of users' names that match the input string. - * @throws Exception - * @LevelAPI Platform - * @anchor PeopleRestService.suggestUsernames - */ @RolesAllowed("users") @GET @Path("suggest.{format}") @@ -166,23 +147,18 @@ public Response suggestUsernames(@Context UriInfo uriInfo, identityFilter.setPosition(""); identityFilter.setSkills(""); - Space currentSpace = getSpaceService().getSpaceByUrl(spaceUrl); - if (currentSpace == null && StringUtils.isNotBlank(spacePrettyName)) { - currentSpace = getSpaceService().getSpaceByPrettyName(spacePrettyName); - if (currentSpace != null) { - spaceUrl = currentSpace.getUrl(); - } + if (StringUtils.isBlank(spacePrettyName) && StringUtils.isNotBlank(spaceUrl)) { + spacePrettyName = spaceUrl; } - + Space currentSpace = getSpaceService().getSpaceByPrettyName(spacePrettyName); IdentityNameList nameList = new IdentityNameList(); - if (currentSpace == null - && (StringUtils.isNotBlank(spacePrettyName) || StringUtils.isNotBlank(spaceUrl))) { + if (currentSpace == null && StringUtils.isNotBlank(spacePrettyName)) { return Util.getResponse(nameList, uriInfo, mediaType, Response.Status.OK); } List excludedIdentityList = identityFilter.getExcludedIdentityList(); if (excludedIdentityList == null) { - excludedIdentityList = new ArrayList(); + excludedIdentityList = new ArrayList<>(); } Identity currentIdentity = Util.getViewerIdentity(currentUser); identityFilter.setViewerIdentity(currentIdentity); @@ -400,7 +376,7 @@ public Response suggestUsernames(@Context UriInfo uriInfo, // first add space members in the suggestion list when mentioning in a space Activity Stream if (currentSpace != null) { - userInfos = addSpaceMembers(spaceUrl, identityFilter, userInfos, currentUser, request.getLocale()); + userInfos = addSpaceMembers(spacePrettyName, identityFilter, userInfos, currentUser, request.getLocale()); } else { // then add connections in the suggestions @@ -451,8 +427,8 @@ public Response suggestUsernames(@Context UriInfo uriInfo, if (currentSpace != null || getActivityManager().getActivity(activityId).getActivityStream().getType().equals(Type.SPACE)) { remain = SUGGEST_LIMIT - (userInfos != null ? userInfos.size() : 0); if (remain > 0) { - spaceUrl = currentSpace == null ? getActivityManager().getActivity(activityId).getStreamOwner() : spaceUrl; - userInfos = addSpaceMembers(spaceUrl, identityFilter, userInfos, currentUser, request.getLocale()); + spacePrettyName = currentSpace == null ? getActivityManager().getActivity(activityId).getStreamOwner() : spacePrettyName; + userInfos = addSpaceMembers(spacePrettyName, identityFilter, userInfos, currentUser, request.getLocale()); } } else { @@ -558,8 +534,8 @@ private LinkedHashSet addOtherUsers (ProfileFilter identityFilter, Lis return userInfos; } - private LinkedHashSet addSpaceMembers (String spaceURL, ProfileFilter identityFilter, LinkedHashSet userInfos, String currentUser, Locale locale) { - String[] spaceMembers = getSpaceService().getSpaceByUrl(spaceURL).getMembers(); + private LinkedHashSet addSpaceMembers (String spaceByPrettyName, ProfileFilter identityFilter, LinkedHashSet userInfos, String currentUser, Locale locale) { + String[] spaceMembers = getSpaceService().getSpaceByPrettyName(spaceByPrettyName).getMembers(); for (String spaceMember : spaceMembers) { Identity identity = getIdentityManager().getOrCreateIdentity(OrganizationIdentityProvider.NAME, spaceMember, false); if (identity.isEnable() && !identity.isDeleted()) { @@ -881,7 +857,7 @@ public static class ConnectionInfoRestOut extends HashMap { private static final long serialVersionUID = -3638967656497819786L; - public static enum Field { + public enum Field { /** * User Displayname */ @@ -917,18 +893,20 @@ public static enum Field { */ private final String fieldName; - /** - * private constructor. - * - * @param string string type - */ - private Field(final String string) { - fieldName = string; - } - + @Override public String toString() { return fieldName; } + + /** + * private constructor. + * + * @param string string type + */ + private Field(final String string) { + fieldName = string; + } + } /** * Default constructor, used by JAX-RS. diff --git a/component/service/src/main/java/org/exoplatform/social/service/rest/RestUtils.java b/component/service/src/main/java/org/exoplatform/social/service/rest/RestUtils.java index f7e23bddde7..31f75d0dcd2 100644 --- a/component/service/src/main/java/org/exoplatform/social/service/rest/RestUtils.java +++ b/component/service/src/main/java/org/exoplatform/social/service/rest/RestUtils.java @@ -23,7 +23,6 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.TimeZone; import java.util.concurrent.ConcurrentHashMap; @@ -31,7 +30,9 @@ import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; + import org.exoplatform.commons.utils.CommonsUtils; +import org.exoplatform.container.ExoContainerContext; import org.exoplatform.services.rest.ApplicationContext; import org.exoplatform.services.rest.impl.ApplicationContextImpl; import org.exoplatform.services.security.ConversationState; @@ -118,7 +119,6 @@ public static Map buildEntityFromSpace(Space space, String userI map.put(RestProperties.IDENTITY, (expand != null && RestProperties.IDENTITY.equals(expand)) ? buildSpaceIdentity(spaceIdentity, restPath, null) : Util.getRestUrl(IDENTITIES_TYPE, spaceIdentity.getId(), restPath)); map.put(RestProperties.GROUP_ID, space.getGroupId()); map.put(RestProperties.AVATAR_URL, space.getAvatarUrl()); - map.put(RestProperties.APPLICATIONS, getSpaceApplications(space)); map.put(RestProperties.MANAGERS, Util.getMembersSpaceRestUrl(space.getId(), "manager", restPath)); map.put(RestProperties.MEMBERS, Util.getMembersSpaceRestUrl(space.getId(), null, restPath)); } @@ -257,72 +257,7 @@ public static Map getActivityStream(ExoSocialActivity activity, as.put(RestProperties.ID, owner.getRemoteId()); return as; } - - private static List> getSpaceApplications(Space space) { - List> spaceApplications = new ArrayList>(); - String installedApps = space.getApp(); - if (installedApps != null) { - String[] appStatuses = installedApps.split(","); - for (String appStatus : appStatuses) { - Map app = new LinkedHashMap(); - String[] apps = appStatus.split(":"); - app.put(RestProperties.ID, apps[0]); - app.put(RestProperties.DISPLAY_NAME, apps.length > 1 ? apps[1] : ""); - spaceApplications.add(app); - } - } - return spaceApplications; - } - - private static List> getSubListByProperties(List> sources, Map properties) { - List> results = new ArrayList>(); - if (sources == null || sources.size() == 0) { - return results; - } - for (Map map : sources) { - if (map.isEmpty()) continue; - Map result = new LinkedHashMap(); - for (Entry property : properties.entrySet()) { - result.put(property.getKey(), map.get(property.getValue())); - } - results.add(result); - } - - return results; - } - - private static Map getPhoneProperties() { - Map properties = new LinkedHashMap(); - properties.put(RestProperties.PHONE_TYPE, KEY); - properties.put(RestProperties.PHONE_NUMBER, VALUE); - return properties; - } - - private static Map getImsProperties() { - Map properties = new LinkedHashMap(); - properties.put(RestProperties.IM_TYPE, KEY); - properties.put(RestProperties.IM_ID, VALUE); - return properties; - } - - private static Map getUrlProperties() { - Map properties = new LinkedHashMap(); - properties.put(RestProperties.URL, VALUE); - return properties; - } - - private static Map getExperiencesProperties() { - Map properties = new LinkedHashMap(); - properties.put(RestProperties.COMPANY, Profile.EXPERIENCES_COMPANY); - properties.put(RestProperties.DESCRIPTION, Profile.EXPERIENCES_DESCRIPTION); - properties.put(RestProperties.POSITION, Profile.EXPERIENCES_POSITION); - properties.put(RestProperties.SKILLS, Profile.EXPERIENCES_SKILLS); - properties.put(RestProperties.IS_CURRENT, Profile.EXPERIENCES_IS_CURRENT); - properties.put(RestProperties.START_DATE, Profile.EXPERIENCES_START_DATE); - properties.put(RestProperties.END_DATE, Profile.EXPERIENCES_END_DATE); - return properties; - } - + private static String formatDateToISO8601(Date date) { TimeZone tz = TimeZone.getTimeZone("UTC"); DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.sss'Z'"); @@ -350,7 +285,7 @@ private static void updateCachedEtagValue(int etagValue) { private static void updateCachedLastModifiedValue(Date lastModifiedDate) { ApplicationContext ac = ApplicationContextImpl.getCurrent(); Map properties = ac.getProperties(); - ConcurrentHashMap props = new ConcurrentHashMap(properties); + ConcurrentHashMap props = new ConcurrentHashMap<>(properties); if (props.containsKey(RestProperties.UPDATE_DATE)) { props.remove(RestProperties.UPDATE_DATE); @@ -418,8 +353,7 @@ public static Identity getCurrentIdentity() { if(StringUtils.isEmpty(currentUsername)) { return null; } - - return CommonsUtils.getService(IdentityManager.class) - .getOrCreateIdentity(OrganizationIdentityProvider.NAME, currentUsername, true); + return ExoContainerContext.getService(IdentityManager.class) + .getOrCreateUserIdentity(currentUsername); } } diff --git a/component/service/src/test/java/io/meeds/social/observer/rest/ObserverRestTest.java b/component/service/src/test/java/io/meeds/social/observer/rest/ObserverRestTest.java index 1eb9eb7ed08..cb5f1175d31 100644 --- a/component/service/src/test/java/io/meeds/social/observer/rest/ObserverRestTest.java +++ b/component/service/src/test/java/io/meeds/social/observer/rest/ObserverRestTest.java @@ -24,7 +24,7 @@ import java.util.Arrays; import java.util.List; -import org.apache.commons.codec.binary.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.junit.Test; import org.mockito.MockedStatic; diff --git a/component/service/src/test/java/org/exoplatform/social/rest/impl/activity/ActivityRestResourcesTest.java b/component/service/src/test/java/org/exoplatform/social/rest/impl/activity/ActivityRestResourcesTest.java index fbafd4e2c36..f0150fc7464 100644 --- a/component/service/src/test/java/org/exoplatform/social/rest/impl/activity/ActivityRestResourcesTest.java +++ b/component/service/src/test/java/org/exoplatform/social/rest/impl/activity/ActivityRestResourcesTest.java @@ -3,6 +3,8 @@ import java.lang.reflect.Field; import java.util.*; +import org.apache.commons.lang3.ArrayUtils; + import org.exoplatform.container.ExoContainerContext; import org.exoplatform.services.rest.impl.ContainerResponse; import org.exoplatform.services.rest.impl.OutputHeadersMap; @@ -28,8 +30,6 @@ public class ActivityRestResourcesTest extends AbstractResourceTest { private IdentityStorage identityStorage; - private IdentityManager identityManager; - private ActivityManager activityManager; private RelationshipManager relationshipManager; @@ -46,13 +46,12 @@ public class ActivityRestResourcesTest extends AbstractResourceTest { private Identity testSpaceIdentity; - public void setUp() throws Exception { + public void setUp() throws Exception { super.setUp(); System.setProperty("gatein.email.domain.url", "localhost:8080"); identityStorage = getContainer().getComponentInstanceOfType(IdentityStorage.class); - identityManager = getContainer().getComponentInstanceOfType(IdentityManager.class); activityManager = getContainer().getComponentInstanceOfType(ActivityManager.class); relationshipManager = getContainer().getComponentInstanceOfType(RelationshipManager.class); spaceService = getContainer().getComponentInstanceOfType(SpaceService.class); @@ -205,7 +204,7 @@ public void testGetActivitiesByStreamType() throws Exception { assertEquals(200, response.getStatus()); collections = (CollectionEntity) response.getEntity(); - assertEquals(2, collections.getEntities().size()); + assertEquals(1, collections.getEntities().size()); activityEntity = getBaseEntity(collections.getEntities().get(0), ActivityEntity.class); assertEquals("mary activity1", activityEntity.getTitle()); @@ -224,7 +223,7 @@ public void testGetActivitiesByStreamType() throws Exception { assertEquals(200, response.getStatus()); collections = (CollectionEntity) response.getEntity(); - assertEquals(2, collections.getEntities().size()); + assertEquals(1, collections.getEntities().size()); // Get favorite activities Favorite favoriteActivity = new Favorite(ExoSocialActivityImpl.DEFAULT_ACTIVITY_METADATA_OBJECT_TYPE, @@ -268,7 +267,7 @@ public void testGetActivitiesByStreamType() throws Exception { assertEquals(200, response.getStatus()); collections = (CollectionEntity) response.getEntity(); - assertEquals(4, collections.getEntities().size()); + assertEquals(3, collections.getEntities().size()); // Get space favorite activities response = @@ -296,12 +295,12 @@ public void testGetActivitiesByStreamType() throws Exception { assertEquals(2, collections.getEntities().size()); // without filter - response = service("GET", getURLResource("activities?limit=5&offset=0"), "", null, null); + response = service("GET", getURLResource("activities?limit=3&offset=0"), "", null, null); assertNotNull(response); assertEquals(200, response.getStatus()); collections = (CollectionEntity) response.getEntity(); - assertEquals(5, collections.getEntities().size()); + assertEquals(3, collections.getEntities().size()); } public void testGetActivity() throws Exception { @@ -468,7 +467,7 @@ public void testGetActivitiesSpaceById() throws Exception { assertNotNull(response); assertEquals(200, response.getStatus()); CollectionEntity activitiesCollections = (CollectionEntity) response.getEntity(); - assertEquals(6, activitiesCollections.getEntities().size()); + assertEquals(5, activitiesCollections.getEntities().size()); //root posts another activity String input = "{\"title\":title6}"; @@ -477,7 +476,7 @@ public void testGetActivitiesSpaceById() throws Exception { assertEquals(200, response.getStatus()); RealtimeListAccess listAccess = activityManager.getActivitiesOfSpaceWithListAccess(spaceIdentity); - assertEquals(7, listAccess.getSize()); + assertEquals(6, listAccess.getSize()); ExoSocialActivity activity = listAccess.load(0, 10)[0]; assertEquals("title6", activity.getTitle()); } @@ -1152,7 +1151,7 @@ public void testShareActivityOnSpaces() throws Exception { assertEquals(200, response.getStatus()); RealtimeListAccess listAccess = activityManager.getActivitiesOfSpaceWithListAccess(shareTargetSpaceIdentity); - assertEquals(2, listAccess.getSize()); + assertEquals(1, listAccess.getSize()); ExoSocialActivity activity = listAccess.load(0, 10)[0]; assertEquals("shared default activity", activity.getTitle()); } @@ -1444,12 +1443,11 @@ private Space getSpaceInstance(String prettyName, String creator) throws Excepti space.setDescription("add new space " + prettyName); space.setVisibility(Space.PRIVATE); space.setRegistration(Space.VALIDATION); - space.setPriority(Space.INTERMEDIATE_PRIORITY); this.spaceService.createSpace(space, creator); return space; } - private Space getSpaceInstance(String prettyName, String creator, String ...members) throws Exception { + private Space getSpaceInstance(String prettyName, String username, String ...members) throws Exception { Space space = new Space(); space.setDisplayName(prettyName); space.setPrettyName(space.getDisplayName()); @@ -1457,10 +1455,14 @@ private Space getSpaceInstance(String prettyName, String creator, String ...memb space.setDescription("add new space " + prettyName); space.setVisibility(Space.PRIVATE); space.setRegistration(Space.VALIDATION); - space.setPriority(Space.INTERMEDIATE_PRIORITY); - space.setMembers(members); - this.spaceService.createSpace(space, creator); - return space; + Space createdSpace = this.spaceService.createSpace(space, username); + if (ArrayUtils.isNotEmpty(members)) { + Arrays.stream(members).forEach(u -> spaceService.addMember(createdSpace, u)); + } + if (ArrayUtils.isNotEmpty(createdSpace.getRedactors())) { + Arrays.stream(createdSpace.getRedactors()).forEach(u -> spaceService.removeRedactor(createdSpace, u)); + } + return createdSpace; } private Space getSpaceInstance(int number, String creator) throws Exception { @@ -1472,7 +1474,6 @@ private Space getSpaceInstance(int number, String creator) throws Exception { space.setDescription("add new space " + number); space.setVisibility(Space.PRIVATE); space.setRegistration(Space.VALIDATION); - space.setPriority(Space.INTERMEDIATE_PRIORITY); space = this.spaceService.createSpace(space, creator); restartTransaction(); return space; @@ -1497,9 +1498,9 @@ public void testPreloadActivitiesId() throws Exception { assertNotNull(response); assertEquals(200, response.getStatus()); CollectionEntity collections = (CollectionEntity) response.getEntity(); - assertEquals(5, collections.getEntities().size()); + assertEquals(4, collections.getEntities().size()); OutputHeadersMap outputHeadersMap = (OutputHeadersMap) response.getHttpHeaders(); - assertEquals(5, outputHeadersMap.get("Link").size()); + assertEquals(4, outputHeadersMap.get("Link").size()); // for (int i = 5; i < 52; i++) { ExoSocialActivity activity = new ExoSocialActivityImpl(); @@ -1530,15 +1531,15 @@ public void testPreloadActivitiesId() throws Exception { assertNotNull(response); assertEquals(200, response.getStatus()); collections = (CollectionEntity) response.getEntity(); - assertEquals(52, collections.getEntities().size()); + assertEquals(51, collections.getEntities().size()); outputHeadersMap = (OutputHeadersMap) response.getHttpHeaders(); assertEquals(4, outputHeadersMap.size()); /* Activity ids list length is 52 Max to preload is 10 Preload limit is limit / 2 = 60 Offset is Preload limit - max to preload = 50 - Expected: 2 links */ - assertEquals(2, outputHeadersMap.get("Link").size()); + Expected: 1 links */ + assertEquals(1, outputHeadersMap.get("Link").size()); } } diff --git a/component/service/src/test/java/org/exoplatform/social/rest/impl/favorite/FavoriteRestTest.java b/component/service/src/test/java/org/exoplatform/social/rest/impl/favorite/FavoriteRestTest.java index 83744ddc7a6..1b53ceba545 100644 --- a/component/service/src/test/java/org/exoplatform/social/rest/impl/favorite/FavoriteRestTest.java +++ b/component/service/src/test/java/org/exoplatform/social/rest/impl/favorite/FavoriteRestTest.java @@ -88,8 +88,7 @@ public void setUp() throws Exception { @Override public void tearDown() throws Exception { - end(); - begin(); + restartTransaction(); identityManager.hardDeleteIdentity(johnIdentity); metadataDAO.deleteAll(); @@ -140,16 +139,9 @@ public void testCreateFavoritesACL() throws Exception { Space space1 = new Space(); space1.setDisplayName("space1"); - space1.setPrettyName(space1.getDisplayName()); space1.setRegistration("validation"); space1.setVisibility("public"); - space1.setPriority("2"); - String[] manager = new String[] { "john" }; - String[] members = new String[] { "john" }; - space1.setManagers(manager); - space1.setMembers(members); - - spaceService.createSpace(space1, johnIdentity.getRemoteId()); + space1 = spaceService.createSpace(space1, johnIdentity.getRemoteId()); Space createdSpace = spaceService.getSpaceByPrettyName(space1.getPrettyName()); diff --git a/component/service/src/test/java/org/exoplatform/social/rest/impl/identity/IdentityRestResourcesTest.java b/component/service/src/test/java/org/exoplatform/social/rest/impl/identity/IdentityRestResourcesTest.java index 899ff613d63..f2ce7e89293 100644 --- a/component/service/src/test/java/org/exoplatform/social/rest/impl/identity/IdentityRestResourcesTest.java +++ b/component/service/src/test/java/org/exoplatform/social/rest/impl/identity/IdentityRestResourcesTest.java @@ -332,7 +332,7 @@ public void testCacheWhenUserJoinsSpace() throws Exception { newSpace.setManagers(new String[] { "root" }); newSpace.setRegistration(Space.OPEN); newSpace.setVisibility(Space.PRIVATE); - spaceService.createSpace(newSpace, "root"); + newSpace = spaceService.createSpace(newSpace, "root"); spaceService.addMember(newSpace, johnIdentity.getRemoteId()); diff --git a/component/service/src/test/java/org/exoplatform/social/rest/impl/relationship/RelationshipsRestResourcesTest.java b/component/service/src/test/java/org/exoplatform/social/rest/impl/relationship/RelationshipsRestResourcesTest.java index 3b50a4cb00d..726c1944190 100644 --- a/component/service/src/test/java/org/exoplatform/social/rest/impl/relationship/RelationshipsRestResourcesTest.java +++ b/component/service/src/test/java/org/exoplatform/social/rest/impl/relationship/RelationshipsRestResourcesTest.java @@ -2,7 +2,7 @@ import java.util.List; -import org.apache.commons.codec.binary.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.exoplatform.services.rest.impl.ContainerResponse; import org.exoplatform.social.core.identity.model.Identity; diff --git a/component/service/src/test/java/org/exoplatform/social/rest/impl/space/SpaceRestResourcesTest.java b/component/service/src/test/java/org/exoplatform/social/rest/impl/space/SpaceRestResourcesTest.java index 73d2fe8b87c..7503a245a69 100644 --- a/component/service/src/test/java/org/exoplatform/social/rest/impl/space/SpaceRestResourcesTest.java +++ b/component/service/src/test/java/org/exoplatform/social/rest/impl/space/SpaceRestResourcesTest.java @@ -7,7 +7,6 @@ import java.io.ByteArrayInputStream; import java.net.URL; import java.util.HashMap; -import java.util.HashSet; import java.util.List; import java.util.Map; @@ -15,7 +14,6 @@ import javax.ws.rs.core.EntityTag; import javax.ws.rs.core.MultivaluedMap; -import org.exoplatform.container.configuration.ConfigurationManager; import org.exoplatform.portal.config.UserACL; import org.exoplatform.portal.config.model.PortalConfig; import org.exoplatform.portal.mop.service.LayoutService; @@ -23,7 +21,6 @@ import org.exoplatform.services.organization.User; import org.exoplatform.services.rest.impl.ContainerResponse; import org.exoplatform.services.rest.impl.MultivaluedMapImpl; -import org.exoplatform.services.security.MembershipEntry; import org.exoplatform.services.thumbnail.ImageThumbnailService; import org.exoplatform.social.common.RealtimeListAccess; import org.exoplatform.social.core.activity.model.ExoSocialActivity; @@ -35,49 +32,47 @@ import org.exoplatform.social.core.mock.MockUploadService; import org.exoplatform.social.core.service.LinkProvider; import org.exoplatform.social.core.space.SpaceUtils; -import org.exoplatform.social.core.space.impl.DefaultSpaceApplicationHandler; import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.core.space.spi.SpaceService; -import org.exoplatform.social.core.space.spi.SpaceTemplateService; import org.exoplatform.social.rest.entity.CollectionEntity; import org.exoplatform.social.rest.entity.DataEntity; import org.exoplatform.social.rest.entity.ProfileEntity; import org.exoplatform.social.rest.entity.SpaceEntity; import org.exoplatform.social.rest.impl.activity.ActivityRest; -import org.exoplatform.social.rest.impl.spacetemplates.SpaceTemplatesRest; import org.exoplatform.social.service.test.AbstractResourceTest; import org.exoplatform.upload.UploadService; import io.meeds.portal.security.service.SecuritySettingService; +import io.meeds.social.core.space.service.SpaceLayoutService; public class SpaceRestResourcesTest extends AbstractResourceTest { - private IdentityManager identityManager; + private IdentityManager identityManager; - private OrganizationService organizationService; + private OrganizationService organizationService; - private UserACL userACL; + private UserACL userACL; - private ActivityManager activityManager; + private ActivityManager activityManager; - private SpaceService spaceService; + private SpaceService spaceService; - private SpaceRest spaceRestResources; + private SpaceRest spaceRestResources; - private Identity rootIdentity; + private Identity rootIdentity; - private Identity johnIdentity; + private Identity johnIdentity; - private Identity maryIdentity; + private Identity maryIdentity; - private Identity demoIdentity; + private Identity demoIdentity; - private Identity externalUserIdentity; + private Identity externalUserIdentity; - private ImageThumbnailService imageThumbnailService; + private ImageThumbnailService imageThumbnailService; private SecuritySettingService securitySettingService; - private MockUploadService uploadService; + private MockUploadService uploadService; public void setUp() throws Exception { super.setUp(); @@ -91,7 +86,8 @@ public void setUp() throws Exception { uploadService = (MockUploadService) getContainer().getComponentInstanceOfType(UploadService.class); imageThumbnailService = getContainer().getComponentInstanceOfType(ImageThumbnailService.class); securitySettingService = getContainer().getComponentInstanceOfType(SecuritySettingService.class); - + SpaceLayoutService spaceLayoutService = getContainer().getComponentInstanceOfType(SpaceLayoutService.class); + rootIdentity = identityManager.getOrCreateIdentity("organization", "root"); johnIdentity = identityManager.getOrCreateIdentity("organization", "john"); maryIdentity = identityManager.getOrCreateIdentity("organization", "mary"); @@ -99,25 +95,16 @@ public void setUp() throws Exception { spaceRestResources = new SpaceRest(new ActivityRest(activityManager, identityManager, spaceService, null), - spaceService, - identityManager, - uploadService, - imageThumbnailService, - securitySettingService); + spaceService, + spaceLayoutService, + identityManager, + uploadService, + imageThumbnailService, + securitySettingService); registry(spaceRestResources); - - SpaceTemplatesRest spaceTemplatesRestResourcesV1 = new SpaceTemplatesRest(getContainer().getComponentInstanceOfType(SpaceTemplateService.class), getContainer().getComponentInstanceOfType(ConfigurationManager.class)); - registry(spaceTemplatesRestResourcesV1); } public void tearDown() throws Exception { - // TODO - /* - for (ExoSocialActivity activity : tearDownActivitiesList) { - activityManager.deleteActivity(activity); - } - */ - super.tearDown(); removeResource(spaceRestResources.getClass()); } @@ -138,23 +125,24 @@ public void testSpaceDisplayNameUpdateWithDifferentCases() throws Exception { assertEquals(200, response.getStatus()); } - public void testSpaceVisibilityUpdateWithDifferentCases () throws Exception { + public void testSpaceVisibilityUpdateWithDifferentCases() throws Exception { startSessionAs("root"); /* - * - * Test of 'private' and 'hidden' fields with a mix of upper/lower cases - */ + * Test of 'private' and 'hidden' fields with a mix of upper/lower cases + */ Space space = getSpaceInstance(1, "root"); - Map listOfResponses = new HashMap() {{ - put("{\"displayName\":\"social\",\"visibility\":PRIVATE}", Space.PRIVATE); - put("{\"displayName\":\"social\",\"visibility\":private}", Space.PRIVATE); - put("{\"displayName\":\"social\",\"visibility\":PriVatE}", Space.PRIVATE); - put("{\"displayName\":\"social\",\"visibility\":HIDDEN}", Space.HIDDEN); - put("{\"displayName\":\"social\",\"visibility\":hidden}", Space.HIDDEN); - put("{\"displayName\":\"social\",\"visibility\":HiDdEn}", Space.HIDDEN); - }}; + Map listOfResponses = new HashMap() { + { + put("{\"displayName\":\"social\",\"visibility\":PRIVATE}", Space.PRIVATE); + put("{\"displayName\":\"social\",\"visibility\":private}", Space.PRIVATE); + put("{\"displayName\":\"social\",\"visibility\":PriVatE}", Space.PRIVATE); + put("{\"displayName\":\"social\",\"visibility\":HIDDEN}", Space.HIDDEN); + put("{\"displayName\":\"social\",\"visibility\":hidden}", Space.HIDDEN); + put("{\"displayName\":\"social\",\"visibility\":HiDdEn}", Space.HIDDEN); + } + }; ContainerResponse response = null; @@ -257,7 +245,7 @@ public void testShouldUseCacheWhenSpacesDidNotChanged() throws Exception { EntityTag eTag = (EntityTag) response.getHttpHeaders().getFirst("ETAG"); assertNotNull(eTag); - MultivaluedMap headers = new MultivaluedMapImpl(); + MultivaluedMap headers = new MultivaluedMapImpl(); headers.putSingle("If-None-Match", "\"" + eTag.getValue() + "\""); response = service("GET", getURLResource("spaces?limit=5&offset=0"), "", headers, null); assertNotNull(response); @@ -285,7 +273,7 @@ public void testShouldNotUseUseSameCacheWhenUserChange() throws Exception { EntityTag eTagRoot = (EntityTag) response.getHttpHeaders().getFirst("ETAG"); assertNotNull(eTagRoot); - MultivaluedMap headers = new MultivaluedMapImpl(); + MultivaluedMap headers = new MultivaluedMapImpl(); headers.putSingle("If-None-Match", "\"" + eTagRoot.getValue() + "\""); response = service("GET", getURLResource("spaces?limit=5&offset=0"), "", headers, null); assertNotNull(response); @@ -322,7 +310,7 @@ public void testShouldNotUseUseSameCacheWhenUserChange() throws Exception { public void testCreateSpace() throws Exception { startSessionAs("root"); String input = "{\"displayName\":\"social\",\"visibility\":\"hidden\",\"subscription\":\"open\"}"; - //root try to update demo activity + // root try to update demo activity ContainerResponse response = getResponse("POST", getURLResource("spaces/"), input); assertNotNull(response); assertEquals(200, response.getStatus()); @@ -336,7 +324,7 @@ public void testCreateSpace() throws Exception { public void testCreateSpaceWithNonLatinName() throws Exception { startSessionAs("root"); String input = "{\"displayName\":\"Благодійність\",\"visibility\":\"hidden\",\"subscription\":\"open\"}"; - //root try to update demo activity + // root try to update demo activity ContainerResponse response = getResponse("POST", getURLResource("spaces/"), input); assertNotNull(response); assertEquals(200, response.getStatus()); @@ -423,7 +411,7 @@ public void testGetSpaceAvatarWithDefaultSize() throws Exception { String user = "john"; Space space = getSpaceInstance(1, user); - uploadSpaceAvatar(user, space.getId(),"hr-avatar.png"); + uploadSpaceAvatar(user, space.getId(), "hr-avatar.png"); space = spaceService.getSpaceById(space.getId()); assertNotNull(space.getAvatarUrl()); @@ -436,7 +424,7 @@ public void testGetSpaceAvatarWithDefaultSize() throws Exception { assertNotNull(response); assertEquals(200, response.getStatus()); - BufferedImage receivedImage = ImageIO.read(new ByteArrayInputStream((byte [])response.getEntity())); + BufferedImage receivedImage = ImageIO.read(new ByteArrayInputStream((byte[]) response.getEntity())); assertEquals(100, receivedImage.getWidth()); assertEquals(100, receivedImage.getHeight()); } @@ -445,7 +433,7 @@ public void testGetSpaceAvatarWithOriginalSize() throws Exception { String user = "john"; Space space = getSpaceInstance(1, user); - uploadSpaceAvatar(user, space.getId(),"hr-avatar.png"); + uploadSpaceAvatar(user, space.getId(), "hr-avatar.png"); space = spaceService.getSpaceById(space.getId()); assertNotNull(space.getAvatarUrl()); @@ -453,13 +441,13 @@ public void testGetSpaceAvatarWithOriginalSize() throws Exception { startSessionAs("mary"); String avatarUrl = space.getAvatarUrl().replace("/portal/rest", ""); - avatarUrl+="&size=0x0"; + avatarUrl += "&size=0x0"; ContainerResponse response = service("GET", avatarUrl, "", null, null); assertNotNull(response); assertEquals(200, response.getStatus()); - BufferedImage receivedImage = ImageIO.read(new ByteArrayInputStream((byte [])response.getEntity())); + BufferedImage receivedImage = ImageIO.read(new ByteArrayInputStream((byte[]) response.getEntity())); assertEquals(595, receivedImage.getWidth()); assertEquals(595, receivedImage.getHeight()); } @@ -470,12 +458,9 @@ public void testGetSpaceBannerForAnonymous() throws Exception { Space space = getSpaceInstance(1, user); String bannerUrl = space.getBannerUrl().replace("/portal/rest", ""); - assertTrue(bannerUrl.contains("spaceTemplates")); + assertThat(bannerUrl, containsString("/social/images/defaultSpaceBanner.webp")); startSessionAs(user); - ContainerResponse response = service("GET", bannerUrl, "", null, null); - assertNotNull(response); - assertEquals(200, response.getStatus()); uploadSpaceBanner(user, space.getId()); @@ -484,7 +469,7 @@ public void testGetSpaceBannerForAnonymous() throws Exception { bannerUrl = space.getBannerUrl().replace("/portal/rest", ""); - response = service("GET", bannerUrl, "", null, null); + ContainerResponse response = service("GET", bannerUrl, "", null, null); assertNotNull(response); assertEquals(200, response.getStatus()); @@ -554,13 +539,13 @@ public void testGetSpaceBannerForAuthentiticatedUser() throws Exception { SpaceEntity spaceEntity = getBaseEntity(response.getEntity(), SpaceEntity.class); assertNotNull(spaceEntity); - assertThat(spaceEntity.getBannerUrl(), containsString("/spaceTemplates/")); + assertThat(spaceEntity.getBannerUrl(), containsString("/social/images/defaultSpaceBanner.webp")); } public void testGetSpaceById() throws Exception { startSessionAs("root"); String input = "{\"displayName\":\"test space\",\"visibility\":\"hidden\",\"subscription\":\"open\"}"; - //root creates a space + // root creates a space ContainerResponse response = getResponse("POST", getURLResource("spaces/"), input); assertNotNull(response); assertEquals(200, response.getStatus()); @@ -618,31 +603,11 @@ public void testGetSpaceByGroupSuffix() throws Exception { assertNotNull(space); // Get space by its groupId - response = service("GET", getURLResource("spaces/byGroupSuffix/" + space.getGroupId().replace(SpaceUtils.SPACE_GROUP + "/", "")), "", null, null); - assertNotNull(response); - assertEquals(200, response.getStatus()); - - spaceEntity = getBaseEntity(response.getEntity(), SpaceEntity.class); - assertNotNull(spaceEntity); - assertEquals("test space", spaceEntity.getDisplayName()); - EntityTag eTag = (EntityTag) response.getHttpHeaders().getFirst("ETAG"); - assertNotNull(eTag); - } - - public void testGetSpaceByDisplayName() throws Exception { - startSessionAs("root"); - String input = "{\"displayName\":\"test space\",\"visibility\":\"hidden\",\"subscription\":\"open\"}"; - // root creates a space - ContainerResponse response = getResponse("POST", getURLResource("spaces/"), input); - assertNotNull(response); - assertEquals(200, response.getStatus()); - - SpaceEntity spaceEntity = getBaseEntity(response.getEntity(), SpaceEntity.class); - Space space = spaceService.getSpaceById(spaceEntity.getId()); - assertNotNull(space); - - // Get space by its display name - response = service("GET", getURLResource("spaces/byDisplayName/" + space.getDisplayName().replaceAll(" ", "%20")), "", null, null); + response = service("GET", + getURLResource("spaces/byGroupSuffix/" + space.getGroupId().replace(SpaceUtils.SPACE_GROUP + "/", "")), + "", + null, + null); assertNotNull(response); assertEquals(200, response.getStatus()); @@ -654,7 +619,7 @@ public void testGetSpaceByDisplayName() throws Exception { } public void testGetUpdateDeleteSpaceById() throws Exception { - //root creates 1 spaces + // root creates 1 spaces Space space = getSpaceInstance(1, "root"); space.setVisibility(Space.HIDDEN); space.setRegistration(Space.CLOSED); @@ -672,7 +637,7 @@ public void testGetUpdateDeleteSpaceById() throws Exception { EntityTag eTag = (EntityTag) response.getHttpHeaders().getFirst("ETAG"); assertNotNull(eTag); - //root update space's description and name + // root update space's description and name String spaceId = spaceEntity.getId(); String input = "{\"displayName\":displayName_updated, \"description\":description_updated}"; response = getResponse("PUT", getURLResource("spaces/" + spaceId), input); @@ -688,7 +653,7 @@ public void testGetUpdateDeleteSpaceById() throws Exception { assertEquals(Space.CLOSED, spaceEntity.getSubscription()); EntityTag updatedETag = (EntityTag) response.getHttpHeaders().getFirst("ETAG"); assertNotSame(eTag, updatedETag); - //root delete his space + // root delete his space response = service("DELETE", getURLResource("spaces/" + space.getId()), "", null, null); assertNotNull(response); assertEquals(200, response.getStatus()); @@ -697,7 +662,7 @@ public void testGetUpdateDeleteSpaceById() throws Exception { } public void testSaveSpacePublicSite() throws Exception { - //root creates 1 spaces + // root creates 1 spaces Space space = getSpaceInstance(1, "root"); startSessionAs("root"); @@ -729,12 +694,12 @@ public void testSaveSpacePublicSite() throws Exception { } public void testGetUsersSpaceById() throws Exception { - //root creates 1 spaces + // root creates 1 spaces Space space = getSpaceInstance(1, "root"); - space.setMembers(new String[] {"root", "john"}); - space.setManagers(new String[] {"root"}); - space.setInvitedUsers(new String[] {"mary"}); - space.setPendingUsers(new String[] {"demo"}); + space.setMembers(new String[] { "root", "john" }); + space.setManagers(new String[] { "root" }); + space.setInvitedUsers(new String[] { "mary" }); + space.setPendingUsers(new String[] { "demo" }); spaceService.updateSpace(space); startSessionAs("root"); @@ -773,10 +738,10 @@ public void testGetUsersSpaceById() throws Exception { } public void testGetSpaceByIdWithDeletedDisableUsers() throws Exception { - //root creates 1 spaces + // root creates 1 spaces Space space = getSpaceInstance(255, "root"); - space.setMembers(new String[] {"root", "john", "mary", "demo"}); - space.setManagers(new String[] {"root", "john"}); + space.setMembers(new String[] { "root", "john", "mary", "demo" }); + space.setManagers(new String[] { "root", "john" }); spaceService.updateSpace(space); startSessionAs("root"); @@ -818,10 +783,8 @@ private Space getSpaceInstance(int number, String creator) throws Exception { space.setPrettyName(space.getDisplayName()); space.setRegistration(Space.OPEN); space.setDescription("add new space " + number); - space.setType(DefaultSpaceApplicationHandler.NAME); space.setVisibility(Space.PRIVATE); space.setRegistration(Space.VALIDATION); - space.setPriority(Space.INTERMEDIATE_PRIORITY); space = this.spaceService.createSpace(space, creator); return space; } @@ -856,8 +819,9 @@ private void removeSpaceBanner(String spaceId) throws Exception { } private void uploadSpaceAvatar(String user, String spaceId) throws Exception { - uploadSpaceAvatar(user,spaceId,"blank.gif"); + uploadSpaceAvatar(user, spaceId, "blank.gif"); } + private void uploadSpaceAvatar(String user, String spaceId, String fileName) throws Exception { startSessionAs(user); String uploadId = fileName; @@ -883,12 +847,12 @@ public void testIsSpaceContainsExternals() throws Exception { identityManager.updateProfile(externalUserIdentity.getProfile()); Space space = getSpaceInstance(10, "root"); ContainerResponse response; - response = service("GET", getURLResource("spaces/" + space.getId()+ "/checkExternals"), "", null, null); + response = service("GET", getURLResource("spaces/" + space.getId() + "/checkExternals"), "", null, null); assertNotNull(response); assertEquals(200, response.getStatus()); assertEquals("false", response.getEntity()); spaceService.addMember(space, "externalUser"); - response = service("GET", getURLResource("spaces/" + space.getId()+ "/checkExternals"), "", null, null); + response = service("GET", getURLResource("spaces/" + space.getId() + "/checkExternals"), "", null, null); assertNotNull(response); assertEquals(200, response.getStatus()); assertEquals("true", response.getEntity()); diff --git a/component/service/src/test/java/org/exoplatform/social/rest/impl/spacemembership/SpaceMembershipRestResourcesTest.java b/component/service/src/test/java/org/exoplatform/social/rest/impl/spacemembership/SpaceMembershipRestResourcesTest.java index 73a71f2476d..649d7013193 100644 --- a/component/service/src/test/java/org/exoplatform/social/rest/impl/spacemembership/SpaceMembershipRestResourcesTest.java +++ b/component/service/src/test/java/org/exoplatform/social/rest/impl/spacemembership/SpaceMembershipRestResourcesTest.java @@ -654,7 +654,6 @@ private void createSpaceIfNotExist(int index, String creator, String registratio space.setDescription("add new space " + index); space.setVisibility(visibility); space.setRegistration(Space.VALIDATION); - space.setPriority(Space.INTERMEDIATE_PRIORITY); this.spaceService.createSpace(space, creator); } } diff --git a/component/service/src/test/java/org/exoplatform/social/rest/impl/spacesadministration/SpacesAdministrationRestResourcesTest.java b/component/service/src/test/java/org/exoplatform/social/rest/impl/spacesadministration/SpacesAdministrationRestResourcesTest.java index 7316addfc42..0d3a2520b07 100644 --- a/component/service/src/test/java/org/exoplatform/social/rest/impl/spacesadministration/SpacesAdministrationRestResourcesTest.java +++ b/component/service/src/test/java/org/exoplatform/social/rest/impl/spacesadministration/SpacesAdministrationRestResourcesTest.java @@ -48,10 +48,6 @@ public void testShouldReturnAllSpacesAdministratorsSettings() throws Exception { new MembershipEntry("/platform/users", "manager"), new MembershipEntry("/platform/administrators", "*") )); - spacesAdministrationService.updateSpacesCreatorsMemberships(Arrays.asList( - new MembershipEntry("/platform/administrators", "*"), - new MembershipEntry("/platform/users", "member") - )); startSessionAs("root", true); @@ -63,7 +59,7 @@ public void testShouldReturnAllSpacesAdministratorsSettings() throws Exception { assertEquals(200, response.getStatus()); List membershipsEntities = (List) response.getEntity(); assertNotNull(membershipsEntities); - assertEquals(2, membershipsEntities.size()); + assertEquals(1, membershipsEntities.size()); List spacesAdministrators = membershipsEntities.stream().filter(m -> m.getId().equals("spacesAdministrators")).collect(Collectors.toList()); assertNotNull(spacesAdministrators); assertEquals(1, spacesAdministrators.size()); @@ -72,14 +68,6 @@ public void testShouldReturnAllSpacesAdministratorsSettings() throws Exception { assertEquals(2, spacesAdministratorsMemberships.size()); assertTrue(spacesAdministratorsMemberships.contains(new MembershipEntry("/platform/users", "manager"))); assertTrue(spacesAdministratorsMemberships.contains(new MembershipEntry("/platform/administrators", "*"))); - List spacesCreators = membershipsEntities.stream().filter(m -> m.getId().equals("spacesCreators")).collect(Collectors.toList()); - assertNotNull(spacesCreators); - assertEquals(1, spacesCreators.size()); - List spacesCreatorsMemberships = spacesCreators.get(0).getMemberships(); - assertNotNull(spacesCreatorsMemberships); - assertEquals(2, spacesCreatorsMemberships.size()); - assertTrue(spacesCreatorsMemberships.contains(new MembershipEntry("/platform/administrators", "*"))); - assertTrue(spacesCreatorsMemberships.contains(new MembershipEntry("/platform/users", "member"))); } public void testShouldNotAuthorizedWhenGettingAllSettingsAsNotPlatformAdministrator() throws Exception { @@ -88,10 +76,6 @@ public void testShouldNotAuthorizedWhenGettingAllSettingsAsNotPlatformAdministra new MembershipEntry("/platform/users", "manager"), new MembershipEntry("/platform/administrators", "*") )); - spacesAdministrationService.updateSpacesCreatorsMemberships(Arrays.asList( - new MembershipEntry("/platform/administrators", "*"), - new MembershipEntry("/platform/users", "member") - )); startSessionAs("mary"); @@ -103,45 +87,9 @@ public void testShouldNotAuthorizedWhenGettingAllSettingsAsNotPlatformAdministra assertEquals(403, response.getStatus()); } - public void testShouldReturnTrueWhenAuthorizedCanCreateSpaces() throws Exception { - // Given - spacesAdministrationService.updateSpacesAdministratorsMemberships(Arrays.asList( - new MembershipEntry("/platform/users", "manager"), - new MembershipEntry("/platform/administrators", "*") - )); - - startSessionAs("root"); - - // When - ContainerResponse response = service("GET", getURLResource("spacesAdministration/permissions/canCreatespaces/mary"), "", null, null, "mary"); - - // Then - assertNotNull(response); - assertEquals(200, response.getStatus()); - assertTrue(response.getEntity().equals("true")); - } - - public void testShouldReturnFalseWhenUserAuthorizedCanCreateSpaces() throws Exception { - // Given - spacesAdministrationService.updateSpacesAdministratorsMemberships(Arrays.asList( - new MembershipEntry("/platform/users", "manager"), - new MembershipEntry("/platform/administrators", "*") - )); - - startSessionAs("root"); - - // When - ContainerResponse response = service("GET", getURLResource("spacesAdministration/permissions/canCreatespaces/__anonim"), "", null, null, "mary"); - - // Then - assertNotNull(response); - assertEquals(200, response.getStatus()); - assertTrue(response.getEntity().equals("false")); - } - public void testShouldReturnEmptySpacesAdministratorsWhenSettingIsEmpty() throws Exception { // Given - spacesAdministrationService.updateSpacesAdministratorsMemberships(Collections.EMPTY_LIST); + spacesAdministrationService.updateSpacesAdministratorsMemberships(Collections.emptyList()); startSessionAs("root"); @@ -251,116 +199,4 @@ public void testShouldNotAuthorizedWhenUpdatingSpacesAdministratorsAsNotPlatform assertEquals(403, response.getStatus()); } - - public void testShouldReturnEmptySpacesCreatorsWhenSettingIsEmpty() throws Exception { - // Given - spacesAdministrationService.updateSpacesCreatorsMemberships(Collections.EMPTY_LIST); - - startSessionAs("root"); - - // When - ContainerResponse response = service("GET", getURLResource("spacesAdministration/permissions/spacesCreators"), "", null, null, "root"); - - // Then - assertNotNull(response); - assertEquals(200, response.getStatus()); - SpacesAdministrationMembershipsEntity membershipsEntity = (SpacesAdministrationMembershipsEntity) response.getEntity(); - List memberships = membershipsEntity.getMemberships(); - assertNotNull(memberships); - assertEquals(0, memberships.size()); - } - - public void testShouldReturnSpacesCreatorsWhenSettingIsNotNull() throws Exception { - // Given - spacesAdministrationService.updateSpacesCreatorsMemberships(Arrays.asList( - new MembershipEntry("/platform/users", "manager"), - new MembershipEntry("/platform/administrators", "*") - )); - - startSessionAs("root"); - - // When - ContainerResponse response = service("GET", getURLResource("spacesAdministration/permissions/spacesCreators"), "", null, null, "root"); - - // Then - assertNotNull(response); - assertEquals(200, response.getStatus()); - SpacesAdministrationMembershipsEntity membershipsEntity = (SpacesAdministrationMembershipsEntity) response.getEntity(); - List memberships = membershipsEntity.getMemberships(); - assertNotNull(memberships); - assertEquals(2, memberships.size()); - assertTrue(memberships.contains(new MembershipEntry("/platform/users", "manager"))); - assertTrue(memberships.contains(new MembershipEntry("/platform/administrators", "*"))); - } - - public void testShouldReturnNotAuthorizedWhenGettingSpacesCreatorsAsNotPlatformAdministrator() throws Exception { - // Given - spacesAdministrationService.updateSpacesAdministratorsMemberships(Arrays.asList( - new MembershipEntry("/platform/users", "manager"), - new MembershipEntry("/platform/administrators", "*") - )); - - startSessionAs("mary"); - - // When - ContainerResponse response = service("GET", getURLResource("spacesAdministration/permissions/spacesCreators"), "", null, null, "mary"); - - // Then - assertNotNull(response); - assertEquals(403, response.getStatus()); - } - - public void testShouldUpdateSpacesCreatorsWhenSpacesAdministrator() throws Exception { - // Given - spacesAdministrationService.updateSpacesCreatorsMemberships(Arrays.asList( - new MembershipEntry("/platform/users", "manager"), - new MembershipEntry("/platform/administrators", "*") - )); - String newMemberships = "[" + - " {" + - " \"membershipType\": \"member\"," + - " \"group\": \"/platform/users\"" + - " }" + - "]"; - MultivaluedMap headers = new MultivaluedMapImpl(); - headers.putSingle("content-type", "application/json"); - - startSessionAs("root"); - - // When - ContainerResponse response = service("PUT", getURLResource("spacesAdministration/permissions/spacesCreators"), "", headers, newMemberships.getBytes(), "root"); - - // Then - assertNotNull(response); - assertEquals(200, response.getStatus()); - List spacesCreatorsMemberships = spacesAdministrationService.getSpacesAdministratorsMemberships(); - assertNotNull(spacesCreatorsMemberships); - assertEquals(1, spacesCreatorsMemberships.size()); - assertTrue(spacesCreatorsMemberships.contains(new MembershipEntry("/platform/users", "member"))); - } - - public void testShouldNotAuthorizedWhenUpdatingSpacesCreatorsAsNotPlatformAdministrator() throws Exception { - // Given - spacesAdministrationService.updateSpacesCreatorsMemberships(Arrays.asList( - new MembershipEntry("/platform/users", "manager"), - new MembershipEntry("/platform/administrators", "*") - )); - String newMemberships = "[" + - " {" + - " \"membershipType\": \"member\"," + - " \"group\": \"/platform/users\"" + - " }" + - "]"; - MultivaluedMap headers = new MultivaluedMapImpl(); - headers.putSingle("content-type", "application/json"); - - startSessionAs("mary"); - - // When - ContainerResponse response = service("PUT", getURLResource("spacesAdministration/permissions/spacesCreators"), "", headers, newMemberships.getBytes(), "mary"); - - // Then - assertNotNull(response); - assertEquals(403, response.getStatus()); - } } diff --git a/component/service/src/test/java/org/exoplatform/social/rest/impl/spacetemplates/SpaceTemplatesRestResourcesTest.java b/component/service/src/test/java/org/exoplatform/social/rest/impl/spacetemplates/SpaceTemplatesRestResourcesTest.java deleted file mode 100644 index 2429bb7924f..00000000000 --- a/component/service/src/test/java/org/exoplatform/social/rest/impl/spacetemplates/SpaceTemplatesRestResourcesTest.java +++ /dev/null @@ -1,123 +0,0 @@ -package org.exoplatform.social.rest.impl.spacetemplates; - -import org.exoplatform.container.configuration.ConfigurationManager; -import org.exoplatform.container.xml.InitParams; -import org.exoplatform.container.xml.ObjectParameter; -import org.exoplatform.services.rest.impl.ContainerResponse; -import org.exoplatform.social.core.space.SpaceApplication; -import org.exoplatform.social.core.space.SpaceTemplate; -import org.exoplatform.social.core.space.SpaceTemplateConfigPlugin; -import org.exoplatform.social.core.space.spi.SpaceTemplateService; -import org.exoplatform.social.service.test.AbstractResourceTest; - -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; - -public class SpaceTemplatesRestResourcesTest extends AbstractResourceTest { - private SpaceTemplateService spaceTemplateService; - private ConfigurationManager configurationManager; - - private SpaceTemplatesRest spaceTemplatesRestResourcesV1; - - public void setUp() throws Exception { - super.setUp(); - - System.setProperty("gatein.email.domain.url", "localhost:8080"); - - spaceTemplateService = getContainer().getComponentInstanceOfType(SpaceTemplateService.class); - configurationManager = getContainer().getComponentInstanceOfType(ConfigurationManager.class); - - spaceTemplatesRestResourcesV1 = new SpaceTemplatesRest(spaceTemplateService, configurationManager); - registry(spaceTemplatesRestResourcesV1); - } - - public void tearDown() throws Exception { - super.tearDown(); - removeResource(spaceTemplatesRestResourcesV1.getClass()); - } - - public void testShouldReturnAllSpaceTemplatesDetails() throws Exception { - // Given - SpaceApplication homeApplication = new SpaceApplication(); - homeApplication.setAppTitle("fakeHome"); - homeApplication.setPortletApp("fakeHomeApp"); - homeApplication.setPortletName("fakeHomeName"); - - List applicationList = new ArrayList<>(); - for (int i=0; i<3; i++) { - SpaceApplication app = new SpaceApplication(); - app.setAppTitle("fakeTitle" + i); - app.setPortletApp("fakeApp" + i); - app.setPortletName("fakeName" + i); - applicationList.add(app); - } - SpaceTemplate spaceTemplate = new SpaceTemplate(); - spaceTemplate.setName("custom"); - spaceTemplate.setVisibility("private"); - spaceTemplate.setRegistration("open"); - spaceTemplate.setPermissions("*:/platform/administrators"); - spaceTemplate.setHomeApplication(homeApplication); - spaceTemplate.setSpaceApplicationList(applicationList); - InitParams params = new InitParams(); - ObjectParameter objParam = new ObjectParameter(); - objParam.setName("template"); - objParam.setObject(spaceTemplate); - params.addParameter(objParam); - SpaceTemplateConfigPlugin spaceTemplateConfigPlugin = new SpaceTemplateConfigPlugin(params); - spaceTemplateService.registerSpaceTemplatePlugin(spaceTemplateConfigPlugin); - - startSessionAs("root"); - - // When - ContainerResponse response = service("GET", getURLResource("spaceTemplates/templates"), "", null, null, "root"); - - // Then - assertNotNull(response); - assertEquals(200, response.getStatus()); - List templates = (List) response.getEntity(); - assertNotNull(templates); - assertEquals(2, templates.size()); - List classicTemplate = templates.stream().filter(t -> t.getName().equals("classic")).collect(Collectors.toList()); - assertNotNull(classicTemplate); - assertEquals(1, classicTemplate.size()); - List customTemplate = templates.stream().filter(t -> t.getName().equals("custom")).collect(Collectors.toList()); - assertNotNull(customTemplate); - assertEquals(1, customTemplate.size()); - List customApps = customTemplate.get(0).getSpaceApplicationList(); - assertNotNull(customApps); - assertEquals(3, customApps.size()); - } - - public void testShouldReturnSpaceTemplateBanner() throws Exception { - // Given - SpaceApplication homeApplication = new SpaceApplication(); - homeApplication.setAppTitle("fakeHome"); - homeApplication.setPortletApp("fakeHomeApp"); - homeApplication.setPortletName("fakeHomeName"); - SpaceTemplate spaceTemplate = new SpaceTemplate(); - spaceTemplate.setName("custom"); - spaceTemplate.setVisibility("private"); - spaceTemplate.setRegistration("open"); - spaceTemplate.setBannerPath("classpath:/conf/social-extension/social/space-template/custom/banner.png"); - spaceTemplate.setHomeApplication(homeApplication); - InitParams params = new InitParams(); - ObjectParameter objParam = new ObjectParameter(); - objParam.setName("template"); - objParam.setObject(spaceTemplate); - params.addParameter(objParam); - SpaceTemplateConfigPlugin spaceTemplateConfigPlugin = new SpaceTemplateConfigPlugin(params); - spaceTemplateService.registerSpaceTemplatePlugin(spaceTemplateConfigPlugin); - - startSessionAs("root"); - - // When - ContainerResponse response = service("GET", getURLResource("spaceTemplates/custom/banner"), "", null, null, "root"); - - // Then - assertNotNull(response); - assertEquals(200, response.getStatus()); - assertEquals("image", response.getContentType().getType()); - assertEquals("png", response.getContentType().getSubtype()); - } -} diff --git a/component/service/src/test/java/org/exoplatform/social/rest/impl/tag/TagRestTest.java b/component/service/src/test/java/org/exoplatform/social/rest/impl/tag/TagRestTest.java index 06d42cfeb8a..57b0363f4fa 100644 --- a/component/service/src/test/java/org/exoplatform/social/rest/impl/tag/TagRestTest.java +++ b/component/service/src/test/java/org/exoplatform/social/rest/impl/tag/TagRestTest.java @@ -214,7 +214,6 @@ private Space createSpace(String spaceName, String creator, String... members) t space.setDescription("description of space" + spaceName); space.setVisibility(Space.PRIVATE); space.setRegistration(Space.OPEN); - space.setPriority(Space.INTERMEDIATE_PRIORITY); String[] managers = new String[] { creator }; String[] spaceMembers = members == null ? new String[] { creator } : members; space.setManagers(managers); diff --git a/component/service/src/test/java/org/exoplatform/social/rest/impl/users/UserRestResourcesTest.java b/component/service/src/test/java/org/exoplatform/social/rest/impl/users/UserRestResourcesTest.java index 5750e7e4b91..377693ad0df 100644 --- a/component/service/src/test/java/org/exoplatform/social/rest/impl/users/UserRestResourcesTest.java +++ b/component/service/src/test/java/org/exoplatform/social/rest/impl/users/UserRestResourcesTest.java @@ -23,7 +23,6 @@ import org.json.JSONObject; import org.mortbay.cometd.continuation.EXoContinuationBayeux; -import org.exoplatform.commons.ObjectAlreadyExistsException; import org.exoplatform.commons.utils.IOUtil; import org.exoplatform.commons.utils.ListAccess; import org.exoplatform.portal.config.UserACL; @@ -50,7 +49,6 @@ import org.exoplatform.social.core.profileproperty.ProfilePropertyService; import org.exoplatform.social.core.profileproperty.model.ProfilePropertySetting; import org.exoplatform.social.core.service.LinkProvider; -import org.exoplatform.social.core.space.impl.DefaultSpaceApplicationHandler; import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.core.space.spi.SpaceService; import org.exoplatform.social.rest.api.ErrorResource; @@ -1286,10 +1284,8 @@ private Space getSpaceInstance(int number, String creator) throws Exception { space.setPrettyName(space.getDisplayName()); space.setRegistration(Space.OPEN); space.setDescription("add new space " + number); - space.setType(DefaultSpaceApplicationHandler.NAME); space.setVisibility(Space.PUBLIC); space.setRegistration(Space.VALIDATION); - space.setPriority(Space.INTERMEDIATE_PRIORITY); space.setGroupId("/spaces/space" + number); String[] managers = new String[] { creator }; String[] members = new String[] { creator }; diff --git a/component/service/src/test/java/org/exoplatform/social/service/rest/GroupSpaceBindingRestServiceTest.java b/component/service/src/test/java/org/exoplatform/social/service/rest/GroupSpaceBindingRestServiceTest.java index 041ec75f90b..37a48ffb672 100644 --- a/component/service/src/test/java/org/exoplatform/social/service/rest/GroupSpaceBindingRestServiceTest.java +++ b/component/service/src/test/java/org/exoplatform/social/service/rest/GroupSpaceBindingRestServiceTest.java @@ -27,7 +27,6 @@ import org.exoplatform.social.core.binding.model.GroupSpaceBinding; import org.exoplatform.social.core.binding.spi.GroupSpaceBindingService; import org.exoplatform.social.core.manager.IdentityManager; -import org.exoplatform.social.core.space.impl.DefaultSpaceApplicationHandler; import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.core.space.spi.SpaceService; import org.exoplatform.social.rest.impl.binding.GroupSpaceBindingRest; @@ -85,7 +84,7 @@ public void testGroupSpaceBindings() throws Exception { // Given startSessionAs("root"); - spaceId1 = createSpace("space1", "").getId(); + spaceId1 = createSpace("space1").getId(); // Given List groupSpaceBindings = new LinkedList<>(); GroupSpaceBinding binding1 = new GroupSpaceBinding(); @@ -118,7 +117,7 @@ public void testGetBindingReportOperations() throws Exception { // Given startSessionAs("root"); - spaceId1 = createSpace("space1", "").getId(); + spaceId1 = createSpace("space1").getId(); // Given List groupSpaceBindings = new LinkedList<>(); GroupSpaceBinding binding1 = new GroupSpaceBinding(); @@ -153,7 +152,7 @@ public void testDeleteSpaceBinding() throws Exception { // Given startSessionAs("root"); - spaceId2 = createSpace("space2", "").getId(); + spaceId2 = createSpace("space2").getId(); // Given List groupSpaceBindings = new LinkedList<>(); @@ -186,18 +185,15 @@ public void testDeleteSpaceBinding() throws Exception { * @throws Exception * @since 4.0 */ - private Space createSpace(String name, String apps) throws Exception { + private Space createSpace(String name) { Space space = new Space(); space.setDisplayName(name); space.setPrettyName(space.getDisplayName()); space.setRegistration(Space.OPEN); space.setDescription("add new space " + name); - space.setType(DefaultSpaceApplicationHandler.NAME); space.setVisibility(Space.PUBLIC); space.setRegistration(Space.VALIDATION); - space.setPriority(Space.INTERMEDIATE_PRIORITY); space.setGroupId("/space/" + name); - space.setApp(apps); String[] managers = new String[] { "john", "mary" }; String[] members = new String[] { "john", "mary", "demo" }; space.setManagers(managers); diff --git a/component/service/src/test/java/org/exoplatform/social/service/rest/NotificationsRestServiceTest.java b/component/service/src/test/java/org/exoplatform/social/service/rest/NotificationsRestServiceTest.java index 62ae4291deb..fa2e6b58526 100644 --- a/component/service/src/test/java/org/exoplatform/social/service/rest/NotificationsRestServiceTest.java +++ b/component/service/src/test/java/org/exoplatform/social/service/rest/NotificationsRestServiceTest.java @@ -24,16 +24,15 @@ import org.exoplatform.social.core.activity.model.ExoSocialActivityImpl; import org.exoplatform.social.core.identity.model.Identity; import org.exoplatform.social.core.manager.ActivityManagerImpl; -import org.exoplatform.social.core.space.impl.SpaceServiceImpl; import org.exoplatform.social.core.space.model.Space; +import org.exoplatform.social.core.space.spi.SpaceService; import org.exoplatform.social.core.storage.api.IdentityStorage; import org.exoplatform.social.service.test.AbstractResourceTest; public class NotificationsRestServiceTest extends AbstractResourceTest { - private IdentityStorage identityStorage; private ActivityManagerImpl activityManager; - private SpaceServiceImpl spaceService; + private SpaceService spaceService; private Identity rootIdentity; private Identity johnIdentity; @@ -43,9 +42,9 @@ public class NotificationsRestServiceTest extends AbstractResourceTest { public void setUp() throws Exception { super.setUp(); - identityStorage = getContainer().getComponentInstanceOfType(IdentityStorage.class); + IdentityStorage identityStorage = getContainer().getComponentInstanceOfType(IdentityStorage.class); activityManager = getContainer().getComponentInstanceOfType(ActivityManagerImpl.class); - spaceService = getContainer().getComponentInstanceOfType(SpaceServiceImpl.class); + spaceService = getContainer().getComponentInstanceOfType(SpaceService.class); rootIdentity = new Identity("organization", "root"); johnIdentity = new Identity("organization", "john"); @@ -160,8 +159,7 @@ public void testAcceptInvitationToJoinSpace() throws Exception { List listInviteds = Arrays.asList(space.getInvitedUsers()); assertTrue(listInviteds.contains("root")); - end(); - begin(); + restartTransaction(); startSessionAs("root"); ContainerResponse response = service("GET", "/social/notifications/acceptInvitationToJoinSpace/" + space.getId() +"/" + rootIdentity.getRemoteId(), "", null, null); @@ -169,8 +167,7 @@ public void testAcceptInvitationToJoinSpace() throws Exception { assertNotNull(response); assertEquals(303, response.getStatus()); - end(); - begin(); + restartTransaction(); listMembers = Arrays.asList(spaceService.getSpaceById(space.getId()).getMembers()); assertTrue(listMembers.contains("root")); @@ -187,8 +184,7 @@ public void testAcceptInvitationToJoinSpaceNotAuthorized() throws Exception { List listInviteds = Arrays.asList(space.getInvitedUsers()); assertTrue(listInviteds.contains("root")); - end(); - begin(); + restartTransaction(); startSessionAs("john"); ContainerResponse response = service("GET", "/social/notifications/acceptInvitationToJoinSpace/" + space.getId() +"/" + rootIdentity.getRemoteId(), "", null, null); @@ -196,8 +192,7 @@ public void testAcceptInvitationToJoinSpaceNotAuthorized() throws Exception { assertNotNull(response); assertEquals(401, response.getStatus()); - end(); - begin(); + restartTransaction(); listMembers = Arrays.asList(spaceService.getSpaceById(space.getId()).getMembers()); assertFalse(listMembers.contains("root")); @@ -214,8 +209,7 @@ public void testIgnoreInvitationToJoinSpace() throws Exception { List listInviteds = Arrays.asList(space.getInvitedUsers()); assertTrue(listInviteds.contains("root")); - end(); - begin(); + restartTransaction(); startSessionAs("root"); ContainerResponse response = service("GET", "/social/notifications/ignoreInvitationToJoinSpace/" + space.getId() +"/" + rootIdentity.getRemoteId(), "", null, null); @@ -223,8 +217,7 @@ public void testIgnoreInvitationToJoinSpace() throws Exception { assertNotNull(response); assertEquals(303, response.getStatus()); - end(); - begin(); + restartTransaction(); listMembers = Arrays.asList(spaceService.getSpaceById(space.getId()).getMembers()); assertFalse(listMembers.contains("root")); @@ -241,8 +234,7 @@ public void testIgnoreInvitationToJoinSpaceNotAuthorized() throws Exception { List listInviteds = Arrays.asList(space.getInvitedUsers()); assertTrue(listInviteds.contains("root")); - end(); - begin(); + restartTransaction(); startSessionAs("john"); ContainerResponse response = service("GET", "/social/notifications/ignoreInvitationToJoinSpace/" + space.getId() +"/" + rootIdentity.getRemoteId(), "", null, null); @@ -250,8 +242,7 @@ public void testIgnoreInvitationToJoinSpaceNotAuthorized() throws Exception { assertNotNull(response); assertEquals(401, response.getStatus()); - end(); - begin(); + restartTransaction(); listMembers = Arrays.asList(spaceService.getSpaceById(space.getId()).getMembers()); assertFalse(listMembers.contains("root")); @@ -266,25 +257,23 @@ public void testValidateRequestToJoinSpace() throws Exception { List listMembers = Arrays.asList(space.getMembers()); assertFalse(listMembers.contains("root")); List listPendings = Arrays.asList(space.getPendingUsers()); - assertTrue(listPendings.contains("root")); + assertTrue(listPendings.contains("james")); - end(); - begin(); + restartTransaction(); startSessionAs("john"); - ContainerResponse response = service("GET", "/social/notifications/validateRequestToJoinSpace/" + space.getId() +"/" + rootIdentity.getRemoteId() + ";jsessionid=0C004882C60E5BF3AB8EDCA4FD1467F1", "", null, null); + ContainerResponse response = service("GET", "/social/notifications/validateRequestToJoinSpace/" + space.getId() +"/james" + ";jsessionid=0C004882C60E5BF3AB8EDCA4FD1467F1", "", null, null); assertNotNull(response); assertEquals(303, response.getStatus()); - end(); - begin(); + restartTransaction(); listMembers = Arrays.asList(spaceService.getSpaceById(space.getId()).getMembers()); - assertTrue(listMembers.contains("root")); + assertTrue(listMembers.contains("james")); listPendings = Arrays.asList(spaceService.getSpaceById(space.getId()).getPendingUsers()); - assertFalse(listPendings.contains("root")); - + assertFalse(listPendings.contains("james")); + spaceService.deleteSpace(space.getId()); } @@ -293,24 +282,22 @@ public void testValidateRequestToJoinSpaceNotAuthorized() throws Exception { List listMembers = Arrays.asList(space.getMembers()); assertFalse(listMembers.contains("root")); List listPendings = Arrays.asList(space.getPendingUsers()); - assertTrue(listPendings.contains("root")); + assertTrue(listPendings.contains("james")); - end(); - begin(); + restartTransaction(); startSessionAs("demo"); - ContainerResponse response = service("GET", "/social/notifications/validateRequestToJoinSpace/" + space.getId() +"/" + rootIdentity.getRemoteId(), "", null, null); + ContainerResponse response = service("GET", "/social/notifications/validateRequestToJoinSpace/" + space.getId() +"/james", "", null, null); assertNotNull(response); assertEquals(401, response.getStatus()); - end(); - begin(); + restartTransaction(); listMembers = Arrays.asList(spaceService.getSpaceById(space.getId()).getMembers()); - assertFalse(listMembers.contains("root")); + assertFalse(listMembers.contains("james")); listPendings = Arrays.asList(spaceService.getSpaceById(space.getId()).getPendingUsers()); - assertTrue(listPendings.contains("root")); + assertTrue(listPendings.contains("james")); spaceService.deleteSpace(space.getId()); } @@ -335,25 +322,18 @@ public void testRedirectUrl() throws Exception { spaceService.deleteSpace(space.getId()); } - private Space getSpaceInstance(int number) throws Exception { + private Space getSpaceInstance(int number) { Space space = new Space(); space.setDisplayName("my_space_" + number); space.setPrettyName(space.getDisplayName()); - space.setRegistration(Space.OPEN); + space.setRegistration(Space.VALIDATION); space.setDescription("add new space " + number); space.setVisibility(Space.PUBLIC); - space.setPriority(Space.INTERMEDIATE_PRIORITY); - space.setGroupId("/spaces/my_space_" + number); - String[] managers = new String[] {"john"}; - String[] members = new String[] {}; + Space createdSpace = this.spaceService.createSpace(space, "john"); String[] invitedUsers = new String[] {"root"}; - String[] pendingUsers = new String[] {"root"}; - space.setInvitedUsers(invitedUsers); - space.setPendingUsers(pendingUsers); - space.setManagers(managers); - space.setMembers(members); - space.setUrl(space.getPrettyName()); - this.spaceService.createSpace(space, "john"); - return space; + String[] pendingUsers = new String[] {"james"}; + Arrays.stream(pendingUsers).forEach(u -> spaceService.addPendingUser(createdSpace, u)); + Arrays.stream(invitedUsers).forEach(u -> spaceService.addInvitedUser(createdSpace, u)); + return createdSpace; } } diff --git a/component/service/src/test/java/org/exoplatform/social/service/rest/notification/IntranetNotificationsRestServiceTest.java b/component/service/src/test/java/org/exoplatform/social/service/rest/notification/IntranetNotificationsRestServiceTest.java index 4ca0c2c5652..6348de3afc2 100644 --- a/component/service/src/test/java/org/exoplatform/social/service/rest/notification/IntranetNotificationsRestServiceTest.java +++ b/component/service/src/test/java/org/exoplatform/social/service/rest/notification/IntranetNotificationsRestServiceTest.java @@ -16,24 +16,22 @@ */ package org.exoplatform.social.service.rest.notification; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + import org.exoplatform.commons.api.notification.model.NotificationInfo; import org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage; import org.exoplatform.services.rest.impl.ContainerResponse; import org.exoplatform.social.core.identity.model.Identity; import org.exoplatform.social.core.manager.RelationshipManager; import org.exoplatform.social.core.relationship.model.Relationship; -import org.exoplatform.social.core.space.impl.DefaultSpaceApplicationHandler; -import org.exoplatform.social.core.space.impl.SpaceServiceImpl; import org.exoplatform.social.core.space.model.Space; +import org.exoplatform.social.core.space.spi.SpaceService; import org.exoplatform.social.core.storage.api.IdentityStorage; -import org.exoplatform.social.rest.impl.relationship.RelationshipsRestResources; import org.exoplatform.social.service.rest.IntranetNotificationRestService; import org.exoplatform.social.service.test.AbstractResourceTest; -import java.util.Arrays; -import java.util.List; -import java.util.Map; - /** * Test class for Intranet Notifications REST API * This test class should be in social-component-notification module (it has probably been put here to easily @@ -42,7 +40,7 @@ public class IntranetNotificationsRestServiceTest extends AbstractResourceTest { private IdentityStorage identityStorage; - private SpaceServiceImpl spaceService; + private SpaceService spaceService; private RelationshipManager relationshipManager; private WebNotificationStorage notificationStorage; @@ -55,7 +53,7 @@ public void setUp() throws Exception { super.setUp(); identityStorage = getContainer().getComponentInstanceOfType(IdentityStorage.class); - spaceService = getContainer().getComponentInstanceOfType(SpaceServiceImpl.class); + spaceService = getContainer().getComponentInstanceOfType(SpaceService.class); relationshipManager = getContainer().getComponentInstanceOfType(RelationshipManager.class); notificationStorage = getContainer().getComponentInstanceOfType(WebNotificationStorage.class); @@ -116,8 +114,7 @@ public void testSecurityRestService() throws Exception { } public void testShouldConfirmInvitationToConnectWhenReceiverConfirmsTheInvitation() throws Exception { - end(); - begin(); + restartTransaction(); // Given Relationship invitation = relationshipManager.inviteToConnect(johnIdentity, maryIdentity); @@ -135,8 +132,7 @@ public void testShouldConfirmInvitationToConnectWhenReceiverConfirmsTheInvitatio } public void testShouldNotConfirmInvitationToConnectWhenSenderConfirmsTheInvitation() throws Exception { - end(); - begin(); + restartTransaction(); // Given Relationship invitation = relationshipManager.inviteToConnect(maryIdentity, johnIdentity); @@ -160,8 +156,7 @@ public void testIgnoreInvitationToJoinSpace() throws Exception { List listInviteds = Arrays.asList(space.getInvitedUsers()); assertTrue(listInviteds.contains("root")); - end(); - begin(); + restartTransaction(); startSessionAs("root"); ContainerResponse response = service("GET", "/social/intranet-notification/ignoreInvitationToJoinSpace/" + space.getId() +"/" + rootIdentity.getRemoteId() + "/" + createNotif() + "/message.json", "", null, null); @@ -172,8 +167,7 @@ public void testIgnoreInvitationToJoinSpace() throws Exception { Map map = (Map) response.getEntity(); assertFalse(map.get("showViewAll")); - end(); - begin(); + restartTransaction(); listMembers = Arrays.asList(spaceService.getSpaceById(space.getId()).getMembers()); assertFalse(listMembers.contains("root")); @@ -186,8 +180,7 @@ public void testIgnoreInvitationToJoinSpace() throws Exception { public void testUnauthorizedUserAcceptInvitation() throws Exception { Space space = getSpaceInstance(1); - end(); - begin(); + restartTransaction(); startSessionAs("mary"); @@ -209,8 +202,7 @@ public void testUnauthorizedUserAcceptInvitation() throws Exception { public void testAuthorizedUserAcceptInvitation() throws Exception { Space space = getSpaceInstance(1); - end(); - begin(); + restartTransaction(); startSessionAs("root"); @@ -236,8 +228,7 @@ public void testAuthorizedUserAcceptInvitation() throws Exception { public void testUnauthorizedUserRequestValidationByManagerWithNonInvitedUser() throws Exception { Space space = getSpaceInstance(1); - end(); - begin(); + restartTransaction(); startSessionAs("john"); @@ -261,8 +252,7 @@ public void testUnauthorizedUserRequestValidationByManagerWithNonInvitedUser() t public void testUnauthorizedUserRequestValidationByNonManagerWithNotInvitedTargetUser() throws Exception { Space space = getSpaceInstance(1); - end(); - begin(); + restartTransaction(); startSessionAs("mary"); @@ -290,21 +280,20 @@ public void testUnauthorizedUserRequestValidationByNonManagerWithInvitedTargetUs Space space = getSpaceInstance(1); - end(); - begin(); + restartTransaction(); startSessionAs("mary"); //Given : mary is not manager, and root is invited List listPendings = Arrays.asList(space.getPendingUsers()); - assertTrue(listPendings.contains("root")); + assertTrue(listPendings.contains("james")); List listManager = Arrays.asList(space.getManagers()); assertFalse(listManager.contains("mary")); //When : she call the service to accept the request - ContainerResponse response = service("GET", "/social/intranet-notification/validateRequestToJoinSpace/" + space.getId() +"/" + rootIdentity.getRemoteId() + "/" + maryIdentity.getRemoteId() + "/"+ createNotif() + "/message.json", "", null, null); + ContainerResponse response = service("GET", "/social/intranet-notification/validateRequestToJoinSpace/" + space.getId() +"/james/" + maryIdentity.getRemoteId() + "/"+ createNotif() + "/message.json", "", null, null); //Then : service return unauthorized assertEquals(401, response.getStatus()); @@ -316,50 +305,41 @@ public void testUnauthorizedUserRequestValidationByNonManagerWithInvitedTargetUs public void testAuthorizedUserRequestValidationByManager() throws Exception { Space space = getSpaceInstance(1); - end(); - begin(); + restartTransaction(); startSessionAs("john"); //Given : root is pending in this space, and john is manager List listPendings = Arrays.asList(space.getPendingUsers()); - assertTrue(listPendings.contains("root")); + assertTrue(listPendings.contains("james")); List listManager = Arrays.asList(space.getManagers()); assertTrue(listManager.contains("john")); //When : he call the service to accept the request - ContainerResponse response = service("GET", "/social/intranet-notification/validateRequestToJoinSpace/" + space.getId() +"/" + rootIdentity.getRemoteId() + "/" + johnIdentity.getRemoteId() + "/"+ createNotif() + "/message.json", "", null, null); + ContainerResponse response = service("GET", "/social/intranet-notification/validateRequestToJoinSpace/" + space.getId() +"/james/" + johnIdentity.getRemoteId() + "/"+ createNotif() + "/message.json", "", null, null); //Then : service return status ok and root is added as member assertEquals(200, response.getStatus()); - List listMembers = Arrays.asList(spaceService.getSpaceById(space.getId()).getMembers()); - assertTrue(listMembers.contains("root")); + assertTrue(listMembers.contains("james")); } - private Space getSpaceInstance(int number) throws Exception { + private Space getSpaceInstance(int number) { Space space = new Space(); space.setDisplayName("my_space_" + number); space.setPrettyName(space.getDisplayName()); - space.setRegistration(Space.OPEN); + space.setRegistration(Space.VALIDATION); space.setDescription("add new space " + number); - space.setType(DefaultSpaceApplicationHandler.NAME); space.setVisibility(Space.PUBLIC); - space.setPriority(Space.INTERMEDIATE_PRIORITY); space.setGroupId("/spaces/my_space_" + number); - String[] managers = new String[] {"john"}; - String[] members = new String[] {}; + Space createdSpace = this.spaceService.createSpace(space, "john"); String[] invitedUsers = new String[] {"root"}; - String[] pendingUsers = new String[] {"root"}; - space.setInvitedUsers(invitedUsers); - space.setPendingUsers(pendingUsers); - space.setManagers(managers); - space.setMembers(members); - space.setUrl(space.getPrettyName()); - this.spaceService.createSpace(space, "john"); - return space; + String[] pendingUsers = new String[] {"james"}; + Arrays.stream(pendingUsers).forEach(u -> spaceService.addPendingUser(createdSpace, u)); + Arrays.stream(invitedUsers).forEach(u -> spaceService.addInvitedUser(createdSpace, u)); + return createdSpace; } private String createNotif() { diff --git a/component/service/src/test/java/org/exoplatform/social/service/test/MockSpacesAdministrationService.java b/component/service/src/test/java/org/exoplatform/social/service/test/MockSpacesAdministrationService.java index d308ebf0031..ce0ee6dc3ba 100644 --- a/component/service/src/test/java/org/exoplatform/social/service/test/MockSpacesAdministrationService.java +++ b/component/service/src/test/java/org/exoplatform/social/service/test/MockSpacesAdministrationService.java @@ -1,6 +1,9 @@ package org.exoplatform.social.service.test; import org.apache.commons.lang3.StringUtils; + +import org.exoplatform.container.ExoContainerContext; +import org.exoplatform.portal.config.UserACL; import org.exoplatform.services.security.IdentityConstants; import org.exoplatform.services.security.MembershipEntry; import org.exoplatform.social.core.space.SpacesAdministrationService; @@ -12,8 +15,6 @@ public class MockSpacesAdministrationService implements SpacesAdministrationServ private List spacesAdministrators = new ArrayList<>(); - private List spacesCreators = new ArrayList<>(); - @Override public List getSpacesAdministratorsMemberships() { return spacesAdministrators; @@ -21,7 +22,7 @@ public List getSpacesAdministratorsMemberships() { @Override public void updateSpacesAdministratorsMemberships(List permissionsExpressions) { - if(permissionsExpressions != null) { + if (permissionsExpressions != null) { spacesAdministrators = new ArrayList<>(permissionsExpressions); } else { spacesAdministrators.clear(); @@ -29,26 +30,19 @@ public void updateSpacesAdministratorsMemberships(List permissi } @Override - public List getSpacesCreatorsMemberships() { - return spacesCreators; - } - - @Override - public void updateSpacesCreatorsMemberships(List permissionsExpressions) { - if(permissionsExpressions != null) { - spacesCreators = new ArrayList<>(permissionsExpressions); - } else { - spacesCreators.clear(); - } - } - - @Override - public boolean canCreateSpace(String username) { - if (StringUtils.isBlank(username) || IdentityConstants.ANONIM.equals(username) || IdentityConstants.SYSTEM.equals(username)) { + public boolean isSuperManager(String username) { + UserACL userAcl = ExoContainerContext.getService(UserACL.class); + if (StringUtils.isBlank(username) + || IdentityConstants.ANONIM.equals(username) + || IdentityConstants.SYSTEM.equals(username)) { return false; - } - else { + } else if (username.equals(userAcl.getSuperUser())) { return true; } + org.exoplatform.services.security.Identity identity = userAcl.getUserIdentity(username); + return identity != null && (identity.isMemberOf(userAcl.getAdminGroups()) + || getSpacesAdministratorsMemberships().stream() + .anyMatch(identity::isMemberOf)); } + } diff --git a/crowdin.yml b/crowdin.yml index 46576384da6..3c84dc1c3f4 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -71,9 +71,9 @@ files: [ "escape_special_characters": 0, "escape_quotes" : 0, }, - # extension + # webapp { - "source" : "/extension/war/src/main/resources/locale/notification/template/Notification_en.properties", + "source" : "/webapp/src/main/resources/locale/notification/template/Notification_en.properties", "translation" : "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace" : { @@ -91,7 +91,7 @@ files: [ "escape_quotes" : 0, }, { - "source" : "/extension/war/src/main/resources/locale/portal/HamburgerMenu_en.properties", + "source" : "/webapp/src/main/resources/locale/portal/HamburgerMenu_en.properties", "translation" : "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace" : { @@ -108,9 +108,8 @@ files: [ "escape_special_characters": 0, "escape_quotes" : 0, }, - # webapp { - "source": "/webapp/portlet/src/main/resources/locale/portal_en.properties", + "source": "/webapp/src/main/resources/locale/portal_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -128,7 +127,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/Portlets_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/Portlets_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -140,13 +139,13 @@ files: [ "sv_SE": "sv_SE","th_TH": "th","tl_PH": "tl","tr_TR": "tr","uk_UA": "uk","ur_IN": "ur_IN","vi_VN": "vi", "zh_CN": "zh_CN","zh_TW": "zh_TW", }, - "dest": "hub/social/webapp/Portlets.properties", + "dest": "hub/social/webapps.properties", "update_option": "update_as_unapproved", "escape_special_characters": 0, "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/GeneralSettings_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -164,7 +163,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/Image_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/Image_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -182,7 +181,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -200,7 +199,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -218,7 +217,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -236,7 +235,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -254,7 +253,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -272,7 +271,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/social/PeopleOverview_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -290,7 +289,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -308,7 +307,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -326,7 +325,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/social/ProfileHeader_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -344,7 +343,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -362,7 +361,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -380,7 +379,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -398,7 +397,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/social/UserPopup_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -416,7 +415,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/social/SpacesOverview_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -434,7 +433,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -452,7 +451,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -470,7 +469,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/social/UserSettings_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -488,7 +487,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/Login_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/Login_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -506,7 +505,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -524,7 +523,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/NotificationAdministration_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -542,7 +541,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/Links_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/Links_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -560,7 +559,7 @@ files: [ "escape_quotes": 0, }, { - "source": "/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_en.properties", + "source": "/webapp/src/main/resources/locale/portlet/PlatformSettings_en.properties", "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", "translation_replace": { @@ -577,4 +576,21 @@ files: [ "escape_special_characters": 0, "escape_quotes": 0, }, + { + "source": "/webapp/src/main/resources/locale/portlet/SpaceTemplatesManagement_en.properties", + "translation": "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", + "translation_replace": { + "_en!": "","ar_SA": "ar","ar_OM": "aro","az_AZ": "az","ca_ES": "ca","ceb_PH": "ceb", + "co_FR": "co","cs_CZ": "cs","de_DE": "de","el_GR": "el","en_US": "en","es_ES": "es_ES","eu_ES": "eu","fa_IR": "fa", + "fi_FI": "fi","fil_PH": "fil","fr_FR": "fr","hi_IN": "hi","hu_HU": "hu","id_ID": "id","it_IT": "it","ja_JP": "ja", + "kab_KAB": "kab","ko_KR": "ko","lt_LT": "lt","ms_MY": "ms","nl_NL": "nl","no_NO": "no","pcm_NG": "pcm","pl_PL": "pl", + "pt_BR": "pt_BR","pt_PT": "pt_PT","ro_RO": "ro","ru_RU": "ru","sk_SK": "sk","sl_SI": "sl","sq_AL": "sq", + "sv_SE": "sv_SE","th_TH": "th","tl_PH": "tl","tr_TR": "tr","uk_UA": "uk","ur_IN": "ur_IN","vi_VN": "vi", + "zh_CN": "zh_CN","zh_TW": "zh_TW", + }, + "dest": "hub/social/webapp/SpaceTemplatesManagement.properties", + "update_option": "update_as_unapproved", + "escape_special_characters": 0, + "escape_quotes": 0, + }, ] diff --git a/extension/pom.xml b/extension/pom.xml deleted file mode 100644 index 87f0d7975d5..00000000000 --- a/extension/pom.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - 4.0.0 - - social - io.meeds.social - 7.0.x-SNAPSHOT - - social-extension - pom - Meeds:: PLF:: Social Extension - Meeds Social Extension - - war - - diff --git a/extension/war/pom.xml b/extension/war/pom.xml deleted file mode 100644 index 319f333e1cf..00000000000 --- a/extension/war/pom.xml +++ /dev/null @@ -1,422 +0,0 @@ - - - - 4.0.0 - - social-extension - io.meeds.social - 7.0.x-SNAPSHOT - - social-extension-war - war - Meeds:: PLF:: Social Extension WAR - Meeds Social Extension WAR - - - - io.meeds.portal - portal.component.api - - - org.springframework.boot - spring-boot-starter-logging - - - org.slf4j - * - - - org.apache.logging.log4j - * - - - org.apache.tomcat.embed - * - - - - - io.meeds.portal - portal.component.api - test-jar - test - - - - io.meeds.portal - portal.component.common - - - io.meeds.portal - portal.component.common - test-jar - test - - - - io.meeds.portal - portal.component.file-storage - - - io.meeds.portal - portal.component.file-storage - test-jar - test - - - - io.meeds.portal - portal.component.resources - - - io.meeds.portal - portal.component.resources - test-jar - test - - - - io.meeds.portal - portal.component.identity - - - io.meeds.portal - portal.component.identity - test-jar - test - - - - io.meeds.portal - portal.component.pc - - - io.meeds.portal - portal.component.pc - test-jar - test - - - - io.meeds.portal - portal.component.portal - - - io.meeds.portal - portal.component.portal - test-jar - test - - - - io.meeds.portal - portal.component.scripting - - - io.meeds.portal - portal.component.scripting - test-jar - test - - - - io.meeds.portal - portal.component.web.controller - - - io.meeds.portal - portal.component.web.controller - test-jar - test - - - - io.meeds.portal - portal.component.web.security - - - io.meeds.portal - portal.component.web.security - test-jar - test - - - - io.meeds.portal - portal.component.web.server - - - io.meeds.portal - portal.component.web.server - test-jar - test - - - - io.meeds.portal - portal.component.web.api - - - io.meeds.portal - portal.component.web.api - test-jar - test - - - - io.meeds.portal - portal.component.web.resources - - - io.meeds.portal - portal.component.web.resources - test-jar - test - - - - io.meeds.portal - portal.webui.portal - - - io.meeds.portal - portal.webui.portal - test-jar - test - - - - io.meeds.portal - portal.component.management - - - io.meeds.portal - portal.component.management - test-jar - test - - - - - io.meeds.commons - commons-api - - - io.meeds.commons - commons-api - test-jar - test - - - - io.meeds.commons - commons-component-common - - - io.meeds.commons - commons-component-common - test-jar - test - - - - io.meeds.commons - commons-component-product - - - io.meeds.commons - commons-component-product - test-jar - test - - - - io.meeds.commons - commons-component-upgrade - - - io.meeds.commons - commons-component-upgrade - test-jar - test - - - - io.meeds.commons - commons-search - - - io.meeds.commons - commons-search - test-jar - test - - - - io.meeds.commons - commons-comet-service - - - io.meeds.commons - commons-comet-service - test-jar - test - - - - - ${project.groupId} - social-component-api - - - ${project.groupId} - social-component-api - test-jar - test - - - - ${project.groupId} - social-component-common - - - ${project.groupId} - social-component-common - test-jar - test - - - - ${project.groupId} - social-component-core - - - ${project.groupId} - social-component-core - test-jar - test - - - - ${project.groupId} - social-component-service - - - ${project.groupId} - social-component-service - test-jar - test - - - - ${project.groupId} - social-component-notification - - - ${project.groupId} - social-component-notification - test-jar - test - - - - ${project.groupId} - social-component-oauth-auth - - - ${project.groupId} - social-component-oauth-auth - test-jar - test - - - - ${project.groupId} - social-component-web - - - ${project.groupId} - social-component-web - test-jar - test - - - - - io.meeds.kernel - exo.kernel.component.ext.cache.impl.infinispan.v8 - - - - - io.meeds.portal - portal.component.test.core - test - - - - io.meeds.portal - portal.component.test.web - test - - - - io.meeds.commons - commons-testing - test - - - - - jakarta.servlet - jakarta.servlet-api - - test - - - - io.swagger.core.v3 - swagger-annotations-jakarta - test - - - - org.projectlombok - lombok - test - - - - - social-extension - - - org.apache.maven.plugins - maven-war-plugin - - false - WEB-INF/lib/*.jar - - - - - diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/ckeditor/attach-image-plugin.js b/extension/war/src/main/webapp/WEB-INF/conf/social-extension/ckeditor/attach-image-plugin.js deleted file mode 100644 index 0f4d679af08..00000000000 --- a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/ckeditor/attach-image-plugin.js +++ /dev/null @@ -1 +0,0 @@ - CKEDITOR.plugins.addExternal('attachImage', '/social-portlet/js/ckeditorPlugins/attachImage/', 'plugin.js'); \ No newline at end of file diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/spaces-templates-configuration.xml b/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/spaces-templates-configuration.xml deleted file mode 100644 index 1ecbdcd10b8..00000000000 --- a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/spaces-templates-configuration.xml +++ /dev/null @@ -1,479 +0,0 @@ - - - - - - org.exoplatform.social.core.space.spi.SpaceTemplateService - - DefaultSpaceApplicationHandler - registerSpaceApplicationHandler - org.exoplatform.social.core.space.impl.DefaultSpaceApplicationHandler - - - templateName - ${exo.social.template.default:community} - - - - - - - Space Template Configuration - registerSpaceTemplatePlugin - org.exoplatform.social.core.space.SpaceTemplateConfigPlugin - - - template - Space Template - - - community - - - private - - - open - - - war:/conf/social-extension/social/space-template/community/banner.png - - - ${exo.social.space.template.community.permissions:*:/platform/users} - - - ${exo.social.space.template.community.invitees:} - - - - - social-portlet - - - SpaceActivityStreamPortlet - - - Home - - - fas fa-stream - - - - - - - - - social-portlet - - - SpaceSettingPortlet - - - Space Settings - - - false - - - 1000 - - - settings - - - fas fa-cog - - - - - manager - - - - - - - - - social-portlet - - - MembersPortlet - - - Members - - - false - - - 700 - - - members - - - fas fa-users - - - - - - - - - - - - - Space Template Configuration - registerSpaceTemplatePlugin - org.exoplatform.social.core.space.SpaceTemplateConfigPlugin - - - template - Space Template - - - communication - - - private - - - validation - - - war:/conf/social-extension/social/space-template/communication/banner.png - - - ${exo.social.space.template.communication.permissions:*:/platform/administrators;*:/platform/web-contributors} - - - ${exo.social.space.template.communication.invitees:} - - - - - social-portlet - - - SpaceActivityStreamPortlet - - - Home - - - fas fa-stream - - - - - - - - - social-portlet - - - MembersPortlet - - - Members - - - false - - - 700 - - - members - - - fas fa-users - - - - - - - social-portlet - - - SpaceSettingPortlet - - - Space Settings - - - false - - - 1000 - - - settings - - - fas fa-cog - - - - - manager - - - - - - - - - - - - - - - - Space Template Configuration - registerSpaceTemplatePlugin - org.exoplatform.social.core.space.SpaceTemplateConfigPlugin - - - template - Space Template - - - project - - - hidden - - - close - - - war:/conf/social-extension/social/space-template/project/banner.png - - - ${exo.social.space.template.project.permissions:*:/platform/users} - - - ${exo.social.space.template.project.invitees:} - - - - - social-portlet - - - SpaceActivityStreamPortlet - - - Home - - - fas fa-stream - - - - - - - - - social-portlet - - - MembersPortlet - - - Members - - - false - - - 700 - - - members - - - fas fa-users - - - - - - - social-portlet - - - SpaceSettingPortlet - - - Space Settings - - - false - - - 1000 - - - settings - - - fas fa-cog - - - - - manager - - - - - - - - - - - - - - - - Space Template Configuration - registerSpaceTemplatePlugin - org.exoplatform.social.core.space.SpaceTemplateConfigPlugin - - - template - Space Template - - - team - - - private - - - close - - - war:/conf/social-extension/social/space-template/team/banner.png - - - ${exo.social.space.template.team.permissions:*:/platform/users} - - - ${exo.social.space.template.team.invitees:} - - - - - social-portlet - - - SpaceActivityStreamPortlet - - - Home - - - fas fa-stream - - - - - - - - - social-portlet - - - MembersPortlet - - - Members - - - false - - - 600 - - - members - - - fas fa-users - - - - - - - social-portlet - - - SpaceSettingPortlet - - - Space Settings - - - false - - - 900 - - - settings - - - fas fa-cog - - - - - manager - - - - - - - - - - - - - - diff --git a/extension/war/src/main/webapp/WEB-INF/web.xml b/extension/war/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index f4d7f22fac1..00000000000 --- a/extension/war/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - social-extension - - - - - - ResourceRequestFilter - org.exoplatform.portal.application.ResourceRequestFilter - - - - ResourceRequestFilter - *.css - *.js - *.html - /i18n/* - /images/* - - - - - - - - org.exoplatform.container.web.PortalContainerConfigOwner - - - - - - GateInServlet - org.gatein.wci.api.GateInServlet - 0 - - - - - GateInServlet - /gateinservlet - - - - diff --git a/pom.xml b/pom.xml index 66ad96e0e75..2b560342f48 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,6 @@ Meeds:: PLF:: Social Meeds Social - Enterprise Social Networking - extension component webapp @@ -164,45 +163,19 @@ test-jar - - io.meeds.social - social-extension - ${project.version} - pom - - - io.meeds.social - social-extension-war - ${project.version} - war - - - io.meeds.social - social-extension-war - ${project.version} - pom - - io.meeds.social social-webapp ${project.version} - pom - - - io.meeds.social - social-webapp-portlet - ${project.version} war io.meeds.social - social-webapp-portlet + social-webapp ${project.version} pom - - + diff --git a/translations.properties b/translations.properties deleted file mode 100644 index f8cc735f808..00000000000 --- a/translations.properties +++ /dev/null @@ -1,59 +0,0 @@ -# -# Copyright (C) 2003-2013 eXo Platform SAS. -# -# This is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation; either version 3 of -# the License, or (at your option) any later version. -# -# This software is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this software; if not, write to the Free -# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -# 02110-1301 USA, or see the FSF site: http://www.fsf.org. -# - -# Mandatory property that indicate the base directory where each file is located in Crowdin (must end with /). -baseDir=platform/social/ - -# Files -# component -component/Core.properties=component/core/src/main/resources/locale/social/Core_en.properties -component/Webui.properties=component/service/src/main/resources/locale/social/Webui_en.properties - -menu/webui.properties=component/service/src/main/resources/locale/social/menu/webui_en.properties - -# extension -extension/Notification.properties=extension/war/src/main/resources/locale/notification/template/Notification_en.properties -extension/hamburgerMenu.properties=extension/war/src/main/resources/locale/portal/HamburgerMenu_en.properties - -# webapp -webapp/portal.properties=webapp/portlet/src/main/resources/locale/portal_en.properties -webapp/Portlets.properties=webapp/portlet/src/main/resources/locale/portlet/Portlets_en.properties -webapp/GeneralSettings.properties=webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_en.properties -webapp/SpaceInfosPortlet.properties=webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_en.properties -webapp/whoisonline.properties=webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_en.properties -webapp/GettingStarted.properties=webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_en.properties -webapp/ExternalSpacesListApplication.properties=webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_en.properties -webapp/PeopleListApplication.properties=webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_en.properties -webapp/PeopleOverview.properties=webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_en.properties -webapp/ProfileAboutMe.properties=webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_en.properties -webapp/ProfileContactInformation.properties=webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_en.properties -webapp/ProfileHeader.properties=webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_en.properties -webapp/ProfileWorkExperience.properties=webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_en.properties -webapp/SpaceAdministrationPortlet.properties=webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_en.properties -webapp/SpacesListApplication.properties=webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_en.properties -webapp/UserPopup.properties=webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_en.properties -webapp/SpacesOverview.properties=webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_en.properties -webapp/SuggestionsPortlet.properties=webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_en.properties -webapp/UserSettings.properties=webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_en.properties -webapp/Login.properties=webapp/portlet/src/main/resources/locale/portlet/Login_en.properties -webapp/UserNotificationPortlet.properties=webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_en.properties -webapp/NotificationAdministration.properties=webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_en.properties -webapp/Links.properties=webapp/portlet/src/main/resources/locale/portlet/Links_en.properties -webapp/PlatformSettings.properties=webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_en.properties -webapp/ComplementaryFilter.properties=webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_en.properties diff --git a/webapp/portlet/.eslintrc.json b/webapp/.eslintrc.json similarity index 100% rename from webapp/portlet/.eslintrc.json rename to webapp/.eslintrc.json diff --git a/webapp/portlet/package-lock.json b/webapp/package-lock.json similarity index 55% rename from webapp/portlet/package-lock.json rename to webapp/package-lock.json index 32fc6090f20..1a5e83326c5 100644 --- a/webapp/portlet/package-lock.json +++ b/webapp/package-lock.json @@ -1,12 +1,12 @@ { - "name": "meeds-social-portlets", - "version": "6.2.0", - "lockfileVersion": 3, + "name": "meeds-social", + "version": "7.0.0", + "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "meeds-social-portlets", - "version": "6.2.0", + "name": "meeds-social", + "version": "7.0.0", "license": "LGPL", "devDependencies": { "babel-loader": "^8.3.0", @@ -874,6 +874,8 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -889,7 +891,9 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/ajv-keywords": { "version": "3.5.2", @@ -4013,5 +4017,2880 @@ "url": "https://github.com/sponsors/sindresorhus" } } + }, + "dependencies": { + "@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "peer": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "@babel/code-frame": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "dev": true, + "peer": true, + "requires": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + } + }, + "@babel/compat-data": { + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.2.tgz", + "integrity": "sha512-bYcppcpKBvX4znYaPEeFau03bp89ShqNMLs+rmdptMw+heSZh9+z84d2YG+K7cYLbWwzdjtDoW/uqZmPjulClQ==", + "dev": true, + "peer": true + }, + "@babel/core": { + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.2.tgz", + "integrity": "sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==", + "dev": true, + "peer": true, + "requires": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.25.0", + "@babel/helper-compilation-targets": "^7.25.2", + "@babel/helper-module-transforms": "^7.25.2", + "@babel/helpers": "^7.25.0", + "@babel/parser": "^7.25.0", + "@babel/template": "^7.25.0", + "@babel/traverse": "^7.25.2", + "@babel/types": "^7.25.2", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + } + }, + "@babel/generator": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.0.tgz", + "integrity": "sha512-3LEEcj3PVW8pW2R1SR1M89g/qrYk/m/mB/tLqn7dn4sbBUQyTqnlod+II2U4dqiGtUmkcnAmkMDralTFZttRiw==", + "dev": true, + "peer": true, + "requires": { + "@babel/types": "^7.25.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.2.tgz", + "integrity": "sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==", + "dev": true, + "peer": true, + "requires": { + "@babel/compat-data": "^7.25.2", + "@babel/helper-validator-option": "^7.24.8", + "browserslist": "^4.23.1", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + } + }, + "@babel/helper-module-imports": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", + "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", + "dev": true, + "peer": true, + "requires": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + } + }, + "@babel/helper-module-transforms": { + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.2.tgz", + "integrity": "sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-simple-access": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "@babel/traverse": "^7.25.2" + } + }, + "@babel/helper-simple-access": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", + "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", + "dev": true, + "peer": true, + "requires": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + } + }, + "@babel/helper-string-parser": { + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", + "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", + "dev": true + }, + "@babel/helper-validator-identifier": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz", + "integrity": "sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==", + "dev": true, + "peer": true + }, + "@babel/helpers": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.0.tgz", + "integrity": "sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw==", + "dev": true, + "peer": true, + "requires": { + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.0" + } + }, + "@babel/highlight": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "dev": true, + "peer": true, + "requires": { + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + } + }, + "@babel/parser": { + "version": "7.25.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.3.tgz", + "integrity": "sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw==", + "dev": true, + "requires": { + "@babel/types": "^7.25.2" + } + }, + "@babel/template": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", + "integrity": "sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==", + "dev": true, + "peer": true, + "requires": { + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.25.0", + "@babel/types": "^7.25.0" + } + }, + "@babel/traverse": { + "version": "7.25.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.3.tgz", + "integrity": "sha512-HefgyP1x754oGCsKmV5reSmtV7IXj/kpaE1XYY+D9G5PvKKoFfSbiS4M77MdjuwlZKDIKFCffq9rPU+H/s3ZdQ==", + "dev": true, + "peer": true, + "requires": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.25.0", + "@babel/parser": "^7.25.3", + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.2", + "debug": "^4.3.1", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.2.tgz", + "integrity": "sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.24.8", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + } + }, + "@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "dev": true + }, + "@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^3.3.0" + } + }, + "@eslint-community/regexpp": { + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", + "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", + "dev": true + }, + "@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + } + } + }, + "@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "dev": true + }, + "@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + } + }, + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true + }, + "@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "dev": true + }, + "@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true + }, + "@jridgewell/source-map": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@types/eslint": { + "version": "8.56.11", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.11.tgz", + "integrity": "sha512-sVBpJMf7UPo/wGecYOpk2aQya2VUGeHhe38WG7/mN5FufNSubf5VT9Uh9Uyp8/eLJpu1/tuhJ/qTo4mhSB4V4Q==", + "dev": true, + "requires": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, + "@types/node": { + "version": "22.3.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.3.0.tgz", + "integrity": "sha512-nrWpWVaDZuaVc5X84xJ0vNrLvomM205oQyLsRt7OHNZbSHslcWsvgFR7O7hire2ZonjLrWBbedmotmIlJDVd6g==", + "dev": true, + "requires": { + "undici-types": "~6.18.2" + } + }, + "@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, + "@vue/compiler-sfc": { + "version": "2.7.16", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.16.tgz", + "integrity": "sha512-KWhJ9k5nXuNtygPU7+t1rX6baZeqOYLEforUPjgNDBnLicfHCoi48H87Q8XyLZOrNNsmhuwKqtpDQWjEFe6Ekg==", + "dev": true, + "requires": { + "@babel/parser": "^7.23.5", + "postcss": "^8.4.14", + "prettier": "^1.18.2 || ^2.0.0", + "source-map": "^0.6.1" + } + }, + "@vue/component-compiler-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@vue/component-compiler-utils/-/component-compiler-utils-3.3.0.tgz", + "integrity": "sha512-97sfH2mYNU+2PzGrmK2haqffDpVASuib9/w2/noxiFi31Z54hW+q3izKQXXQZSNhtiUpAI36uSuYepeBe4wpHQ==", + "dev": true, + "requires": { + "consolidate": "^0.15.1", + "hash-sum": "^1.0.2", + "lru-cache": "^4.1.2", + "merge-source-map": "^1.1.0", + "postcss": "^7.0.36", + "postcss-selector-parser": "^6.0.2", + "prettier": "^1.18.2 || ^2.0.0", + "source-map": "~0.6.1", + "vue-template-es2015-compiler": "^1.9.0" + }, + "dependencies": { + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "picocolors": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", + "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", + "dev": true + }, + "postcss": { + "version": "7.0.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", + "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", + "dev": true, + "requires": { + "picocolors": "^0.2.1", + "source-map": "^0.6.1" + } + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", + "dev": true + } + } + }, + "@webassemblyjs/ast": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", + "dev": true, + "requires": { + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", + "dev": true + }, + "@webassemblyjs/helper-api-error": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", + "dev": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", + "dev": true + }, + "@webassemblyjs/helper-numbers": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "dev": true, + "requires": { + "@webassemblyjs/floating-point-hex-parser": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", + "dev": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/wasm-gen": "1.12.1" + } + }, + "@webassemblyjs/ieee754": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", + "dev": true, + "requires": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", + "dev": true, + "requires": { + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/utf8": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", + "dev": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/helper-wasm-section": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-opt": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1", + "@webassemblyjs/wast-printer": "1.12.1" + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.12.1", + "@xtuc/long": "4.2.2" + } + }, + "@webpack-cli/configtest": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", + "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", + "dev": true, + "requires": {} + }, + "@webpack-cli/info": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz", + "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", + "dev": true, + "requires": { + "envinfo": "^7.7.3" + } + }, + "@webpack-cli/serve": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz", + "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", + "dev": true, + "requires": {} + }, + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, + "acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true + }, + "acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", + "dev": true, + "requires": {} + }, + "acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "requires": {} + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, + "requires": {}, + "dependencies": { + "ajv": { + "version": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "optional": true, + "peer": true + } + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "requires": {} + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "peer": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "aria-query": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", + "dev": true, + "requires": { + "dequal": "^2.0.3" + } + }, + "babel-loader": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.3.0.tgz", + "integrity": "sha512-H8SvsMF+m9t15HNLMipppzkC+Y2Yq+v3SonZyU70RBL/h1gxPkH08Ot8pEE9Z4Kd+czyWJClmFS8qzIP9OZ04Q==", + "dev": true, + "requires": { + "find-cache-dir": "^3.3.1", + "loader-utils": "^2.0.0", + "make-dir": "^3.1.0", + "schema-utils": "^2.6.5" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, + "binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "requires": { + "fill-range": "^7.1.1" + } + }, + "browserslist": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz", + "integrity": "sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001646", + "electron-to-chromium": "^1.5.4", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.0" + } + }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30001651", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz", + "integrity": "sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "peer": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } + } + }, + "chrome-trace-event": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", + "dev": true + }, + "clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "peer": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "peer": true + }, + "colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "consolidate": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/consolidate/-/consolidate-0.15.1.tgz", + "integrity": "sha512-DW46nrsMJgy9kqAbPt5rKaCr7uFtpo4mSUvLHIUbJEjm0vo+aY5QLwBUq3FK4tRnJr/X0Psc0C4jf/h+HtXSMw==", + "dev": true, + "requires": { + "bluebird": "^3.1.1" + } + }, + "convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "peer": true + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "css-loader": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-7.1.2.tgz", + "integrity": "sha512-6WvYYn7l/XEGN8Xu2vWFt9nVzrCn39vKyTEFf/ExEyoksJjjSZV/0/35XPlMbpnr6VGhZIUg5yJrL8tGfes/FA==", + "dev": true, + "peer": true, + "requires": { + "icss-utils": "^5.1.0", + "postcss": "^8.4.33", + "postcss-modules-extract-imports": "^3.1.0", + "postcss-modules-local-by-default": "^4.0.5", + "postcss-modules-scope": "^3.2.0", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.2.0", + "semver": "^7.5.4" + }, + "dependencies": { + "semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "peer": true + } + } + }, + "cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true + }, + "csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "dev": true + }, + "de-indent": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz", + "integrity": "sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==", + "dev": true + }, + "debug": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "electron-to-chromium": { + "version": "1.5.9", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.9.tgz", + "integrity": "sha512-HfkT8ndXR0SEkU8gBQQM3rz035bpE/hxkZ1YIt4KJPEFES68HfIU6LzKukH0H794Lm83WJtkSAMfEToxCs15VA==", + "dev": true + }, + "emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true + }, + "emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "dev": true + }, + "enhanced-resolve": { + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + } + }, + "envinfo": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.13.0.tgz", + "integrity": "sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q==", + "dev": true + }, + "es-module-lexer": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", + "dev": true + }, + "escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "peer": true + }, + "eslint": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "eslint-config-meedsio": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/eslint-config-meedsio/-/eslint-config-meedsio-1.0.5.tgz", + "integrity": "sha512-eSae9Ald7T7g4gIdomPGJ7/H+aVd9L+wLvDUICvc8vKfLeKoJSdOH1uoJ1beUytObQbzbJJJC+cHvf+8BxYDdg==", + "dev": true + }, + "eslint-plugin-vue": { + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.7.1.tgz", + "integrity": "sha512-28sbtm4l4cOzoO1LtzQPxfxhQABararUb1JtqusQqObJpWX2e/gmVyeYVfepizPFne0Q5cILkYGiBoV36L12Wg==", + "dev": true, + "requires": { + "eslint-utils": "^3.0.0", + "natural-compare": "^1.4.0", + "nth-check": "^2.0.1", + "postcss-selector-parser": "^6.0.9", + "semver": "^7.3.5", + "vue-eslint-parser": "^8.0.1" + }, + "dependencies": { + "semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true + } + } + }, + "eslint-plugin-vuejs-accessibility": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-vuejs-accessibility/-/eslint-plugin-vuejs-accessibility-2.4.1.tgz", + "integrity": "sha512-ZRZhPdslplZXSF71MtSG+zXYRAT5KiHR4JVuo/DERQf9noAkDvi5W418VOE1qllmJd7wTenndxi1q8XeDMxdHw==", + "dev": true, + "requires": { + "aria-query": "^5.3.0", + "emoji-regex": "^10.0.0", + "vue-eslint-parser": "^9.0.1" + }, + "dependencies": { + "semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true + }, + "vue-eslint-parser": { + "version": "9.4.3", + "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.4.3.tgz", + "integrity": "sha512-2rYRLWlIpaiN8xbPiDyXZXRgLGOtWxERV7ND5fFAv5qo1D2N9Fu9MNajBNc6o13lZ+24DAWCkQCvj4klgmcITg==", + "dev": true, + "requires": { + "debug": "^4.3.4", + "eslint-scope": "^7.1.1", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.1", + "esquery": "^1.4.0", + "lodash": "^4.17.21", + "semver": "^7.3.6" + } + } + } + }, + "eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + } + } + }, + "eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true + }, + "eslint-webpack-plugin": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-webpack-plugin/-/eslint-webpack-plugin-3.2.0.tgz", + "integrity": "sha512-avrKcGncpPbPSUHX6B3stNGzkKFto3eL+DKM4+VyMrVnhPc3vRczVlCq3uhuFOdRvDHTVXuzwk1ZKUrqDQHQ9w==", + "dev": true, + "requires": { + "@types/eslint": "^7.29.0 || ^8.4.1", + "jest-worker": "^28.0.2", + "micromatch": "^4.0.5", + "normalize-path": "^3.0.0", + "schema-utils": "^4.0.0" + }, + "dependencies": { + "ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + } + }, + "ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.3" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "schema-utils": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", + "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" + } + } + } + }, + "espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "requires": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + } + }, + "esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + } + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "fast-uri": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz", + "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==", + "dev": true + }, + "fastest-levenshtein": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", + "dev": true + }, + "fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, + "fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + } + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true + }, + "flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "requires": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "peer": true + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + }, + "glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "peer": true + }, + "graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "peer": true + }, + "hash-sum": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz", + "integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==", + "dev": true + }, + "hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "requires": { + "function-bind": "^1.1.2" + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "icss-utils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", + "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", + "dev": true, + "peer": true, + "requires": {} + }, + "ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true + }, + "immutable": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", + "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "import-local": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", + "dev": true, + "requires": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "interpret": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", + "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", + "dev": true + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-core-module": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", + "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==", + "dev": true, + "requires": { + "hasown": "^2.0.2" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true + }, + "jest-worker": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz", + "integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "peer": true + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "peer": true + }, + "json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true + }, + "keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "requires": { + "json-buffer": "3.0.1" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true + }, + "loader-utils": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "peer": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "merge-source-map": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", + "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", + "dev": true, + "requires": { + "source-map": "^0.6.1" + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "micromatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "dev": true, + "requires": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + } + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "requires": { + "mime-db": "1.52.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node-releases": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dev": true, + "requires": { + "boolbase": "^1.0.0" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + } + } + }, + "postcss": { + "version": "8.4.41", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.41.tgz", + "integrity": "sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==", + "dev": true, + "requires": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.1", + "source-map-js": "^1.2.0" + } + }, + "postcss-modules-extract-imports": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.1.0.tgz", + "integrity": "sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q==", + "dev": true, + "peer": true, + "requires": {} + }, + "postcss-modules-local-by-default": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.5.tgz", + "integrity": "sha512-6MieY7sIfTK0hYfafw1OMEG+2bg8Q1ocHCpoWLqOKj3JXlKu4G7btkmM/B7lFubYkYWmRSPLZi5chid63ZaZYw==", + "dev": true, + "peer": true, + "requires": { + "icss-utils": "^5.0.0", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.1.0" + } + }, + "postcss-modules-scope": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.0.tgz", + "integrity": "sha512-oq+g1ssrsZOsx9M96c5w8laRmvEu9C3adDSjI8oTcbfkrTE8hx/zfyobUoWIxaKPO8bt6S62kxpw5GqypEw1QQ==", + "dev": true, + "peer": true, + "requires": { + "postcss-selector-parser": "^6.0.4" + } + }, + "postcss-modules-values": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", + "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", + "dev": true, + "peer": true, + "requires": { + "icss-utils": "^5.0.0" + } + }, + "postcss-selector-parser": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", + "dev": true, + "requires": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + } + }, + "postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true, + "peer": true + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "optional": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", + "dev": true + }, + "punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "rechoir": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", + "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", + "dev": true, + "requires": { + "resolve": "^1.9.0" + } + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, + "resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "requires": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "requires": { + "resolve-from": "^5.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + } + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, + "sass": { + "version": "1.77.8", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.8.tgz", + "integrity": "sha512-4UHg6prsrycW20fqLGPShtEvo/WyHRVRHwOP4DzkUrObWoWI05QBSfzU71TVB7PFaL104TwNaHpjlWXAZbQiNQ==", + "dev": true, + "requires": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + } + }, + "sass-loader": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-16.0.0.tgz", + "integrity": "sha512-n13Z+3rU9A177dk4888czcVFiC8CL9dii4qpXWUg3YIIgZEvi9TCFKjOQcbK0kJM7DJu9VucrZFddvNfYCPwtw==", + "dev": true, + "requires": { + "neo-async": "^2.6.2" + } + }, + "schema-utils": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", + "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.5", + "ajv": "^6.12.4", + "ajv-keywords": "^3.5.2" + } + }, + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true + }, + "serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "dev": true + }, + "source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "peer": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, + "tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true + }, + "terser": { + "version": "5.31.6", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.6.tgz", + "integrity": "sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg==", + "dev": true, + "requires": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + } + }, + "terser-webpack-plugin": { + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.20", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.1", + "terser": "^5.26.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + } + }, + "schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + }, + "undici-types": { + "version": "6.18.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.18.2.tgz", + "integrity": "sha512-5ruQbENj95yDYJNS3TvcaxPMshV7aizdv/hWYjGIKoANWKjhWNBsr2YEuYZKodQulB1b8l7ILOuDQep3afowQQ==", + "dev": true + }, + "update-browserslist-db": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", + "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==", + "dev": true, + "requires": { + "escalade": "^3.1.2", + "picocolors": "^1.0.1" + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "vue": { + "version": "2.7.16", + "resolved": "https://registry.npmjs.org/vue/-/vue-2.7.16.tgz", + "integrity": "sha512-4gCtFXaAA3zYZdTp5s4Hl2sozuySsgz4jy1EnpBHNfpMa9dK1ZCG7viqBPCwXtmgc8nHqUsAu3G4gtmXkkY3Sw==", + "dev": true, + "requires": { + "@vue/compiler-sfc": "2.7.16", + "csstype": "^3.1.0" + } + }, + "vue-eslint-parser": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-8.3.0.tgz", + "integrity": "sha512-dzHGG3+sYwSf6zFBa0Gi9ZDshD7+ad14DGOdTLjruRVgZXe2J+DcZ9iUhyR48z5g1PqRa20yt3Njna/veLJL/g==", + "dev": true, + "requires": { + "debug": "^4.3.2", + "eslint-scope": "^7.0.0", + "eslint-visitor-keys": "^3.1.0", + "espree": "^9.0.0", + "esquery": "^1.4.0", + "lodash": "^4.17.21", + "semver": "^7.3.5" + }, + "dependencies": { + "semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true + } + } + }, + "vue-hot-reload-api": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz", + "integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==", + "dev": true + }, + "vue-loader": { + "version": "15.11.1", + "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.11.1.tgz", + "integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==", + "dev": true, + "requires": { + "@vue/component-compiler-utils": "^3.1.0", + "hash-sum": "^1.0.2", + "loader-utils": "^1.1.0", + "vue-hot-reload-api": "^2.3.0", + "vue-style-loader": "^4.1.0" + }, + "dependencies": { + "json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "loader-utils": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz", + "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + } + } + } + }, + "vue-style-loader": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz", + "integrity": "sha512-sFuh0xfbtpRlKfm39ss/ikqs9AbKCoXZBpHeVZ8Tx650o0k0q/YCM7FRvigtxpACezfq6af+a7JeqVTWvncqDg==", + "dev": true, + "requires": { + "hash-sum": "^1.0.2", + "loader-utils": "^1.0.2" + }, + "dependencies": { + "json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "loader-utils": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz", + "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + } + } + } + }, + "vue-template-compiler": { + "version": "2.7.16", + "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.7.16.tgz", + "integrity": "sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==", + "dev": true, + "requires": { + "de-indent": "^1.0.2", + "he": "^1.2.0" + } + }, + "vue-template-es2015-compiler": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz", + "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==", + "dev": true + }, + "watchpack": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", + "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", + "dev": true, + "requires": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + } + }, + "webpack": { + "version": "5.94.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz", + "integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==", + "dev": true, + "requires": { + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", + "acorn": "^8.7.1", + "acorn-import-attributes": "^1.9.5", + "browserslist": "^4.21.10", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.17.1", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.11", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.2.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", + "webpack-sources": "^3.2.3" + }, + "dependencies": { + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + } + } + }, + "webpack-cli": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", + "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", + "dev": true, + "requires": { + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^1.2.0", + "@webpack-cli/info": "^1.5.0", + "@webpack-cli/serve": "^1.7.0", + "colorette": "^2.0.14", + "commander": "^7.0.0", + "cross-spawn": "^7.0.3", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^2.2.0", + "rechoir": "^0.7.0", + "webpack-merge": "^5.7.3" + }, + "dependencies": { + "commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true + } + } + }, + "webpack-merge": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", + "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", + "dev": true, + "requires": { + "clone-deep": "^4.0.1", + "flat": "^5.0.2", + "wildcard": "^2.0.0" + } + }, + "webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wildcard": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", + "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", + "dev": true + }, + "word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "peer": true + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true + } } } diff --git a/webapp/portlet/package.json b/webapp/package.json similarity index 94% rename from webapp/portlet/package.json rename to webapp/package.json index 077c076f3d2..10db92123f2 100644 --- a/webapp/portlet/package.json +++ b/webapp/package.json @@ -1,6 +1,6 @@ { - "name": "meeds-social-portlets", - "version": "6.2.0", + "name": "meeds-social", + "version": "7.0.0", "description": "Meeds Space poetlets", "repository": { "type": "git", diff --git a/webapp/pom.xml b/webapp/pom.xml index 8b076f9674b..ee8940daaa3 100644 --- a/webapp/pom.xml +++ b/webapp/pom.xml @@ -1,34 +1,507 @@ 4.0.0 - social io.meeds.social + social 7.0.x-SNAPSHOT social-webapp - pom - Meeds:: PLF:: Social Web Apps - Meeds Social Web Apps - - portlet - + war + Meeds:: PLF:: Social Webapp + Meeds Social Webapp + + + + io.meeds.portal + portal.component.api + + + org.springframework.boot + spring-boot-starter-logging + + + org.slf4j + * + + + org.apache.logging.log4j + * + + + org.apache.tomcat.embed + * + + + + + io.meeds.portal + portal.component.api + test-jar + test + + + + io.meeds.portal + portal.component.common + + + io.meeds.portal + portal.component.common + test-jar + test + + + + io.meeds.portal + portal.component.file-storage + + + io.meeds.portal + portal.component.file-storage + test-jar + test + + + + io.meeds.portal + portal.component.resources + + + io.meeds.portal + portal.component.resources + test-jar + test + + + + io.meeds.portal + portal.component.identity + + + io.meeds.portal + portal.component.identity + test-jar + test + + + + io.meeds.portal + portal.component.pc + + + io.meeds.portal + portal.component.pc + test-jar + test + + + + io.meeds.portal + portal.component.portal + + + io.meeds.portal + portal.component.portal + test-jar + test + + + + io.meeds.portal + portal.component.scripting + + + io.meeds.portal + portal.component.scripting + test-jar + test + + + + io.meeds.portal + portal.component.web.controller + + + io.meeds.portal + portal.component.web.controller + test-jar + test + + + + io.meeds.portal + portal.component.web.security + + + io.meeds.portal + portal.component.web.security + test-jar + test + + + + io.meeds.portal + portal.component.web.api + + + io.meeds.portal + portal.component.web.api + test-jar + test + + + + io.meeds.portal + portal.component.web.resources + + + io.meeds.portal + portal.component.web.resources + test-jar + test + + + + io.meeds.portal + portal.webui.portal + + + io.meeds.portal + portal.webui.portal + test-jar + test + + + + io.meeds.portal + portal.component.management + + + io.meeds.portal + portal.component.management + test-jar + test + + + + + io.meeds.commons + commons-api + + + io.meeds.commons + commons-api + test-jar + test + + + + io.meeds.commons + commons-component-common + + + io.meeds.commons + commons-component-common + test-jar + test + + + + io.meeds.commons + commons-component-product + + + io.meeds.commons + commons-component-product + test-jar + test + + + + io.meeds.commons + commons-component-upgrade + + + io.meeds.commons + commons-component-upgrade + test-jar + test + + + + io.meeds.commons + commons-search + + + io.meeds.commons + commons-search + test-jar + test + + + + io.meeds.commons + commons-comet-service + + + io.meeds.commons + commons-comet-service + test-jar + test + + + + + ${project.groupId} + social-component-api + + + ${project.groupId} + social-component-api + test-jar + test + + + + ${project.groupId} + social-component-common + + + ${project.groupId} + social-component-common + test-jar + test + + + + ${project.groupId} + social-component-core + + + ${project.groupId} + social-component-core + test-jar + test + + + + ${project.groupId} + social-component-service + + + ${project.groupId} + social-component-service + test-jar + test + + + + ${project.groupId} + social-component-notification + + + ${project.groupId} + social-component-notification + test-jar + test + + + + ${project.groupId} + social-component-oauth-auth + + + ${project.groupId} + social-component-oauth-auth + test-jar + test + + + + ${project.groupId} + social-component-web + + + ${project.groupId} + social-component-web + test-jar + test + + + + + io.meeds.kernel + exo.kernel.component.ext.cache.impl.infinispan.v8 + + + + + io.meeds.portal + portal.component.test.core + test + + + + io.meeds.portal + portal.component.test.web + test + + + + io.meeds.commons + commons-testing + test + + + + + jakarta.servlet + jakarta.servlet-api + + test + + + + io.swagger.core.v3 + swagger-annotations-jakarta + test + + + + org.projectlombok + lombok + provided + + + + + io.meeds.platform-ui + platform-ui-skin + sources + provided + + + + social + + + maven-resources-plugin + + + less-copy-resources + generate-sources + + copy-resources + + + ${project.build.directory}/src/main/webapp/skin/less + + + src/main/webapp/skin/less + + + + + + + + maven-dependency-plugin + + + platform-ui-src + initialize + + unpack-dependencies + + + platform-ui-skin + ${project.build.directory}/src/main/webapp + + + + + + org.lesscss + lesscss-maven-plugin + + + core + + ${project.build.directory}/src/main/webapp/skin/less + ${project.build.directory}/${project.build.finalName}/skin/css + false + + portlet/ActivitySearch/Style.less + portlet/ActivityStream/Style.less + portlet/GettingStarted/Style.less + portlet/HamburgerMenu/Style.less + portlet/IDMGroupsManagement/Style.less + portlet/IDMMembershipTypesManagement/Style.less + portlet/IDMUsersManagement/Style.less + portlet/PeopleList/Style.less + portlet/PeopleOverview/Style.less + portlet/ProfileAboutMe/Style.less + portlet/ProfileContactInformation/Style.less + portlet/ProfileHeader/Style.less + portlet/ProfileSearch/Style.less + portlet/ProfileSettings/Style.less + portlet/ProfileWorkExperience/Style.less + portlet/Search/Style.less + portlet/SpaceInfos/Style.less + portlet/SpacesAdministration/Style.less + portlet/SpacesListExternal/Style.less + portlet/SpacesOverview/Style.less + portlet/SuggestionsPeopleAndSpace/Style.less + portlet/TopBarMenu/Style.less + portlet/VerticalMenu/Style.less + common/siteDetails/Style.less + portlet/organizational-chart/Style.less + + portlet/TopBarNotification/Style.less + + standalone-pages/AccountSetup.less + standalone-pages/Login.less + + + + compile + + + + + + org.apache.maven.plugins + maven-war-plugin + + false + WEB-INF/lib/*.jar,**/*.less,**/less/**,**/*.vue,css/lib/*,vue-apps/**,js/mock/**/*,**-dev.*,**/vue-apps + + + + com.github.eirslett + frontend-maven-plugin + + + diff --git a/webapp/portlet/pom.xml b/webapp/portlet/pom.xml deleted file mode 100644 index 771a4fa81b7..00000000000 --- a/webapp/portlet/pom.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - - 4.0.0 - - social-webapp - io.meeds.social - 7.0.x-SNAPSHOT - - social-webapp-portlet - war - Meeds:: PLF:: Social Portlet Web App - Meeds Social Portlet Web App - - - ${project.groupId} - social-component-web - provided - - - - io.meeds.platform-ui - platform-ui-skin - sources - provided - - - - social-portlet - - - maven-resources-plugin - - - less-copy-resources - generate-sources - - copy-resources - - - ${project.build.directory}/src/main/webapp/skin/less - - - src/main/webapp/skin/less - - - - - - - - maven-dependency-plugin - - - platform-ui-src - initialize - - unpack-dependencies - - - platform-ui-skin - ${project.build.directory}/src/main/webapp - - - - - - org.lesscss - lesscss-maven-plugin - - - core - - ${project.build.directory}/src/main/webapp/skin/less - ${project.build.directory}/${project.build.finalName}/skin/css - false - - portlet/ActivitySearch/Style.less - portlet/ActivityStream/Style.less - portlet/GettingStarted/Style.less - portlet/HamburgerMenu/Style.less - portlet/IDMGroupsManagement/Style.less - portlet/IDMMembershipTypesManagement/Style.less - portlet/IDMUsersManagement/Style.less - portlet/PeopleList/Style.less - portlet/PeopleOverview/Style.less - portlet/ProfileAboutMe/Style.less - portlet/ProfileContactInformation/Style.less - portlet/ProfileHeader/Style.less - portlet/ProfileSearch/Style.less - portlet/ProfileSettings/Style.less - portlet/ProfileWorkExperience/Style.less - portlet/Search/Style.less - portlet/SpaceHeader/Style.less - portlet/SpaceInfos/Style.less - portlet/SpaceMenu/Style.less - portlet/SpacesAdministration/Style.less - portlet/SpacesListExternal/Style.less - portlet/SpacesOverview/Style.less - portlet/SuggestionsPeopleAndSpace/Style.less - portlet/TopBarMenu/Style.less - portlet/VerticalMenu/Style.less - common/siteDetails/Style.less - common/AdministrationSite/Style.less - portlet/organizational-chart/Style.less - - portlet/TopBarNotification/Style.less - - standalone-pages/AccountSetup.less - standalone-pages/Login.less - - - - compile - - - - - - org.apache.maven.plugins - maven-war-plugin - - false - WEB-INF/lib/*.jar,**/*.less,**/less/**,**/*.vue,css/lib/*,vue-apps/**,js/mock/**/*,**-dev.*,**/vue-apps - - - - com.github.eirslett - frontend-maven-plugin - - - - diff --git a/webapp/portlet/src/main/java/org/exoplatform/social/portlet/SpaceHeaderPortlet.java b/webapp/portlet/src/main/java/org/exoplatform/social/portlet/SpaceHeaderPortlet.java deleted file mode 100644 index 3aad09b38aa..00000000000 --- a/webapp/portlet/src/main/java/org/exoplatform/social/portlet/SpaceHeaderPortlet.java +++ /dev/null @@ -1,107 +0,0 @@ -package org.exoplatform.social.portlet; - -import java.io.IOException; -import java.util.*; - -import javax.portlet.*; -import jakarta.servlet.http.HttpServletRequest; - -import org.apache.commons.lang3.StringUtils; - -import org.exoplatform.portal.config.model.Page; -import org.exoplatform.portal.mop.PageType; -import org.exoplatform.portal.mop.user.UserNode; -import org.exoplatform.portal.webui.util.Util; -import org.exoplatform.services.log.ExoLogger; -import org.exoplatform.services.log.Log; -import org.exoplatform.social.core.space.SpaceUtils; -import org.exoplatform.social.core.space.model.Space; - -/** - * @deprecated use SpaceBannerPortlet instead - */ -@Deprecated(forRemoval = true, since = "7.0") -public class SpaceHeaderPortlet extends GenericPortlet { - - private static final Log LOG = ExoLogger.getLogger(SpaceHeaderPortlet.class); - - private String viewDispatchedPath; - - @Override - public void init(PortletConfig config) throws PortletException { - super.init(config); - viewDispatchedPath = config.getInitParameter("portlet-view-dispatched-file-path"); - if (StringUtils.isBlank(viewDispatchedPath)) { - throw new IllegalStateException("Portlet init parameter 'portlet-view-dispatched-file-path' is mandatory"); - } - } - - @Override - public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException { - Space space = SpaceUtils.getSpaceByContext(); - if (space == null) { - return; - } - - HttpServletRequest httpRequest = Util.getPortalRequestContext().getRequest(); - // If menu is not displayed yet in top bar, then display it with the banner - // (like for intranet) - boolean isMenuPortletDisplayed = httpRequest.getAttribute("SPACE_MENU_DISPLAYED") != null; - if (!isMenuPortletDisplayed) { - Locale locale = request.getLocale(); - String currentUser = request.getRemoteUser(); - try { - List navigations = SpaceUtils.getSpaceNavigations(space, - locale, - currentUser); - request.setAttribute("navigations", navigations); - - Map navigationMap = new HashMap<>(); - navigations.stream().forEach(userNode -> { - if (userNode.getPageRef() != null) { - Page navigationNodePage = SpaceUtils.getLayoutService().getPage(userNode.getPageRef()); - if (PageType.LINK.equals(PageType.valueOf(navigationNodePage.getType()))) { - navigationMap.put(userNode.getId(), navigationNodePage.getLink()); - } else { - navigationMap.put(userNode.getId(), SpaceUtils.getUri(userNode)); - } - } else { - navigationMap.put(userNode.getId(), SpaceUtils.getUri(userNode)); - } - }); - request.setAttribute("navigationsUri", navigationMap); - - UserNode selectedUserNode = Util.getUIPortal().getSelectedUserNode(); - request.setAttribute("selectedUri", navigationMap.get(selectedUserNode.getId())); - request.setAttribute("isSpaceHome", SpaceUtils.isHomeNavigation(selectedUserNode)); - - SpaceUtils.setPageTitle(navigations, request, space, locale); - } catch (Exception e) { - LOG.warn("Error displaying space menu", e); - } - } - - boolean isHeaderAlreadyDisplayed = httpRequest.getAttribute("SPACE_HEADER_DISPLAYED") != null; - if (isHeaderAlreadyDisplayed) { - return; - } else { - httpRequest.setAttribute("SPACE_HEADER_DISPLAYED", true); - - try { - UserNode selectedUserNode = Util.getUIPortal().getSelectedUserNode(); - // Display header only on homepage of space or the topbar menu is not - // displayed - if (isMenuPortletDisplayed && !SpaceUtils.isHomeNavigation(selectedUserNode)) { - return; - } - } catch (Exception e) { - LOG.error("Error retrieving current navigation node", e); - return; - } - } - - PortletRequestDispatcher requestDispatcher = getPortletContext().getRequestDispatcher(viewDispatchedPath); - requestDispatcher.include(request, response); - } - -} diff --git a/webapp/portlet/src/main/java/org/exoplatform/social/portlet/SpaceMenuPortlet.java b/webapp/portlet/src/main/java/org/exoplatform/social/portlet/SpaceMenuPortlet.java deleted file mode 100644 index 0478da67857..00000000000 --- a/webapp/portlet/src/main/java/org/exoplatform/social/portlet/SpaceMenuPortlet.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.exoplatform.social.portlet; - -import java.io.IOException; -import java.util.*; - -import javax.portlet.*; -import jakarta.servlet.http.HttpServletRequest; - -import org.apache.commons.lang3.StringUtils; - -import org.exoplatform.portal.config.model.Page; -import org.exoplatform.portal.mop.PageType; -import org.exoplatform.portal.mop.user.UserNode; -import org.exoplatform.portal.webui.util.Util; -import org.exoplatform.services.log.ExoLogger; -import org.exoplatform.services.log.Log; -import org.exoplatform.social.core.space.SpaceUtils; -import org.exoplatform.social.core.space.model.Space; - -/** - * @deprecated use SpaceBannerPortlet instead - */ -@Deprecated(forRemoval = true, since = "7.0") -public class SpaceMenuPortlet extends GenericPortlet { - - private static final Log LOG = ExoLogger.getLogger(SpaceMenuPortlet.class); - - private String viewDispatchedPath; - - @Override - public void init(PortletConfig config) throws PortletException { - super.init(config); - viewDispatchedPath = config.getInitParameter("portlet-view-dispatched-file-path"); - if (StringUtils.isBlank(viewDispatchedPath)) { - throw new IllegalStateException("Portlet init parameter 'portlet-view-dispatched-file-path' is mandatory"); - } - } - - @Override - public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException { - Space space = SpaceUtils.getSpaceByContext(); - if (space == null) { - return; - } - - HttpServletRequest httpRequest = Util.getPortalRequestContext().getRequest(); - httpRequest.setAttribute("SPACE_MENU_DISPLAYED", true); - - Locale locale = request.getLocale(); - String currentUser = request.getRemoteUser(); - try { - List navigations = SpaceUtils.getSpaceNavigations(space, - locale, - currentUser); - request.setAttribute("navigations", navigations); - - Map navigationMap = new HashMap<>(); - navigations.stream().forEach(userNode -> { - if (userNode.getPageRef() != null) { - Page navigationNodePage = SpaceUtils.getLayoutService().getPage(userNode.getPageRef()); - if (PageType.LINK.equals(PageType.valueOf(navigationNodePage.getType()))) { - navigationMap.put(userNode.getId(), navigationNodePage.getLink()); - } else { - navigationMap.put(userNode.getId(), SpaceUtils.getUri(userNode)); - } - } else { - navigationMap.put(userNode.getId(), SpaceUtils.getUri(userNode)); - } - }); - request.setAttribute("navigationsUri", navigationMap); - - UserNode selectedUserNode = Util.getUIPortal().getSelectedUserNode(); - request.setAttribute("selectedUri", navigationMap.get(selectedUserNode.getId())); - request.setAttribute("isSpaceHome", SpaceUtils.isHomeNavigation(selectedUserNode)); - - SpaceUtils.setPageTitle(navigations, request, space, locale); - } catch (Exception e) { - LOG.warn("Error displaying space menu", e); - } - - PortletRequestDispatcher requestDispatcher = getPortletContext().getRequestDispatcher(viewDispatchedPath); - requestDispatcher.include(request, response); - } -} diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceHeader.jsp b/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceHeader.jsp deleted file mode 100644 index b83f40523ee..00000000000 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceHeader.jsp +++ /dev/null @@ -1,89 +0,0 @@ -<%@page import="org.exoplatform.social.core.space.spi.SpaceService"%> -<%@page import="org.exoplatform.social.core.identity.model.Identity"%> -<%@page import="org.exoplatform.social.core.space.model.Space"%> -<%@page import="org.exoplatform.social.core.space.SpaceUtils"%> -<%@page import="org.exoplatform.social.core.identity.provider.SpaceIdentityProvider"%> -<%@page import="org.exoplatform.commons.utils.CommonsUtils"%> -<%@page import="org.exoplatform.social.core.manager.IdentityManager"%> -<%@page import="java.util.Map"%> -<%@page import="java.util.Iterator"%> -<%@page import="org.exoplatform.portal.mop.user.UserNode"%> -<%@page import="java.util.List"%> -<% - request.setAttribute("SPACE_HEADER_DISPLAYED", true); - - Space space = SpaceUtils.getSpaceByContext(); - String bannerUrl = space.getBannerUrl(); - - IdentityManager identityManager = CommonsUtils.getService(IdentityManager.class); - int maxUploadSize = identityManager.getImageUploadLimit(); - - SpaceService spaceService = CommonsUtils.getService(SpaceService.class); - boolean isAdmin = spaceService.canManageSpace(space, request.getRemoteUser()); - - List navigations = (List) request.getAttribute("navigations"); -%> - -
- -
\ No newline at end of file diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceMenu.jsp b/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceMenu.jsp deleted file mode 100644 index 93377b3ae93..00000000000 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceMenu.jsp +++ /dev/null @@ -1,63 +0,0 @@ -<%@page import="java.util.Map"%> -<%@page import="java.util.Iterator"%> -<%@page import="org.exoplatform.portal.mop.user.UserNode"%> -<%@page import="java.util.List"%> -<%@page import="org.exoplatform.social.core.space.SpaceUtils"%> -<%@page import="org.exoplatform.social.core.space.model.Space"%> -<% -List navigations = (List) request.getAttribute("navigations"); - -if (navigations != null) { - Iterator navIterator = navigations.iterator(); - Map navigationsUri = (Map) request.getAttribute("navigationsUri"); - String selectedUri = (String) request.getAttribute("selectedUri"); - Space space = SpaceUtils.getSpaceByContext(); - String spaceId = space.getId(); -%> -
-
- - - -
-
-<% } %> \ No newline at end of file diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/SpaceHeader/Style.less b/webapp/portlet/src/main/webapp/skin/less/portlet/SpaceHeader/Style.less deleted file mode 100644 index c88e96b8730..00000000000 --- a/webapp/portlet/src/main/webapp/skin/less/portlet/SpaceHeader/Style.less +++ /dev/null @@ -1,50 +0,0 @@ -/** - - This file is part of the Meeds project (https://meeds.io/). - - Copyright (C) 2020 - 2023 Meeds Association contact@meeds.io - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -*/ - -@import "../../variables.less"; -@import "../../mixins.less"; - -#SpaceHeader { - - &.hasNavigations { - margin: 0; - background: #fff !important; - } - - .changeBannerButton { - background: rgba(0, 0, 0, 0.2) !important; - } -} - -#MenuChildren { - width: @singlePageApplicationWidth; - padding: 24px 20px 0 !important; - margin: 0 auto !important; - max-width: 100% !important; - box-sizing: border-box !important; - - .PORTLET-FRAGMENT { - padding-bottom: 0 !important; - margin-bottom: 0 !important; - } -} -#SpacePage #MenuChildren { - display: none; -} diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/SpaceMenu/Style.less b/webapp/portlet/src/main/webapp/skin/less/portlet/SpaceMenu/Style.less deleted file mode 100644 index a33ba84aa6d..00000000000 --- a/webapp/portlet/src/main/webapp/skin/less/portlet/SpaceMenu/Style.less +++ /dev/null @@ -1,83 +0,0 @@ -/** - - This file is part of the Meeds project (https://meeds.io/). - - Copyright (C) 2020 - 2023 Meeds Association contact@meeds.io - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -*/ - -@import "../../variables.less"; -@import "../../mixins.less"; - -.spaceMenuParent { - height: 57px; - - .v-slide-group__wrapper { - height: 57px; - } - - .v-slide-group__prev--disabled, .v-slide-group__next--disabled { - display: none !important; - } - - .v-tabs-bar { - min-height: 57px; - } -} -.hide-scroll .spaceButtomNavigation { - visibility: hidden; -} -.VuetifyApp .v-application .v-footer.spaceButtomNavigation { - position: fixed; - bottom: 0; - width: 100%; - max-width: 100vw !important; - overflow: auto; - left: 0; - transition: none; - transform: none; - box-sizing: border-box; - box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12); - - .v-bottom-navigation { - width: auto; - max-width: none; - box-shadow: none; - transition: none; - transform: none; - - .spaceButtomNavigationItem { - flex: 1 0 auto; - width: auto; - color: @textColor; - - i { - font-size: 24px; - } - - i { - color: @greyColorLighten1; - } - - &.v-btn--active{ - color: @secondaryColor; - - i { - color: @secondaryColor; - } - } - } - } -} diff --git a/webapp/portlet/src/main/webapp/vue-apps/space-menu/components/SpaceMenu.vue b/webapp/portlet/src/main/webapp/vue-apps/space-menu/components/SpaceMenu.vue deleted file mode 100644 index 5afee07ce71..00000000000 --- a/webapp/portlet/src/main/webapp/vue-apps/space-menu/components/SpaceMenu.vue +++ /dev/null @@ -1,155 +0,0 @@ - - - \ No newline at end of file diff --git a/webapp/portlet/src/main/webapp/vue-apps/space-menu/initComponents.js b/webapp/portlet/src/main/webapp/vue-apps/space-menu/initComponents.js deleted file mode 100644 index e4cccc2d931..00000000000 --- a/webapp/portlet/src/main/webapp/vue-apps/space-menu/initComponents.js +++ /dev/null @@ -1,11 +0,0 @@ -import SpaceMenu from './components/SpaceMenu.vue'; -import SpaceMenuItem from './components/SpaceMenuItem.vue'; - -const components = { - 'space-menu': SpaceMenu, - 'space-menu-item': SpaceMenuItem -}; - -for (const key in components) { - Vue.component(key, components[key]); -} diff --git a/webapp/portlet/src/main/webapp/vue-apps/space-menu/main.js b/webapp/portlet/src/main/webapp/vue-apps/space-menu/main.js deleted file mode 100644 index 9a16714bc92..00000000000 --- a/webapp/portlet/src/main/webapp/vue-apps/space-menu/main.js +++ /dev/null @@ -1,28 +0,0 @@ -import './initComponents.js'; - -// get overrided components if exists -if (extensionRegistry) { - const components = extensionRegistry.loadComponents('SpaceMenu', 'SpaceTitleActionComponents'); - if (components && components.length > 0) { - components.forEach(cmp => { - Vue.component(cmp.componentName, cmp.componentOptions); - }); - } -} - -const appId = 'SpaceMenu'; -const cacheId = `${appId}_${eXo.env.portal.spaceId}`; - -export function init(settings) { - const appElement = document.createElement('div'); - appElement.id = appId; - - Vue.createApp({ - data: { - navigations: settings && settings.navigations, - selectedNavigationUri: settings && settings.selectedNavigationUri, - }, - template: ``, - vuetify: Vue.prototype.vuetifyOptions, - }, appElement, 'Space Menu'); -} diff --git a/webapp/portlet/src/main/webapp/vue-apps/spaces-administration/components/modal/SpaceHomeLayoutResetConfirm.vue b/webapp/portlet/src/main/webapp/vue-apps/spaces-administration/components/modal/SpaceHomeLayoutResetConfirm.vue deleted file mode 100644 index 311297f97d3..00000000000 --- a/webapp/portlet/src/main/webapp/vue-apps/spaces-administration/components/modal/SpaceHomeLayoutResetConfirm.vue +++ /dev/null @@ -1,63 +0,0 @@ - - - - \ No newline at end of file diff --git a/webapp/src/main/java/io/meeds/social/SocialApplication.java b/webapp/src/main/java/io/meeds/social/SocialApplication.java new file mode 100644 index 00000000000..23d7d67737b --- /dev/null +++ b/webapp/src/main/java/io/meeds/social/SocialApplication.java @@ -0,0 +1,42 @@ +/* + * This file is part of the Meeds project (https://meeds.io/). + * Copyright (C) 2020 - 2022 Meeds Association contact@meeds.io + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package io.meeds.social; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration; +import org.springframework.context.annotation.PropertySource; +import org.springframework.data.jpa.repository.config.EnableJpaRepositories; + +import io.meeds.spring.AvailableIntegration; +import io.meeds.spring.kernel.PortalApplicationContextInitializer; + +@SpringBootApplication(scanBasePackages = { + SocialApplication.MODULE_NAME, + AvailableIntegration.KERNEL_MODULE, + AvailableIntegration.JPA_MODULE, + AvailableIntegration.WEB_MODULE, +}, exclude = { + LiquibaseAutoConfiguration.class, +}) +@EnableJpaRepositories(basePackages = SocialApplication.MODULE_NAME) +@PropertySource("classpath:application.properties") +@PropertySource("classpath:application-common.properties") +@PropertySource("classpath:social.properties") +public class SocialApplication extends PortalApplicationContextInitializer { + + public static final String MODULE_NAME = "io.meeds.social"; + +} diff --git a/webapp/portlet/src/main/java/io/meeds/social/portlet/ImagePortlet.java b/webapp/src/main/java/io/meeds/social/portlet/ImagePortlet.java similarity index 100% rename from webapp/portlet/src/main/java/io/meeds/social/portlet/ImagePortlet.java rename to webapp/src/main/java/io/meeds/social/portlet/ImagePortlet.java diff --git a/webapp/portlet/src/main/java/io/meeds/social/portlet/LinkPortlet.java b/webapp/src/main/java/io/meeds/social/portlet/LinkPortlet.java similarity index 100% rename from webapp/portlet/src/main/java/io/meeds/social/portlet/LinkPortlet.java rename to webapp/src/main/java/io/meeds/social/portlet/LinkPortlet.java diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_ar.properties b/webapp/src/main/resources/locale/notification/template/Notification_ar.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_ar.properties rename to webapp/src/main/resources/locale/notification/template/Notification_ar.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_aro.properties b/webapp/src/main/resources/locale/notification/template/Notification_aro.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_aro.properties rename to webapp/src/main/resources/locale/notification/template/Notification_aro.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_az.properties b/webapp/src/main/resources/locale/notification/template/Notification_az.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_az.properties rename to webapp/src/main/resources/locale/notification/template/Notification_az.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_ca.properties b/webapp/src/main/resources/locale/notification/template/Notification_ca.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_ca.properties rename to webapp/src/main/resources/locale/notification/template/Notification_ca.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_ceb.properties b/webapp/src/main/resources/locale/notification/template/Notification_ceb.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_ceb.properties rename to webapp/src/main/resources/locale/notification/template/Notification_ceb.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_co.properties b/webapp/src/main/resources/locale/notification/template/Notification_co.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_co.properties rename to webapp/src/main/resources/locale/notification/template/Notification_co.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_cs.properties b/webapp/src/main/resources/locale/notification/template/Notification_cs.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_cs.properties rename to webapp/src/main/resources/locale/notification/template/Notification_cs.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_de.properties b/webapp/src/main/resources/locale/notification/template/Notification_de.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_de.properties rename to webapp/src/main/resources/locale/notification/template/Notification_de.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_el.properties b/webapp/src/main/resources/locale/notification/template/Notification_el.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_el.properties rename to webapp/src/main/resources/locale/notification/template/Notification_el.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_en.properties b/webapp/src/main/resources/locale/notification/template/Notification_en.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_en.properties rename to webapp/src/main/resources/locale/notification/template/Notification_en.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_es_ES.properties b/webapp/src/main/resources/locale/notification/template/Notification_es_ES.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_es_ES.properties rename to webapp/src/main/resources/locale/notification/template/Notification_es_ES.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_eu.properties b/webapp/src/main/resources/locale/notification/template/Notification_eu.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_eu.properties rename to webapp/src/main/resources/locale/notification/template/Notification_eu.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_fa.properties b/webapp/src/main/resources/locale/notification/template/Notification_fa.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_fa.properties rename to webapp/src/main/resources/locale/notification/template/Notification_fa.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_fi.properties b/webapp/src/main/resources/locale/notification/template/Notification_fi.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_fi.properties rename to webapp/src/main/resources/locale/notification/template/Notification_fi.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_fil.properties b/webapp/src/main/resources/locale/notification/template/Notification_fil.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_fil.properties rename to webapp/src/main/resources/locale/notification/template/Notification_fil.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_fr.properties b/webapp/src/main/resources/locale/notification/template/Notification_fr.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_fr.properties rename to webapp/src/main/resources/locale/notification/template/Notification_fr.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_he.properties b/webapp/src/main/resources/locale/notification/template/Notification_he.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_he.properties rename to webapp/src/main/resources/locale/notification/template/Notification_he.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_hi.properties b/webapp/src/main/resources/locale/notification/template/Notification_hi.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_hi.properties rename to webapp/src/main/resources/locale/notification/template/Notification_hi.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_hu.properties b/webapp/src/main/resources/locale/notification/template/Notification_hu.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_hu.properties rename to webapp/src/main/resources/locale/notification/template/Notification_hu.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_id.properties b/webapp/src/main/resources/locale/notification/template/Notification_id.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_id.properties rename to webapp/src/main/resources/locale/notification/template/Notification_id.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_in.properties b/webapp/src/main/resources/locale/notification/template/Notification_in.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_in.properties rename to webapp/src/main/resources/locale/notification/template/Notification_in.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_it.properties b/webapp/src/main/resources/locale/notification/template/Notification_it.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_it.properties rename to webapp/src/main/resources/locale/notification/template/Notification_it.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_ja.properties b/webapp/src/main/resources/locale/notification/template/Notification_ja.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_ja.properties rename to webapp/src/main/resources/locale/notification/template/Notification_ja.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_kab.properties b/webapp/src/main/resources/locale/notification/template/Notification_kab.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_kab.properties rename to webapp/src/main/resources/locale/notification/template/Notification_kab.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_ko.properties b/webapp/src/main/resources/locale/notification/template/Notification_ko.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_ko.properties rename to webapp/src/main/resources/locale/notification/template/Notification_ko.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_lt.properties b/webapp/src/main/resources/locale/notification/template/Notification_lt.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_lt.properties rename to webapp/src/main/resources/locale/notification/template/Notification_lt.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_ms.properties b/webapp/src/main/resources/locale/notification/template/Notification_ms.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_ms.properties rename to webapp/src/main/resources/locale/notification/template/Notification_ms.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_nl.properties b/webapp/src/main/resources/locale/notification/template/Notification_nl.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_nl.properties rename to webapp/src/main/resources/locale/notification/template/Notification_nl.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_no.properties b/webapp/src/main/resources/locale/notification/template/Notification_no.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_no.properties rename to webapp/src/main/resources/locale/notification/template/Notification_no.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_pcm.properties b/webapp/src/main/resources/locale/notification/template/Notification_pcm.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_pcm.properties rename to webapp/src/main/resources/locale/notification/template/Notification_pcm.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_pl.properties b/webapp/src/main/resources/locale/notification/template/Notification_pl.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_pl.properties rename to webapp/src/main/resources/locale/notification/template/Notification_pl.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_pt_BR.properties b/webapp/src/main/resources/locale/notification/template/Notification_pt_BR.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_pt_BR.properties rename to webapp/src/main/resources/locale/notification/template/Notification_pt_BR.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_pt_PT.properties b/webapp/src/main/resources/locale/notification/template/Notification_pt_PT.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_pt_PT.properties rename to webapp/src/main/resources/locale/notification/template/Notification_pt_PT.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_ro.properties b/webapp/src/main/resources/locale/notification/template/Notification_ro.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_ro.properties rename to webapp/src/main/resources/locale/notification/template/Notification_ro.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_ru.properties b/webapp/src/main/resources/locale/notification/template/Notification_ru.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_ru.properties rename to webapp/src/main/resources/locale/notification/template/Notification_ru.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_sk.properties b/webapp/src/main/resources/locale/notification/template/Notification_sk.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_sk.properties rename to webapp/src/main/resources/locale/notification/template/Notification_sk.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_sl.properties b/webapp/src/main/resources/locale/notification/template/Notification_sl.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_sl.properties rename to webapp/src/main/resources/locale/notification/template/Notification_sl.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_sq.properties b/webapp/src/main/resources/locale/notification/template/Notification_sq.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_sq.properties rename to webapp/src/main/resources/locale/notification/template/Notification_sq.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_sv_SE.properties b/webapp/src/main/resources/locale/notification/template/Notification_sv_SE.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_sv_SE.properties rename to webapp/src/main/resources/locale/notification/template/Notification_sv_SE.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_th.properties b/webapp/src/main/resources/locale/notification/template/Notification_th.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_th.properties rename to webapp/src/main/resources/locale/notification/template/Notification_th.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_tl.properties b/webapp/src/main/resources/locale/notification/template/Notification_tl.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_tl.properties rename to webapp/src/main/resources/locale/notification/template/Notification_tl.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_tr.properties b/webapp/src/main/resources/locale/notification/template/Notification_tr.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_tr.properties rename to webapp/src/main/resources/locale/notification/template/Notification_tr.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_uk.properties b/webapp/src/main/resources/locale/notification/template/Notification_uk.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_uk.properties rename to webapp/src/main/resources/locale/notification/template/Notification_uk.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_ur_IN.properties b/webapp/src/main/resources/locale/notification/template/Notification_ur_IN.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_ur_IN.properties rename to webapp/src/main/resources/locale/notification/template/Notification_ur_IN.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_vi.properties b/webapp/src/main/resources/locale/notification/template/Notification_vi.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_vi.properties rename to webapp/src/main/resources/locale/notification/template/Notification_vi.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_zh_CN.properties b/webapp/src/main/resources/locale/notification/template/Notification_zh_CN.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_zh_CN.properties rename to webapp/src/main/resources/locale/notification/template/Notification_zh_CN.properties diff --git a/extension/war/src/main/resources/locale/notification/template/Notification_zh_TW.properties b/webapp/src/main/resources/locale/notification/template/Notification_zh_TW.properties similarity index 100% rename from extension/war/src/main/resources/locale/notification/template/Notification_zh_TW.properties rename to webapp/src/main/resources/locale/notification/template/Notification_zh_TW.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_ar.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_ar.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_ar.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_ar.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_aro.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_aro.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_aro.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_aro.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_az.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_az.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_az.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_az.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_ca.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_ca.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_ca.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_ca.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_ceb.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_ceb.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_ceb.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_ceb.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_co.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_co.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_co.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_co.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_cs.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_cs.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_cs.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_cs.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_de.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_de.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_de.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_de.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_el.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_el.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_el.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_el.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_en.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_en.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_en.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_en.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_es_ES.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_es_ES.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_es_ES.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_es_ES.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_eu.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_eu.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_eu.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_eu.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_fa.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_fa.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_fa.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_fa.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_fi.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_fi.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_fi.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_fi.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_fil.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_fil.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_fil.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_fil.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_fr.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_fr.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_fr.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_fr.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_hi.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_hi.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_hi.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_hi.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_hu.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_hu.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_hu.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_hu.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_id.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_id.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_id.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_id.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_in.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_in.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_in.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_in.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_it.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_it.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_it.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_it.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_ja.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_ja.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_ja.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_ja.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_kab.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_kab.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_kab.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_kab.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_ko.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_ko.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_ko.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_ko.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_lt.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_lt.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_lt.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_lt.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_ms.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_ms.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_ms.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_ms.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_nl.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_nl.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_nl.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_nl.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_no.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_no.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_no.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_no.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_pcm.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_pcm.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_pcm.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_pcm.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_pl.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_pl.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_pl.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_pl.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_pt_BR.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_pt_BR.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_pt_BR.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_pt_BR.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_pt_PT.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_pt_PT.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_pt_PT.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_pt_PT.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_ro.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_ro.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_ro.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_ro.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_ru.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_ru.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_ru.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_ru.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_sk.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_sk.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_sk.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_sk.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_sl.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_sl.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_sl.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_sl.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_sq.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_sq.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_sq.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_sq.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_sv_SE.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_sv_SE.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_sv_SE.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_sv_SE.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_th.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_th.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_th.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_th.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_tl.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_tl.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_tl.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_tl.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_tr.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_tr.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_tr.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_tr.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_uk.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_uk.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_uk.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_uk.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_ur_IN.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_ur_IN.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_ur_IN.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_ur_IN.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_vi.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_vi.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_vi.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_vi.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_zh_CN.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_zh_CN.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_zh_CN.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_zh_CN.properties diff --git a/extension/war/src/main/resources/locale/portal/HamburgerMenu_zh_TW.properties b/webapp/src/main/resources/locale/portal/HamburgerMenu_zh_TW.properties similarity index 100% rename from extension/war/src/main/resources/locale/portal/HamburgerMenu_zh_TW.properties rename to webapp/src/main/resources/locale/portal/HamburgerMenu_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_ar.properties b/webapp/src/main/resources/locale/portal_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_ar.properties rename to webapp/src/main/resources/locale/portal_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_aro.properties b/webapp/src/main/resources/locale/portal_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_aro.properties rename to webapp/src/main/resources/locale/portal_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_az.properties b/webapp/src/main/resources/locale/portal_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_az.properties rename to webapp/src/main/resources/locale/portal_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_ca.properties b/webapp/src/main/resources/locale/portal_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_ca.properties rename to webapp/src/main/resources/locale/portal_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_ceb.properties b/webapp/src/main/resources/locale/portal_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_ceb.properties rename to webapp/src/main/resources/locale/portal_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_co.properties b/webapp/src/main/resources/locale/portal_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_co.properties rename to webapp/src/main/resources/locale/portal_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_cs.properties b/webapp/src/main/resources/locale/portal_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_cs.properties rename to webapp/src/main/resources/locale/portal_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_de.properties b/webapp/src/main/resources/locale/portal_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_de.properties rename to webapp/src/main/resources/locale/portal_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_el.properties b/webapp/src/main/resources/locale/portal_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_el.properties rename to webapp/src/main/resources/locale/portal_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_en.properties b/webapp/src/main/resources/locale/portal_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_en.properties rename to webapp/src/main/resources/locale/portal_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_es_ES.properties b/webapp/src/main/resources/locale/portal_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_es_ES.properties rename to webapp/src/main/resources/locale/portal_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_eu.properties b/webapp/src/main/resources/locale/portal_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_eu.properties rename to webapp/src/main/resources/locale/portal_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_fa.properties b/webapp/src/main/resources/locale/portal_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_fa.properties rename to webapp/src/main/resources/locale/portal_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_fi.properties b/webapp/src/main/resources/locale/portal_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_fi.properties rename to webapp/src/main/resources/locale/portal_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_fil.properties b/webapp/src/main/resources/locale/portal_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_fil.properties rename to webapp/src/main/resources/locale/portal_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_fr.properties b/webapp/src/main/resources/locale/portal_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_fr.properties rename to webapp/src/main/resources/locale/portal_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_he.properties b/webapp/src/main/resources/locale/portal_he.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_he.properties rename to webapp/src/main/resources/locale/portal_he.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_hi.properties b/webapp/src/main/resources/locale/portal_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_hi.properties rename to webapp/src/main/resources/locale/portal_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_hu.properties b/webapp/src/main/resources/locale/portal_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_hu.properties rename to webapp/src/main/resources/locale/portal_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_id.properties b/webapp/src/main/resources/locale/portal_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_id.properties rename to webapp/src/main/resources/locale/portal_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_in.properties b/webapp/src/main/resources/locale/portal_in.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_in.properties rename to webapp/src/main/resources/locale/portal_in.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_it.properties b/webapp/src/main/resources/locale/portal_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_it.properties rename to webapp/src/main/resources/locale/portal_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_ja.properties b/webapp/src/main/resources/locale/portal_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_ja.properties rename to webapp/src/main/resources/locale/portal_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_kab.properties b/webapp/src/main/resources/locale/portal_kab.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_kab.properties rename to webapp/src/main/resources/locale/portal_kab.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_ko.properties b/webapp/src/main/resources/locale/portal_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_ko.properties rename to webapp/src/main/resources/locale/portal_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_lt.properties b/webapp/src/main/resources/locale/portal_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_lt.properties rename to webapp/src/main/resources/locale/portal_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_ms.properties b/webapp/src/main/resources/locale/portal_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_ms.properties rename to webapp/src/main/resources/locale/portal_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_nl.properties b/webapp/src/main/resources/locale/portal_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_nl.properties rename to webapp/src/main/resources/locale/portal_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_no.properties b/webapp/src/main/resources/locale/portal_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_no.properties rename to webapp/src/main/resources/locale/portal_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_pcm.properties b/webapp/src/main/resources/locale/portal_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_pcm.properties rename to webapp/src/main/resources/locale/portal_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_pl.properties b/webapp/src/main/resources/locale/portal_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_pl.properties rename to webapp/src/main/resources/locale/portal_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_pt_BR.properties b/webapp/src/main/resources/locale/portal_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_pt_BR.properties rename to webapp/src/main/resources/locale/portal_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_pt_PT.properties b/webapp/src/main/resources/locale/portal_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_pt_PT.properties rename to webapp/src/main/resources/locale/portal_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_ro.properties b/webapp/src/main/resources/locale/portal_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_ro.properties rename to webapp/src/main/resources/locale/portal_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_ru.properties b/webapp/src/main/resources/locale/portal_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_ru.properties rename to webapp/src/main/resources/locale/portal_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_sk.properties b/webapp/src/main/resources/locale/portal_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_sk.properties rename to webapp/src/main/resources/locale/portal_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_sl.properties b/webapp/src/main/resources/locale/portal_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_sl.properties rename to webapp/src/main/resources/locale/portal_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_sq.properties b/webapp/src/main/resources/locale/portal_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_sq.properties rename to webapp/src/main/resources/locale/portal_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_sv_SE.properties b/webapp/src/main/resources/locale/portal_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_sv_SE.properties rename to webapp/src/main/resources/locale/portal_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_th.properties b/webapp/src/main/resources/locale/portal_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_th.properties rename to webapp/src/main/resources/locale/portal_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_tl.properties b/webapp/src/main/resources/locale/portal_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_tl.properties rename to webapp/src/main/resources/locale/portal_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_tr.properties b/webapp/src/main/resources/locale/portal_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_tr.properties rename to webapp/src/main/resources/locale/portal_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_uk.properties b/webapp/src/main/resources/locale/portal_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_uk.properties rename to webapp/src/main/resources/locale/portal_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_ur_IN.properties b/webapp/src/main/resources/locale/portal_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_ur_IN.properties rename to webapp/src/main/resources/locale/portal_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_vi.properties b/webapp/src/main/resources/locale/portal_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_vi.properties rename to webapp/src/main/resources/locale/portal_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_zh_CN.properties b/webapp/src/main/resources/locale/portal_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_zh_CN.properties rename to webapp/src/main/resources/locale/portal_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portal_zh_TW.properties b/webapp/src/main/resources/locale/portal_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portal_zh_TW.properties rename to webapp/src/main/resources/locale/portal_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_ar.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_ar.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_aro.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_aro.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_az.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_az.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_ca.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_ca.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_ceb.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_ceb.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_co.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_co.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_cs.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_cs.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_de.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_de.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_el.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_el.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_en.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_en.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_es_ES.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_es_ES.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_eu.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_eu.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_fa.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_fa.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_fi.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_fi.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_fil.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_fil.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_fr.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_fr.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_hi.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_hi.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_hu.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_hu.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_id.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_id.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_in.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_in.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_in.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_in.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_it.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_it.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_ja.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_ja.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_ko.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_ko.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_lt.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_lt.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_ms.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_ms.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_nl.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_nl.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_no.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_no.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_pcm.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_pcm.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_pl.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_pl.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_pt_BR.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_pt_PT.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_ro.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_ro.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_ru.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_ru.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_sk.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_sk.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_sl.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_sl.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_sq.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_sq.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_sv_SE.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_th.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_th.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_tl.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_tl.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_tr.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_tr.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_uk.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_uk.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_ur_IN.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_vi.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_vi.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_zh_CN.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_zh_TW.properties b/webapp/src/main/resources/locale/portlet/GeneralSettings_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/GeneralSettings_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/GeneralSettings_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_ar.properties b/webapp/src/main/resources/locale/portlet/Image_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_ar.properties rename to webapp/src/main/resources/locale/portlet/Image_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_aro.properties b/webapp/src/main/resources/locale/portlet/Image_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_aro.properties rename to webapp/src/main/resources/locale/portlet/Image_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_az.properties b/webapp/src/main/resources/locale/portlet/Image_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_az.properties rename to webapp/src/main/resources/locale/portlet/Image_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_ca.properties b/webapp/src/main/resources/locale/portlet/Image_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_ca.properties rename to webapp/src/main/resources/locale/portlet/Image_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_ceb.properties b/webapp/src/main/resources/locale/portlet/Image_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_ceb.properties rename to webapp/src/main/resources/locale/portlet/Image_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_co.properties b/webapp/src/main/resources/locale/portlet/Image_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_co.properties rename to webapp/src/main/resources/locale/portlet/Image_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_cs.properties b/webapp/src/main/resources/locale/portlet/Image_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_cs.properties rename to webapp/src/main/resources/locale/portlet/Image_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_de.properties b/webapp/src/main/resources/locale/portlet/Image_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_de.properties rename to webapp/src/main/resources/locale/portlet/Image_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_el.properties b/webapp/src/main/resources/locale/portlet/Image_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_el.properties rename to webapp/src/main/resources/locale/portlet/Image_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_en.properties b/webapp/src/main/resources/locale/portlet/Image_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_en.properties rename to webapp/src/main/resources/locale/portlet/Image_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_es_ES.properties b/webapp/src/main/resources/locale/portlet/Image_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_es_ES.properties rename to webapp/src/main/resources/locale/portlet/Image_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_eu.properties b/webapp/src/main/resources/locale/portlet/Image_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_eu.properties rename to webapp/src/main/resources/locale/portlet/Image_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_fa.properties b/webapp/src/main/resources/locale/portlet/Image_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_fa.properties rename to webapp/src/main/resources/locale/portlet/Image_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_fi.properties b/webapp/src/main/resources/locale/portlet/Image_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_fi.properties rename to webapp/src/main/resources/locale/portlet/Image_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_fil.properties b/webapp/src/main/resources/locale/portlet/Image_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_fil.properties rename to webapp/src/main/resources/locale/portlet/Image_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_fr.properties b/webapp/src/main/resources/locale/portlet/Image_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_fr.properties rename to webapp/src/main/resources/locale/portlet/Image_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_hi.properties b/webapp/src/main/resources/locale/portlet/Image_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_hi.properties rename to webapp/src/main/resources/locale/portlet/Image_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_hu.properties b/webapp/src/main/resources/locale/portlet/Image_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_hu.properties rename to webapp/src/main/resources/locale/portlet/Image_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_id.properties b/webapp/src/main/resources/locale/portlet/Image_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_id.properties rename to webapp/src/main/resources/locale/portlet/Image_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_it.properties b/webapp/src/main/resources/locale/portlet/Image_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_it.properties rename to webapp/src/main/resources/locale/portlet/Image_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_ja.properties b/webapp/src/main/resources/locale/portlet/Image_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_ja.properties rename to webapp/src/main/resources/locale/portlet/Image_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_ko.properties b/webapp/src/main/resources/locale/portlet/Image_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_ko.properties rename to webapp/src/main/resources/locale/portlet/Image_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_lt.properties b/webapp/src/main/resources/locale/portlet/Image_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_lt.properties rename to webapp/src/main/resources/locale/portlet/Image_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_ms.properties b/webapp/src/main/resources/locale/portlet/Image_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_ms.properties rename to webapp/src/main/resources/locale/portlet/Image_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_nl.properties b/webapp/src/main/resources/locale/portlet/Image_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_nl.properties rename to webapp/src/main/resources/locale/portlet/Image_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_no.properties b/webapp/src/main/resources/locale/portlet/Image_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_no.properties rename to webapp/src/main/resources/locale/portlet/Image_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_pcm.properties b/webapp/src/main/resources/locale/portlet/Image_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_pcm.properties rename to webapp/src/main/resources/locale/portlet/Image_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_pl.properties b/webapp/src/main/resources/locale/portlet/Image_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_pl.properties rename to webapp/src/main/resources/locale/portlet/Image_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_pt_BR.properties b/webapp/src/main/resources/locale/portlet/Image_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/Image_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_pt_PT.properties b/webapp/src/main/resources/locale/portlet/Image_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/Image_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_ro.properties b/webapp/src/main/resources/locale/portlet/Image_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_ro.properties rename to webapp/src/main/resources/locale/portlet/Image_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_ru.properties b/webapp/src/main/resources/locale/portlet/Image_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_ru.properties rename to webapp/src/main/resources/locale/portlet/Image_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_sk.properties b/webapp/src/main/resources/locale/portlet/Image_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_sk.properties rename to webapp/src/main/resources/locale/portlet/Image_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_sl.properties b/webapp/src/main/resources/locale/portlet/Image_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_sl.properties rename to webapp/src/main/resources/locale/portlet/Image_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_sq.properties b/webapp/src/main/resources/locale/portlet/Image_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_sq.properties rename to webapp/src/main/resources/locale/portlet/Image_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_sv_SE.properties b/webapp/src/main/resources/locale/portlet/Image_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/Image_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_th.properties b/webapp/src/main/resources/locale/portlet/Image_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_th.properties rename to webapp/src/main/resources/locale/portlet/Image_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_tl.properties b/webapp/src/main/resources/locale/portlet/Image_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_tl.properties rename to webapp/src/main/resources/locale/portlet/Image_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_tr.properties b/webapp/src/main/resources/locale/portlet/Image_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_tr.properties rename to webapp/src/main/resources/locale/portlet/Image_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_uk.properties b/webapp/src/main/resources/locale/portlet/Image_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_uk.properties rename to webapp/src/main/resources/locale/portlet/Image_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_ur_IN.properties b/webapp/src/main/resources/locale/portlet/Image_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/Image_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_vi.properties b/webapp/src/main/resources/locale/portlet/Image_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_vi.properties rename to webapp/src/main/resources/locale/portlet/Image_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_zh_CN.properties b/webapp/src/main/resources/locale/portlet/Image_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/Image_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Image_zh_TW.properties b/webapp/src/main/resources/locale/portlet/Image_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Image_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/Image_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_ar.properties b/webapp/src/main/resources/locale/portlet/Links_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_ar.properties rename to webapp/src/main/resources/locale/portlet/Links_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_aro.properties b/webapp/src/main/resources/locale/portlet/Links_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_aro.properties rename to webapp/src/main/resources/locale/portlet/Links_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_az.properties b/webapp/src/main/resources/locale/portlet/Links_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_az.properties rename to webapp/src/main/resources/locale/portlet/Links_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_ca.properties b/webapp/src/main/resources/locale/portlet/Links_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_ca.properties rename to webapp/src/main/resources/locale/portlet/Links_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_ceb.properties b/webapp/src/main/resources/locale/portlet/Links_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_ceb.properties rename to webapp/src/main/resources/locale/portlet/Links_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_co.properties b/webapp/src/main/resources/locale/portlet/Links_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_co.properties rename to webapp/src/main/resources/locale/portlet/Links_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_cs.properties b/webapp/src/main/resources/locale/portlet/Links_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_cs.properties rename to webapp/src/main/resources/locale/portlet/Links_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_de.properties b/webapp/src/main/resources/locale/portlet/Links_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_de.properties rename to webapp/src/main/resources/locale/portlet/Links_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_el.properties b/webapp/src/main/resources/locale/portlet/Links_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_el.properties rename to webapp/src/main/resources/locale/portlet/Links_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_en.properties b/webapp/src/main/resources/locale/portlet/Links_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_en.properties rename to webapp/src/main/resources/locale/portlet/Links_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_es_ES.properties b/webapp/src/main/resources/locale/portlet/Links_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_es_ES.properties rename to webapp/src/main/resources/locale/portlet/Links_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_eu.properties b/webapp/src/main/resources/locale/portlet/Links_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_eu.properties rename to webapp/src/main/resources/locale/portlet/Links_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_fa.properties b/webapp/src/main/resources/locale/portlet/Links_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_fa.properties rename to webapp/src/main/resources/locale/portlet/Links_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_fi.properties b/webapp/src/main/resources/locale/portlet/Links_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_fi.properties rename to webapp/src/main/resources/locale/portlet/Links_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_fil.properties b/webapp/src/main/resources/locale/portlet/Links_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_fil.properties rename to webapp/src/main/resources/locale/portlet/Links_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_fr.properties b/webapp/src/main/resources/locale/portlet/Links_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_fr.properties rename to webapp/src/main/resources/locale/portlet/Links_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_hi.properties b/webapp/src/main/resources/locale/portlet/Links_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_hi.properties rename to webapp/src/main/resources/locale/portlet/Links_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_hu.properties b/webapp/src/main/resources/locale/portlet/Links_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_hu.properties rename to webapp/src/main/resources/locale/portlet/Links_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_id.properties b/webapp/src/main/resources/locale/portlet/Links_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_id.properties rename to webapp/src/main/resources/locale/portlet/Links_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_in.properties b/webapp/src/main/resources/locale/portlet/Links_in.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_in.properties rename to webapp/src/main/resources/locale/portlet/Links_in.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_it.properties b/webapp/src/main/resources/locale/portlet/Links_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_it.properties rename to webapp/src/main/resources/locale/portlet/Links_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_ja.properties b/webapp/src/main/resources/locale/portlet/Links_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_ja.properties rename to webapp/src/main/resources/locale/portlet/Links_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_ko.properties b/webapp/src/main/resources/locale/portlet/Links_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_ko.properties rename to webapp/src/main/resources/locale/portlet/Links_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_lt.properties b/webapp/src/main/resources/locale/portlet/Links_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_lt.properties rename to webapp/src/main/resources/locale/portlet/Links_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_ms.properties b/webapp/src/main/resources/locale/portlet/Links_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_ms.properties rename to webapp/src/main/resources/locale/portlet/Links_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_nl.properties b/webapp/src/main/resources/locale/portlet/Links_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_nl.properties rename to webapp/src/main/resources/locale/portlet/Links_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_no.properties b/webapp/src/main/resources/locale/portlet/Links_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_no.properties rename to webapp/src/main/resources/locale/portlet/Links_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_pcm.properties b/webapp/src/main/resources/locale/portlet/Links_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_pcm.properties rename to webapp/src/main/resources/locale/portlet/Links_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_pl.properties b/webapp/src/main/resources/locale/portlet/Links_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_pl.properties rename to webapp/src/main/resources/locale/portlet/Links_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_pt_BR.properties b/webapp/src/main/resources/locale/portlet/Links_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/Links_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_pt_PT.properties b/webapp/src/main/resources/locale/portlet/Links_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/Links_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_ro.properties b/webapp/src/main/resources/locale/portlet/Links_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_ro.properties rename to webapp/src/main/resources/locale/portlet/Links_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_ru.properties b/webapp/src/main/resources/locale/portlet/Links_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_ru.properties rename to webapp/src/main/resources/locale/portlet/Links_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_sk.properties b/webapp/src/main/resources/locale/portlet/Links_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_sk.properties rename to webapp/src/main/resources/locale/portlet/Links_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_sl.properties b/webapp/src/main/resources/locale/portlet/Links_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_sl.properties rename to webapp/src/main/resources/locale/portlet/Links_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_sq.properties b/webapp/src/main/resources/locale/portlet/Links_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_sq.properties rename to webapp/src/main/resources/locale/portlet/Links_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_sv_SE.properties b/webapp/src/main/resources/locale/portlet/Links_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/Links_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_th.properties b/webapp/src/main/resources/locale/portlet/Links_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_th.properties rename to webapp/src/main/resources/locale/portlet/Links_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_tl.properties b/webapp/src/main/resources/locale/portlet/Links_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_tl.properties rename to webapp/src/main/resources/locale/portlet/Links_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_tr.properties b/webapp/src/main/resources/locale/portlet/Links_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_tr.properties rename to webapp/src/main/resources/locale/portlet/Links_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_uk.properties b/webapp/src/main/resources/locale/portlet/Links_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_uk.properties rename to webapp/src/main/resources/locale/portlet/Links_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_ur_IN.properties b/webapp/src/main/resources/locale/portlet/Links_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/Links_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_vi.properties b/webapp/src/main/resources/locale/portlet/Links_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_vi.properties rename to webapp/src/main/resources/locale/portlet/Links_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_zh_CN.properties b/webapp/src/main/resources/locale/portlet/Links_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/Links_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Links_zh_TW.properties b/webapp/src/main/resources/locale/portlet/Links_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Links_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/Links_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_ar.properties b/webapp/src/main/resources/locale/portlet/Login_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_ar.properties rename to webapp/src/main/resources/locale/portlet/Login_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_aro.properties b/webapp/src/main/resources/locale/portlet/Login_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_aro.properties rename to webapp/src/main/resources/locale/portlet/Login_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_az.properties b/webapp/src/main/resources/locale/portlet/Login_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_az.properties rename to webapp/src/main/resources/locale/portlet/Login_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_ca.properties b/webapp/src/main/resources/locale/portlet/Login_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_ca.properties rename to webapp/src/main/resources/locale/portlet/Login_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_ceb.properties b/webapp/src/main/resources/locale/portlet/Login_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_ceb.properties rename to webapp/src/main/resources/locale/portlet/Login_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_co.properties b/webapp/src/main/resources/locale/portlet/Login_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_co.properties rename to webapp/src/main/resources/locale/portlet/Login_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_cs.properties b/webapp/src/main/resources/locale/portlet/Login_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_cs.properties rename to webapp/src/main/resources/locale/portlet/Login_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_de.properties b/webapp/src/main/resources/locale/portlet/Login_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_de.properties rename to webapp/src/main/resources/locale/portlet/Login_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_el.properties b/webapp/src/main/resources/locale/portlet/Login_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_el.properties rename to webapp/src/main/resources/locale/portlet/Login_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_en.properties b/webapp/src/main/resources/locale/portlet/Login_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_en.properties rename to webapp/src/main/resources/locale/portlet/Login_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_es_ES.properties b/webapp/src/main/resources/locale/portlet/Login_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_es_ES.properties rename to webapp/src/main/resources/locale/portlet/Login_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_eu.properties b/webapp/src/main/resources/locale/portlet/Login_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_eu.properties rename to webapp/src/main/resources/locale/portlet/Login_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_fa.properties b/webapp/src/main/resources/locale/portlet/Login_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_fa.properties rename to webapp/src/main/resources/locale/portlet/Login_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_fi.properties b/webapp/src/main/resources/locale/portlet/Login_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_fi.properties rename to webapp/src/main/resources/locale/portlet/Login_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_fil.properties b/webapp/src/main/resources/locale/portlet/Login_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_fil.properties rename to webapp/src/main/resources/locale/portlet/Login_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_fr.properties b/webapp/src/main/resources/locale/portlet/Login_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_fr.properties rename to webapp/src/main/resources/locale/portlet/Login_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_hi.properties b/webapp/src/main/resources/locale/portlet/Login_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_hi.properties rename to webapp/src/main/resources/locale/portlet/Login_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_hu.properties b/webapp/src/main/resources/locale/portlet/Login_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_hu.properties rename to webapp/src/main/resources/locale/portlet/Login_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_id.properties b/webapp/src/main/resources/locale/portlet/Login_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_id.properties rename to webapp/src/main/resources/locale/portlet/Login_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_in.properties b/webapp/src/main/resources/locale/portlet/Login_in.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_in.properties rename to webapp/src/main/resources/locale/portlet/Login_in.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_it.properties b/webapp/src/main/resources/locale/portlet/Login_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_it.properties rename to webapp/src/main/resources/locale/portlet/Login_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_ja.properties b/webapp/src/main/resources/locale/portlet/Login_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_ja.properties rename to webapp/src/main/resources/locale/portlet/Login_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_ko.properties b/webapp/src/main/resources/locale/portlet/Login_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_ko.properties rename to webapp/src/main/resources/locale/portlet/Login_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_lt.properties b/webapp/src/main/resources/locale/portlet/Login_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_lt.properties rename to webapp/src/main/resources/locale/portlet/Login_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_ms.properties b/webapp/src/main/resources/locale/portlet/Login_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_ms.properties rename to webapp/src/main/resources/locale/portlet/Login_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_nl.properties b/webapp/src/main/resources/locale/portlet/Login_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_nl.properties rename to webapp/src/main/resources/locale/portlet/Login_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_no.properties b/webapp/src/main/resources/locale/portlet/Login_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_no.properties rename to webapp/src/main/resources/locale/portlet/Login_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_pcm.properties b/webapp/src/main/resources/locale/portlet/Login_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_pcm.properties rename to webapp/src/main/resources/locale/portlet/Login_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_pl.properties b/webapp/src/main/resources/locale/portlet/Login_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_pl.properties rename to webapp/src/main/resources/locale/portlet/Login_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_pt_BR.properties b/webapp/src/main/resources/locale/portlet/Login_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/Login_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_pt_PT.properties b/webapp/src/main/resources/locale/portlet/Login_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/Login_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_ro.properties b/webapp/src/main/resources/locale/portlet/Login_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_ro.properties rename to webapp/src/main/resources/locale/portlet/Login_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_ru.properties b/webapp/src/main/resources/locale/portlet/Login_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_ru.properties rename to webapp/src/main/resources/locale/portlet/Login_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_sk.properties b/webapp/src/main/resources/locale/portlet/Login_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_sk.properties rename to webapp/src/main/resources/locale/portlet/Login_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_sl.properties b/webapp/src/main/resources/locale/portlet/Login_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_sl.properties rename to webapp/src/main/resources/locale/portlet/Login_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_sq.properties b/webapp/src/main/resources/locale/portlet/Login_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_sq.properties rename to webapp/src/main/resources/locale/portlet/Login_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_sv_SE.properties b/webapp/src/main/resources/locale/portlet/Login_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/Login_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_th.properties b/webapp/src/main/resources/locale/portlet/Login_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_th.properties rename to webapp/src/main/resources/locale/portlet/Login_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_tl.properties b/webapp/src/main/resources/locale/portlet/Login_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_tl.properties rename to webapp/src/main/resources/locale/portlet/Login_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_tr.properties b/webapp/src/main/resources/locale/portlet/Login_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_tr.properties rename to webapp/src/main/resources/locale/portlet/Login_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_uk.properties b/webapp/src/main/resources/locale/portlet/Login_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_uk.properties rename to webapp/src/main/resources/locale/portlet/Login_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_ur_IN.properties b/webapp/src/main/resources/locale/portlet/Login_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/Login_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_vi.properties b/webapp/src/main/resources/locale/portlet/Login_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_vi.properties rename to webapp/src/main/resources/locale/portlet/Login_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_zh_CN.properties b/webapp/src/main/resources/locale/portlet/Login_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/Login_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Login_zh_TW.properties b/webapp/src/main/resources/locale/portlet/Login_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/Login_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/Login_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_ar.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_ar.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_aro.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_aro.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_az.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_az.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_ca.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_ca.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_ceb.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_ceb.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_co.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_co.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_cs.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_cs.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_de.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_de.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_el.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_el.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_en.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_en.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_es_ES.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_es_ES.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_eu.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_eu.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_fa.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_fa.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_fi.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_fi.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_fil.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_fil.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_fr.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_fr.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_hi.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_hi.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_hu.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_hu.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_id.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_id.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_in.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_in.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_in.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_in.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_it.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_it.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_ja.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_ja.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_ko.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_ko.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_lt.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_lt.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_ms.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_ms.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_nl.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_nl.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_no.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_no.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_pcm.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_pcm.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_pl.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_pl.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_pt_BR.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_pt_PT.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_ro.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_ro.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_ru.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_ru.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_sk.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_sk.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_sl.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_sl.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_sq.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_sq.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_sv_SE.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_th.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_th.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_tl.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_tl.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_tr.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_tr.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_uk.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_uk.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_ur_IN.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_vi.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_vi.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_zh_CN.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_zh_TW.properties b/webapp/src/main/resources/locale/portlet/NotificationAdministration_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/NotificationAdministration_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/NotificationAdministration_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_ar.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_ar.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_aro.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_aro.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_az.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_az.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_ca.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_ca.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_ceb.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_ceb.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_co.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_co.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_cs.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_cs.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_de.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_de.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_el.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_el.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_en.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_en.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_es_ES.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_es_ES.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_eu.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_eu.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_fa.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_fa.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_fi.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_fi.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_fil.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_fil.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_fr.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_fr.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_hi.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_hi.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_hu.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_hu.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_id.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_id.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_it.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_it.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_ja.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_ja.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_ko.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_ko.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_lt.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_lt.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_ms.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_ms.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_nl.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_nl.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_no.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_no.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_pcm.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_pcm.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_pl.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_pl.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_pt_BR.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_pt_PT.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_ro.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_ro.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_ru.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_ru.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_sk.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_sk.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_sl.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_sl.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_sq.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_sq.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_sv_SE.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_th.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_th.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_tl.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_tl.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_tr.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_tr.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_uk.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_uk.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_ur_IN.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_vi.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_vi.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_zh_CN.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_zh_TW.properties b/webapp/src/main/resources/locale/portlet/PlatformSettings_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/PlatformSettings_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/PlatformSettings_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_ar.properties b/webapp/src/main/resources/locale/portlet/Portlets_ar.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_ar.properties rename to webapp/src/main/resources/locale/portlet/Portlets_ar.properties index cce33ad89f9..ad87d2a989f 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_ar.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_ar.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=حفظ UITitleBar.label.edit=تغيير ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=صيغة هذا الاسم غير صحيحة. يجب أن يحتوي الاسم على الأقل على ثلاثة أحرف ، ألاّ يبدأ بـ '_' ، و ألاّ يحتوي على أحرف خاصّة. -UISpaceMenuPortlet.msg.existingAppName=صيغة هذا الاسم غير صحيحة. يجب أن يحتوي الاسم على الأقل على ثلاثة أحرف ، ألاّ يبدأ بـ '_' أو يحتوي على أحرف خاصّة. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_aro.properties b/webapp/src/main/resources/locale/portlet/Portlets_aro.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_aro.properties rename to webapp/src/main/resources/locale/portlet/Portlets_aro.properties index 12a39d6f332..37c853661c0 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_aro.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_aro.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=حفظ UITitleBar.label.edit=تغيير ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=صيغة هذا الاسم غير صحيحة. يجب أن يحتوي الاسم على الأقل على ثلاثة أحرف ، ألاّ يبدأ بـ '_' ، و ألاّ يحتوي على أحرف خاصّة. -UISpaceMenuPortlet.msg.existingAppName=صيغة هذا الاسم غير صحيحة. يجب أن يحتوي الاسم على الأقل على ثلاثة أحرف ، ألاّ يبدأ بـ '_' أو يحتوي على أحرف خاصّة. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_az.properties b/webapp/src/main/resources/locale/portlet/Portlets_az.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_az.properties rename to webapp/src/main/resources/locale/portlet/Portlets_az.properties index 370e6b0d61c..69dfc7b960f 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_az.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_az.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Edit ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=Bu ad düzgün deyil. Adda ən azı üç simvol olmalıdır, '_' xarakteri ilə başlaya bilməz və digər xüsusi simvollar daxil edilə bilməz. -UISpaceMenuPortlet.msg.existingAppName=Bu ad düzgün deyil. Ən azı üç simvol olmalıdır və '_' ilə başlaya bilməz və ya xüsusi simvollar daxil edilə bilməz. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_ca.properties b/webapp/src/main/resources/locale/portlet/Portlets_ca.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_ca.properties rename to webapp/src/main/resources/locale/portlet/Portlets_ca.properties index 140b027491b..d3a1155ae98 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_ca.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_ca.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Edita ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=Aquest nom no és vàlid. El nom ha de tenir com a mínim tres caràcters, no pot començar amb '_' i no pot contenir altres caràcters especials. -UISpaceMenuPortlet.msg.existingAppName=Aquest nom no és vàlid. Cal tenir almenys tres caràcters i no pot començar amb '_' o contenir caràcters especials. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_ceb.properties b/webapp/src/main/resources/locale/portlet/Portlets_ceb.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_ceb.properties rename to webapp/src/main/resources/locale/portlet/Portlets_ceb.properties index 6ad362f036c..d0e51130d71 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_ceb.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_ceb.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Edit ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=This name is not valid. The name must have at least three characters, cannot begin with the character '_' and cannot contain other special characters. -UISpaceMenuPortlet.msg.existingAppName=This name is not valid. It must have at least three characters, and cannot start with '_' or contain special characters. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_co.properties b/webapp/src/main/resources/locale/portlet/Portlets_co.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_co.properties rename to webapp/src/main/resources/locale/portlet/Portlets_co.properties index e8ff2eaa57d..7be8dcadc17 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_co.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_co.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Edit ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=This name is not valid. The name must have at least three characters, cannot begin with the character '_' and cannot contain other special characters. -UISpaceMenuPortlet.msg.existingAppName=This name is not valid. It must have at least three characters, and cannot start with '_' or contain special characters. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_cs.properties b/webapp/src/main/resources/locale/portlet/Portlets_cs.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_cs.properties rename to webapp/src/main/resources/locale/portlet/Portlets_cs.properties index fbcd821891b..70962af4f91 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_cs.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_cs.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Upravit ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=Tento název není platný. Název musí mít nejméně tři znaky, nesmí začínat znakem "_" a nesmí obsahovat speciální znaky. -UISpaceMenuPortlet.msg.existingAppName=Tento název není platný. Musí mít nejméně tři znaky a nemůže začínat '_' nebo obsahovat speciální znaky. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_de.properties b/webapp/src/main/resources/locale/portlet/Portlets_de.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_de.properties rename to webapp/src/main/resources/locale/portlet/Portlets_de.properties index 6dc4af57406..33acde05db0 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_de.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_de.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Bearbeiten ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=Dieser Name ist ungültig. Der Name muss aus mindestens drei Zeichen bestehen, darf nicht mit dem Zeichen '_' beginnen und darf keine anderen Sonderzeichen enthalten. -UISpaceMenuPortlet.msg.existingAppName=Dieser Name ist nicht gültig. Er muss aus mindestens drei Zeichen bestehen und kann nicht mit '_' beginnen oder Sonderzeichen enthalten. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_el.properties b/webapp/src/main/resources/locale/portlet/Portlets_el.properties similarity index 98% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_el.properties rename to webapp/src/main/resources/locale/portlet/Portlets_el.properties index b71cbe203b2..9cbc00638ad 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_el.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_el.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Επεξεργασία ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=Αυτό το όνομα δεν είναι έγκυρο. Το όνομα πρέπει να έχει τουλάχιστον τρεις χαρακτήρες, δεν μπορεί να ξεκινά με το χαρακτήρα '_' και δεν μπορεί να περιέχει άλλους ειδικούς χαρακτήρες. -UISpaceMenuPortlet.msg.existingAppName=Αυτό το όνομα δεν είναι έγκυρο. Πρέπει να έχει τουλάχιστον τρεις χαρακτήρες, και δεν μπορεί να ξεκινά με '_' ή να περιέχει ειδικούς χαρακτήρες. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_en.properties b/webapp/src/main/resources/locale/portlet/Portlets_en.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_en.properties rename to webapp/src/main/resources/locale/portlet/Portlets_en.properties index 66fd3d6c5a1..f7409ee7707 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_en.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_en.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Edit ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=This name is not valid. The name must have at least three characters, cannot begin with the character '_' and cannot contain other special characters. -UISpaceMenuPortlet.msg.existingAppName=This name is not valid. It must have at least three characters, and cannot start with '_' or contain special characters. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_es_ES.properties b/webapp/src/main/resources/locale/portlet/Portlets_es_ES.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_es_ES.properties rename to webapp/src/main/resources/locale/portlet/Portlets_es_ES.properties index 46d7b0d7c1a..d1282a28a1f 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_es_ES.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_es_ES.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Editar ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=El nombre no es válido. Debe incluir al menos tres caracteres, no comenzar con «_» ni contener otros caracteres especiales. -UISpaceMenuPortlet.msg.existingAppName=Este nombre no es válido. Debe tener al menos tres caracteres, y no puede comenzar con '_' o contener caracteres especiales. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_eu.properties b/webapp/src/main/resources/locale/portlet/Portlets_eu.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_eu.properties rename to webapp/src/main/resources/locale/portlet/Portlets_eu.properties index e8ff2eaa57d..7be8dcadc17 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_eu.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_eu.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Edit ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=This name is not valid. The name must have at least three characters, cannot begin with the character '_' and cannot contain other special characters. -UISpaceMenuPortlet.msg.existingAppName=This name is not valid. It must have at least three characters, and cannot start with '_' or contain special characters. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_fa.properties b/webapp/src/main/resources/locale/portlet/Portlets_fa.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_fa.properties rename to webapp/src/main/resources/locale/portlet/Portlets_fa.properties index 99aa62cb54d..e893a392143 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_fa.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_fa.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=ویرایش ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=This name is not valid. The name must have at least three characters, cannot begin with the character '_' and cannot contain other special characters. -UISpaceMenuPortlet.msg.existingAppName=This name is not valid. It must have at least three characters, and cannot start with '_' or contain special characters. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_fi.properties b/webapp/src/main/resources/locale/portlet/Portlets_fi.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_fi.properties rename to webapp/src/main/resources/locale/portlet/Portlets_fi.properties index e8ff2eaa57d..7be8dcadc17 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_fi.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_fi.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Edit ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=This name is not valid. The name must have at least three characters, cannot begin with the character '_' and cannot contain other special characters. -UISpaceMenuPortlet.msg.existingAppName=This name is not valid. It must have at least three characters, and cannot start with '_' or contain special characters. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_fil.properties b/webapp/src/main/resources/locale/portlet/Portlets_fil.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_fil.properties rename to webapp/src/main/resources/locale/portlet/Portlets_fil.properties index 9854ce453d0..ad6768c5c1f 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_fil.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_fil.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=I-Edit ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=Ang pangalan na ito ay hindi balido. Kinakailngan ang pangalan ay mayroong tatlong mga letra, hindi maaring mag umpisa sa letra na '_' at hindi maaring may laman na ibang espesyal na mga karakter. -UISpaceMenuPortlet.msg.existingAppName=Ang pangalan na ito ay hindi balido. Kailangan itoy mayroong mga tatlong letra, at hindi maaring mag umpisa sa '_' o naglalaman ng espesyal na mga letra. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_fr.properties b/webapp/src/main/resources/locale/portlet/Portlets_fr.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_fr.properties rename to webapp/src/main/resources/locale/portlet/Portlets_fr.properties index 29b7916b55c..2993659881f 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_fr.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_fr.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Modifier ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=Ce nom n'est pas valide. Il devrait être long d'au moins trois caractères, sans commencer par le caractère '_' ou contenir de caractères spéciaux. -UISpaceMenuPortlet.msg.existingAppName=Ce nom d'application existe déjà. Veuillez en choisir un autre. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_he.properties b/webapp/src/main/resources/locale/portlet/Portlets_he.properties similarity index 96% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_he.properties rename to webapp/src/main/resources/locale/portlet/Portlets_he.properties index 8481f3794c8..2c24357019e 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_he.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_he.properties @@ -187,10 +187,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Edit ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=This name is not valid. The name must have at least three characters, cannot begin with the character '_' and cannot contain other special characters. -UISpaceMenuPortlet.msg.existingAppName=This name is not valid. It must have at least three characters, and cannot start with '_' or contain special characters. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_hi.properties b/webapp/src/main/resources/locale/portlet/Portlets_hi.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_hi.properties rename to webapp/src/main/resources/locale/portlet/Portlets_hi.properties index e8ff2eaa57d..7be8dcadc17 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_hi.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_hi.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Edit ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=This name is not valid. The name must have at least three characters, cannot begin with the character '_' and cannot contain other special characters. -UISpaceMenuPortlet.msg.existingAppName=This name is not valid. It must have at least three characters, and cannot start with '_' or contain special characters. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_hu.properties b/webapp/src/main/resources/locale/portlet/Portlets_hu.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_hu.properties rename to webapp/src/main/resources/locale/portlet/Portlets_hu.properties index e8ff2eaa57d..7be8dcadc17 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_hu.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_hu.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Edit ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=This name is not valid. The name must have at least three characters, cannot begin with the character '_' and cannot contain other special characters. -UISpaceMenuPortlet.msg.existingAppName=This name is not valid. It must have at least three characters, and cannot start with '_' or contain special characters. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_id.properties b/webapp/src/main/resources/locale/portlet/Portlets_id.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_id.properties rename to webapp/src/main/resources/locale/portlet/Portlets_id.properties index 13f66af248a..86a0cc17d78 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_id.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_id.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Sunting ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=Nama ini tidak sah. Nama harus memiliki setidaknya tiga karakter, tidak bisa dimulai dengan karakter '_' dan tidak mengandung karakter khusus lainnya. -UISpaceMenuPortlet.msg.existingAppName=Nama ini tidak sah Ini harus memiliki setidaknya tiga karakter, dan tidak dapat dimulai dengan '_' atau berisi karakter khusus. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_in.properties b/webapp/src/main/resources/locale/portlet/Portlets_in.properties similarity index 98% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_in.properties rename to webapp/src/main/resources/locale/portlet/Portlets_in.properties index e83a204cd23..f43fe4d4e98 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_in.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_in.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Sunting ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=Nama ini tidak sah. Nama harus memiliki setidaknya tiga karakter, tidak bisa dimulai dengan karakter '_' dan tidak mengandung karakter khusus lainnya. -UISpaceMenuPortlet.msg.existingAppName=Nama ini tidak sah Ini harus memiliki setidaknya tiga karakter, dan tidak dapat dimulai dengan '_' atau berisi karakter khusus. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_it.properties b/webapp/src/main/resources/locale/portlet/Portlets_it.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_it.properties rename to webapp/src/main/resources/locale/portlet/Portlets_it.properties index 3be609ceeb5..ac26340e16c 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_it.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_it.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Modifica ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=Questo nome non è valido. Il nome deve avere almeno tre caratteri, non deve iniziare con il carattere '_' e non deve contenere altri caratteri speciali. -UISpaceMenuPortlet.msg.existingAppName=Questo nome applicazione esiste già. si prega di sceglierne un altro. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_ja.properties b/webapp/src/main/resources/locale/portlet/Portlets_ja.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_ja.properties rename to webapp/src/main/resources/locale/portlet/Portlets_ja.properties index c57c3c2b033..8b712e2a3f5 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_ja.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_ja.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=編集 ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=この名前は無効です。少なくとも 3 つの文字、名前を付ける必要があります、文字 '_' で始めることはできません他の特殊文字を含めることはできません。 -UISpaceMenuPortlet.msg.existingAppName=この名前は無効です。少なくとも 3 つの文字、名前を付ける必要があります、文字 '_' で始めることはできません他の特殊文字を含めることはできません。 ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_kab.properties b/webapp/src/main/resources/locale/portlet/Portlets_kab.properties similarity index 98% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_kab.properties rename to webapp/src/main/resources/locale/portlet/Portlets_kab.properties index 5590655938f..f789ea29b94 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_kab.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_kab.properties @@ -192,10 +192,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Edit ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=This name is not valid. The name must have at least three characters, cannot begin with the character '_' and cannot contain other special characters. -UISpaceMenuPortlet.msg.existingAppName=This name is not valid. It must have at least three characters, and cannot start with '_' or contain special characters. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_ko.properties b/webapp/src/main/resources/locale/portlet/Portlets_ko.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_ko.properties rename to webapp/src/main/resources/locale/portlet/Portlets_ko.properties index e8ff2eaa57d..7be8dcadc17 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_ko.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_ko.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Edit ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=This name is not valid. The name must have at least three characters, cannot begin with the character '_' and cannot contain other special characters. -UISpaceMenuPortlet.msg.existingAppName=This name is not valid. It must have at least three characters, and cannot start with '_' or contain special characters. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_lt.properties b/webapp/src/main/resources/locale/portlet/Portlets_lt.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_lt.properties rename to webapp/src/main/resources/locale/portlet/Portlets_lt.properties index 01a5bbf615e..0df8654a8a3 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_lt.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_lt.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Redaguoti ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=Šis pavadinimas yra neleistinas. Pavadinimas turi būti ne mažiau kaip trijų simbolių, negali prasidėti simboliu "_" ir negali būti kitų specialiųjų simbolių. -UISpaceMenuPortlet.msg.existingAppName=Šis pavadinimas yra neleistinas. Privalo turėti ne mažiau kaip tris simbolius, negali prasidėti "_" arba turėti specialių simbolių. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_ms.properties b/webapp/src/main/resources/locale/portlet/Portlets_ms.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_ms.properties rename to webapp/src/main/resources/locale/portlet/Portlets_ms.properties index 8cedcc4b242..21626ce5041 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_ms.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_ms.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Sunting ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=This name is not valid. The name must have at least three characters, cannot begin with the character '_' and cannot contain other special characters. -UISpaceMenuPortlet.msg.existingAppName=This name is not valid. It must have at least three characters, and cannot start with '_' or contain special characters. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_nl.properties b/webapp/src/main/resources/locale/portlet/Portlets_nl.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_nl.properties rename to webapp/src/main/resources/locale/portlet/Portlets_nl.properties index 49d79e4f177..357565e289d 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_nl.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_nl.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Bewerken ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=Deze naam is niet geldig. De naam moet uit ten minste drie tekens bestaan, mag niet beginnen met het teken '_' en andere speciale tekens niet bevatten. -UISpaceMenuPortlet.msg.existingAppName=Deze naam is niet geldig. Het moet hebben van ten minste drie tekens, en kan niet beginnen met '_' of speciale tekens bevatten. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_no.properties b/webapp/src/main/resources/locale/portlet/Portlets_no.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_no.properties rename to webapp/src/main/resources/locale/portlet/Portlets_no.properties index ea706d78db9..ff5ccb906aa 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_no.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_no.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Rediger ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=Dette navnet er ikke gyldig. Navnet må ha minst tre tegn og kan ikke begynne med tegnet '_'. Det kan heller ikke inneholde andre spesialtegn. -UISpaceMenuPortlet.msg.existingAppName=Dette navnet er ikke gyldig. Navnet må ha minst tre tegn og kan ikke begynne med tegnet '_'. Det kan heller ikke inneholde andre spesialtegn. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_pcm.properties b/webapp/src/main/resources/locale/portlet/Portlets_pcm.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_pcm.properties rename to webapp/src/main/resources/locale/portlet/Portlets_pcm.properties index 32a030e5990..72c7f9c9926 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_pcm.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_pcm.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Edit ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=This name is not valid. The name must have at least three characters, cannot begin with the character '_' and cannot contain other special characters. -UISpaceMenuPortlet.msg.existingAppName=This name is not valid. It must have at least three characters, and cannot start with '_' or contain special characters. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_pl.properties b/webapp/src/main/resources/locale/portlet/Portlets_pl.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_pl.properties rename to webapp/src/main/resources/locale/portlet/Portlets_pl.properties index cbe24daeab4..6036fb61c42 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_pl.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_pl.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Edytuj ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=Nazwa nie jest prawidłowa. Nazwa musi mieć co najmniej trzy znaki, nie może zaczynać się znakiem "_" i nie może zawierać innych znaków specjalnych. -UISpaceMenuPortlet.msg.existingAppName=Nazwa nie jest prawidłowa. Musi mieć co najmniej trzy znaki i nie zaczynać się od '_' lub zawiera znaki specjalne. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_pt_BR.properties b/webapp/src/main/resources/locale/portlet/Portlets_pt_BR.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/Portlets_pt_BR.properties index 7a345d15095..e5377da05f7 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_pt_BR.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_pt_BR.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Editar ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=Esse nome não é válido. O nome deve ter pelo menos três caracteres, não pode começar com o caractere '_' e não pode conter outros caracteres especiais. -UISpaceMenuPortlet.msg.existingAppName=Esse nome não é válido. O nome deve ter pelo menos três caracteres e não pode começar com '_' ou conter caracteres especiais. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_pt_PT.properties b/webapp/src/main/resources/locale/portlet/Portlets_pt_PT.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/Portlets_pt_PT.properties index d80707c52d0..fd11b174108 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_pt_PT.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_pt_PT.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Editar ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=Esse nome não é válido. O nome deve ter pelo menos três caracteres, não pode começar com o caractere '_' e não pode conter outros caracteres especiais. -UISpaceMenuPortlet.msg.existingAppName=Esse nome não é válido. O nome deve ter pelo menos três caracteres e não pode começar com '_' ou conter caracteres especiais. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_ro.properties b/webapp/src/main/resources/locale/portlet/Portlets_ro.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_ro.properties rename to webapp/src/main/resources/locale/portlet/Portlets_ro.properties index a061516cebb..97802c9a90a 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_ro.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_ro.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Modifică ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=Acest nume nu este valid. Numele trebuie să aibă cel puţin trei caractere,nu poate începe cu caracterul '_' şi nu poate conține alte caractere speciale. -UISpaceMenuPortlet.msg.existingAppName=Acest nume nu este valid. Acesta trebuie să aibă cel puţin trei caractere,nu poate începe cu '_' sau conţine caractere speciale. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_ru.properties b/webapp/src/main/resources/locale/portlet/Portlets_ru.properties similarity index 98% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_ru.properties rename to webapp/src/main/resources/locale/portlet/Portlets_ru.properties index 622cec68b24..4486258f7d7 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_ru.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_ru.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Редактировать ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=Недопустимое название. Название должно состоять как минимум из трех символов, не может начинаться с символа '_', а также содержать другие специальные символы. -UISpaceMenuPortlet.msg.existingAppName=Недопустимое название. Оно должно состоять как минимум из трех символов, а также не может начинаться с '_' или содержать специальные символы. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_sk.properties b/webapp/src/main/resources/locale/portlet/Portlets_sk.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_sk.properties rename to webapp/src/main/resources/locale/portlet/Portlets_sk.properties index e8ff2eaa57d..7be8dcadc17 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_sk.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_sk.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Edit ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=This name is not valid. The name must have at least three characters, cannot begin with the character '_' and cannot contain other special characters. -UISpaceMenuPortlet.msg.existingAppName=This name is not valid. It must have at least three characters, and cannot start with '_' or contain special characters. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_sl.properties b/webapp/src/main/resources/locale/portlet/Portlets_sl.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_sl.properties rename to webapp/src/main/resources/locale/portlet/Portlets_sl.properties index 06fe597d4bb..9aa69ab8e33 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_sl.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_sl.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Uredi ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=To ime ni veljavno. Ime mora imeti vsaj tri znake, ne more se začeti z znakom »_ « in ne more vsebovati drugih posebnih znakov. -UISpaceMenuPortlet.msg.existingAppName=To ime ni veljavno. Vsebovati mora vsaj tri znake, ne morese začeti z "_" vsebovati posebne znakeposebnih znakov. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_sq.properties b/webapp/src/main/resources/locale/portlet/Portlets_sq.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_sq.properties rename to webapp/src/main/resources/locale/portlet/Portlets_sq.properties index 34842e41267..a702b4acc5b 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_sq.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_sq.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=crwdns40660:0#{word.save}crwdne40660:0 UITitleBar.label.edit=crwdns40662:0crwdne40662:0 ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=crwdns40664:0crwdne40664:0 -UISpaceMenuPortlet.msg.existingAppName=crwdns40666:0crwdne40666:0 ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_sv_SE.properties b/webapp/src/main/resources/locale/portlet/Portlets_sv_SE.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/Portlets_sv_SE.properties index dab307a2f9a..0a0b5f056f0 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_sv_SE.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_sv_SE.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Redigera ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=Detta namn är inte giltigt. Namnet måste ha minst tre tecken, får inte börja med tecknet '_' och kan inte innehålla andra specialtecken. -UISpaceMenuPortlet.msg.existingAppName=Detta namn är inte giltigt. Det måste innehålla minst tre tecken, och kan inte börja med '_' eller innehålla specialtecken. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_th.properties b/webapp/src/main/resources/locale/portlet/Portlets_th.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_th.properties rename to webapp/src/main/resources/locale/portlet/Portlets_th.properties index e8ff2eaa57d..7be8dcadc17 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_th.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_th.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Edit ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=This name is not valid. The name must have at least three characters, cannot begin with the character '_' and cannot contain other special characters. -UISpaceMenuPortlet.msg.existingAppName=This name is not valid. It must have at least three characters, and cannot start with '_' or contain special characters. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_tl.properties b/webapp/src/main/resources/locale/portlet/Portlets_tl.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_tl.properties rename to webapp/src/main/resources/locale/portlet/Portlets_tl.properties index 5705f242d54..4347ca8f3e3 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_tl.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_tl.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Edit ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=Ang pangalan na ito ay hindi wasto. Ang pangalan ay dapat magkaroon ng hindi bababa sa tatlong mga karakter, hindi maaaring magsimula sa karakter '_' at hindi maaaring maglaman ng iba pang mga espesyal na karakter. -UISpaceMenuPortlet.msg.existingAppName=Ang pangalan na ito ay hindi wasto. Ito ay dapat na magkaroon ng hindi bababa sa tatlong mga karakter, at hindi maaaring magsimula sa '_' o maglaman ng mga espesyal na karakter. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_tr.properties b/webapp/src/main/resources/locale/portlet/Portlets_tr.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_tr.properties rename to webapp/src/main/resources/locale/portlet/Portlets_tr.properties index d24b8d47f9e..9a4a56b7b79 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_tr.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_tr.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Düzenle ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=Bu ad geçersiz. Ad en az üç karakter olmalıdır, '_' karakteriyle başlayamaz ve diğer özel karakterler içeremez. -UISpaceMenuPortlet.msg.existingAppName=Bu ad geçersiz. En az üç karakter olmalıdır ve '_' ile başlayamaz veya özel karakterler içeremez. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_uk.properties b/webapp/src/main/resources/locale/portlet/Portlets_uk.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_uk.properties rename to webapp/src/main/resources/locale/portlet/Portlets_uk.properties index 2a49ec14800..526cceff9ad 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_uk.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_uk.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Редагувати ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=Це ім'я неприпустиме. Ім'я повинно мати принаймні три символи, не може починатися із символу "_" і не може містити інші спеціальні символи. -UISpaceMenuPortlet.msg.existingAppName=Це ім'я неприпустиме. Воно повинно мати принаймні три символи, не може починатися з "_" і містити спеціальні символи. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_ur_IN.properties b/webapp/src/main/resources/locale/portlet/Portlets_ur_IN.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/Portlets_ur_IN.properties index 8ee8a6e5005..6b9bc979ada 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_ur_IN.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_ur_IN.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=ترمیم ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=This name is not valid. The name must have at least three characters, cannot begin with the character '_' and cannot contain other special characters. -UISpaceMenuPortlet.msg.existingAppName=This name is not valid. It must have at least three characters, and cannot start with '_' or contain special characters. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_vi.properties b/webapp/src/main/resources/locale/portlet/Portlets_vi.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_vi.properties rename to webapp/src/main/resources/locale/portlet/Portlets_vi.properties index 9c69e0594eb..a25a23c9a41 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_vi.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_vi.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=Chỉnh sửa ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=Tên không hợp lệ. Tên phải có ít nhất 3 ký tự, không được bắt đầu bằng ký tự '_' và không chứa các ký tự đặc biệt khác. -UISpaceMenuPortlet.msg.existingAppName=Tên này đã tồn tại. Tên phải có ít nhất 3 ký tự và không được bắt đầu bằng ký tự '_' hay chứa các ký tự đặc biệt. ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_zh_CN.properties b/webapp/src/main/resources/locale/portlet/Portlets_zh_CN.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/Portlets_zh_CN.properties index 1f25a46a2bf..4ae55ec8e9a 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_zh_CN.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_zh_CN.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=编辑 ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=此名称不是有效的。名称必须有至少三个字符,不能以字符 _ 开头,并且不能包含其他特殊字符。 -UISpaceMenuPortlet.msg.existingAppName=此名称不是有效的。它必须有至少三个字符,和不能以 _ 开头或包含特殊字符。 ##################################################################################### # Actions # diff --git a/webapp/portlet/src/main/resources/locale/portlet/Portlets_zh_TW.properties b/webapp/src/main/resources/locale/portlet/Portlets_zh_TW.properties similarity index 99% rename from webapp/portlet/src/main/resources/locale/portlet/Portlets_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/Portlets_zh_TW.properties index 9e97663b003..8e1b2fd352d 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/Portlets_zh_TW.properties +++ b/webapp/src/main/resources/locale/portlet/Portlets_zh_TW.properties @@ -197,10 +197,7 @@ UITitleBar.label.save=#{word.save} UITitleBar.label.edit=編輯 ##################################################################################### -# UISpaceMenuPortlet # ##################################################################################### -UISpaceMenuPortlet.msg.invalidAppName=此名稱不是有效的。名稱必須有至少三個字元,不能以字元 _ 開頭,並且不能包含其他特殊字元。 -UISpaceMenuPortlet.msg.existingAppName=此名稱不是有效的。它必須有至少三個字元,和不能以 _ 開頭或包含特殊字元。 ##################################################################################### # Actions # diff --git a/webapp/src/main/resources/locale/portlet/SpaceTemplatesManagement_en.properties b/webapp/src/main/resources/locale/portlet/SpaceTemplatesManagement_en.properties new file mode 100644 index 00000000000..759898b08ff --- /dev/null +++ b/webapp/src/main/resources/locale/portlet/SpaceTemplatesManagement_en.properties @@ -0,0 +1,109 @@ +spaceTemplates.title=Space Templates +spaceTemplates.add=Add +spaceTemplates.filter.placeholder=Filter by name, description +spaceTemplates.label.name=Name +spaceTemplates.label.description=Description +spaceTemplates.label.permissions=Creation +spaceTemplates.label.spacesCount=Spaces +spaceTemplates.label.status=Status +spaceTemplates.label.actions=Actions +spaceTemplates.menu.open=Open Menu +spaceTemplate.label.preview=Preview of {0} template +spaceTemplate.status.update.success=Template status successfully updated +spaceTemplate.status.update.error=An unknown error occurred while updating template status. Please contact the administrator or try agan later. +spaceTemplate.layout.update.success=Template layout successfully updated +spaceTemplate.layout.update.error=An unknown error occurred while updating template layout. Please contact the administrator or try agan later. +spaceTemplate.delete.success=Template successfully deleted +spaceTemplate.delete.error=An unknown error occurred while deleting template. Please contact the administrator or try agan later. +spaceTemplate.label.delete=Delete +spaceTemplate.label.editLayout=Edit Layout +spaceTemplate.label.editProperties=Edit Properties +spaceTemplate.label.duplicate=Duplicate +spaceTemplate.label.templateMenu={0} +spaceTemplate.label.closeMenu=Close Menu +spaceTemplate.label.close=Close +spaceTemplate.label.openIllustrationPreview=Open illustration Preview +spaceTemplate.label.enableTemplate=Enable Template +spaceTemplate.label.disableTemplate=Disable Template +spaceTemplate.label.system.noDelete=Default templates cannot be deleted +spaceTemplate.label.system.noEditLayout=This product template's layout cannot be updated +spaceTemplate.label.confirmDeleteTitle=Delete space template? +spaceTemplate.label.confirmDeleteMessage=Would you like to delete space template: {0} +spaceTemplate.label.confirm=Confirm +spaceTemplate.label.cancel=Cancel +spaceTemplate.add.drawer.newTemplate=Add Space Template +spaceTemplate.add.drawer.editTemplate=Edit Space Template +spaceTemplate.nameLabel=Name +spaceTemplate.namePlaceholder=Give a name to your template +spaceTemplate.nameDrawerTitle=Space Template Name +spaceTemplate.nameExceedsMaxLength=Name length should be less than {0} +spaceTemplate.descriptionLabel=Description +spaceTemplate.descriptionPlaceholder=Explain how this template can be used +spaceTemplate.descriptionDrawerTitle=Space Template Description +spaceTemplate.descriptionExceedsMaxLength=The description length should be less than {0} +spaceTemplate.start=Start +spaceTemplate.mandatoryCreationStep=Mandatory Creation steps +spaceTemplate.editName=Edit name, description or icon +spaceTemplate.mandatoryCreationStepDescription=To create a space, creators must complete the following: +spaceTemplate.mandatoryCreationStepName=Name +spaceTemplate.mandatoryCreationStepInvitation=Invitation +spaceTemplate.mandatoryCreationStepProperties=Properties (Description, logo, banner) +spaceTemplate.mandatoryCreationStepAccessControl=Access Control +spaceTemplate.mandatoryCreationStepNameOrInvitationMandatory=Name or Invitation must be selected at minimum +spaceTemplate.defaultSpaceConfigurationStep=Default Space Configuration +spaceTemplate.defaultSpaceConfigurationStepDescription=Select the default configuration for space created using this template. +spaceTemplate.defaultSpaceConfigurationStepBanner=Default {0}Banner{1} +spaceTemplate.defaultSpaceConfigurationStepBannerTooltip=Why using a banner? +spaceTemplate.defaultSpaceConfigurationStepBannerHelp1=The banner can be used to feature your space in its public site. It also can be used in any pages of your space. +spaceTemplate.defaultSpaceConfigurationStepBannerHelp2=Recommended banner size: 1280 x 175 pixels +spaceTemplate.defaultSpaceConfigurationStepBannerCropperDrawer=Sapce Template Banner +spaceTemplate.defaultSpaceConfigurationStepBannerButtonTooltip=Change Banner +spaceTemplate.defaultSpaceConfigurationStepAccess=Access +spaceTemplate.defaultSpaceConfigurationStepAccessOpen=Open +spaceTemplate.defaultSpaceConfigurationStepAccessOpenDescription=Any user can join the space. No approval required. +spaceTemplate.defaultSpaceConfigurationStepAccessValidation=Request Approval +spaceTemplate.defaultSpaceConfigurationStepAccessValidationDescription=User can request to join. Membership must be approved by an admin +spaceTemplate.defaultSpaceConfigurationStepAccessClosed=Invite Only +spaceTemplate.defaultSpaceConfigurationStepAccessClosedDescription=Users can't request to join. Admins must send invitations +spaceTemplate.defaultSpaceConfigurationStepVisibility=Visibility +spaceTemplate.defaultSpaceConfigurationStepVisibilityListed=Listed +spaceTemplate.defaultSpaceConfigurationStepVisibilityListedDescription=The space is visible in the directory +spaceTemplate.defaultSpaceConfigurationStepVisibilityUnlisted=Unlisted +spaceTemplate.defaultSpaceConfigurationStepVisibilityUnlistedDescription=The space is not listed in the space directory +spaceTemplate.permissionsStep=Permissions +spaceTemplate.permissionsStepDescription1=Permissions are managed using the {0}Spaces Management Page{1}. +spaceTemplate.permissionsStepDescription2=Yet, you can specify permissions for spaces created using this template. +spaceTemplate.permissionsStepCreateSpacePermissionLabel=Who can create spaces? +spaceTemplate.permissionsStepEditSpaceLayoutPermissionLabel=Who can edit navigation? +spaceTemplate.permissionsStepIsSpaceEditorialLabel=Are spaces editorial ones? +spaceTemplate.permissionsStepIsSpaceEditorialDescription=Only admins and content writers can add contents +spaceTemplate.permissionsStepDeleteSpacePermissionLabel=Who can delete spaces? +spaceTemplate.permissionsStepUsers=Users +spaceTemplate.permissionsStepAdministrators=Administrators +spaceTemplate.permissionsStepGroupMembers=Group Members +spaceTemplate.permissionsStepSpaceAdmins=Space Admins +spaceTemplate.groupSuggester.placeholder=Enter group +spaceTemplate.groupSuggester.noData=No data +spaceTemplate.previous=Previous +spaceTemplate.cancel=Cancel +spaceTemplate.next=Next +spaceTemplate.create=Create +spaceTemplate.update=Update +spaceTemplate.spaceTemplateCreatedSuccessfully=Space template created successfully +spaceTemplate.spaceTemplateUpdatedSuccessfully=Space template updated successfully +spaceTemplate.bannerImage=Banner Image + +spaceTemplate.editWarningInfo1=Changes affect only new spaces created with the template. +spaceTemplate.editWarningInfo2=To update existing spaces, use the {0}Spaces Management Page{1}. +spaceTemplate.closeConfirmLabels.title=Confirm cancellation +spaceTemplate.closeConfirmLabels.message=Do you confirm the cancellation of current updates? +spaceTemplate.closeConfirmLabels.ok=Ok +spaceTemplate.closeConfirmLabels.cancel=Cancel + +spaceTemplate.templateSpacesDrawer.title={0} Spaces +spaceTemplate.templateSpacesDrawer.description=Please find below, spaces created using this template +spaceTemplate.templateSpacesDrawer.loadMore=Load more +spaceTemplate.addSpaceTooltip=Create new space using this template +spaceTemplate.addSpaceButtonLabel=Add +spaceTemplate.addSpaceMenuLabel=Create Space +spaceTemplate.listSpaceMenuLabel=List Spaces diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_ar.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_ar.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_aro.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_aro.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_az.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_az.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_ca.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_ca.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_ceb.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_ceb.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_co.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_co.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_cs.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_cs.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_de.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_de.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_el.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_el.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_en.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_en.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_es_ES.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_es_ES.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_eu.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_eu.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_fa.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_fa.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_fi.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_fi.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_fil.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_fil.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_fr.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_fr.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_hi.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_hi.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_hu.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_hu.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_id.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_id.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_in.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_in.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_in.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_in.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_it.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_it.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_ja.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_ja.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_ko.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_ko.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_lt.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_lt.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_ms.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_ms.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_nl.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_nl.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_no.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_no.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_pcm.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_pcm.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_pl.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_pl.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_pt_BR.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_pt_PT.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_ro.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_ro.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_ru.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_ru.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_sk.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_sk.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_sl.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_sl.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_sq.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_sq.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_sv_SE.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_th.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_th.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_tl.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_tl.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_tr.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_tr.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_uk.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_uk.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_ur_IN.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_vi.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_vi.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_zh_CN.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_zh_TW.properties b/webapp/src/main/resources/locale/portlet/UserNotificationPortlet_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/UserNotificationPortlet_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/UserNotificationPortlet_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_ar.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_ar.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_aro.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_aro.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_az.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_az.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_ca.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_ca.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_ceb.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_ceb.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_co.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_co.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_cs.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_cs.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_de.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_de.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_el.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_el.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_en.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_en.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_es_ES.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_es_ES.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_eu.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_eu.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_fa.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_fa.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_fi.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_fi.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_fil.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_fil.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_fr.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_fr.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_hi.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_hi.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_hu.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_hu.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_id.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_id.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_it.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_it.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_ja.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_ja.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_ko.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_ko.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_lt.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_lt.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_ms.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_ms.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_nl.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_nl.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_no.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_no.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_pcm.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_pcm.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_pl.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_pl.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_pt_BR.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_pt_PT.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_ro.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_ro.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_ru.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_ru.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_sk.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_sk.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_sl.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_sl.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_sq.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_sq.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_sv_SE.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_th.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_th.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_tl.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_tl.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_tr.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_tr.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_uk.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_uk.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_ur_IN.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_vi.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_vi.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_zh_CN.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_zh_TW.properties b/webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ComplementaryFilter_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/social/ComplementaryFilter_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ar.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ar.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_aro.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_aro.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_az.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_az.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ca.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ca.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ceb.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ceb.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_co.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_co.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_cs.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_cs.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_de.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_de.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_el.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_el.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_en.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_en.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_es_ES.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_es_ES.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_eu.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_eu.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_fa.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_fa.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_fi.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_fi.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_fil.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_fil.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_fr.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_fr.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_hi.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_hi.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_hu.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_hu.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_id.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_id.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_in.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_in.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_in.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_in.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_it.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_it.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ja.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ja.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_kab.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_kab.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_kab.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_kab.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ko.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ko.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_lt.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_lt.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ms.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ms.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_nl.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_nl.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_no.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_no.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_pcm.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_pcm.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_pl.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_pl.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_pt_BR.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_pt_PT.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ro.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ro.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ru.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ru.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_sk.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_sk.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_sl.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_sl.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_sq.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_sq.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_sv_SE.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_th.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_th.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_tl.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_tl.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_tr.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_tr.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_uk.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_uk.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ur_IN.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_vi.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_vi.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_zh_CN.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_zh_TW.properties b/webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/social/ExternalSpacesListApplication_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_ar.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_ar.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_aro.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_aro.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_az.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_az.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_ca.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_ca.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_ceb.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_ceb.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_co.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_co.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_cs.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_cs.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_de.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_de.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_el.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_el.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_en.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_en.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_es_ES.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_es_ES.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_eu.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_eu.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_fa.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_fa.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_fi.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_fi.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_fil.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_fil.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_fr.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_fr.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_hi.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_hi.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_hu.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_hu.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_id.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_id.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_in.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_in.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_in.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_in.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_it.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_it.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_ja.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_ja.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_kab.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_kab.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_kab.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_kab.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_ko.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_ko.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_lt.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_lt.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_ms.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_ms.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_nl.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_nl.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_no.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_no.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_pcm.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_pcm.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_pl.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_pl.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_pt_BR.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_pt_PT.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_ro.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_ro.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_ru.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_ru.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_sk.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_sk.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_sl.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_sl.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_sq.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_sq.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_sv_SE.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_th.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_th.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_tl.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_tl.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_tr.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_tr.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_uk.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_uk.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_ur_IN.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_vi.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_vi.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_zh_CN.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_zh_TW.properties b/webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/GettingStartedPortlet_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/social/GettingStartedPortlet_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_ar.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_ar.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_aro.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_aro.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_az.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_az.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_ca.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_ca.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_ceb.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_ceb.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_co.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_co.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_cs.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_cs.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_de.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_de.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_el.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_el.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_en.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_en.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_es_ES.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_es_ES.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_eu.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_eu.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_fa.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_fa.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_fi.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_fi.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_fil.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_fil.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_fr.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_fr.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_hi.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_hi.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_hu.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_hu.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_id.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_id.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_in.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_in.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_in.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_in.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_it.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_it.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_ja.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_ja.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_kab.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_kab.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_kab.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_kab.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_ko.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_ko.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_lt.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_lt.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_ms.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_ms.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_nl.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_nl.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_no.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_no.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_pcm.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_pcm.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_pl.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_pl.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_pt_BR.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_pt_PT.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_ro.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_ro.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_ru.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_ru.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_sk.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_sk.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_sl.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_sl.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_sq.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_sq.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_sv_SE.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_th.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_th.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_tl.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_tl.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_tr.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_tr.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_uk.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_uk.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_ur_IN.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_vi.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_vi.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_zh_CN.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_zh_TW.properties b/webapp/src/main/resources/locale/portlet/social/PeopleListApplication_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleListApplication_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleListApplication_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_ar.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_ar.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_aro.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_aro.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_az.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_az.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_ca.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_ca.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_ceb.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_ceb.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_co.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_co.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_cs.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_cs.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_de.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_de.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_el.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_el.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_en.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_en.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_es_ES.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_es_ES.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_eu.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_eu.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_fa.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_fa.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_fi.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_fi.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_fil.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_fil.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_fr.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_fr.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_hi.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_hi.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_hu.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_hu.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_id.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_id.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_in.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_in.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_in.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_in.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_it.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_it.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_ja.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_ja.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_kab.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_kab.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_kab.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_kab.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_ko.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_ko.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_lt.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_lt.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_ms.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_ms.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_nl.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_nl.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_no.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_no.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_pcm.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_pcm.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_pl.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_pl.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_pt_BR.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_pt_PT.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_ro.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_ro.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_ru.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_ru.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_sk.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_sk.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_sl.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_sl.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_sq.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_sq.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_sv_SE.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_th.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_th.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_tl.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_tl.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_tr.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_tr.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_uk.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_uk.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_ur_IN.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_vi.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_vi.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_zh_CN.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_zh_TW.properties b/webapp/src/main/resources/locale/portlet/social/PeopleOverview_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/PeopleOverview_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/social/PeopleOverview_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_ar.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_ar.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_aro.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_aro.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_az.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_az.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_ca.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_ca.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_ceb.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_ceb.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_co.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_co.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_cs.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_cs.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_de.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_de.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_el.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_el.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_en.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_en.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_es_ES.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_es_ES.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_eu.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_eu.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_fa.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_fa.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_fi.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_fi.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_fil.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_fil.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_fr.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_fr.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_hi.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_hi.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_hu.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_hu.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_id.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_id.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_in.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_in.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_in.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_in.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_it.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_it.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_ja.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_ja.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_kab.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_kab.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_kab.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_kab.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_ko.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_ko.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_lt.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_lt.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_ms.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_ms.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_nl.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_nl.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_no.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_no.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_pcm.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_pcm.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_pl.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_pl.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_pt_BR.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_pt_PT.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_ro.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_ro.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_ru.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_ru.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_sk.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_sk.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_sl.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_sl.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_sq.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_sq.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_sv_SE.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_th.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_th.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_tl.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_tl.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_tr.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_tr.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_uk.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_uk.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_ur_IN.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_vi.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_vi.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_zh_CN.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_zh_TW.properties b/webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileAboutMe_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileAboutMe_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_ar.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_ar.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_aro.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_aro.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_az.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_az.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_ca.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_ca.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_ceb.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_ceb.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_co.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_co.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_cs.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_cs.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_de.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_de.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_el.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_el.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_en.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_en.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_es_ES.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_es_ES.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_eu.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_eu.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_fa.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_fa.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_fi.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_fi.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_fil.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_fil.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_fr.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_fr.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_hi.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_hi.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_hu.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_hu.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_id.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_id.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_in.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_in.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_in.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_in.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_it.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_it.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_ja.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_ja.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_kab.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_kab.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_kab.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_kab.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_ko.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_ko.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_lt.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_lt.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_ms.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_ms.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_nl.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_nl.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_no.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_no.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_pcm.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_pcm.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_pl.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_pl.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_pt_BR.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_pt_PT.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_ro.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_ro.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_ru.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_ru.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_sk.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_sk.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_sl.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_sl.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_sq.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_sq.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_sv_SE.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_th.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_th.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_tl.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_tl.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_tr.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_tr.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_uk.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_uk.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_ur_IN.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_vi.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_vi.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_zh_CN.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_zh_TW.properties b/webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileContactInformation_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileContactInformation_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_ar.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_ar.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_aro.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_aro.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_az.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_az.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_ca.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_ca.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_ceb.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_ceb.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_co.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_co.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_cs.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_cs.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_de.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_de.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_el.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_el.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_en.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_en.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_es_ES.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_es_ES.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_eu.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_eu.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_fa.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_fa.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_fi.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_fi.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_fil.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_fil.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_fr.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_fr.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_hi.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_hi.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_hu.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_hu.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_id.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_id.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_in.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_in.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_in.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_in.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_it.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_it.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_ja.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_ja.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_kab.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_kab.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_kab.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_kab.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_ko.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_ko.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_lt.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_lt.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_ms.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_ms.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_nl.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_nl.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_no.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_no.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_pcm.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_pcm.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_pl.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_pl.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_pt_BR.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_pt_PT.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_ro.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_ro.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_ru.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_ru.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_sk.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_sk.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_sl.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_sl.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_sq.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_sq.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_sv_SE.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_th.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_th.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_tl.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_tl.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_tr.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_tr.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_uk.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_uk.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_ur_IN.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_vi.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_vi.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_zh_CN.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_zh_TW.properties b/webapp/src/main/resources/locale/portlet/social/ProfileHeader_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileHeader_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileHeader_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_ar.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_ar.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_aro.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_aro.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_az.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_az.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_ca.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_ca.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_ceb.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_ceb.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_co.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_co.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_cs.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_cs.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_de.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_de.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_el.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_el.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_en.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_en.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_es_ES.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_es_ES.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_eu.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_eu.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_fa.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_fa.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_fi.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_fi.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_fil.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_fil.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_fr.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_fr.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_hi.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_hi.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_hu.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_hu.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_id.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_id.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_in.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_in.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_in.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_in.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_it.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_it.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_ja.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_ja.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_kab.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_kab.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_kab.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_kab.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_ko.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_ko.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_lt.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_lt.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_ms.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_ms.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_nl.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_nl.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_no.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_no.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_pcm.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_pcm.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_pl.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_pl.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_pt_BR.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_pt_PT.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_ro.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_ro.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_ru.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_ru.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_sk.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_sk.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_sl.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_sl.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_sq.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_sq.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_sv_SE.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_th.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_th.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_tl.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_tl.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_tr.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_tr.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_uk.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_uk.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_ur_IN.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_vi.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_vi.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_zh_CN.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_zh_TW.properties b/webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/ProfileWorkExperience_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/social/ProfileWorkExperience_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ar.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ar.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_aro.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_aro.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_az.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_az.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ca.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ca.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ceb.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ceb.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_co.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_co.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_cs.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_cs.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_de.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_de.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_el.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_el.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_en.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_en.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_es_ES.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_es_ES.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_eu.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_eu.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_fa.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_fa.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_fi.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_fi.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_fil.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_fil.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_fr.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_fr.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_hi.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_hi.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_hu.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_hu.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_id.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_id.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_in.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_in.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_in.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_in.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_it.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_it.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ja.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ja.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_kab.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_kab.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_kab.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_kab.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ko.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ko.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_lt.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_lt.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ms.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ms.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_nl.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_nl.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_no.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_no.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_pcm.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_pcm.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_pl.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_pl.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_pt_BR.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_pt_PT.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ro.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ro.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ru.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ru.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_sk.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_sk.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_sl.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_sl.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_sq.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_sq.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_sv_SE.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_th.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_th.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_tl.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_tl.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_tr.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_tr.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_uk.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_uk.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ur_IN.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_vi.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_vi.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_zh_CN.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_zh_TW.properties b/webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpaceInfosPortlet_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/social/SpaceInfosPortlet_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ar.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ar.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ar.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ar.properties index 677089ff193..7dc56b67eb0 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ar.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ar.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=تأكيد social.spaces.administration.delete.spaces.confirm=هل تؤكد حذف هذا الفضاء؟ social.spaces.administration.delete.spaces.button.delete=حذف social.spaces.administration.delete.spaces.button.cancel=إلغاء -social.spaces.administration.restore.spaceHomeLayout.confirm.title=استعادة التخطيط؟ -social.spaces.administration.restore.spaceHomeLayout.confirm.message=هل تؤكد إعادة تعيين التخطيط الحالي المطبق على المساحة للحصول على التخطيط الافتراضي (ستتم إزالة أي مدخل مخصص مضاف إلى المساحة الرئيسية)؟ -social.spaces.administration.restore.spaceHomeLayout.button.confirm=تأكيد -social.spaces.administration.restore.spaceHomeLayout.button.cancel=الغاء -social.spaces.administration.restore.spaceHomeLayout.confimed=إستعادة تخطيط الصفحة الرئيسية للفضاء كما هو مطلوب -social.spaces.administration.restore.spaceHomeLayout.error=حدث خطأ أثناء استعادة تخطيط الصفحة الرئيسية social.spaces.administration.manageSpaces.spaceBindingForm.title=إضافة ربط social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=اكتب اسم المجموعة social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=مجموعات مرتبطة @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=عدد المستخدم social.spaces.administration.manageSpaces.actions=الإجراءات social.spaces.administration.manageSpaces.actions.bind=ربط الفضاء social.spaces.administration.manageSpaces.actions.edit=تغيير -social.spaces.administration.manageSpaces.actions.resetHomeLayout=استعادة تصميم الفضاء social.spaces.administration.manageSpaces.actions.delete=حذف social.spaces.administration.manageSpaces.noSpaces=لا social.spaces.administration.manageSpaces.search=اكتب اسم أو وصف المساحة @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=ربط الفضاء social.spaces.administration.permissions.actions.edit=تغيير social.spaces.administration.permissions.actions.save=حفظ social.spaces.administration.permissions.actions.cancel=الغاء -social.spaces.administration.permissions.createSpace=انشاء فضاء -social.spaces.administration.permissions.descriptionCreateSpace=القدرة على تعديل الفضاءات social.spaces.administration.permissions.manageSpaces=إدارة الفضاءات social.spaces.administration.permissions.descriptionManageSpaces=القدرة على تعديل الفضاءات social.spaces.administration.permissions.noAssignment=لا تكليف diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_aro.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_aro.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_aro.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_aro.properties index 677089ff193..7dc56b67eb0 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_aro.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_aro.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=تأكيد social.spaces.administration.delete.spaces.confirm=هل تؤكد حذف هذا الفضاء؟ social.spaces.administration.delete.spaces.button.delete=حذف social.spaces.administration.delete.spaces.button.cancel=إلغاء -social.spaces.administration.restore.spaceHomeLayout.confirm.title=استعادة التخطيط؟ -social.spaces.administration.restore.spaceHomeLayout.confirm.message=هل تؤكد إعادة تعيين التخطيط الحالي المطبق على المساحة للحصول على التخطيط الافتراضي (ستتم إزالة أي مدخل مخصص مضاف إلى المساحة الرئيسية)؟ -social.spaces.administration.restore.spaceHomeLayout.button.confirm=تأكيد -social.spaces.administration.restore.spaceHomeLayout.button.cancel=الغاء -social.spaces.administration.restore.spaceHomeLayout.confimed=إستعادة تخطيط الصفحة الرئيسية للفضاء كما هو مطلوب -social.spaces.administration.restore.spaceHomeLayout.error=حدث خطأ أثناء استعادة تخطيط الصفحة الرئيسية social.spaces.administration.manageSpaces.spaceBindingForm.title=إضافة ربط social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=اكتب اسم المجموعة social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=مجموعات مرتبطة @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=عدد المستخدم social.spaces.administration.manageSpaces.actions=الإجراءات social.spaces.administration.manageSpaces.actions.bind=ربط الفضاء social.spaces.administration.manageSpaces.actions.edit=تغيير -social.spaces.administration.manageSpaces.actions.resetHomeLayout=استعادة تصميم الفضاء social.spaces.administration.manageSpaces.actions.delete=حذف social.spaces.administration.manageSpaces.noSpaces=لا social.spaces.administration.manageSpaces.search=اكتب اسم أو وصف المساحة @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=ربط الفضاء social.spaces.administration.permissions.actions.edit=تغيير social.spaces.administration.permissions.actions.save=حفظ social.spaces.administration.permissions.actions.cancel=الغاء -social.spaces.administration.permissions.createSpace=انشاء فضاء -social.spaces.administration.permissions.descriptionCreateSpace=القدرة على تعديل الفضاءات social.spaces.administration.permissions.manageSpaces=إدارة الفضاءات social.spaces.administration.permissions.descriptionManageSpaces=القدرة على تعديل الفضاءات social.spaces.administration.permissions.noAssignment=لا تكليف diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_az.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_az.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_az.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_az.properties index 3e10517fd76..90d896e91d9 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_az.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_az.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ca.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ca.properties similarity index 89% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ca.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ca.properties index f9d90078f66..72d80a5ea6b 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ca.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ca.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ceb.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ceb.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ceb.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ceb.properties index 99779447d84..bf1b5d1f68b 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ceb.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ceb.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_co.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_co.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_co.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_co.properties index c6e0c6a3fe9..2bda5436bfd 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_co.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_co.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_cs.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_cs.properties similarity index 89% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_cs.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_cs.properties index aa6656e13b2..a7d747608cf 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_cs.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_cs.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_de.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_de.properties similarity index 89% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_de.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_de.properties index 72877b594bf..9e588389adf 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_de.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_de.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Bestätigung social.spaces.administration.delete.spaces.confirm=Sind sie sich sicher das sie das wirklich löschen wollen? social.spaces.administration.delete.spaces.button.delete=Löschen social.spaces.administration.delete.spaces.button.cancel=Abbrechen -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Layout wiederherstellen? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Bestätigen Sie, dass das aktuelle Layout vom Standardlayout ersetzt werden soll. Jedes benutzerdefinierte Portlet wird entfernt. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Bestätigen -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Abbrechen -social.spaces.administration.restore.spaceHomeLayout.confimed=Layout der Raum-Startseite wie gewünscht wiederherstellen -social.spaces.administration.restore.spaceHomeLayout.error=Fehler beim Wiederherstellen des Layouts der Raumstartseite social.spaces.administration.manageSpaces.spaceBindingForm.title=Bindung hinzufügen social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Geben Sie den Namen einer Gruppe ein social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Gebundene Gruppen @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Anzahl der gebundenen Be social.spaces.administration.manageSpaces.actions=Aktionen social.spaces.administration.manageSpaces.actions.bind=Raumbindung social.spaces.administration.manageSpaces.actions.edit=Bearbeiten -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Standardlayout wiederherstellen social.spaces.administration.manageSpaces.actions.delete=Löschen social.spaces.administration.manageSpaces.noSpaces=Nein social.spaces.administration.manageSpaces.search=Geben Sie den Namen oder die Beschreibung eines Raums ein @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Raumbindung social.spaces.administration.permissions.actions.edit=Bearbeiten social.spaces.administration.permissions.actions.save=Speichern social.spaces.administration.permissions.actions.cancel=Abbrechen -social.spaces.administration.permissions.createSpace=Räume erstellen -social.spaces.administration.permissions.descriptionCreateSpace=Fähigkeit, Räume zu erstellen social.spaces.administration.permissions.manageSpaces=Räume verwalten social.spaces.administration.permissions.descriptionManageSpaces=Fähigkeit, Räume zu bearbeiten social.spaces.administration.permissions.noAssignment=Keine Zuweisung diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_el.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_el.properties similarity index 89% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_el.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_el.properties index 7b555f30c35..dd4fabddae8 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_el.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_el.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_en.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_en.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_en.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_en.properties index c6e0c6a3fe9..2bda5436bfd 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_en.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_en.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_es_ES.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_es_ES.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_es_ES.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_es_ES.properties index 00fae932192..2cdef2bf07c 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_es_ES.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_es_ES.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmación social.spaces.administration.delete.spaces.confirm=¿Confirmas la eliminación de este espacio? social.spaces.administration.delete.spaces.button.delete=Eliminar social.spaces.administration.delete.spaces.button.cancel=Cancelar -social.spaces.administration.restore.spaceHomeLayout.confirm.title=¿Restaurar diseño? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirmar -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancelar -social.spaces.administration.restore.spaceHomeLayout.confimed=Se ha restaurado el diseño de la página de inicio del espacio como se solicitó -social.spaces.administration.restore.spaceHomeLayout.error=Error al restaurar el diseño de la página de inicio del espacio social.spaces.administration.manageSpaces.spaceBindingForm.title=Añadir asignación social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Escribe el nombre del grupo social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Grupos asignados @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Número de usuarios asig social.spaces.administration.manageSpaces.actions=Acciones social.spaces.administration.manageSpaces.actions.bind=Asignación del espacio social.spaces.administration.manageSpaces.actions.edit=Editar -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restaurar el diseño espacio por defecto social.spaces.administration.manageSpaces.actions.delete=Eliminar social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Introduce nombre o descripción del espacio @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Asignación del espacio social.spaces.administration.permissions.actions.edit=Editar social.spaces.administration.permissions.actions.save=Guardar social.spaces.administration.permissions.actions.cancel=Cancelar -social.spaces.administration.permissions.createSpace=Crear espacios -social.spaces.administration.permissions.descriptionCreateSpace=Capacidad de crear espacios social.spaces.administration.permissions.manageSpaces=Administrar espacios social.spaces.administration.permissions.descriptionManageSpaces=Capacidad de editar espacios social.spaces.administration.permissions.noAssignment=Sin asignar diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_eu.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_eu.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_eu.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_eu.properties index c6e0c6a3fe9..2bda5436bfd 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_eu.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_eu.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fa.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fa.properties similarity index 89% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fa.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fa.properties index 22cb8d377f9..161d361ed4b 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fa.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fa.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fi.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fi.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fi.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fi.properties index c6e0c6a3fe9..2bda5436bfd 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fi.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fi.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fil.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fil.properties similarity index 89% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fil.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fil.properties index 4b33be2da63..3d0149aaddf 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fil.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fil.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fr.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fr.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fr.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fr.properties index 16a2a81aa59..ed253d4dd0a 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fr.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_fr.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Vous confirmez la suppression de cet espace? social.spaces.administration.delete.spaces.button.delete=Supprimer social.spaces.administration.delete.spaces.button.cancel=Annuler -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Réinitialiser ? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Confirmez-vous la réinitialisation de la mise en page de l'espace (toute application ajoutée à la page d'accueil de l'espace sera supprimée) ? -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirmer -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Annuler -social.spaces.administration.restore.spaceHomeLayout.confimed=Mise en page de l'espace restaurée avec succès -social.spaces.administration.restore.spaceHomeLayout.error=Une erreur s'est produite lors de la restauration de la mise en page de l'espace social.spaces.administration.manageSpaces.spaceBindingForm.title=Ajouter liaison social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Saisir un nom de groupe social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Groupes liés @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Nombre des utilisateurs social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Liaison espace social.spaces.administration.manageSpaces.actions.edit=Modifier -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restaurer la mise en page par défaut de l'espace social.spaces.administration.manageSpaces.actions.delete=Supprimer social.spaces.administration.manageSpaces.noSpaces=Non social.spaces.administration.manageSpaces.search=Entrez un nom ou la description de l'espace @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Liaison espace social.spaces.administration.permissions.actions.edit=Modifier social.spaces.administration.permissions.actions.save=Enregistrer social.spaces.administration.permissions.actions.cancel=Annuler -social.spaces.administration.permissions.createSpace=Créer des espaces -social.spaces.administration.permissions.descriptionCreateSpace=Possibilité de créer des espaces social.spaces.administration.permissions.manageSpaces=Gérer les espaces social.spaces.administration.permissions.descriptionManageSpaces=Possibilité de modifier les espaces social.spaces.administration.permissions.noAssignment=Aucune attribution diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_hi.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_hi.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_hi.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_hi.properties index c6e0c6a3fe9..2bda5436bfd 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_hi.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_hi.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_hu.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_hu.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_hu.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_hu.properties index c6e0c6a3fe9..2bda5436bfd 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_hu.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_hu.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_id.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_id.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_id.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_id.properties index fb02ae71fc3..993f4b3784a 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_id.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_id.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Konfirmasi social.spaces.administration.delete.spaces.confirm=Apakah Anda mengonfirmasi penghapusan forum ini? social.spaces.administration.delete.spaces.button.delete=Hapus social.spaces.administration.delete.spaces.button.cancel=Batal -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Apakah Anda ingin mengembalikan tata letak? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Konfirmasi -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Batal -social.spaces.administration.restore.spaceHomeLayout.confimed=Tata letak halaman beranda forum dipulihkan sesuai permintaan. -social.spaces.administration.restore.spaceHomeLayout.error=Terjadi kesalahan saat memulihkan tata letak halaman beranda forum. social.spaces.administration.manageSpaces.spaceBindingForm.title=Tambahkan ikatan social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Ketik nama grup social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Grup yang terikat @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Jumlah pengguna yang ter social.spaces.administration.manageSpaces.actions=Aksi social.spaces.administration.manageSpaces.actions.bind=Pengikatan forum social.spaces.administration.manageSpaces.actions.edit=Sunting -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Pulihkan tata letak bawaan forum. social.spaces.administration.manageSpaces.actions.delete=Hapus social.spaces.administration.manageSpaces.noSpaces=Tidak social.spaces.administration.manageSpaces.search=Masukkan nama atau deskripsi forum. @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Perikatan forum social.spaces.administration.permissions.actions.edit=Sunting social.spaces.administration.permissions.actions.save=Simpan social.spaces.administration.permissions.actions.cancel=Batal -social.spaces.administration.permissions.createSpace=Buat Forum -social.spaces.administration.permissions.descriptionCreateSpace=Kemampuan untuk membuat forum. social.spaces.administration.permissions.manageSpaces=Kelola forum social.spaces.administration.permissions.descriptionManageSpaces=Kemampuan untuk menyunting forum social.spaces.administration.permissions.noAssignment=Tidak ada penugasan diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_in.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_in.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_in.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_in.properties index ed2b77340a7..60fc6a1ffae 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_in.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_in.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Do you confirm to reset the current layout applied to the space to have the default layout (any customized portlet added to the space home will be removed)? -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_it.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_it.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_it.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_it.properties index 59a1c4befb2..dcfd1fad336 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_it.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_it.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Conferma social.spaces.administration.delete.spaces.confirm=Confermi l'eliminazione di questo spazio? social.spaces.administration.delete.spaces.button.delete=Eliminare social.spaces.administration.delete.spaces.button.cancel=Cancellare -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Ripristinare il layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Conferma -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancellare -social.spaces.administration.restore.spaceHomeLayout.confimed=Il layout della home page dello spazio è stato ripristinato come richiesto -social.spaces.administration.restore.spaceHomeLayout.error=Si è verificato un errore ripristinando il layout della pagina home dello spazio social.spaces.administration.manageSpaces.spaceBindingForm.title=Aggiungi Associazione social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Digita un nome del gruppo social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Gruppi associati @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Numero di utenti associa social.spaces.administration.manageSpaces.actions=Azioni social.spaces.administration.manageSpaces.actions.bind=Associazione Spazio social.spaces.administration.manageSpaces.actions.edit=Modificare -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Ripristinare il layout predefinito dello spazio social.spaces.administration.manageSpaces.actions.delete=Eliminare social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Digita un nome dello spazio o la descrizione @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Spazi Collegati social.spaces.administration.permissions.actions.edit=Modificare social.spaces.administration.permissions.actions.save=Salvare social.spaces.administration.permissions.actions.cancel=Cancellare -social.spaces.administration.permissions.createSpace=Crea spazi -social.spaces.administration.permissions.descriptionCreateSpace=Abilità di creare spazi social.spaces.administration.permissions.manageSpaces=Gestire gli spazi social.spaces.administration.permissions.descriptionManageSpaces=Abilità di modificare spazi social.spaces.administration.permissions.noAssignment=Nessun incarico diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ja.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ja.properties similarity index 89% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ja.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ja.properties index 5a919f30a4b..8e87c478070 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ja.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ja.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_kab.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_kab.properties similarity index 97% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_kab.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_kab.properties index d4fc5722112..8a2af10ced6 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_kab.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_kab.properties @@ -50,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ko.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ko.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ko.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ko.properties index c6e0c6a3fe9..2bda5436bfd 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ko.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ko.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_lt.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_lt.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_lt.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_lt.properties index b0a998a17d3..85ade26f998 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_lt.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_lt.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ms.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ms.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ms.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ms.properties index c6e0c6a3fe9..2bda5436bfd 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ms.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ms.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_nl.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_nl.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_nl.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_nl.properties index abb9c32076e..d41530459a7 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_nl.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_nl.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_no.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_no.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_no.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_no.properties index 9950db44292..b99f10f3cd9 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_no.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_no.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pcm.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pcm.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pcm.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pcm.properties index c6e0c6a3fe9..2bda5436bfd 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pcm.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pcm.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pl.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pl.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pl.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pl.properties index 41086726dde..1ce6918f8f9 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pl.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pl.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pt_BR.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pt_BR.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pt_BR.properties index eac9992d70d..9dd971b97d2 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pt_BR.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pt_BR.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pt_PT.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pt_PT.properties similarity index 89% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pt_PT.properties index 61123b867ec..02fab917669 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pt_PT.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_pt_PT.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ro.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ro.properties similarity index 89% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ro.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ro.properties index c8da266a309..16ca69bb4ce 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ro.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ro.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ru.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ru.properties similarity index 89% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ru.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ru.properties index d7fd8af3ceb..20d60d5732a 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ru.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ru.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sk.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sk.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sk.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sk.properties index c6e0c6a3fe9..2bda5436bfd 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sk.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sk.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sl.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sl.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sl.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sl.properties index 9cfb5fc8ba9..b660799e663 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sl.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sl.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sq.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sq.properties similarity index 91% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sq.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sq.properties index ba5a2007f53..a767a62f015 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sq.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sq.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=crwdns45984:0crwdne4598 social.spaces.administration.delete.spaces.confirm=crwdns45986:0crwdne45986:0 social.spaces.administration.delete.spaces.button.delete=crwdns45988:0crwdne45988:0 social.spaces.administration.delete.spaces.button.cancel=crwdns45990:0crwdne45990:0 -social.spaces.administration.restore.spaceHomeLayout.confirm.title=crwdns45992:0crwdne45992:0 -social.spaces.administration.restore.spaceHomeLayout.confirm.message=crwdns45994:0crwdne45994:0 -social.spaces.administration.restore.spaceHomeLayout.button.confirm=crwdns45996:0crwdne45996:0 -social.spaces.administration.restore.spaceHomeLayout.button.cancel=crwdns45998:0crwdne45998:0 -social.spaces.administration.restore.spaceHomeLayout.confimed=crwdns46000:0crwdne46000:0 -social.spaces.administration.restore.spaceHomeLayout.error=crwdns46002:0crwdne46002:0 social.spaces.administration.manageSpaces.spaceBindingForm.title=crwdns46004:0crwdne46004:0 social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=crwdns46006:0crwdne46006:0 social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=crwdns46008:0crwdne46008:0 @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=crwdns46060:0crwdne46060 social.spaces.administration.manageSpaces.actions=crwdns46062:0crwdne46062:0 social.spaces.administration.manageSpaces.actions.bind=crwdns46064:0crwdne46064:0 social.spaces.administration.manageSpaces.actions.edit=crwdns46066:0crwdne46066:0 -social.spaces.administration.manageSpaces.actions.resetHomeLayout=crwdns46068:0crwdne46068:0 social.spaces.administration.manageSpaces.actions.delete=crwdns46070:0crwdne46070:0 social.spaces.administration.manageSpaces.noSpaces=crwdns46072:0crwdne46072:0 social.spaces.administration.manageSpaces.search=crwdns46074:0crwdne46074:0 @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=crwdns46086:0crwdne46086:0 social.spaces.administration.permissions.actions.edit=crwdns46088:0crwdne46088:0 social.spaces.administration.permissions.actions.save=crwdns46090:0crwdne46090:0 social.spaces.administration.permissions.actions.cancel=crwdns46092:0crwdne46092:0 -social.spaces.administration.permissions.createSpace=crwdns46094:0crwdne46094:0 -social.spaces.administration.permissions.descriptionCreateSpace=crwdns46096:0crwdne46096:0 social.spaces.administration.permissions.manageSpaces=crwdns46098:0crwdne46098:0 social.spaces.administration.permissions.descriptionManageSpaces=crwdns46100:0crwdne46100:0 social.spaces.administration.permissions.noAssignment=crwdns46102:0crwdne46102:0 diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sv_SE.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sv_SE.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sv_SE.properties index aa6a947cf5a..04b58b68a09 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sv_SE.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_sv_SE.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_th.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_th.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_th.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_th.properties index c6e0c6a3fe9..2bda5436bfd 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_th.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_th.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_tl.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_tl.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_tl.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_tl.properties index ebd6f59ea37..189d8890a6d 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_tl.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_tl.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_tr.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_tr.properties similarity index 89% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_tr.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_tr.properties index bcda6068de3..0b40823fd89 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_tr.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_tr.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Bu alanın silinmesini onaylıyor musunuz? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Bağlayıcı Ekle social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Bir grubun adını yazın social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bağlı Gruplar @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Bağlı kullanıcı say social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Alan Bağlayıcı social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Bir alanın adını veya açıklamasını yazın @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Alan Bağlayıcı social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Alanlar oluşturun -social.spaces.administration.permissions.descriptionCreateSpace=Alan oluşturma olanağı social.spaces.administration.permissions.manageSpaces=Alanları yönetin social.spaces.administration.permissions.descriptionManageSpaces=Alanları düzenleme olanağı social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_uk.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_uk.properties similarity index 89% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_uk.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_uk.properties index 96b58f5ea27..adf73cff79d 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_uk.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_uk.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Ви підтверджуєте видалення цієї області? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Додати прив'язку social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Введіть назву групи social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Прив'язані групи @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Кількість пр social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Прив'язування області social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Введіть ім'я області або опис @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Створити області -social.spaces.administration.permissions.descriptionCreateSpace=Здатність створити області social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Здатність редагувати області social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ur_IN.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ur_IN.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ur_IN.properties index ee0954ece1d..0d5ab393cce 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ur_IN.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_ur_IN.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_vi.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_vi.properties similarity index 89% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_vi.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_vi.properties index 905b778c2a1..9ff52ef1b57 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_vi.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_vi.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_zh_CN.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_zh_CN.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_zh_CN.properties index 97e524f12ba..741ec3242ca 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_zh_CN.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_zh_CN.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_zh_TW.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_zh_TW.properties similarity index 88% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_zh_TW.properties index df638759259..9f4c12eff4c 100644 --- a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_zh_TW.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_zh_TW.properties @@ -2,12 +2,6 @@ social.spaces.administration.delete.spaces.confirm.title=Confirmation social.spaces.administration.delete.spaces.confirm=Do you confirm the deletion of this space? social.spaces.administration.delete.spaces.button.delete=Delete social.spaces.administration.delete.spaces.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confirm.title=Restore layout? -social.spaces.administration.restore.spaceHomeLayout.confirm.message=Please confirm that you want to reset the current layout and apply the default layout. Any custom portlets added to the space's homepage will be removed. -social.spaces.administration.restore.spaceHomeLayout.button.confirm=Confirm -social.spaces.administration.restore.spaceHomeLayout.button.cancel=Cancel -social.spaces.administration.restore.spaceHomeLayout.confimed=Space home page layout restored as requested -social.spaces.administration.restore.spaceHomeLayout.error=An error occurred while restoring space home page layout social.spaces.administration.manageSpaces.spaceBindingForm.title=Add Binding social.spaces.administration.manageSpaces.spaceBindingForm.textField.placeHolder=Type a group's name social.spaces.administration.manageSpaces.spaceBindingForm.boundGroups=Bound Groups @@ -44,7 +38,6 @@ social.spaces.administration.manageSpaces.users.tooltip=Number of bound users/To social.spaces.administration.manageSpaces.actions=Actions social.spaces.administration.manageSpaces.actions.bind=Space Binding social.spaces.administration.manageSpaces.actions.edit=Edit -social.spaces.administration.manageSpaces.actions.resetHomeLayout=Restore the default space layout social.spaces.administration.manageSpaces.actions.delete=Delete social.spaces.administration.manageSpaces.noSpaces=No social.spaces.administration.manageSpaces.search=Type a space's name or description @@ -57,8 +50,6 @@ social.spaces.administration.permissions.actions.bind=Space Binding social.spaces.administration.permissions.actions.edit=Edit social.spaces.administration.permissions.actions.save=Save social.spaces.administration.permissions.actions.cancel=Cancel -social.spaces.administration.permissions.createSpace=Create spaces -social.spaces.administration.permissions.descriptionCreateSpace=Ability to create spaces social.spaces.administration.permissions.manageSpaces=Manage spaces social.spaces.administration.permissions.descriptionManageSpaces=Ability to edit spaces social.spaces.administration.permissions.noAssignment=No assignment diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_ar.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_ar.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_aro.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_aro.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_az.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_az.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_ca.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_ca.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_ceb.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_ceb.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_co.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_co.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_cs.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_cs.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_de.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_de.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_el.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_el.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_en.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_en.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_es_ES.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_es_ES.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_eu.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_eu.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_fa.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_fa.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_fi.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_fi.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_fil.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_fil.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_fr.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_fr.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_hi.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_hi.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_hu.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_hu.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_id.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_id.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_in.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_in.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_in.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_in.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_it.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_it.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_ja.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_ja.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_kab.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_kab.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_kab.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_kab.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_ko.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_ko.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_lt.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_lt.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_ms.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_ms.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_nl.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_nl.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_no.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_no.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_pcm.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_pcm.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_pl.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_pl.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_pt_BR.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_pt_PT.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_ro.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_ro.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_ru.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_ru.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_sk.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_sk.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_sl.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_sl.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_sq.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_sq.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_sv_SE.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_th.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_th.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_tl.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_tl.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_tr.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_tr.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_uk.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_uk.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_ur_IN.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_vi.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_vi.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_zh_CN.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_zh_TW.properties b/webapp/src/main/resources/locale/portlet/social/SpacesListApplication_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesListApplication_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesListApplication_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_ar.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_ar.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_aro.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_aro.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_az.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_az.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_ca.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_ca.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_ceb.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_ceb.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_co.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_co.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_cs.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_cs.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_de.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_de.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_el.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_el.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_en.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_en.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_es_ES.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_es_ES.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_eu.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_eu.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_fa.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_fa.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_fi.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_fi.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_fil.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_fil.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_fr.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_fr.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_hi.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_hi.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_hu.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_hu.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_id.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_id.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_in.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_in.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_in.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_in.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_it.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_it.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_ja.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_ja.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_kab.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_kab.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_kab.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_kab.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_ko.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_ko.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_lt.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_lt.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_ms.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_ms.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_nl.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_nl.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_no.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_no.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_pcm.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_pcm.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_pl.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_pl.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_pt_BR.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_pt_PT.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_ro.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_ro.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_ru.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_ru.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_sk.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_sk.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_sl.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_sl.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_sq.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_sq.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_sv_SE.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_th.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_th.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_tl.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_tl.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_tr.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_tr.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_uk.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_uk.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_ur_IN.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_vi.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_vi.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_zh_CN.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_zh_TW.properties b/webapp/src/main/resources/locale/portlet/social/SpacesOverview_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SpacesOverview_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/social/SpacesOverview_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_ar.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_ar.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_aro.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_aro.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_az.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_az.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_ca.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_ca.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_ceb.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_ceb.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_co.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_co.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_cs.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_cs.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_de.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_de.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_el.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_el.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_en.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_en.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_es_ES.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_es_ES.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_eu.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_eu.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_fa.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_fa.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_fi.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_fi.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_fil.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_fil.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_fr.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_fr.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_hi.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_hi.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_hu.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_hu.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_id.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_id.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_in.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_in.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_in.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_in.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_it.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_it.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_ja.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_ja.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_kab.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_kab.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_kab.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_kab.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_ko.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_ko.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_lt.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_lt.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_ms.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_ms.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_nl.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_nl.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_no.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_no.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_pcm.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_pcm.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_pl.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_pl.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_pt_BR.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_pt_PT.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_ro.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_ro.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_ru.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_ru.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_sk.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_sk.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_sl.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_sl.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_sq.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_sq.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_sv_SE.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_th.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_th.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_tl.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_tl.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_tr.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_tr.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_uk.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_uk.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_ur_IN.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_vi.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_vi.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_zh_CN.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_zh_TW.properties b/webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/SuggestionsPortlet_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/social/SuggestionsPortlet_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_ar.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_ar.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_aro.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_aro.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_az.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_az.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_ca.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_ca.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_ceb.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_ceb.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_co.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_co.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_cs.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_cs.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_de.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_de.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_el.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_el.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_en.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_en.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_es_ES.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_es_ES.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_eu.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_eu.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_fa.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_fa.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_fi.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_fi.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_fil.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_fil.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_fr.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_fr.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_hi.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_hi.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_hu.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_hu.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_id.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_id.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_in.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_in.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_in.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_in.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_it.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_it.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_ja.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_ja.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_kab.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_kab.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_kab.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_kab.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_ko.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_ko.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_lt.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_lt.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_ms.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_ms.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_nl.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_nl.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_no.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_no.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_pcm.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_pcm.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_pl.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_pl.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_pt_BR.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_pt_PT.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_ro.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_ro.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_ru.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_ru.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_sk.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_sk.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_sl.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_sl.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_sq.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_sq.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_sv_SE.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_th.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_th.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_tl.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_tl.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_tr.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_tr.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_uk.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_uk.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_ur_IN.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_vi.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_vi.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_zh_CN.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_zh_TW.properties b/webapp/src/main/resources/locale/portlet/social/UserPopup_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserPopup_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/social/UserPopup_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_ar.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_ar.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_aro.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_aro.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_az.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_az.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_ca.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_ca.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_ceb.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_ceb.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_co.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_co.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_cs.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_cs.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_de.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_de.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_el.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_el.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_en.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_en.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_es_ES.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_es_ES.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_eu.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_eu.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_fa.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_fa.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_fi.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_fi.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_fil.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_fil.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_fr.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_fr.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_hi.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_hi.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_hu.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_hu.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_id.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_id.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_in.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_in.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_in.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_in.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_it.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_it.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_ja.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_ja.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_kab.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_kab.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_kab.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_kab.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_ko.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_ko.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_lt.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_lt.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_ms.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_ms.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_nl.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_nl.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_no.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_no.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_pcm.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_pcm.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_pl.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_pl.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_pt_BR.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_pt_PT.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_ro.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_ro.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_ru.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_ru.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_sk.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_sk.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_sl.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_sl.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_sq.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_sq.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_sv_SE.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_th.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_th.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_tl.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_tl.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_tr.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_tr.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_uk.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_uk.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_ur_IN.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_vi.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_vi.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_zh_CN.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_zh_TW.properties b/webapp/src/main/resources/locale/portlet/social/UserSettings_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/social/UserSettings_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/social/UserSettings_zh_TW.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_ar.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_ar.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_ar.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_ar.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_aro.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_aro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_aro.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_aro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_az.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_az.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_az.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_az.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_ca.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_ca.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_ca.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_ca.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_ceb.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_ceb.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_ceb.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_ceb.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_co.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_co.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_co.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_co.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_cs.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_cs.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_cs.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_cs.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_de.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_de.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_de.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_de.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_el.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_el.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_el.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_el.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_en.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_en.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_en.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_en.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_es_ES.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_es_ES.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_es_ES.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_es_ES.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_eu.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_eu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_eu.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_eu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_fa.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_fa.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_fa.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_fa.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_fi.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_fi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_fi.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_fi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_fil.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_fil.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_fil.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_fil.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_fr.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_fr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_fr.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_fr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_he.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_he.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_he.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_he.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_hi.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_hi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_hi.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_hi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_hu.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_hu.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_hu.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_hu.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_id.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_id.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_id.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_id.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_in.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_in.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_in.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_in.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_it.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_it.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_it.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_it.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_ja.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_ja.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_ja.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_ja.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_kab.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_kab.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_kab.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_kab.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_ko.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_ko.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_ko.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_ko.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_lt.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_lt.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_lt.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_lt.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_ms.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_ms.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_ms.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_ms.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_nl.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_nl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_nl.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_nl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_no.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_no.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_no.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_no.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_pcm.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_pcm.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_pcm.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_pcm.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_pl.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_pl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_pl.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_pl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_pt_BR.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_pt_BR.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_pt_BR.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_pt_BR.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_pt_PT.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_pt_PT.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_pt_PT.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_pt_PT.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_ro.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_ro.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_ro.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_ro.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_ru.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_ru.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_ru.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_ru.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_sk.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_sk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_sk.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_sk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_sl.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_sl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_sl.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_sl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_sq.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_sq.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_sq.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_sq.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_sv_SE.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_sv_SE.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_sv_SE.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_sv_SE.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_th.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_th.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_th.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_th.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_tl.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_tl.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_tl.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_tl.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_tr.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_tr.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_tr.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_tr.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_uk.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_uk.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_uk.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_uk.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_ur_IN.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_ur_IN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_ur_IN.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_ur_IN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_vi.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_vi.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_vi.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_vi.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_zh_CN.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_zh_CN.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_zh_CN.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_zh_CN.properties diff --git a/webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_zh_TW.properties b/webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_zh_TW.properties similarity index 100% rename from webapp/portlet/src/main/resources/locale/portlet/whoisonline/whoisonline_zh_TW.properties rename to webapp/src/main/resources/locale/portlet/whoisonline/whoisonline_zh_TW.properties diff --git a/webapp/src/main/resources/social.properties b/webapp/src/main/resources/social.properties new file mode 100644 index 00000000000..bdf205b419e --- /dev/null +++ b/webapp/src/main/resources/social.properties @@ -0,0 +1,18 @@ +# +# This file is part of the Meeds project (https://meeds.io/). +# +# Copyright (C) 2024 Meeds Association contact@meeds.io +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/webapp/portlet/src/main/webapp/META-INF/context.xml b/webapp/src/main/webapp/META-INF/context.xml similarity index 100% rename from webapp/portlet/src/main/webapp/META-INF/context.xml rename to webapp/src/main/webapp/META-INF/context.xml diff --git a/extension/war/src/main/webapp/WEB-INF/conf/configuration.xml b/webapp/src/main/webapp/WEB-INF/conf/configuration.xml similarity index 97% rename from extension/war/src/main/webapp/WEB-INF/conf/configuration.xml rename to webapp/src/main/webapp/WEB-INF/conf/configuration.xml index 1d04371c43a..23d97947e32 100644 --- a/extension/war/src/main/webapp/WEB-INF/conf/configuration.xml +++ b/webapp/src/main/webapp/WEB-INF/conf/configuration.xml @@ -28,7 +28,6 @@ war:/conf/social-extension/portal/dynamic-container-configuration.xml war:/conf/social-extension/portal/upgrade-plugins-configuration.xml war:/conf/social-extension/social/social-configuration.xml - war:/conf/social-extension/social/spaces-templates-configuration.xml war:/conf/social-extension/social/component-plugins-configuration.xml war:/conf/social-extension/social/cache-configuration.xml war:/conf/social-extension/social/common-configuration.xml diff --git a/webapp/src/main/webapp/WEB-INF/conf/social-extension/ckeditor/attach-image-plugin.js b/webapp/src/main/webapp/WEB-INF/conf/social-extension/ckeditor/attach-image-plugin.js new file mode 100644 index 00000000000..4301e2d3bfa --- /dev/null +++ b/webapp/src/main/webapp/WEB-INF/conf/social-extension/ckeditor/attach-image-plugin.js @@ -0,0 +1 @@ + CKEDITOR.plugins.addExternal('attachImage', '/social/js/ckeditorPlugins/attachImage/', 'plugin.js'); \ No newline at end of file diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/ckeditor/config.js b/webapp/src/main/webapp/WEB-INF/conf/social-extension/ckeditor/config.js similarity index 98% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/ckeditor/config.js rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/ckeditor/config.js index 989d9d53389..664f83a43c3 100644 --- a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/ckeditor/config.js +++ b/webapp/src/main/webapp/WEB-INF/conf/social-extension/ckeditor/config.js @@ -24,7 +24,7 @@ CKEDITOR.editorConfig = function(config) { CKEDITOR.plugins.addExternal('tagSuggester', '/commons-extension/eXoPlugins/tagSuggester/', 'plugin.js'); CKEDITOR.plugins.addExternal('formatOption', '/commons-extension/eXoPlugins/formatOption/', 'plugin.js'); CKEDITOR.plugins.addExternal('googleDocPastePlugin', '/commons-extension/eXoPlugins/googleDocPastePlugin/', 'plugin.js'); - CKEDITOR.plugins.addExternal('linkBalloon', '/social-portlet/js/ckeditorPlugins/linkBalloon/', 'plugin.js'); + CKEDITOR.plugins.addExternal('linkBalloon', '/social/js/ckeditorPlugins/linkBalloon/', 'plugin.js'); const embedBaseApiEndpoint = '@JVMProp{io.meeds.iframely.url://ckeditor.iframe.ly/api/oembed?omit_script=1}'; CKEDITOR.config.embed_provider = embedBaseApiEndpoint + (embedBaseApiEndpoint.includes('?') ? '&' : '?') + 'url={url}&callback={callback}'; diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/organization/organization-configuration.xml b/webapp/src/main/webapp/WEB-INF/conf/social-extension/organization/organization-configuration.xml similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/organization/organization-configuration.xml rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/organization/organization-configuration.xml diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/portal/dynamic-container-configuration.xml b/webapp/src/main/webapp/WEB-INF/conf/social-extension/portal/dynamic-container-configuration.xml similarity index 96% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/portal/dynamic-container-configuration.xml rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/portal/dynamic-container-configuration.xml index f5fd2c729a9..61bdd3c1db9 100644 --- a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/portal/dynamic-container-configuration.xml +++ b/webapp/src/main/webapp/WEB-INF/conf/social-extension/portal/dynamic-container-configuration.xml @@ -21,7 +21,7 @@ - social-portlet/HamburgerMenu + social/HamburgerMenu @@ -68,7 +68,7 @@ - social-portlet/Search + social/Search @@ -115,7 +115,7 @@ - social-portlet/TopBarLogo + social/TopBarLogo @@ -162,7 +162,7 @@ - social-portlet/TopBarNotification + social/TopBarNotification @@ -209,7 +209,7 @@ - social-portlet/TopBarFavorites + social/TopBarFavorites @@ -256,7 +256,7 @@ - social-portlet/DrawersOverlay + social/DrawersOverlay @@ -300,7 +300,7 @@ - social-portlet/TopBarMenu + social/TopBarMenu @@ -344,7 +344,7 @@ - social-portlet/Popover + social/Popover @@ -391,7 +391,7 @@ - social-portlet/PlatformSettings + social/PlatformSettings diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/portal/social-portal-configuration.xml b/webapp/src/main/webapp/WEB-INF/conf/social-extension/portal/social-portal-configuration.xml similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/portal/social-portal-configuration.xml rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/portal/social-portal-configuration.xml diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/portal/upgrade-plugins-configuration.xml b/webapp/src/main/webapp/WEB-INF/conf/social-extension/portal/upgrade-plugins-configuration.xml similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/portal/upgrade-plugins-configuration.xml rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/portal/upgrade-plugins-configuration.xml diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/cache-configuration.xml b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/cache-configuration.xml similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/cache-configuration.xml rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/cache-configuration.xml diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/ckeditor-configuration.xml b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/ckeditor-configuration.xml similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/ckeditor-configuration.xml rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/ckeditor-configuration.xml diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/common-configuration.xml b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/common-configuration.xml similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/common-configuration.xml rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/common-configuration.xml diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/component-plugins-configuration.xml b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/component-plugins-configuration.xml similarity index 92% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/component-plugins-configuration.xml rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/component-plugins-configuration.xml index b286a1acdfb..893c91f20df 100644 --- a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/component-plugins-configuration.xml +++ b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/component-plugins-configuration.xml @@ -97,18 +97,6 @@ org.exoplatform.social.core.listeners.SocialMembershipListenerImpl 50 - - space.portal.config.listener - addListenerPlugin - org.exoplatform.portal.config.GroupPortalConfigListener - - - group.name.pattern - The group name pattern - /spaces/ - - - diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/core-configuration.xml b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/core-configuration.xml similarity index 82% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/core-configuration.xml rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/core-configuration.xml index 540c73775c6..14d8d139cf9 100644 --- a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/core-configuration.xml +++ b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/core-configuration.xml @@ -257,7 +257,7 @@ Space storage components. --> - org.exoplatform.social.core.storage.api.SpaceStorage + org.exoplatform.social.core.jpa.storage.SpaceStorage org.exoplatform.social.core.storage.cache.CachedSpaceStorage - + - org.exoplatform.social.core.space.spi.SpaceService - org.exoplatform.social.core.space.impl.SpaceServiceImpl + org.exoplatform.social.core.space.spi.SpaceService + io.meeds.social.core.space.service.SpaceServiceImpl - - - org.exoplatform.social.core.space.spi.SpaceTemplateService - org.exoplatform.social.core.space.impl.SpaceTemplateServiceImpl - - - defaultSpaceTemplate - ${exo.social.template.default:community} - - - - + org.exoplatform.social.core.space.SpacesAdministrationService org.exoplatform.social.core.space.impl.SpacesAdministrationServiceImpl @@ -455,92 +444,6 @@ org.exoplatform.social.core.processor.I18NActivityProcessor org.exoplatform.social.core.processor.I18NActivityProcessor - - exosocial:spaces - addActivityResourceBundlePlugin - org.exoplatform.social.core.processor.ActivityResourceBundlePlugin - - - locale.social.Core - activity key type resource bundle mapping for exosocial:spaces - - - - - space_created - SpaceActivityPublisher.space_created - - - manager_role_granted - SpaceActivityPublisher.manager_role_granted - - - manager_role_revoked - SpaceActivityPublisher.manager_role_revoked - - - has_joined - SpaceActivityPublisher.has_joined - - - has_left - SpaceActivityPublisher.has_left - - - user_joined - SpaceActivityPublisher.user_joined - - - member_left - SpaceActivityPublisher.member_left - - - space_renamed - SpaceActivityPublisher.space_renamed - - - space_description_edited - SpaceActivityPublisher.space_description_edited - - - space_avatar_edited - SpaceActivityPublisher.space_avatar_edited - - - - - - - - - USER_ACTIVITIES_FOR_SPACE - addActivityResourceBundlePlugin - org.exoplatform.social.core.processor.ActivityResourceBundlePlugin - - - locale.social.Core - activity key type resource bundle mapping for exosocial:spaces - - - - - user_joined_public_space - SpaceActivityPublisher.member_of_one_or_zero_public_space - - - user_joined_public_spaces - SpaceActivityPublisher.member_of_number_public_spaces - - - user_space_joined - SpaceActivityPublisher.user_space_joined - - - - - - - USER_ACTIVITIES_FOR_RELATIONSHIP addActivityResourceBundlePlugin @@ -665,31 +568,6 @@ - - SPACE_ACTIVITY - addActivityResourceBundlePlugin - org.exoplatform.social.core.processor.ActivityResourceBundlePlugin - - - locale.social.Core - activity key type resource bundle mapping for space activity - - - - - space_members - SpaceActivityPublisher.members - - - space_member - SpaceActivityPublisher.member - - - - - - - @@ -697,16 +575,6 @@ org.exoplatform.social.core.application.ProfileUpdatesPublisher org.exoplatform.social.core.application.ProfileUpdatesPublisher - - - org.exoplatform.social.core.application.RelationshipPublisher - org.exoplatform.social.core.application.RelationshipPublisher - - - - org.exoplatform.social.core.application.SpaceActivityPublisher - org.exoplatform.social.core.application.SpaceActivityPublisher - org.exoplatform.social.core.profile.settings.UserProfileSettingsService @@ -823,17 +691,12 @@ - org.exoplatform.social.core.space.spi.SpaceService - - SpaceMetadataListenerImpl - addSpaceListener - org.exoplatform.social.core.listeners.SpaceMetadataListenerImpl - - - SpaceActivityPublisher - addSpaceListener - org.exoplatform.social.core.application.SpaceActivityPublisher - + org.exoplatform.social.core.space.spi.SpaceService + + SpaceMetadataListenerImpl + addSpaceListener + org.exoplatform.social.core.listeners.SpaceMetadataListenerImpl + diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/indexing-configuration.xml b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/indexing-configuration.xml similarity index 98% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/indexing-configuration.xml rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/indexing-configuration.xml index 012f7bd47ae..b29582bb874 100644 --- a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/indexing-configuration.xml +++ b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/indexing-configuration.xml @@ -98,8 +98,8 @@ constructor.params - - + + diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/metadata-plugins-configuration.xml b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/metadata-plugins-configuration.xml similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/metadata-plugins-configuration.xml rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/metadata-plugins-configuration.xml diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/notification-configuration.xml b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/notification-configuration.xml similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/notification-configuration.xml rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/notification-configuration.xml diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/notification-plugins-configuration.xml b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/notification-plugins-configuration.xml similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/notification-plugins-configuration.xml rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/notification-plugins-configuration.xml diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/permlink-configuration.xml b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/permlink-configuration.xml similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/permlink-configuration.xml rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/permlink-configuration.xml diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/profileproperty/profile-property-configuration.xml b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/profileproperty/profile-property-configuration.xml similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/profileproperty/profile-property-configuration.xml rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/profileproperty/profile-property-configuration.xml diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/search-configuration.xml b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/search-configuration.xml similarity index 98% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/search-configuration.xml rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/search-configuration.xml index e925242b145..4b241f21660 100644 --- a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/search-configuration.xml +++ b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/search-configuration.xml @@ -91,7 +91,7 @@ SHARED/PeopleSearchResultCard - social-portlet/ProfileSearch + social/ProfileSearch locale.portlet.social.PeopleListApplication @@ -170,7 +170,7 @@ SHARED/ActivitySearchResultCard - social-portlet/ActivitySearch + social/ActivitySearch activity-search-result-card diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/search/activities-search-query.json b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/search/activities-search-query.json similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/search/activities-search-query.json rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/search/activities-search-query.json diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/search/spaces-count-query.json b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/search/spaces-count-query.json similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/search/spaces-count-query.json rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/search/spaces-count-query.json diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/search/spaces-search-query.json b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/search/spaces-search-query.json similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/search/spaces-search-query.json rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/search/spaces-search-query.json diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/service-configuration.xml b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/service-configuration.xml similarity index 97% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/service-configuration.xml rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/service-configuration.xml index 22da5a0b70a..85eb6307179 100644 --- a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/service-configuration.xml +++ b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/service-configuration.xml @@ -68,9 +68,6 @@ org.exoplatform.social.rest.impl.spacesadministration.SpacesAdministrationRest - - org.exoplatform.social.rest.impl.spacetemplates.SpaceTemplatesRest - org.exoplatform.social.rest.impl.favorite.FavoriteRest diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/social-configuration.xml b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/social-configuration.xml similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/social-configuration.xml rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/social-configuration.xml diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/space-template/communication/banner.png b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/space-template/communication/banner.png similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/space-template/communication/banner.png rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/space-template/communication/banner.png diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/space-template/community/banner.png b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/space-template/community/banner.png similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/space-template/community/banner.png rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/space-template/community/banner.png diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/space-template/project/banner.png b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/space-template/project/banner.png similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/space-template/project/banner.png rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/space-template/project/banner.png diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/space-template/team/banner.png b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/space-template/team/banner.png similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/space-template/team/banner.png rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/space-template/team/banner.png diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/upgrade-configuration.xml b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/upgrade-configuration.xml similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/upgrade-configuration.xml rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/upgrade-configuration.xml diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/websocket-configuration.xml b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/websocket-configuration.xml similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/websocket-configuration.xml rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/websocket-configuration.xml diff --git a/extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/webui-configuration.xml b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/webui-configuration.xml similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/conf/social-extension/social/webui-configuration.xml rename to webapp/src/main/webapp/WEB-INF/conf/social-extension/social/webui-configuration.xml diff --git a/webapp/portlet/src/main/webapp/WEB-INF/gatein-resources.xml b/webapp/src/main/webapp/WEB-INF/gatein-resources.xml similarity index 95% rename from webapp/portlet/src/main/webapp/WEB-INF/gatein-resources.xml rename to webapp/src/main/webapp/WEB-INF/gatein-resources.xml index e1cccdfdda7..81f3a1167d9 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/gatein-resources.xml +++ b/webapp/src/main/webapp/WEB-INF/gatein-resources.xml @@ -29,21 +29,21 @@ - social-portlet + social GeneralSettings Enterprise ImageCropper - social-portlet + social SpaceBannerPortlet Enterprise ImageCropper - social-portlet + social HamburgerMenu Enterprise /skin/css/portlet/HamburgerMenu/Style.css @@ -51,14 +51,14 @@ - social-portlet + social PeopleList Enterprise PeopleList - social-portlet + social ProfileAboutMe Enterprise /skin/css/portlet/ProfileAboutMe/Style.css @@ -66,14 +66,14 @@ - social-portlet + social SpaceSettingPortlet Enterprise ImageCropper - social-portlet + social Image Enterprise 1 @@ -81,7 +81,7 @@ - social-portlet + social SpaceActivityStreamPortlet Enterprise /skin/css/portlet/ActivityStream/Style.css @@ -89,7 +89,7 @@ - social-portlet + social UserActivityStreamPortlet Enterprise /skin/css/portlet/ActivityStream/Style.css @@ -97,7 +97,7 @@ - social-portlet + social SpacesAdministration Enterprise /skin/css/portlet/SpacesAdministration/Style.css @@ -105,38 +105,28 @@ - social-portlet - SpaceMenuPortlet + social + SpaceTemplateManagement Enterprise - /skin/css/portlet/SpaceHeader/Style.css - 1 ImageCropper - social-portlet - SpaceTopbarMenu - Enterprise - /skin/css/portlet/SpaceMenu/Style.css - 1 - - - - social-portlet + social MembersPortlet Enterprise PeopleList - social-portlet + social SpaceWidgetMembers Enterprise PeopleList - social-portlet + social ProfileHeader Enterprise /skin/css/portlet/ProfileHeader/Style.css @@ -145,7 +135,7 @@ - social-portlet + social Search Enterprise /skin/css/portlet/Search/Style.css @@ -153,7 +143,7 @@ - social-portlet + social ProfileContactInformation Enterprise /skin/css/portlet/ProfileContactInformation/Style.css @@ -162,7 +152,7 @@ - social-portlet + social ProfileWorkExperience Enterprise /skin/css/portlet/ProfileWorkExperience/Style.css @@ -170,7 +160,7 @@ - social-portlet + social SpaceInfos Enterprise /skin/css/portlet/SpaceInfos/Style.css @@ -178,7 +168,7 @@ - social-portlet + social GettingStarted Enterprise /skin/css/portlet/GettingStarted/Style.css @@ -186,7 +176,7 @@ - social-portlet + social ExternalSpacesList Enterprise /skin/css/portlet/SpacesListExternal/Style.css @@ -194,7 +184,7 @@ - social-portlet + social SuggestionsPeopleAndSpace Enterprise /skin/css/portlet/SuggestionsPeopleAndSpace/Style.css @@ -202,7 +192,7 @@ - social-portlet + social SpacesOverview Enterprise /skin/css/portlet/SpacesOverview/Style.css @@ -210,7 +200,7 @@ - social-portlet + social PeopleOverview Enterprise /skin/css/portlet/PeopleOverview/Style.css @@ -218,7 +208,7 @@ - social-portlet + social IDMUsersManagement Enterprise /skin/css/portlet/IDMUsersManagement/Style.css @@ -226,7 +216,7 @@ - social-portlet + social IDMGroupsManagement Enterprise /skin/css/portlet/IDMGroupsManagement/Style.css @@ -234,7 +224,7 @@ - social-portlet + social IDMMembershipTypesManagement Enterprise /skin/css/portlet/IDMMembershipTypesManagement/Style.css @@ -243,7 +233,7 @@ - social-portlet + social TopBarMenu Enterprise /skin/css/portlet/TopBarMenu/Style.css @@ -252,7 +242,7 @@ - social-portlet + social ProfileSettingsPortlet Enterprise /skin/css/portlet/ProfileSettings/Style.css @@ -261,7 +251,7 @@ - social-portlet + social TopBarNotification Enterprise /skin/css/portlet/TopBarNotification/Style.css @@ -271,7 +261,7 @@ - social-portlet + social ProfileSearch Enterprise @@ -280,7 +270,7 @@ - social-portlet + social ActivitySearch Enterprise @@ -305,14 +295,14 @@ - social-portlet + social VerticalMenu Enterprise /skin/css/portlet/VerticalMenu/Style.css - social-portlet + social OrganizationalChart Enterprise /skin/css/portlet/organizational-chart/Style.css @@ -929,73 +919,12 @@ - - SpaceTopbarMenu - - - - commonVueComponents - - - vue - - - vuetify - - - eXoVueI18n - - - jquery - $ - - - extensionRegistry - - - - - - SpaceMenuPortlet - - - - commonVueComponents - - - vue - - - vuetify - - - eXoVueI18n - - - jquery - $ - - - extensionRegistry - - - imageCropper - - - - SpaceBannerPortlet commonVueComponents @@ -2046,6 +1975,41 @@ + + SpaceTemplateManagement + + spaceTemplateManagement + + + vue + + + vuetify + + + translationField + + + commonVueComponents + + + applicationToolbarComponent + + + imageCropper + + + eXoVueI18n + + + extensionRegistry + + + + siteDetailsComponent vueGRP diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/externalRegistration/init_account.jsp b/webapp/src/main/webapp/WEB-INF/jsp/externalRegistration/init_account.jsp similarity index 100% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/externalRegistration/init_account.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/externalRegistration/init_account.jsp diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/forgotpassword/forgot_password.jsp b/webapp/src/main/webapp/WEB-INF/jsp/forgotpassword/forgot_password.jsp similarity index 100% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/forgotpassword/forgot_password.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/forgotpassword/forgot_password.jsp diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/login/login.jsp b/webapp/src/main/webapp/WEB-INF/jsp/login/login.jsp similarity index 100% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/login/login.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/login/login.jsp diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/login/oauth_invitation.jsp b/webapp/src/main/webapp/WEB-INF/jsp/login/oauth_invitation.jsp similarity index 97% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/login/oauth_invitation.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/login/oauth_invitation.jsp index 3484052a0c1..f6acbc028b4 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/login/oauth_invitation.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/login/oauth_invitation.jsp @@ -75,8 +75,8 @@ <%}%> <%}%> - - + +
diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/login/oauth_register.jsp b/webapp/src/main/webapp/WEB-INF/jsp/login/oauth_register.jsp similarity index 98% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/login/oauth_register.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/login/oauth_register.jsp index 1d3900faf0f..ac7bf89c69c 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/login/oauth_register.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/login/oauth_register.jsp @@ -93,8 +93,8 @@ <%}%> <%}%> - - + +
diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/onboarding/reset_password.jsp b/webapp/src/main/webapp/WEB-INF/jsp/onboarding/reset_password.jsp similarity index 100% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/onboarding/reset_password.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/onboarding/reset_password.jsp diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/activityStream.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/activityStream.jsp similarity index 100% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/activityStream.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/activityStream.jsp diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/breadcrumb.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/breadcrumb.jsp similarity index 81% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/breadcrumb.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/breadcrumb.jsp index 440aa318855..9a4bbb88596 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/breadcrumb.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/breadcrumb.jsp @@ -6,7 +6,7 @@
\ No newline at end of file diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/generalSettings.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/generalSettings.jsp similarity index 93% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/generalSettings.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/generalSettings.jsp index 03165abe8db..cdb638eb1b0 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/generalSettings.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/generalSettings.jsp @@ -33,7 +33,7 @@ class="v-application v-application--is-ltr theme--light" id="generalSettings">
\ No newline at end of file diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/gettingStarted.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/gettingStarted.jsp similarity index 98% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/gettingStarted.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/gettingStarted.jsp index 62dc630362f..df054c33d85 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/gettingStarted.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/gettingStarted.jsp @@ -87,6 +87,6 @@ <% } %> \ No newline at end of file diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/hamburgerMenu.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/hamburgerMenu.jsp similarity index 92% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/hamburgerMenu.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/hamburgerMenu.jsp index 8a14b4e138d..d07291b2806 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/hamburgerMenu.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/hamburgerMenu.jsp @@ -5,10 +5,10 @@ <%@page import="org.exoplatform.commons.api.settings.data.Scope"%> <%@page import="org.exoplatform.commons.api.settings.data.Context"%> <%@page import="org.exoplatform.commons.api.settings.SettingService"%> -<%@page import="org.exoplatform.social.core.space.SpacesAdministrationService"%> <%@page import="org.exoplatform.container.ExoContainerContext"%> +<%@page import="io.meeds.social.space.template.service.SpaceTemplateService"%> <% - boolean canCreateSpace = ExoContainerContext.getService(SpacesAdministrationService.class).canCreateSpace(request.getRemoteUser()); + boolean canCreateSpace = ExoContainerContext.getService(SpaceTemplateService.class).canCreateSpace(request.getRemoteUser()); SettingValue stickySettingValue = ExoContainerContext.getService(SettingService.class).get(Context.USER.id(request.getRemoteUser()), Scope.APPLICATION.id("HamburgerMenu"), "Sticky"); boolean sticky = stickySettingValue == null ? Boolean.parseBoolean(System.getProperty("io.meeds.userPrefs.HamburgerMenu.sticky", "false")) : Boolean.parseBoolean(stickySettingValue.getValue().toString()); @@ -58,7 +58,7 @@ diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/image.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/image.jsp similarity index 91% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/image.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/image.jsp index fe6f6cb4faf..784ecbb5626 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/image.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/image.jsp @@ -42,7 +42,7 @@ class="v-application transparent v-application--is-ltr theme--light" flat="" id="<%=id%>"> \ No newline at end of file diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/links.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/links.jsp similarity index 82% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/links.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/links.jsp index 7ebde5ff9df..d8b5f2b5c7a 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/links.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/links.jsp @@ -10,7 +10,7 @@ class="v-application transparent v-application--is-ltr theme--light" flat="" id="<%=id%>"> \ No newline at end of file diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/organizationalChart.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/organizationalChart.jsp similarity index 98% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/organizationalChart.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/organizationalChart.jsp index aa9d01d5bcc..314255c9b8b 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/organizationalChart.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/organizationalChart.jsp @@ -80,7 +80,7 @@ class="v-application transparent v-application--is-ltr theme--light"> <% if (propertySetting.isActive()) { %> diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/peopleOverview.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/peopleOverview.jsp similarity index 100% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/peopleOverview.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/peopleOverview.jsp diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/platformSettings.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/platformSettings.jsp similarity index 94% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/platformSettings.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/platformSettings.jsp index bade55cbabb..9f1b30112ba 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/platformSettings.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/platformSettings.jsp @@ -22,7 +22,7 @@ diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/profileAboutMe.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/profileAboutMe.jsp similarity index 84% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/profileAboutMe.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/profileAboutMe.jsp index 22d5a69408b..17271a1aa7f 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/profileAboutMe.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/profileAboutMe.jsp @@ -8,7 +8,7 @@ id="ProfileAboutMe"> \ No newline at end of file diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/profileContactInformation.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/profileContactInformation.jsp similarity index 95% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/profileContactInformation.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/profileContactInformation.jsp index f1239af47fd..07be356fd00 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/profileContactInformation.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/profileContactInformation.jsp @@ -21,7 +21,7 @@ id="ProfileContactInformation"> diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/profileHeader.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/profileHeader.jsp similarity index 88% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/profileHeader.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/profileHeader.jsp index 17df4fcb9ba..ff5e6a34e0d 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/profileHeader.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/profileHeader.jsp @@ -12,7 +12,7 @@ id="ProfileHeader"> \ No newline at end of file diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/profileSettings.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/profileSettings.jsp similarity index 94% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/profileSettings.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/profileSettings.jsp index 15d526f6c4d..1a21a34aa48 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/profileSettings.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/profileSettings.jsp @@ -32,7 +32,7 @@ id="profileSettings" flat=""> diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/profileWorkExperience.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/profileWorkExperience.jsp similarity index 84% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/profileWorkExperience.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/profileWorkExperience.jsp index ec325b2715d..6367e11b029 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/profileWorkExperience.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/profileWorkExperience.jsp @@ -8,7 +8,7 @@ id="ProfileWorkExperience"> \ No newline at end of file diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/search.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/search.jsp similarity index 96% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/search.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/search.jsp index c8eecb96c48..1a90dc84c6b 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/search.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/search.jsp @@ -54,7 +54,7 @@ type="button" title="<%=tooltip%>" class="transparent v-btn v-btn--flat v-btn--icon v-btn--round theme--light v-size--default" - onclick="Vue.startApp('PORTLET/social-portlet/Search', 'init')"> + onclick="Vue.startApp('PORTLET/social/Search', 'init')"> @@ -63,7 +63,7 @@ <% if (rcontext.getRequestURI().endsWith("/search") || rcontext.getRequestURI().equals("search")) { %> <% } %> diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceAccess.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/spaceAccess.jsp similarity index 96% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceAccess.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/spaceAccess.jsp index d34e68f7025..19150802138 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceAccess.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/spaceAccess.jsp @@ -26,7 +26,7 @@ "originalUri": "<%=originalUri%>" } \ No newline at end of file diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceInformation.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/spaceInformation.jsp similarity index 100% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceInformation.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/spaceInformation.jsp diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceMembers.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/spaceMembers.jsp similarity index 96% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceMembers.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/spaceMembers.jsp index 0c08f892692..f5339714d54 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceMembers.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/spaceMembers.jsp @@ -31,7 +31,7 @@ class="v-application transparent v-application--is-ltr theme--light singlePageApplication" id="spaceMembersApplication" flat=""> diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceSettings.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/spaceSettings.jsp similarity index 90% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceSettings.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/spaceSettings.jsp index 97531280ee4..aaaa6f259d3 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceSettings.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/spaceSettings.jsp @@ -15,7 +15,7 @@ class="v-application transparent v-application--is-ltr theme--light singlePageApplication" id="SpaceSettings" flat=""> diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceWidgetDescription.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/spaceWidgetDescription.jsp similarity index 57% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceWidgetDescription.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/spaceWidgetDescription.jsp index 07d062897f9..4d4d47fd8ac 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceWidgetDescription.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/spaceWidgetDescription.jsp @@ -1,32 +1,27 @@ -<%@page import="org.exoplatform.portal.mop.service.LayoutService"%> -<%@page import="org.apache.commons.lang3.StringUtils"%> <%@page import="java.net.URLEncoder"%> <%@page import="org.exoplatform.social.core.space.spi.SpaceService"%> <%@page import="org.exoplatform.container.ExoContainerContext"%> -<%@page import="org.exoplatform.web.PortalHttpServletResponseWrapper"%> <%@page import="org.exoplatform.social.core.space.model.Space"%> <%@page import="org.exoplatform.social.core.space.SpaceUtils"%> <%@page import="org.exoplatform.portal.application.PortalRequestContext"%> <%@page import="org.exoplatform.portal.mop.SiteType"%> +<%@page import="io.meeds.social.core.space.service.SpaceLayoutService"%> <% - PortalRequestContext rcontext = (PortalRequestContext) PortalRequestContext.getCurrentInstance(); - PortalHttpServletResponseWrapper responseWrapper = (PortalHttpServletResponseWrapper) rcontext.getResponse(); + PortalRequestContext rcontext = PortalRequestContext.getCurrentInstance(); + Space space = SpaceUtils.getSpaceByContext(); + SpaceService spaceService = ExoContainerContext.getService(SpaceService.class); + SpaceLayoutService spaceLayoutService = ExoContainerContext.getService(SpaceLayoutService.class); + String activityId = rcontext.getRequest().getParameter("id"); String username = request.getRemoteUser(); - - SpaceService spaceService = ExoContainerContext.getService(SpaceService.class); - Space space = SpaceUtils.getSpaceByContext(); String description = space == null || space.getDescription() == null ? "" : space.getDescription(); String id = space == null ? "0" : space.getId(); - + boolean canEdit = spaceService.canManageSpace(space, username); String publicSiteName = ""; - if (rcontext.getSiteType() == SiteType.GROUP && spaceService.canAccessSpacePublicSite(space, username)) { - publicSiteName = spaceService.getSpacePublicSiteName(space); - } - boolean canEdit = space != null - && username != null - && spaceService.canManageSpace(space, username); + if (spaceService.canAccessSpacePublicSite(space, username)) { + publicSiteName = spaceLayoutService.getSpacePublicSiteName(space); + } %>
diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceWidgetManagers.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/spaceWidgetManagers.jsp similarity index 98% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceWidgetManagers.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/spaceWidgetManagers.jsp index dc47a0ac2e8..17f2eb0b6d7 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceWidgetManagers.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/spaceWidgetManagers.jsp @@ -54,7 +54,7 @@ id="SpaceManagersApplication" flat=""> diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceWidgetMembers.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/spaceWidgetMembers.jsp similarity index 98% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceWidgetMembers.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/spaceWidgetMembers.jsp index 0cf058936a4..3a18ae6a686 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spaceWidgetMembers.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/spaceWidgetMembers.jsp @@ -63,7 +63,7 @@ id="SpaceMembersApplication" flat=""> diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spacesList.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/spacesList.jsp similarity index 58% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spacesList.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/spacesList.jsp index 2a607a9ff30..a45d6a81053 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/spacesList.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/spacesList.jsp @@ -1,5 +1,5 @@ +<%@page import="io.meeds.social.space.template.service.SpaceTemplateService"%> <%@page import="org.exoplatform.container.ExoContainerContext"%> -<%@page import="org.exoplatform.social.core.space.SpacesAdministrationService"%> <% Object filter = request.getAttribute("filter"); if (filter == null) { @@ -7,15 +7,15 @@ } else { filter = ((String[]) filter)[0]; } - SpacesAdministrationService spacesAdministrationService = ExoContainerContext.getService(SpacesAdministrationService.class); - boolean canCreateSpace = spacesAdministrationService.canCreateSpace(request.getRemoteUser()); + boolean canCreateSpace = ExoContainerContext.getService(SpaceTemplateService.class) + .canCreateSpace(request.getRemoteUser()); %>
diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/suggestions.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/suggestions.jsp similarity index 90% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/suggestions.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/suggestions.jsp index a32e59a2b5e..72a20f1e511 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/suggestions.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/suggestions.jsp @@ -14,7 +14,7 @@ class="v-application hiddenable-widget transparent v-application--is-ltr theme--light" id="SuggestionsPeopleAndSpace" flat=""> diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/topBarMenu.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/topBarMenu.jsp similarity index 89% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/topBarMenu.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/topBarMenu.jsp index 144ecd40394..b6655652875 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/topBarMenu.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/topBarMenu.jsp @@ -13,7 +13,7 @@ if (window.topBarMenuHtml) { document.querySelector('#topBarMenu').innerHTML = window.topBarMenuHtml; } - require(['PORTLET/social-portlet/TopBarMenu'], app => app.init('<%=cacheId%>')); + require(['PORTLET/social/TopBarMenu'], app => app.init('<%=cacheId%>')); }
diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/topBarPublishSite.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/topBarPublishSite.jsp similarity index 93% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/topBarPublishSite.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/topBarPublishSite.jsp index 6f157022e46..b3066cb8add 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/topBarPublishSite.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/topBarPublishSite.jsp @@ -33,7 +33,7 @@ class="v-application border-box-sizing theme--light" id="topBarPublishSite">
diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/topbarLogin.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/topbarLogin.jsp similarity index 97% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/topbarLogin.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/topbarLogin.jsp index f6256cd3720..04531030fc3 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/topbarLogin.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/topbarLogin.jsp @@ -51,7 +51,7 @@ <% } %> diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/userSettingLanguage.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/userSettingLanguage.jsp similarity index 90% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/userSettingLanguage.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/userSettingLanguage.jsp index 7d3b3af7245..c048db3d179 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/userSettingLanguage.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/userSettingLanguage.jsp @@ -31,7 +31,7 @@ \ No newline at end of file diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/userSettingNotifications.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/userSettingNotifications.jsp similarity index 96% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/userSettingNotifications.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/userSettingNotifications.jsp index 2bd4e0cef76..f7a75489964 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/userSettingNotifications.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/userSettingNotifications.jsp @@ -33,7 +33,7 @@ class="v-application v-application--is-ltr theme--light" id="UserSettingNotifications"> diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/userSettingSecurity.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/userSettingSecurity.jsp similarity index 90% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/userSettingSecurity.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/userSettingSecurity.jsp index 8ad78eea64d..382fd5f9a31 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/userSettingSecurity.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/userSettingSecurity.jsp @@ -13,7 +13,7 @@ id="UserSettingSecurity"> diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/whoIsOnline.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/whoIsOnline.jsp similarity index 97% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/whoIsOnline.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/portlet/whoIsOnline.jsp index 21d2a42d8d8..fdd5d768ce0 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/portlet/whoIsOnline.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/whoIsOnline.jsp @@ -52,7 +52,7 @@ id="OnlinePortlet"> diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/register/register.jsp b/webapp/src/main/webapp/WEB-INF/jsp/register/register.jsp similarity index 100% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/register/register.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/register/register.jsp diff --git a/webapp/portlet/src/main/webapp/WEB-INF/jsp/welcome-screens/accountSetup.jsp b/webapp/src/main/webapp/WEB-INF/jsp/welcome-screens/accountSetup.jsp similarity index 96% rename from webapp/portlet/src/main/webapp/WEB-INF/jsp/welcome-screens/accountSetup.jsp rename to webapp/src/main/webapp/WEB-INF/jsp/welcome-screens/accountSetup.jsp index e8dd0bcaeae..dab1c571b45 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/jsp/welcome-screens/accountSetup.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/welcome-screens/accountSetup.jsp @@ -69,11 +69,11 @@ - + - - + +
diff --git a/extension/war/src/main/webapp/WEB-INF/notification/templates/ActivityCommentPlugin.gtmpl b/webapp/src/main/webapp/WEB-INF/notification/templates/ActivityCommentPlugin.gtmpl similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/notification/templates/ActivityCommentPlugin.gtmpl rename to webapp/src/main/webapp/WEB-INF/notification/templates/ActivityCommentPlugin.gtmpl diff --git a/extension/war/src/main/webapp/WEB-INF/notification/templates/ActivityMentionPlugin.gtmpl b/webapp/src/main/webapp/WEB-INF/notification/templates/ActivityMentionPlugin.gtmpl similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/notification/templates/ActivityMentionPlugin.gtmpl rename to webapp/src/main/webapp/WEB-INF/notification/templates/ActivityMentionPlugin.gtmpl diff --git a/extension/war/src/main/webapp/WEB-INF/notification/templates/ActivityReplyToCommentPlugin.gtmpl b/webapp/src/main/webapp/WEB-INF/notification/templates/ActivityReplyToCommentPlugin.gtmpl similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/notification/templates/ActivityReplyToCommentPlugin.gtmpl rename to webapp/src/main/webapp/WEB-INF/notification/templates/ActivityReplyToCommentPlugin.gtmpl diff --git a/extension/war/src/main/webapp/WEB-INF/notification/templates/EditActivityPlugin.gtmpl b/webapp/src/main/webapp/WEB-INF/notification/templates/EditActivityPlugin.gtmpl similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/notification/templates/EditActivityPlugin.gtmpl rename to webapp/src/main/webapp/WEB-INF/notification/templates/EditActivityPlugin.gtmpl diff --git a/extension/war/src/main/webapp/WEB-INF/notification/templates/EditCommentPlugin.gtmpl b/webapp/src/main/webapp/WEB-INF/notification/templates/EditCommentPlugin.gtmpl similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/notification/templates/EditCommentPlugin.gtmpl rename to webapp/src/main/webapp/WEB-INF/notification/templates/EditCommentPlugin.gtmpl diff --git a/extension/war/src/main/webapp/WEB-INF/notification/templates/LikeCommentPlugin.gtmpl b/webapp/src/main/webapp/WEB-INF/notification/templates/LikeCommentPlugin.gtmpl similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/notification/templates/LikeCommentPlugin.gtmpl rename to webapp/src/main/webapp/WEB-INF/notification/templates/LikeCommentPlugin.gtmpl diff --git a/extension/war/src/main/webapp/WEB-INF/notification/templates/LikePlugin.gtmpl b/webapp/src/main/webapp/WEB-INF/notification/templates/LikePlugin.gtmpl similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/notification/templates/LikePlugin.gtmpl rename to webapp/src/main/webapp/WEB-INF/notification/templates/LikePlugin.gtmpl diff --git a/extension/war/src/main/webapp/WEB-INF/notification/templates/NewUserPlugin.gtmpl b/webapp/src/main/webapp/WEB-INF/notification/templates/NewUserPlugin.gtmpl similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/notification/templates/NewUserPlugin.gtmpl rename to webapp/src/main/webapp/WEB-INF/notification/templates/NewUserPlugin.gtmpl diff --git a/extension/war/src/main/webapp/WEB-INF/notification/templates/PostActivityPlugin.gtmpl b/webapp/src/main/webapp/WEB-INF/notification/templates/PostActivityPlugin.gtmpl similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/notification/templates/PostActivityPlugin.gtmpl rename to webapp/src/main/webapp/WEB-INF/notification/templates/PostActivityPlugin.gtmpl diff --git a/extension/war/src/main/webapp/WEB-INF/notification/templates/PostActivitySpaceStreamPlugin.gtmpl b/webapp/src/main/webapp/WEB-INF/notification/templates/PostActivitySpaceStreamPlugin.gtmpl similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/notification/templates/PostActivitySpaceStreamPlugin.gtmpl rename to webapp/src/main/webapp/WEB-INF/notification/templates/PostActivitySpaceStreamPlugin.gtmpl diff --git a/extension/war/src/main/webapp/WEB-INF/notification/templates/RelationshipReceivedRequestPlugin.gtmpl b/webapp/src/main/webapp/WEB-INF/notification/templates/RelationshipReceivedRequestPlugin.gtmpl similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/notification/templates/RelationshipReceivedRequestPlugin.gtmpl rename to webapp/src/main/webapp/WEB-INF/notification/templates/RelationshipReceivedRequestPlugin.gtmpl diff --git a/extension/war/src/main/webapp/WEB-INF/notification/templates/RequestJoinSpacePlugin.gtmpl b/webapp/src/main/webapp/WEB-INF/notification/templates/RequestJoinSpacePlugin.gtmpl similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/notification/templates/RequestJoinSpacePlugin.gtmpl rename to webapp/src/main/webapp/WEB-INF/notification/templates/RequestJoinSpacePlugin.gtmpl diff --git a/extension/war/src/main/webapp/WEB-INF/notification/templates/SharedActivitySpaceStreamPlugin.gtmpl b/webapp/src/main/webapp/WEB-INF/notification/templates/SharedActivitySpaceStreamPlugin.gtmpl similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/notification/templates/SharedActivitySpaceStreamPlugin.gtmpl rename to webapp/src/main/webapp/WEB-INF/notification/templates/SharedActivitySpaceStreamPlugin.gtmpl diff --git a/extension/war/src/main/webapp/WEB-INF/notification/templates/SpaceInvitationPlugin.gtmpl b/webapp/src/main/webapp/WEB-INF/notification/templates/SpaceInvitationPlugin.gtmpl similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/notification/templates/SpaceInvitationPlugin.gtmpl rename to webapp/src/main/webapp/WEB-INF/notification/templates/SpaceInvitationPlugin.gtmpl diff --git a/extension/war/src/main/webapp/WEB-INF/notification/templates/activities/DefaultActivity.gtmpl b/webapp/src/main/webapp/WEB-INF/notification/templates/activities/DefaultActivity.gtmpl similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/notification/templates/activities/DefaultActivity.gtmpl rename to webapp/src/main/webapp/WEB-INF/notification/templates/activities/DefaultActivity.gtmpl diff --git a/extension/war/src/main/webapp/WEB-INF/notification/templates/activities/NotificationLinkActivity.gtmpl b/webapp/src/main/webapp/WEB-INF/notification/templates/activities/NotificationLinkActivity.gtmpl similarity index 100% rename from extension/war/src/main/webapp/WEB-INF/notification/templates/activities/NotificationLinkActivity.gtmpl rename to webapp/src/main/webapp/WEB-INF/notification/templates/activities/NotificationLinkActivity.gtmpl diff --git a/webapp/portlet/src/main/webapp/WEB-INF/portlet.xml b/webapp/src/main/webapp/WEB-INF/portlet.xml similarity index 97% rename from webapp/portlet/src/main/webapp/WEB-INF/portlet.xml rename to webapp/src/main/webapp/WEB-INF/portlet.xml index fa185911221..e04837dc1db 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/portlet.xml +++ b/webapp/src/main/webapp/WEB-INF/portlet.xml @@ -180,7 +180,7 @@ js-manager-jsModule - PORTLET/social-portlet/SpaceInfos + PORTLET/social/SpaceInfos text/html @@ -268,41 +268,6 @@ - - SpaceTopbarMenu - org.exoplatform.social.portlet.SpaceMenuPortlet - - portlet-view-dispatched-file-path - /WEB-INF/jsp/portlet/spaceMenu.jsp - - - layout-css-class - no-layout-style - - - text/html - - - Space Topbar and mobile menus - - - - - SpaceMenuPortlet - Space banner and menu - org.exoplatform.social.portlet.SpaceHeaderPortlet - - portlet-view-dispatched-file-path - /WEB-INF/jsp/portlet/spaceHeader.jsp - - - text/html - - - Space banner and menu - - - SpaceBannerPortlet Space banner @@ -777,7 +742,7 @@ js-manager-jsModule - PORTLET/social-portlet/PeopleOverview + PORTLET/social/PeopleOverview prefetch.resources @@ -1087,4 +1052,26 @@ Organizational Chart + + + SpaceTemplateManagement + Space Template Management + org.exoplatform.commons.api.portlet.GenericDispatchedViewPortlet + + portlet-view-dispatched-file-path + /html/spaceTemplateManagement.html + + -1 + PUBLIC + + text/html + + en + locale.portlet.SpaceTemplateManagement + + Space Template Management + Space Template Management + + + diff --git a/webapp/portlet/src/main/webapp/WEB-INF/web.xml b/webapp/src/main/webapp/WEB-INF/web.xml similarity index 98% rename from webapp/portlet/src/main/webapp/WEB-INF/web.xml rename to webapp/src/main/webapp/WEB-INF/web.xml index d39dc35fbcb..9153c029056 100644 --- a/webapp/portlet/src/main/webapp/WEB-INF/web.xml +++ b/webapp/src/main/webapp/WEB-INF/web.xml @@ -25,7 +25,7 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> - social-portlet + social diff --git a/webapp/portlet/src/main/webapp/groovy/social/webui/UISocialPortalApplicationHead.gtmpl b/webapp/src/main/webapp/groovy/social/webui/UISocialPortalApplicationHead.gtmpl similarity index 95% rename from webapp/portlet/src/main/webapp/groovy/social/webui/UISocialPortalApplicationHead.gtmpl rename to webapp/src/main/webapp/groovy/social/webui/UISocialPortalApplicationHead.gtmpl index e7b7a8092cb..24ef0879f16 100644 --- a/webapp/portlet/src/main/webapp/groovy/social/webui/UISocialPortalApplicationHead.gtmpl +++ b/webapp/src/main/webapp/groovy/social/webui/UISocialPortalApplicationHead.gtmpl @@ -35,7 +35,6 @@ eXo.env.portal.spaceUrl = "<%=space == null ? "" : space.getUrl()%>" ; eXo.env.portal.spaceDisplayName = decodeURIComponent("<%=space == null ? "" : java.net.URLEncoder.encode(space.getDisplayName().replace(" ", "._.")).replace("._.", " ") %>") ; eXo.env.portal.spaceGroup = "<%=space == null ? "" : space.getGroupId().replace("/spaces/", "")%>" ; - eXo.env.portal.spaceTemplate = "<%=space == null ? "" : space.getTemplate()%>" ; eXo.env.portal.spaceIdentityId = "<%=spaceIdentity == null ? "" : spaceIdentity.getId()%>" ; eXo.env.portal.profileOwner = "<%=ownerIdentityId == null ? "" : Utils.getOwnerRemoteId()%>" ; eXo.env.portal.profileOwnerIdentityId = "<%=ownerIdentityId == null ? "" : Utils.getOwnerIdentityId()%>" ; @@ -64,7 +63,6 @@ }, }; - eXo.env.portal.SpaceHomeLayoutResetEnabled = <%=featureService.isFeatureActiveForUser("SpaceHomeLayoutReset", userName)%>; eXo.env.portal.postToNetworkEnabled = <%=featureService.isFeatureActiveForUser("PostToNetwork", userName)%>; eXo.env.portal.editorAttachImageEnabled = <%=featureService.isFeatureActiveForUser("EditorAttachImage", userName)%>; eXo.env.portal.attachmentObjectTypes = ['<%=StringUtils.join(supportedAttachmentObjectTypes, "', '")%>']; diff --git a/webapp/portlet/src/main/webapp/groovy/social/webui/UISocialPreloadHead.gtmpl b/webapp/src/main/webapp/groovy/social/webui/UISocialPreloadHead.gtmpl similarity index 100% rename from webapp/portlet/src/main/webapp/groovy/social/webui/UISocialPreloadHead.gtmpl rename to webapp/src/main/webapp/groovy/social/webui/UISocialPreloadHead.gtmpl diff --git a/webapp/portlet/src/main/webapp/html/blank.html b/webapp/src/main/webapp/html/blank.html similarity index 100% rename from webapp/portlet/src/main/webapp/html/blank.html rename to webapp/src/main/webapp/html/blank.html diff --git a/webapp/portlet/src/main/webapp/html/drawersOverlay.html b/webapp/src/main/webapp/html/drawersOverlay.html similarity index 100% rename from webapp/portlet/src/main/webapp/html/drawersOverlay.html rename to webapp/src/main/webapp/html/drawersOverlay.html diff --git a/webapp/portlet/src/main/webapp/html/externalSpaceList.html b/webapp/src/main/webapp/html/externalSpaceList.html similarity index 72% rename from webapp/portlet/src/main/webapp/html/externalSpaceList.html rename to webapp/src/main/webapp/html/externalSpaceList.html index 99abc2ebac6..9ea87d6c48c 100644 --- a/webapp/portlet/src/main/webapp/html/externalSpaceList.html +++ b/webapp/src/main/webapp/html/externalSpaceList.html @@ -3,7 +3,7 @@ class="v-application v-application--is-ltr theme--light" id="ExternalSpacesListPortlet"> diff --git a/webapp/portlet/src/main/webapp/html/idmGroupsManagement.html b/webapp/src/main/webapp/html/idmGroupsManagement.html similarity index 71% rename from webapp/portlet/src/main/webapp/html/idmGroupsManagement.html rename to webapp/src/main/webapp/html/idmGroupsManagement.html index e4673e23a63..12ef5405c68 100644 --- a/webapp/portlet/src/main/webapp/html/idmGroupsManagement.html +++ b/webapp/src/main/webapp/html/idmGroupsManagement.html @@ -3,7 +3,7 @@ class="v-application v-application--is-ltr theme--light" id="GroupsManagement"> \ No newline at end of file diff --git a/webapp/portlet/src/main/webapp/html/idmMembershipTypesManagement.html b/webapp/src/main/webapp/html/idmMembershipTypesManagement.html similarity index 69% rename from webapp/portlet/src/main/webapp/html/idmMembershipTypesManagement.html rename to webapp/src/main/webapp/html/idmMembershipTypesManagement.html index 02812b61034..f23b2eb2106 100644 --- a/webapp/portlet/src/main/webapp/html/idmMembershipTypesManagement.html +++ b/webapp/src/main/webapp/html/idmMembershipTypesManagement.html @@ -3,7 +3,7 @@ class="v-application v-application--is-ltr theme--light" id="MembershipTypesManagement"> \ No newline at end of file diff --git a/webapp/portlet/src/main/webapp/html/idmUsersManagement.html b/webapp/src/main/webapp/html/idmUsersManagement.html similarity index 71% rename from webapp/portlet/src/main/webapp/html/idmUsersManagement.html rename to webapp/src/main/webapp/html/idmUsersManagement.html index 8d6cd45fa14..3ee5432c140 100644 --- a/webapp/portlet/src/main/webapp/html/idmUsersManagement.html +++ b/webapp/src/main/webapp/html/idmUsersManagement.html @@ -3,7 +3,7 @@ class="v-application white v-application--is-ltr theme--light" id="UsersManagement"> \ No newline at end of file diff --git a/webapp/portlet/src/main/webapp/html/notificationAdministration.html b/webapp/src/main/webapp/html/notificationAdministration.html similarity index 70% rename from webapp/portlet/src/main/webapp/html/notificationAdministration.html rename to webapp/src/main/webapp/html/notificationAdministration.html index a537baed890..9763a27b370 100644 --- a/webapp/portlet/src/main/webapp/html/notificationAdministration.html +++ b/webapp/src/main/webapp/html/notificationAdministration.html @@ -1,7 +1,7 @@
diff --git a/webapp/portlet/src/main/webapp/html/pageNotFound.html b/webapp/src/main/webapp/html/pageNotFound.html similarity index 83% rename from webapp/portlet/src/main/webapp/html/pageNotFound.html rename to webapp/src/main/webapp/html/pageNotFound.html index d5036cfb151..803665a7e8a 100644 --- a/webapp/portlet/src/main/webapp/html/pageNotFound.html +++ b/webapp/src/main/webapp/html/pageNotFound.html @@ -3,7 +3,7 @@ class="v-application transparent v-application--is-ltr theme--light singlePageApplication" id="PageNotFound"> diff --git a/webapp/src/main/webapp/html/spaceTemplateManagement.html b/webapp/src/main/webapp/html/spaceTemplateManagement.html new file mode 100644 index 00000000000..2cbaacc41a2 --- /dev/null +++ b/webapp/src/main/webapp/html/spaceTemplateManagement.html @@ -0,0 +1,9 @@ +
+
+ +
+
diff --git a/webapp/portlet/src/main/webapp/html/spacesAdministration.html b/webapp/src/main/webapp/html/spacesAdministration.html similarity index 71% rename from webapp/portlet/src/main/webapp/html/spacesAdministration.html rename to webapp/src/main/webapp/html/spacesAdministration.html index 3a58c9168d8..ddcbfcee67c 100644 --- a/webapp/portlet/src/main/webapp/html/spacesAdministration.html +++ b/webapp/src/main/webapp/html/spacesAdministration.html @@ -3,7 +3,7 @@ class="v-application white v-application--is-ltr theme--light spacesAdministration" id="spacesAdministration">
\ No newline at end of file diff --git a/webapp/portlet/src/main/webapp/html/spacesOverview.html b/webapp/src/main/webapp/html/spacesOverview.html similarity index 70% rename from webapp/portlet/src/main/webapp/html/spacesOverview.html rename to webapp/src/main/webapp/html/spacesOverview.html index 282f272ed68..b8eb178cd75 100644 --- a/webapp/portlet/src/main/webapp/html/spacesOverview.html +++ b/webapp/src/main/webapp/html/spacesOverview.html @@ -3,7 +3,7 @@ class="v-application v-application--is-ltr theme--light" id="SpacesOverview"> diff --git a/webapp/portlet/src/main/webapp/html/topbarFavorites.html b/webapp/src/main/webapp/html/topbarFavorites.html similarity index 86% rename from webapp/portlet/src/main/webapp/html/topbarFavorites.html rename to webapp/src/main/webapp/html/topbarFavorites.html index 2917b2f69ef..4c7f1483256 100644 --- a/webapp/portlet/src/main/webapp/html/topbarFavorites.html +++ b/webapp/src/main/webapp/html/topbarFavorites.html @@ -8,7 +8,7 @@ aria-label="Favorites" type="button" class="icon-default-color v-btn v-btn--flat v-btn--icon v-btn--round theme--light v-size--default" - onclick="require(['PORTLET/social-portlet/TopBarFavorites'], app => app.init())"> + onclick="require(['PORTLET/social/TopBarFavorites'], app => app.init())"> diff --git a/webapp/portlet/src/main/webapp/html/topbarPreview.html b/webapp/src/main/webapp/html/topbarPreview.html similarity index 70% rename from webapp/portlet/src/main/webapp/html/topbarPreview.html rename to webapp/src/main/webapp/html/topbarPreview.html index 8fae46308d5..1690c7fccde 100644 --- a/webapp/portlet/src/main/webapp/html/topbarPreview.html +++ b/webapp/src/main/webapp/html/topbarPreview.html @@ -3,7 +3,7 @@ class="v-application border-box-sizing theme--light" id="topbarPreview"> diff --git a/webapp/portlet/src/main/webapp/html/verticalMenu.html b/webapp/src/main/webapp/html/verticalMenu.html similarity index 66% rename from webapp/portlet/src/main/webapp/html/verticalMenu.html rename to webapp/src/main/webapp/html/verticalMenu.html index 6ee35ce5108..19bb84958e7 100644 --- a/webapp/portlet/src/main/webapp/html/verticalMenu.html +++ b/webapp/src/main/webapp/html/verticalMenu.html @@ -2,7 +2,7 @@
\ No newline at end of file diff --git a/webapp/portlet/src/main/webapp/images/cadre.png b/webapp/src/main/webapp/images/cadre.png similarity index 100% rename from webapp/portlet/src/main/webapp/images/cadre.png rename to webapp/src/main/webapp/images/cadre.png diff --git a/webapp/src/main/webapp/images/defaultSpaceBanner.webp b/webapp/src/main/webapp/images/defaultSpaceBanner.webp new file mode 100644 index 00000000000..86b3f1c34b8 Binary files /dev/null and b/webapp/src/main/webapp/images/defaultSpaceBanner.webp differ diff --git a/webapp/portlet/src/main/webapp/images/deprecated/space-access/denyIcon.png b/webapp/src/main/webapp/images/deprecated/space-access/denyIcon.png similarity index 100% rename from webapp/portlet/src/main/webapp/images/deprecated/space-access/denyIcon.png rename to webapp/src/main/webapp/images/deprecated/space-access/denyIcon.png diff --git a/webapp/portlet/src/main/webapp/images/deprecated/space-access/lockIcon.png b/webapp/src/main/webapp/images/deprecated/space-access/lockIcon.png similarity index 100% rename from webapp/portlet/src/main/webapp/images/deprecated/space-access/lockIcon.png rename to webapp/src/main/webapp/images/deprecated/space-access/lockIcon.png diff --git a/webapp/portlet/src/main/webapp/images/deprecated/space-access/texture.png b/webapp/src/main/webapp/images/deprecated/space-access/texture.png similarity index 100% rename from webapp/portlet/src/main/webapp/images/deprecated/space-access/texture.png rename to webapp/src/main/webapp/images/deprecated/space-access/texture.png diff --git a/webapp/portlet/src/main/webapp/images/deprecated/space-access/warningIcon.png b/webapp/src/main/webapp/images/deprecated/space-access/warningIcon.png similarity index 100% rename from webapp/portlet/src/main/webapp/images/deprecated/space-access/warningIcon.png rename to webapp/src/main/webapp/images/deprecated/space-access/warningIcon.png diff --git a/webapp/portlet/src/main/webapp/images/deprecated/welcome-screen/uiIconsColor.png b/webapp/src/main/webapp/images/deprecated/welcome-screen/uiIconsColor.png similarity index 100% rename from webapp/portlet/src/main/webapp/images/deprecated/welcome-screen/uiIconsColor.png rename to webapp/src/main/webapp/images/deprecated/welcome-screen/uiIconsColor.png diff --git a/webapp/portlet/src/main/webapp/images/emptyCol1.webp b/webapp/src/main/webapp/images/emptyCol1.webp similarity index 100% rename from webapp/portlet/src/main/webapp/images/emptyCol1.webp rename to webapp/src/main/webapp/images/emptyCol1.webp diff --git a/webapp/portlet/src/main/webapp/images/emptyCol2.webp b/webapp/src/main/webapp/images/emptyCol2.webp similarity index 100% rename from webapp/portlet/src/main/webapp/images/emptyCol2.webp rename to webapp/src/main/webapp/images/emptyCol2.webp diff --git a/webapp/portlet/src/main/webapp/images/emptyCol3.webp b/webapp/src/main/webapp/images/emptyCol3.webp similarity index 100% rename from webapp/portlet/src/main/webapp/images/emptyCol3.webp rename to webapp/src/main/webapp/images/emptyCol3.webp diff --git a/webapp/portlet/src/main/webapp/images/empty_pin_stream.png b/webapp/src/main/webapp/images/empty_pin_stream.png similarity index 100% rename from webapp/portlet/src/main/webapp/images/empty_pin_stream.png rename to webapp/src/main/webapp/images/empty_pin_stream.png diff --git a/webapp/portlet/src/main/webapp/images/link.jpg b/webapp/src/main/webapp/images/link.jpg similarity index 100% rename from webapp/portlet/src/main/webapp/images/link.jpg rename to webapp/src/main/webapp/images/link.jpg diff --git a/webapp/portlet/src/main/webapp/js/BodyScrollListener.js b/webapp/src/main/webapp/js/BodyScrollListener.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/BodyScrollListener.js rename to webapp/src/main/webapp/js/BodyScrollListener.js diff --git a/webapp/portlet/src/main/webapp/js/ExtendedDomPurify.js b/webapp/src/main/webapp/js/ExtendedDomPurify.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/ExtendedDomPurify.js rename to webapp/src/main/webapp/js/ExtendedDomPurify.js diff --git a/webapp/portlet/src/main/webapp/js/MobileSwipeContainer.js b/webapp/src/main/webapp/js/MobileSwipeContainer.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/MobileSwipeContainer.js rename to webapp/src/main/webapp/js/MobileSwipeContainer.js diff --git a/webapp/portlet/src/main/webapp/js/TopbarLoading.js b/webapp/src/main/webapp/js/TopbarLoading.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/TopbarLoading.js rename to webapp/src/main/webapp/js/TopbarLoading.js diff --git a/webapp/portlet/src/main/webapp/js/ckeditorPlugins/attachImage/icons/attachImage.png b/webapp/src/main/webapp/js/ckeditorPlugins/attachImage/icons/attachImage.png similarity index 100% rename from webapp/portlet/src/main/webapp/js/ckeditorPlugins/attachImage/icons/attachImage.png rename to webapp/src/main/webapp/js/ckeditorPlugins/attachImage/icons/attachImage.png diff --git a/webapp/portlet/src/main/webapp/js/ckeditorPlugins/attachImage/lang/en.js b/webapp/src/main/webapp/js/ckeditorPlugins/attachImage/lang/en.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/ckeditorPlugins/attachImage/lang/en.js rename to webapp/src/main/webapp/js/ckeditorPlugins/attachImage/lang/en.js diff --git a/webapp/portlet/src/main/webapp/js/ckeditorPlugins/attachImage/lang/fr.js b/webapp/src/main/webapp/js/ckeditorPlugins/attachImage/lang/fr.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/ckeditorPlugins/attachImage/lang/fr.js rename to webapp/src/main/webapp/js/ckeditorPlugins/attachImage/lang/fr.js diff --git a/webapp/portlet/src/main/webapp/js/ckeditorPlugins/attachImage/plugin.js b/webapp/src/main/webapp/js/ckeditorPlugins/attachImage/plugin.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/ckeditorPlugins/attachImage/plugin.js rename to webapp/src/main/webapp/js/ckeditorPlugins/attachImage/plugin.js diff --git a/webapp/portlet/src/main/webapp/js/ckeditorPlugins/linkBalloon/icons/addLink.png b/webapp/src/main/webapp/js/ckeditorPlugins/linkBalloon/icons/addLink.png similarity index 100% rename from webapp/portlet/src/main/webapp/js/ckeditorPlugins/linkBalloon/icons/addLink.png rename to webapp/src/main/webapp/js/ckeditorPlugins/linkBalloon/icons/addLink.png diff --git a/webapp/portlet/src/main/webapp/js/ckeditorPlugins/linkBalloon/icons/removeLink.png b/webapp/src/main/webapp/js/ckeditorPlugins/linkBalloon/icons/removeLink.png similarity index 100% rename from webapp/portlet/src/main/webapp/js/ckeditorPlugins/linkBalloon/icons/removeLink.png rename to webapp/src/main/webapp/js/ckeditorPlugins/linkBalloon/icons/removeLink.png diff --git a/webapp/portlet/src/main/webapp/js/ckeditorPlugins/linkBalloon/lang/en.js b/webapp/src/main/webapp/js/ckeditorPlugins/linkBalloon/lang/en.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/ckeditorPlugins/linkBalloon/lang/en.js rename to webapp/src/main/webapp/js/ckeditorPlugins/linkBalloon/lang/en.js diff --git a/webapp/portlet/src/main/webapp/js/ckeditorPlugins/linkBalloon/lang/fr.js b/webapp/src/main/webapp/js/ckeditorPlugins/linkBalloon/lang/fr.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/ckeditorPlugins/linkBalloon/lang/fr.js rename to webapp/src/main/webapp/js/ckeditorPlugins/linkBalloon/lang/fr.js diff --git a/webapp/portlet/src/main/webapp/js/ckeditorPlugins/linkBalloon/plugin.js b/webapp/src/main/webapp/js/ckeditorPlugins/linkBalloon/plugin.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/ckeditorPlugins/linkBalloon/plugin.js rename to webapp/src/main/webapp/js/ckeditorPlugins/linkBalloon/plugin.js diff --git a/webapp/portlet/src/main/webapp/js/extensionRegistry.js b/webapp/src/main/webapp/js/extensionRegistry.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/extensionRegistry.js rename to webapp/src/main/webapp/js/extensionRegistry.js diff --git a/webapp/portlet/src/main/webapp/js/lib/autolinker.min.js b/webapp/src/main/webapp/js/lib/autolinker.min.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/lib/autolinker.min.js rename to webapp/src/main/webapp/js/lib/autolinker.min.js diff --git a/webapp/portlet/src/main/webapp/js/lib/cropper.min.js b/webapp/src/main/webapp/js/lib/cropper.min.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/lib/cropper.min.js rename to webapp/src/main/webapp/js/lib/cropper.min.js diff --git a/webapp/portlet/src/main/webapp/js/lib/deprecated/switch-button.js b/webapp/src/main/webapp/js/lib/deprecated/switch-button.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/lib/deprecated/switch-button.js rename to webapp/src/main/webapp/js/lib/deprecated/switch-button.js diff --git a/webapp/portlet/src/main/webapp/js/lib/echarts.min.js b/webapp/src/main/webapp/js/lib/echarts.min.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/lib/echarts.min.js rename to webapp/src/main/webapp/js/lib/echarts.min.js diff --git a/webapp/portlet/src/main/webapp/js/lib/html2canvas.min.js b/webapp/src/main/webapp/js/lib/html2canvas.min.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/lib/html2canvas.min.js rename to webapp/src/main/webapp/js/lib/html2canvas.min.js diff --git a/webapp/portlet/src/main/webapp/js/lib/jquery-3.2.1.js b/webapp/src/main/webapp/js/lib/jquery-3.2.1.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/lib/jquery-3.2.1.js rename to webapp/src/main/webapp/js/lib/jquery-3.2.1.js diff --git a/webapp/portlet/src/main/webapp/js/lib/jquery.atwho.js b/webapp/src/main/webapp/js/lib/jquery.atwho.js similarity index 99% rename from webapp/portlet/src/main/webapp/js/lib/jquery.atwho.js rename to webapp/src/main/webapp/js/lib/jquery.atwho.js index a9266c47832..112acaa9867 100644 --- a/webapp/portlet/src/main/webapp/js/lib/jquery.atwho.js +++ b/webapp/src/main/webapp/js/lib/jquery.atwho.js @@ -672,7 +672,7 @@ EditableController = (function(superClass) { EditableController.prototype._getRange = function() { var sel; sel = this.app.window.getSelection(); - if (sel.rangeCount > 0) { + if (sel?.rangeCount) { return sel.getRangeAt(0); } }; diff --git a/webapp/portlet/src/main/webapp/js/lib/jquery.caret.js b/webapp/src/main/webapp/js/lib/jquery.caret.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/lib/jquery.caret.js rename to webapp/src/main/webapp/js/lib/jquery.caret.js diff --git a/webapp/portlet/src/main/webapp/js/lib/jquery.exomentions.js b/webapp/src/main/webapp/js/lib/jquery.exomentions.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/lib/jquery.exomentions.js rename to webapp/src/main/webapp/js/lib/jquery.exomentions.js diff --git a/webapp/portlet/src/main/webapp/js/lib/jspdf.min.js b/webapp/src/main/webapp/js/lib/jspdf.min.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/lib/jspdf.min.js rename to webapp/src/main/webapp/js/lib/jspdf.min.js diff --git a/webapp/portlet/src/main/webapp/js/lib/purify.min.js b/webapp/src/main/webapp/js/lib/purify.min.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/lib/purify.min.js rename to webapp/src/main/webapp/js/lib/purify.min.js diff --git a/webapp/portlet/src/main/webapp/js/lib/require.js b/webapp/src/main/webapp/js/lib/require.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/lib/require.js rename to webapp/src/main/webapp/js/lib/require.js diff --git a/webapp/portlet/src/main/webapp/js/lib/selectize.js b/webapp/src/main/webapp/js/lib/selectize.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/lib/selectize.js rename to webapp/src/main/webapp/js/lib/selectize.js diff --git a/webapp/portlet/src/main/webapp/js/lib/sortable.min.js b/webapp/src/main/webapp/js/lib/sortable.min.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/lib/sortable.min.js rename to webapp/src/main/webapp/js/lib/sortable.min.js diff --git a/webapp/portlet/src/main/webapp/js/lib/underscore.js b/webapp/src/main/webapp/js/lib/underscore.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/lib/underscore.js rename to webapp/src/main/webapp/js/lib/underscore.js diff --git a/webapp/portlet/src/main/webapp/js/lib/vue-i18n.min.js b/webapp/src/main/webapp/js/lib/vue-i18n.min.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/lib/vue-i18n.min.js rename to webapp/src/main/webapp/js/lib/vue-i18n.min.js diff --git a/webapp/portlet/src/main/webapp/js/lib/vue.min.js b/webapp/src/main/webapp/js/lib/vue.min.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/lib/vue.min.js rename to webapp/src/main/webapp/js/lib/vue.min.js diff --git a/webapp/portlet/src/main/webapp/js/lib/vueDraggable.min.js b/webapp/src/main/webapp/js/lib/vueDraggable.min.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/lib/vueDraggable.min.js rename to webapp/src/main/webapp/js/lib/vueDraggable.min.js diff --git a/webapp/portlet/src/main/webapp/js/lib/vuetify.min.js b/webapp/src/main/webapp/js/lib/vuetify.min.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/lib/vuetify.min.js rename to webapp/src/main/webapp/js/lib/vuetify.min.js diff --git a/webapp/portlet/src/main/webapp/js/portal.js b/webapp/src/main/webapp/js/portal.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/portal.js rename to webapp/src/main/webapp/js/portal.js diff --git a/webapp/portlet/src/main/webapp/js/sanitize-html-directive.js b/webapp/src/main/webapp/js/sanitize-html-directive.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/sanitize-html-directive.js rename to webapp/src/main/webapp/js/sanitize-html-directive.js diff --git a/webapp/portlet/src/main/webapp/js/suggester.js b/webapp/src/main/webapp/js/suggester.js similarity index 99% rename from webapp/portlet/src/main/webapp/js/suggester.js rename to webapp/src/main/webapp/js/suggester.js index 41075744858..ee40d3d26d3 100644 --- a/webapp/portlet/src/main/webapp/js/suggester.js +++ b/webapp/src/main/webapp/js/suggester.js @@ -262,7 +262,12 @@ .on('click', '.remove', function(e) { $(this).closest('[data-atwho-at-query]').remove(); }); - if (range = this._getRange()) { + try { + range = this._getRange() + } catch (e) { + return; + } + if (range) { if (this.query.el.length) { range.setEndAfter(this.query.el[0]); } diff --git a/webapp/portlet/src/main/webapp/js/tag.suggester.js b/webapp/src/main/webapp/js/tag.suggester.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/tag.suggester.js rename to webapp/src/main/webapp/js/tag.suggester.js diff --git a/webapp/portlet/src/main/webapp/js/vue-i18n-wrapper.js b/webapp/src/main/webapp/js/vue-i18n-wrapper.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/vue-i18n-wrapper.js rename to webapp/src/main/webapp/js/vue-i18n-wrapper.js diff --git a/webapp/portlet/src/main/webapp/js/welcome-screens/accountSetup.js b/webapp/src/main/webapp/js/welcome-screens/accountSetup.js similarity index 100% rename from webapp/portlet/src/main/webapp/js/welcome-screens/accountSetup.js rename to webapp/src/main/webapp/js/welcome-screens/accountSetup.js diff --git a/webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/Breadcrumb.png b/webapp/src/main/webapp/skin/DefaultSkin/portletIcons/Breadcrumb.png similarity index 100% rename from webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/Breadcrumb.png rename to webapp/src/main/webapp/skin/DefaultSkin/portletIcons/Breadcrumb.png diff --git a/webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/ExternalSpacesList.png b/webapp/src/main/webapp/skin/DefaultSkin/portletIcons/ExternalSpacesList.png similarity index 100% rename from webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/ExternalSpacesList.png rename to webapp/src/main/webapp/skin/DefaultSkin/portletIcons/ExternalSpacesList.png diff --git a/webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/Image.png b/webapp/src/main/webapp/skin/DefaultSkin/portletIcons/Image.png similarity index 100% rename from webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/Image.png rename to webapp/src/main/webapp/skin/DefaultSkin/portletIcons/Image.png diff --git a/webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/Links.png b/webapp/src/main/webapp/skin/DefaultSkin/portletIcons/Links.png similarity index 100% rename from webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/Links.png rename to webapp/src/main/webapp/skin/DefaultSkin/portletIcons/Links.png diff --git a/webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/MembersPortlet.png b/webapp/src/main/webapp/skin/DefaultSkin/portletIcons/MembersPortlet.png similarity index 100% rename from webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/MembersPortlet.png rename to webapp/src/main/webapp/skin/DefaultSkin/portletIcons/MembersPortlet.png diff --git a/webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/OrganizationalChart.png b/webapp/src/main/webapp/skin/DefaultSkin/portletIcons/OrganizationalChart.png similarity index 100% rename from webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/OrganizationalChart.png rename to webapp/src/main/webapp/skin/DefaultSkin/portletIcons/OrganizationalChart.png diff --git a/webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/PeopleOverview.png b/webapp/src/main/webapp/skin/DefaultSkin/portletIcons/PeopleOverview.png similarity index 100% rename from webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/PeopleOverview.png rename to webapp/src/main/webapp/skin/DefaultSkin/portletIcons/PeopleOverview.png diff --git a/webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/SpaceActivityStreamPortlet.png b/webapp/src/main/webapp/skin/DefaultSkin/portletIcons/SpaceActivityStreamPortlet.png similarity index 100% rename from webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/SpaceActivityStreamPortlet.png rename to webapp/src/main/webapp/skin/DefaultSkin/portletIcons/SpaceActivityStreamPortlet.png diff --git a/webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/SpaceInfos.png b/webapp/src/main/webapp/skin/DefaultSkin/portletIcons/SpaceInfos.png similarity index 100% rename from webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/SpaceInfos.png rename to webapp/src/main/webapp/skin/DefaultSkin/portletIcons/SpaceInfos.png diff --git a/webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/SpaceMenuPortlet.png b/webapp/src/main/webapp/skin/DefaultSkin/portletIcons/SpaceMenuPortlet.png similarity index 100% rename from webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/SpaceMenuPortlet.png rename to webapp/src/main/webapp/skin/DefaultSkin/portletIcons/SpaceMenuPortlet.png diff --git a/webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/SpaceSettingPortlet.png b/webapp/src/main/webapp/skin/DefaultSkin/portletIcons/SpaceSettingPortlet.png similarity index 100% rename from webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/SpaceSettingPortlet.png rename to webapp/src/main/webapp/skin/DefaultSkin/portletIcons/SpaceSettingPortlet.png diff --git a/webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/SpacesOverview.png b/webapp/src/main/webapp/skin/DefaultSkin/portletIcons/SpacesOverview.png similarity index 100% rename from webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/SpacesOverview.png rename to webapp/src/main/webapp/skin/DefaultSkin/portletIcons/SpacesOverview.png diff --git a/webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/SuggestionsPeopleAndSpace.png b/webapp/src/main/webapp/skin/DefaultSkin/portletIcons/SuggestionsPeopleAndSpace.png similarity index 100% rename from webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/SuggestionsPeopleAndSpace.png rename to webapp/src/main/webapp/skin/DefaultSkin/portletIcons/SuggestionsPeopleAndSpace.png diff --git a/webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/TopBarLogin.png b/webapp/src/main/webapp/skin/DefaultSkin/portletIcons/TopBarLogin.png similarity index 100% rename from webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/TopBarLogin.png rename to webapp/src/main/webapp/skin/DefaultSkin/portletIcons/TopBarLogin.png diff --git a/webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/TopBarLogo.png b/webapp/src/main/webapp/skin/DefaultSkin/portletIcons/TopBarLogo.png similarity index 100% rename from webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/TopBarLogo.png rename to webapp/src/main/webapp/skin/DefaultSkin/portletIcons/TopBarLogo.png diff --git a/webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/TopBarPreview.png b/webapp/src/main/webapp/skin/DefaultSkin/portletIcons/TopBarPreview.png similarity index 100% rename from webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/TopBarPreview.png rename to webapp/src/main/webapp/skin/DefaultSkin/portletIcons/TopBarPreview.png diff --git a/webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/TopBarPublishSite.png b/webapp/src/main/webapp/skin/DefaultSkin/portletIcons/TopBarPublishSite.png similarity index 100% rename from webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/TopBarPublishSite.png rename to webapp/src/main/webapp/skin/DefaultSkin/portletIcons/TopBarPublishSite.png diff --git a/webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/VerticalMenu.png b/webapp/src/main/webapp/skin/DefaultSkin/portletIcons/VerticalMenu.png similarity index 100% rename from webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/VerticalMenu.png rename to webapp/src/main/webapp/skin/DefaultSkin/portletIcons/VerticalMenu.png diff --git a/webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/WhoIsOnLinePortlet.png b/webapp/src/main/webapp/skin/DefaultSkin/portletIcons/WhoIsOnLinePortlet.png similarity index 100% rename from webapp/portlet/src/main/webapp/skin/DefaultSkin/portletIcons/WhoIsOnLinePortlet.png rename to webapp/src/main/webapp/skin/DefaultSkin/portletIcons/WhoIsOnLinePortlet.png diff --git a/webapp/portlet/src/main/webapp/skin/css/welcome-screens/jquery.qtip.min.css b/webapp/src/main/webapp/skin/css/welcome-screens/jquery.qtip.min.css similarity index 100% rename from webapp/portlet/src/main/webapp/skin/css/welcome-screens/jquery.qtip.min.css rename to webapp/src/main/webapp/skin/css/welcome-screens/jquery.qtip.min.css diff --git a/webapp/portlet/src/main/webapp/skin/less/common/AdministrationSite/Style.less b/webapp/src/main/webapp/skin/less/common/AdministrationSite/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/common/AdministrationSite/Style.less rename to webapp/src/main/webapp/skin/less/common/AdministrationSite/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/common/Notification/Style.less b/webapp/src/main/webapp/skin/less/common/Notification/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/common/Notification/Style.less rename to webapp/src/main/webapp/skin/less/common/Notification/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/common/PeopleList/Style.less b/webapp/src/main/webapp/skin/less/common/PeopleList/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/common/PeopleList/Style.less rename to webapp/src/main/webapp/skin/less/common/PeopleList/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/common/ProfileCard/Style-mobile.less b/webapp/src/main/webapp/skin/less/common/ProfileCard/Style-mobile.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/common/ProfileCard/Style-mobile.less rename to webapp/src/main/webapp/skin/less/common/ProfileCard/Style-mobile.less diff --git a/webapp/portlet/src/main/webapp/skin/less/common/ProfileCard/Style.less b/webapp/src/main/webapp/skin/less/common/ProfileCard/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/common/ProfileCard/Style.less rename to webapp/src/main/webapp/skin/less/common/ProfileCard/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/common/UserCard/Style.less b/webapp/src/main/webapp/skin/less/common/UserCard/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/common/UserCard/Style.less rename to webapp/src/main/webapp/skin/less/common/UserCard/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/common/siteDetails/Style.less b/webapp/src/main/webapp/skin/less/common/siteDetails/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/common/siteDetails/Style.less rename to webapp/src/main/webapp/skin/less/common/siteDetails/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/Style.less b/webapp/src/main/webapp/skin/less/deprecated/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/Style.less rename to webapp/src/main/webapp/skin/less/deprecated/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/bootstrap.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/bootstrap.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/bootstrap.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/bootstrap.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/accordion.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/accordion.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/accordion.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/accordion.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/alerts.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/alerts.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/alerts.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/alerts.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/bootstrap.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/bootstrap.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/bootstrap.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/bootstrap.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/breadcrumbs.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/breadcrumbs.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/breadcrumbs.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/breadcrumbs.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/button-groups.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/button-groups.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/button-groups.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/button-groups.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/buttons.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/buttons.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/buttons.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/buttons.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/carousel.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/carousel.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/carousel.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/carousel.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/close.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/close.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/close.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/close.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/code.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/code.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/code.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/code.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/component-animations.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/component-animations.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/component-animations.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/component-animations.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/dropdowns.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/dropdowns.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/dropdowns.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/dropdowns.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/forms.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/forms.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/forms.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/forms.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/grid.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/grid.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/grid.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/grid.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/hero-unit.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/hero-unit.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/hero-unit.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/hero-unit.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/labels-badges.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/labels-badges.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/labels-badges.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/labels-badges.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/layouts.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/layouts.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/layouts.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/layouts.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/media.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/media.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/media.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/media.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/mixins.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/mixins.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/mixins.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/mixins.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/modals.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/modals.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/modals.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/modals.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/navbar.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/navbar.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/navbar.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/navbar.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/navs.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/navs.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/navs.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/navs.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/pager.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/pager.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/pager.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/pager.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/pagination.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/pagination.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/pagination.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/pagination.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/popovers.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/popovers.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/popovers.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/popovers.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/progress-bars.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/progress-bars.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/progress-bars.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/progress-bars.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/reset.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/reset.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/reset.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/reset.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive-1200px-min.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive-1200px-min.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive-1200px-min.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive-1200px-min.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive-767px-max.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive-767px-max.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive-767px-max.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive-767px-max.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive-768px-979px.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive-768px-979px.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive-768px-979px.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive-768px-979px.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive-navbar.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive-navbar.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive-navbar.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive-navbar.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive-utilities.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive-utilities.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive-utilities.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive-utilities.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/responsive.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/scaffolding.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/scaffolding.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/scaffolding.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/scaffolding.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/sprites.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/sprites.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/sprites.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/sprites.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/tables.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/tables.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/tables.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/tables.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/thumbnails.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/thumbnails.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/thumbnails.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/thumbnails.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/tooltip.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/tooltip.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/tooltip.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/tooltip.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/type.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/type.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/type.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/type.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/utilities.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/utilities.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/utilities.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/utilities.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/variables.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/variables.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/variables.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/variables.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/wells.less b/webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/wells.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/bootstrap/less/wells.less rename to webapp/src/main/webapp/skin/less/deprecated/bootstrap/less/wells.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/webui/Buttons/Style.less b/webapp/src/main/webapp/skin/less/deprecated/webui/Buttons/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/webui/Buttons/Style.less rename to webapp/src/main/webapp/skin/less/deprecated/webui/Buttons/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/webui/Checkbox/Style.less b/webapp/src/main/webapp/skin/less/deprecated/webui/Checkbox/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/webui/Checkbox/Style.less rename to webapp/src/main/webapp/skin/less/deprecated/webui/Checkbox/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/webui/Form/Style.less b/webapp/src/main/webapp/skin/less/deprecated/webui/Form/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/webui/Form/Style.less rename to webapp/src/main/webapp/skin/less/deprecated/webui/Form/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/webui/Grid/Style.less b/webapp/src/main/webapp/skin/less/deprecated/webui/Grid/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/webui/Grid/Style.less rename to webapp/src/main/webapp/skin/less/deprecated/webui/Grid/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/webui/Grid/tables.less b/webapp/src/main/webapp/skin/less/deprecated/webui/Grid/tables.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/webui/Grid/tables.less rename to webapp/src/main/webapp/skin/less/deprecated/webui/Grid/tables.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/webui/Popup/Style.less b/webapp/src/main/webapp/skin/less/deprecated/webui/Popup/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/webui/Popup/Style.less rename to webapp/src/main/webapp/skin/less/deprecated/webui/Popup/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/webui/SearchInput/Style.less b/webapp/src/main/webapp/skin/less/deprecated/webui/SearchInput/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/webui/SearchInput/Style.less rename to webapp/src/main/webapp/skin/less/deprecated/webui/SearchInput/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/webui/Selectize/Style.less b/webapp/src/main/webapp/skin/less/deprecated/webui/Selectize/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/webui/Selectize/Style.less rename to webapp/src/main/webapp/skin/less/deprecated/webui/Selectize/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/deprecated/webui/webui.less b/webapp/src/main/webapp/skin/less/deprecated/webui/webui.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/deprecated/webui/webui.less rename to webapp/src/main/webapp/skin/less/deprecated/webui/webui.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/ActivitySearch/Style.less b/webapp/src/main/webapp/skin/less/portlet/ActivitySearch/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/ActivitySearch/Style.less rename to webapp/src/main/webapp/skin/less/portlet/ActivitySearch/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/ActivityStream/Style.less b/webapp/src/main/webapp/skin/less/portlet/ActivityStream/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/ActivityStream/Style.less rename to webapp/src/main/webapp/skin/less/portlet/ActivityStream/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/GettingStarted/Style.less b/webapp/src/main/webapp/skin/less/portlet/GettingStarted/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/GettingStarted/Style.less rename to webapp/src/main/webapp/skin/less/portlet/GettingStarted/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/HamburgerMenu/Style.less b/webapp/src/main/webapp/skin/less/portlet/HamburgerMenu/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/HamburgerMenu/Style.less rename to webapp/src/main/webapp/skin/less/portlet/HamburgerMenu/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/IDMGroupsManagement/Style.less b/webapp/src/main/webapp/skin/less/portlet/IDMGroupsManagement/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/IDMGroupsManagement/Style.less rename to webapp/src/main/webapp/skin/less/portlet/IDMGroupsManagement/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/IDMMembershipTypesManagement/Style.less b/webapp/src/main/webapp/skin/less/portlet/IDMMembershipTypesManagement/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/IDMMembershipTypesManagement/Style.less rename to webapp/src/main/webapp/skin/less/portlet/IDMMembershipTypesManagement/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/IDMUsersManagement/Style.less b/webapp/src/main/webapp/skin/less/portlet/IDMUsersManagement/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/IDMUsersManagement/Style.less rename to webapp/src/main/webapp/skin/less/portlet/IDMUsersManagement/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/PeopleList/Style.less b/webapp/src/main/webapp/skin/less/portlet/PeopleList/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/PeopleList/Style.less rename to webapp/src/main/webapp/skin/less/portlet/PeopleList/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/PeopleOverview/Style.less b/webapp/src/main/webapp/skin/less/portlet/PeopleOverview/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/PeopleOverview/Style.less rename to webapp/src/main/webapp/skin/less/portlet/PeopleOverview/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/ProfileAboutMe/Style.less b/webapp/src/main/webapp/skin/less/portlet/ProfileAboutMe/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/ProfileAboutMe/Style.less rename to webapp/src/main/webapp/skin/less/portlet/ProfileAboutMe/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/ProfileContactInformation/Style.less b/webapp/src/main/webapp/skin/less/portlet/ProfileContactInformation/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/ProfileContactInformation/Style.less rename to webapp/src/main/webapp/skin/less/portlet/ProfileContactInformation/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/ProfileHeader/Style.less b/webapp/src/main/webapp/skin/less/portlet/ProfileHeader/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/ProfileHeader/Style.less rename to webapp/src/main/webapp/skin/less/portlet/ProfileHeader/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/ProfileSearch/Style.less b/webapp/src/main/webapp/skin/less/portlet/ProfileSearch/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/ProfileSearch/Style.less rename to webapp/src/main/webapp/skin/less/portlet/ProfileSearch/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/ProfileSettings/Style.less b/webapp/src/main/webapp/skin/less/portlet/ProfileSettings/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/ProfileSettings/Style.less rename to webapp/src/main/webapp/skin/less/portlet/ProfileSettings/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/ProfileWorkExperience/Style.less b/webapp/src/main/webapp/skin/less/portlet/ProfileWorkExperience/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/ProfileWorkExperience/Style.less rename to webapp/src/main/webapp/skin/less/portlet/ProfileWorkExperience/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/Search/Style.less b/webapp/src/main/webapp/skin/less/portlet/Search/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/Search/Style.less rename to webapp/src/main/webapp/skin/less/portlet/Search/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/SpaceInfos/Style.less b/webapp/src/main/webapp/skin/less/portlet/SpaceInfos/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/SpaceInfos/Style.less rename to webapp/src/main/webapp/skin/less/portlet/SpaceInfos/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/SpacesAdministration/Style.less b/webapp/src/main/webapp/skin/less/portlet/SpacesAdministration/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/SpacesAdministration/Style.less rename to webapp/src/main/webapp/skin/less/portlet/SpacesAdministration/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/SpacesListExternal/Style.less b/webapp/src/main/webapp/skin/less/portlet/SpacesListExternal/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/SpacesListExternal/Style.less rename to webapp/src/main/webapp/skin/less/portlet/SpacesListExternal/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/SpacesOverview/Style.less b/webapp/src/main/webapp/skin/less/portlet/SpacesOverview/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/SpacesOverview/Style.less rename to webapp/src/main/webapp/skin/less/portlet/SpacesOverview/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/SuggestionsPeopleAndSpace/Style.less b/webapp/src/main/webapp/skin/less/portlet/SuggestionsPeopleAndSpace/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/SuggestionsPeopleAndSpace/Style.less rename to webapp/src/main/webapp/skin/less/portlet/SuggestionsPeopleAndSpace/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/TopBarMenu/Style.less b/webapp/src/main/webapp/skin/less/portlet/TopBarMenu/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/TopBarMenu/Style.less rename to webapp/src/main/webapp/skin/less/portlet/TopBarMenu/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/TopBarNotification/Style.less b/webapp/src/main/webapp/skin/less/portlet/TopBarNotification/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/TopBarNotification/Style.less rename to webapp/src/main/webapp/skin/less/portlet/TopBarNotification/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/VerticalMenu/Style.less b/webapp/src/main/webapp/skin/less/portlet/VerticalMenu/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/VerticalMenu/Style.less rename to webapp/src/main/webapp/skin/less/portlet/VerticalMenu/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/portlet/organizational-chart/Style.less b/webapp/src/main/webapp/skin/less/portlet/organizational-chart/Style.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/portlet/organizational-chart/Style.less rename to webapp/src/main/webapp/skin/less/portlet/organizational-chart/Style.less diff --git a/webapp/portlet/src/main/webapp/skin/less/standalone-pages/AccountSetup.less b/webapp/src/main/webapp/skin/less/standalone-pages/AccountSetup.less similarity index 95% rename from webapp/portlet/src/main/webapp/skin/less/standalone-pages/AccountSetup.less rename to webapp/src/main/webapp/skin/less/standalone-pages/AccountSetup.less index e06d8def4b5..d3768fd40a1 100644 --- a/webapp/portlet/src/main/webapp/skin/less/standalone-pages/AccountSetup.less +++ b/webapp/src/main/webapp/skin/less/standalone-pages/AccountSetup.less @@ -157,11 +157,11 @@ a { margin: 10px 0 15px; } .uiIconError { - background: url("/social-portlet/images/deprecated/welcome-screen/uiIconsColor.png") no-repeat scroll left top transparent; + background: url("/social/images/deprecated/welcome-screen/uiIconsColor.png") no-repeat scroll left top transparent; padding-left: 20px; } .uiIconWarning { - background: url("/social-portlet/images/deprecated/welcome-screen/uiIconsColor.png") no-repeat -20px top transparent; + background: url("/social/images/deprecated/welcome-screen/uiIconsColor.png") no-repeat -20px top transparent; padding-left: 20px; } } diff --git a/webapp/portlet/src/main/webapp/skin/less/standalone-pages/Login.less b/webapp/src/main/webapp/skin/less/standalone-pages/Login.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/standalone-pages/Login.less rename to webapp/src/main/webapp/skin/less/standalone-pages/Login.less diff --git a/webapp/portlet/src/main/webapp/skin/less/standalone-pages/OAuth.less b/webapp/src/main/webapp/skin/less/standalone-pages/OAuth.less similarity index 100% rename from webapp/portlet/src/main/webapp/skin/less/standalone-pages/OAuth.less rename to webapp/src/main/webapp/skin/less/standalone-pages/OAuth.less diff --git a/webapp/portlet/src/main/webapp/tld/portlet_2_0.tld b/webapp/src/main/webapp/tld/portlet_2_0.tld similarity index 100% rename from webapp/portlet/src/main/webapp/tld/portlet_2_0.tld rename to webapp/src/main/webapp/tld/portlet_2_0.tld diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-reactions/components/ActivityLikerItem.vue b/webapp/src/main/webapp/vue-apps/activity-reactions/components/ActivityLikerItem.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-reactions/components/ActivityLikerItem.vue rename to webapp/src/main/webapp/vue-apps/activity-reactions/components/ActivityLikerItem.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-reactions/components/ActivityLikesList.vue b/webapp/src/main/webapp/vue-apps/activity-reactions/components/ActivityLikesList.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-reactions/components/ActivityLikesList.vue rename to webapp/src/main/webapp/vue-apps/activity-reactions/components/ActivityLikesList.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-reactions/components/ActivityReactions.vue b/webapp/src/main/webapp/vue-apps/activity-reactions/components/ActivityReactions.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-reactions/components/ActivityReactions.vue rename to webapp/src/main/webapp/vue-apps/activity-reactions/components/ActivityReactions.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-reactions/components/ActivityReactionsApp.vue b/webapp/src/main/webapp/vue-apps/activity-reactions/components/ActivityReactionsApp.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-reactions/components/ActivityReactionsApp.vue rename to webapp/src/main/webapp/vue-apps/activity-reactions/components/ActivityReactionsApp.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-reactions/components/ActivityReactionsDrawer.vue b/webapp/src/main/webapp/vue-apps/activity-reactions/components/ActivityReactionsDrawer.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-reactions/components/ActivityReactionsDrawer.vue rename to webapp/src/main/webapp/vue-apps/activity-reactions/components/ActivityReactionsDrawer.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-reactions/components/ActivityReactionsListItems.vue b/webapp/src/main/webapp/vue-apps/activity-reactions/components/ActivityReactionsListItems.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-reactions/components/ActivityReactionsListItems.vue rename to webapp/src/main/webapp/vue-apps/activity-reactions/components/ActivityReactionsListItems.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-reactions/components/ActivityReactionsMobile.vue b/webapp/src/main/webapp/vue-apps/activity-reactions/components/ActivityReactionsMobile.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-reactions/components/ActivityReactionsMobile.vue rename to webapp/src/main/webapp/vue-apps/activity-reactions/components/ActivityReactionsMobile.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-reactions/extensions.js b/webapp/src/main/webapp/vue-apps/activity-reactions/extensions.js similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-reactions/extensions.js rename to webapp/src/main/webapp/vue-apps/activity-reactions/extensions.js diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-reactions/initComponents.js b/webapp/src/main/webapp/vue-apps/activity-reactions/initComponents.js similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-reactions/initComponents.js rename to webapp/src/main/webapp/vue-apps/activity-reactions/initComponents.js diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-reactions/main.js b/webapp/src/main/webapp/vue-apps/activity-reactions/main.js similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-reactions/main.js rename to webapp/src/main/webapp/vue-apps/activity-reactions/main.js diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/ActivityStream.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/ActivityStream.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/ActivityStream.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/ActivityStream.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/ActivityStreamActivity.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/ActivityStreamActivity.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/ActivityStreamActivity.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/activity/ActivityStreamActivity.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/ActivityStreamLoader.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/ActivityStreamLoader.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/ActivityStreamLoader.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/activity/ActivityStreamLoader.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityBody.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityBody.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityBody.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityBody.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityEmbeddedHTML.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityEmbeddedHTML.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityEmbeddedHTML.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityEmbeddedHTML.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityImageAttachments.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityImageAttachments.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityImageAttachments.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityImageAttachments.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityLink.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityLink.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityLink.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityLink.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityShare.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityShare.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityShare.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityShare.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/footer/ActivityActions.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/footer/ActivityActions.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/footer/ActivityActions.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/activity/footer/ActivityActions.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/footer/ActivityFooter.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/footer/ActivityFooter.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/footer/ActivityFooter.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/activity/footer/ActivityFooter.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/footer/ActivityShareInformation.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/footer/ActivityShareInformation.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/footer/ActivityShareInformation.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/activity/footer/ActivityShareInformation.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/footer/actions/ActivityCommentAction.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/footer/actions/ActivityCommentAction.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/footer/actions/ActivityCommentAction.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/activity/footer/actions/ActivityCommentAction.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/footer/actions/ActivityFavoriteAction.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/footer/actions/ActivityFavoriteAction.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/footer/actions/ActivityFavoriteAction.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/activity/footer/actions/ActivityFavoriteAction.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/footer/actions/ActivityLikeAction.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/footer/actions/ActivityLikeAction.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/footer/actions/ActivityLikeAction.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/activity/footer/actions/ActivityLikeAction.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/footer/actions/ActivityShareAction.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/footer/actions/ActivityShareAction.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/footer/actions/ActivityShareAction.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/activity/footer/actions/ActivityShareAction.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/header/ActivityHead.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/header/ActivityHead.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/header/ActivityHead.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/activity/header/ActivityHead.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/header/ActivityHeadMenu.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/header/ActivityHeadMenu.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/header/ActivityHeadMenu.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/activity/header/ActivityHeadMenu.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/header/ActivityHeadTime.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/header/ActivityHeadTime.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/header/ActivityHeadTime.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/activity/header/ActivityHeadTime.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/header/ActivityMobileHead.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/header/ActivityMobileHead.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/header/ActivityMobileHead.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/activity/header/ActivityMobileHead.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/list/ActivityStreamList.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/list/ActivityStreamList.vue similarity index 99% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/list/ActivityStreamList.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/activity/list/ActivityStreamList.vue index 4a9b5474d8f..51fb6aa0705 100644 --- a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/activity/list/ActivityStreamList.vue +++ b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/list/ActivityStreamList.vue @@ -167,7 +167,7 @@ export default { if (activity) { setTimeout(() => { if (activity.activityStream.type === 'space') { - location.href = `${eXo.env.portal.context}/g/${activity.activityStream.space.groupId.replace(/\//g, ':')}`; + location.href = `${eXo.env.portal.context}/s/${activity.activityStream.space.id}`; } else { location.href = eXo.env.portal.context; } diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/comment/ActivityComment.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/comment/ActivityComment.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/comment/ActivityComment.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/comment/ActivityComment.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/comment/content/ActivityCommentBodyText.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/comment/content/ActivityCommentBodyText.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/comment/content/ActivityCommentBodyText.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/comment/content/ActivityCommentBodyText.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/comment/content/ActivityCommentRichText.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/comment/content/ActivityCommentRichText.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/comment/content/ActivityCommentRichText.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/comment/content/ActivityCommentRichText.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/comment/footer/ActivityCommentActions.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/comment/footer/ActivityCommentActions.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/comment/footer/ActivityCommentActions.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/comment/footer/ActivityCommentActions.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/comment/footer/ActivityCommentTime.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/comment/footer/ActivityCommentTime.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/comment/footer/ActivityCommentTime.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/comment/footer/ActivityCommentTime.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/comment/footer/actions/ActivityCommentLikeAction.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/comment/footer/actions/ActivityCommentLikeAction.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/comment/footer/actions/ActivityCommentLikeAction.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/comment/footer/actions/ActivityCommentLikeAction.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/comment/footer/actions/ActivityCommentReplyAction.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/comment/footer/actions/ActivityCommentReplyAction.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/comment/footer/actions/ActivityCommentReplyAction.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/comment/footer/actions/ActivityCommentReplyAction.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/comment/header/ActivityCommentMenu.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/comment/header/ActivityCommentMenu.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/comment/header/ActivityCommentMenu.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/comment/header/ActivityCommentMenu.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/comment/list/ActivityComments.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/comment/list/ActivityComments.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/comment/list/ActivityComments.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/comment/list/ActivityComments.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/comment/list/ActivityCommentsDrawer.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/comment/list/ActivityCommentsDrawer.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/comment/list/ActivityCommentsDrawer.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/comment/list/ActivityCommentsDrawer.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/comment/list/ActivityCommentsPreview.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/comment/list/ActivityCommentsPreview.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/comment/list/ActivityCommentsPreview.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/comment/list/ActivityCommentsPreview.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/common/ActivityStreamConfirm.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/common/ActivityStreamConfirm.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/common/ActivityStreamConfirm.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/common/ActivityStreamConfirm.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/common/ActivityStreamUpdater.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/common/ActivityStreamUpdater.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/common/ActivityStreamUpdater.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/common/ActivityStreamUpdater.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/empty-stream/ActivityNotFound.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/empty-stream/ActivityNotFound.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/empty-stream/ActivityNotFound.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/empty-stream/ActivityNotFound.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/empty-stream/ActivityStreamEmptyMessage.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/empty-stream/ActivityStreamEmptyMessage.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/empty-stream/ActivityStreamEmptyMessage.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/empty-stream/ActivityStreamEmptyMessage.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/empty-stream/ActivityStreamEmptyMessageCard.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/empty-stream/ActivityStreamEmptyMessageCard.vue similarity index 96% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/empty-stream/ActivityStreamEmptyMessageCard.vue rename to webapp/src/main/webapp/vue-apps/activity-stream/components/empty-stream/ActivityStreamEmptyMessageCard.vue index 704f2ec64af..4c9245e21cf 100644 --- a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/components/empty-stream/ActivityStreamEmptyMessageCard.vue +++ b/webapp/src/main/webapp/vue-apps/activity-stream/components/empty-stream/ActivityStreamEmptyMessageCard.vue @@ -27,7 +27,7 @@ click: () => $emit('apply'), }"> activity && activity.templateParams && activity.templateParams.description || '', - getThumbnail: activity => activity && activity.templateParams && activity.templateParams.image || '/social-portlet/images/link.jpg', + getThumbnail: activity => activity && activity.templateParams && activity.templateParams.image || '/social/images/link.jpg', isDefaultThumbnail: activity => !(activity && activity.templateParams && activity.templateParams.image && activity.templateParams.image.length > 0), getPreviewWidth: activity => activity && activity.templateParams && activity.templateParams.previewWidth || 0, getPreviewHeight: activity => activity && activity.templateParams && activity.templateParams.previewHeight || 0, diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/initComponents.js b/webapp/src/main/webapp/vue-apps/activity-stream/initComponents.js similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/initComponents.js rename to webapp/src/main/webapp/vue-apps/activity-stream/initComponents.js diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/js/ActivityConstants.js b/webapp/src/main/webapp/vue-apps/activity-stream/js/ActivityConstants.js similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/js/ActivityConstants.js rename to webapp/src/main/webapp/vue-apps/activity-stream/js/ActivityConstants.js diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/js/ActivityUtils.js b/webapp/src/main/webapp/vue-apps/activity-stream/js/ActivityUtils.js similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/js/ActivityUtils.js rename to webapp/src/main/webapp/vue-apps/activity-stream/js/ActivityUtils.js diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/js/WebSocket.js b/webapp/src/main/webapp/vue-apps/activity-stream/js/WebSocket.js similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/js/WebSocket.js rename to webapp/src/main/webapp/vue-apps/activity-stream/js/WebSocket.js diff --git a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/main.js b/webapp/src/main/webapp/vue-apps/activity-stream/main.js similarity index 92% rename from webapp/portlet/src/main/webapp/vue-apps/activity-stream/main.js rename to webapp/src/main/webapp/vue-apps/activity-stream/main.js index 1703a7dc365..620e8c5b897 100644 --- a/webapp/portlet/src/main/webapp/vue-apps/activity-stream/main.js +++ b/webapp/src/main/webapp/vue-apps/activity-stream/main.js @@ -47,9 +47,9 @@ const appId = 'ActivityStream'; // Attention!!! when changing this, the list of preloaded // URLs has to change in JSP as well const urls = [ - `/social-portlet/i18n/locale.portlet.Portlets?lang=${lang}`, - `/social-portlet/i18n/locale.commons.Commons?lang=${lang}`, - `/social-portlet/i18n/locale.social.Webui?lang=${lang}`, + `/social/i18n/locale.portlet.Portlets?lang=${lang}`, + `/social/i18n/locale.commons.Commons?lang=${lang}`, + `/social/i18n/locale.social.Webui?lang=${lang}`, ]; export function init(maxFileSize) { diff --git a/webapp/portlet/src/main/webapp/vue-apps/animations/components/ConfetiAnimation.vue b/webapp/src/main/webapp/vue-apps/animations/components/ConfetiAnimation.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/animations/components/ConfetiAnimation.vue rename to webapp/src/main/webapp/vue-apps/animations/components/ConfetiAnimation.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/animations/initComponents.js b/webapp/src/main/webapp/vue-apps/animations/initComponents.js similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/animations/initComponents.js rename to webapp/src/main/webapp/vue-apps/animations/initComponents.js diff --git a/webapp/portlet/src/main/webapp/vue-apps/animations/main.js b/webapp/src/main/webapp/vue-apps/animations/main.js similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/animations/main.js rename to webapp/src/main/webapp/vue-apps/animations/main.js diff --git a/webapp/portlet/src/main/webapp/vue-apps/application-toolbar/components/ApplicationToolbar.vue b/webapp/src/main/webapp/vue-apps/application-toolbar/components/ApplicationToolbar.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/application-toolbar/components/ApplicationToolbar.vue rename to webapp/src/main/webapp/vue-apps/application-toolbar/components/ApplicationToolbar.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/application-toolbar/initComponents.js b/webapp/src/main/webapp/vue-apps/application-toolbar/initComponents.js similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/application-toolbar/initComponents.js rename to webapp/src/main/webapp/vue-apps/application-toolbar/initComponents.js diff --git a/webapp/portlet/src/main/webapp/vue-apps/application-toolbar/main.js b/webapp/src/main/webapp/vue-apps/application-toolbar/main.js similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/application-toolbar/main.js rename to webapp/src/main/webapp/vue-apps/application-toolbar/main.js diff --git a/webapp/portlet/src/main/webapp/vue-apps/attach-image/components/form/ImageAttachmentCropDrawer.vue b/webapp/src/main/webapp/vue-apps/attach-image/components/form/ImageAttachmentCropDrawer.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/attach-image/components/form/ImageAttachmentCropDrawer.vue rename to webapp/src/main/webapp/vue-apps/attach-image/components/form/ImageAttachmentCropDrawer.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/attach-image/components/form/ImageInput.vue b/webapp/src/main/webapp/vue-apps/attach-image/components/form/ImageInput.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/attach-image/components/form/ImageInput.vue rename to webapp/src/main/webapp/vue-apps/attach-image/components/form/ImageInput.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/attach-image/components/form/ImageInputItem.vue b/webapp/src/main/webapp/vue-apps/attach-image/components/form/ImageInputItem.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/attach-image/components/form/ImageInputItem.vue rename to webapp/src/main/webapp/vue-apps/attach-image/components/form/ImageInputItem.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/attach-image/components/form/ImageInputItems.vue b/webapp/src/main/webapp/vue-apps/attach-image/components/form/ImageInputItems.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/attach-image/components/form/ImageInputItems.vue rename to webapp/src/main/webapp/vue-apps/attach-image/components/form/ImageInputItems.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/attach-image/components/form/ImageInputMultiUpload.vue b/webapp/src/main/webapp/vue-apps/attach-image/components/form/ImageInputMultiUpload.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/attach-image/components/form/ImageInputMultiUpload.vue rename to webapp/src/main/webapp/vue-apps/attach-image/components/form/ImageInputMultiUpload.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/attach-image/components/preview/ImagePreviewDialog.vue b/webapp/src/main/webapp/vue-apps/attach-image/components/preview/ImagePreviewDialog.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/attach-image/components/preview/ImagePreviewDialog.vue rename to webapp/src/main/webapp/vue-apps/attach-image/components/preview/ImagePreviewDialog.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/attach-image/components/preview/ImagePreviewItem.vue b/webapp/src/main/webapp/vue-apps/attach-image/components/preview/ImagePreviewItem.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/attach-image/components/preview/ImagePreviewItem.vue rename to webapp/src/main/webapp/vue-apps/attach-image/components/preview/ImagePreviewItem.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/attach-image/components/view/ImageItem.vue b/webapp/src/main/webapp/vue-apps/attach-image/components/view/ImageItem.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/attach-image/components/view/ImageItem.vue rename to webapp/src/main/webapp/vue-apps/attach-image/components/view/ImageItem.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/attach-image/components/view/ImageItems.vue b/webapp/src/main/webapp/vue-apps/attach-image/components/view/ImageItems.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/attach-image/components/view/ImageItems.vue rename to webapp/src/main/webapp/vue-apps/attach-image/components/view/ImageItems.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/attach-image/initComponents.js b/webapp/src/main/webapp/vue-apps/attach-image/initComponents.js similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/attach-image/initComponents.js rename to webapp/src/main/webapp/vue-apps/attach-image/initComponents.js diff --git a/webapp/portlet/src/main/webapp/vue-apps/attach-image/js/FileAttachmentService.js b/webapp/src/main/webapp/vue-apps/attach-image/js/FileAttachmentService.js similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/attach-image/js/FileAttachmentService.js rename to webapp/src/main/webapp/vue-apps/attach-image/js/FileAttachmentService.js diff --git a/webapp/portlet/src/main/webapp/vue-apps/attach-image/main.js b/webapp/src/main/webapp/vue-apps/attach-image/main.js similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/attach-image/main.js rename to webapp/src/main/webapp/vue-apps/attach-image/main.js diff --git a/webapp/portlet/src/main/webapp/vue-apps/attach-image/services.js b/webapp/src/main/webapp/vue-apps/attach-image/services.js similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/attach-image/services.js rename to webapp/src/main/webapp/vue-apps/attach-image/services.js diff --git a/webapp/portlet/src/main/webapp/vue-apps/breadcrumb/components/Breadcrumb.vue b/webapp/src/main/webapp/vue-apps/breadcrumb/components/Breadcrumb.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/breadcrumb/components/Breadcrumb.vue rename to webapp/src/main/webapp/vue-apps/breadcrumb/components/Breadcrumb.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/breadcrumb/initComponents.js b/webapp/src/main/webapp/vue-apps/breadcrumb/initComponents.js similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/breadcrumb/initComponents.js rename to webapp/src/main/webapp/vue-apps/breadcrumb/initComponents.js diff --git a/webapp/portlet/src/main/webapp/vue-apps/breadcrumb/main.js b/webapp/src/main/webapp/vue-apps/breadcrumb/main.js similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/breadcrumb/main.js rename to webapp/src/main/webapp/vue-apps/breadcrumb/main.js diff --git a/webapp/portlet/src/main/webapp/vue-apps/common-font-icon/components/FontIconDrawer.vue b/webapp/src/main/webapp/vue-apps/common-font-icon/components/FontIconDrawer.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/common-font-icon/components/FontIconDrawer.vue rename to webapp/src/main/webapp/vue-apps/common-font-icon/components/FontIconDrawer.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/common-font-icon/components/FontIconInput.vue b/webapp/src/main/webapp/vue-apps/common-font-icon/components/FontIconInput.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/common-font-icon/components/FontIconInput.vue rename to webapp/src/main/webapp/vue-apps/common-font-icon/components/FontIconInput.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/common-font-icon/initComponents.js b/webapp/src/main/webapp/vue-apps/common-font-icon/initComponents.js similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/common-font-icon/initComponents.js rename to webapp/src/main/webapp/vue-apps/common-font-icon/initComponents.js diff --git a/webapp/portlet/src/main/webapp/vue-apps/common-font-icon/js/fontLibrary.js b/webapp/src/main/webapp/vue-apps/common-font-icon/js/fontLibrary.js similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/common-font-icon/js/fontLibrary.js rename to webapp/src/main/webapp/vue-apps/common-font-icon/js/fontLibrary.js diff --git a/webapp/portlet/src/main/webapp/vue-apps/common-font-icon/main.js b/webapp/src/main/webapp/vue-apps/common-font-icon/main.js similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/common-font-icon/main.js rename to webapp/src/main/webapp/vue-apps/common-font-icon/main.js diff --git a/webapp/portlet/src/main/webapp/vue-apps/common-font-icon/services.js b/webapp/src/main/webapp/vue-apps/common-font-icon/services.js similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/common-font-icon/services.js rename to webapp/src/main/webapp/vue-apps/common-font-icon/services.js diff --git a/webapp/portlet/src/main/webapp/vue-apps/common/components/ActivityShareDrawer.vue b/webapp/src/main/webapp/vue-apps/common/components/ActivityShareDrawer.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/common/components/ActivityShareDrawer.vue rename to webapp/src/main/webapp/vue-apps/common/components/ActivityShareDrawer.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/common/components/AttachmentsDraggableZone.vue b/webapp/src/main/webapp/vue-apps/common/components/AttachmentsDraggableZone.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/common/components/AttachmentsDraggableZone.vue rename to webapp/src/main/webapp/vue-apps/common/components/AttachmentsDraggableZone.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/common/components/CardCarousel.vue b/webapp/src/main/webapp/vue-apps/common/components/CardCarousel.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/common/components/CardCarousel.vue rename to webapp/src/main/webapp/vue-apps/common/components/CardCarousel.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/common/components/ChangesReminder.vue b/webapp/src/main/webapp/vue-apps/common/components/ChangesReminder.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/common/components/ChangesReminder.vue rename to webapp/src/main/webapp/vue-apps/common/components/ChangesReminder.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/common/components/ConfirmDialog.vue b/webapp/src/main/webapp/vue-apps/common/components/ConfirmDialog.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/common/components/ConfirmDialog.vue rename to webapp/src/main/webapp/vue-apps/common/components/ConfirmDialog.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/common/components/DateFormat.vue b/webapp/src/main/webapp/vue-apps/common/components/DateFormat.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/common/components/DateFormat.vue rename to webapp/src/main/webapp/vue-apps/common/components/DateFormat.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/common/components/DatePicker.vue b/webapp/src/main/webapp/vue-apps/common/components/DatePicker.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/common/components/DatePicker.vue rename to webapp/src/main/webapp/vue-apps/common/components/DatePicker.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/common/components/DrawersOverlay.vue b/webapp/src/main/webapp/vue-apps/common/components/DrawersOverlay.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/common/components/DrawersOverlay.vue rename to webapp/src/main/webapp/vue-apps/common/components/DrawersOverlay.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/common/components/DynamicHTMLElement.vue b/webapp/src/main/webapp/vue-apps/common/components/DynamicHTMLElement.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/common/components/DynamicHTMLElement.vue rename to webapp/src/main/webapp/vue-apps/common/components/DynamicHTMLElement.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/common/components/ExoDrawer.vue b/webapp/src/main/webapp/vue-apps/common/components/ExoDrawer.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/common/components/ExoDrawer.vue rename to webapp/src/main/webapp/vue-apps/common/components/ExoDrawer.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/common/components/ExoGroupSuggester.vue b/webapp/src/main/webapp/vue-apps/common/components/ExoGroupSuggester.vue similarity index 100% rename from webapp/portlet/src/main/webapp/vue-apps/common/components/ExoGroupSuggester.vue rename to webapp/src/main/webapp/vue-apps/common/components/ExoGroupSuggester.vue diff --git a/webapp/portlet/src/main/webapp/vue-apps/common/components/ExoIdentitySuggester.vue b/webapp/src/main/webapp/vue-apps/common/components/ExoIdentitySuggester.vue similarity index 96% rename from webapp/portlet/src/main/webapp/vue-apps/common/components/ExoIdentitySuggester.vue rename to webapp/src/main/webapp/vue-apps/common/components/ExoIdentitySuggester.vue index bbb7f68036f..75faf00b8bc 100644 --- a/webapp/portlet/src/main/webapp/vue-apps/common/components/ExoIdentitySuggester.vue +++ b/webapp/src/main/webapp/vue-apps/common/components/ExoIdentitySuggester.vue @@ -62,7 +62,14 @@ :close="!disabled" class="identitySuggesterItem" @click:close="remove(item)"> + + fa-users + {{ $t('social.spaces.administration.manageSpaces.actions.edit') }} - - - {{ $t('social.spaces.administration.manageSpaces.actions.resetHomeLayout') }} -