import org.sonar.server.user.index.UserIndex;
import org.sonar.server.user.index.UserIndexDefinition;
import org.sonar.server.user.index.UserIndexer;
-import org.sonar.server.user.ws.CurrentAction;
-import org.sonar.server.user.ws.FavoritesWs;
-import org.sonar.server.user.ws.IdentityProvidersAction;
-import org.sonar.server.user.ws.UserJsonWriter;
-import org.sonar.server.user.ws.UserPropertiesWs;
-import org.sonar.server.user.ws.UsersWs;
+import org.sonar.server.user.ws.UsersWsModule;
import org.sonar.server.usergroups.ws.UserGroupsModule;
import org.sonar.server.usertoken.UserTokenModule;
import org.sonar.server.util.TypeValidationModule;
NewUserNotifier.class,
DefaultUserFinder.class,
DefaultUserService.class,
- UserJsonWriter.class,
- UsersWs.class,
- org.sonar.server.user.ws.CreateAction.class,
- org.sonar.server.user.ws.UpdateAction.class,
- org.sonar.server.user.ws.DeactivateAction.class,
- org.sonar.server.user.ws.ChangePasswordAction.class,
- CurrentAction.class,
- org.sonar.server.user.ws.SearchAction.class,
- org.sonar.server.user.ws.GroupsAction.class,
- IdentityProvidersAction.class,
- FavoritesWs.class,
- UserPropertiesWs.class,
UserIndexDefinition.class,
UserIndexer.class,
UserIndex.class,
UserUpdater.class,
+ UsersWsModule.class,
UserTokenModule.class,
// groups
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2016 SonarSource SA
+ * mailto:contact AT sonarsource DOT com
+ *
+ * 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.sonar.server.user.ws;
+
+import org.sonar.core.platform.Module;
+
+public class UsersWsModule extends Module {
+ @Override
+ protected void configureModule() {
+ add(
+ UsersWs.class,
+ CreateAction.class,
+ UpdateAction.class,
+ DeactivateAction.class,
+ ChangePasswordAction.class,
+ CurrentAction.class,
+ SearchAction.class,
+ GroupsAction.class,
+ IdentityProvidersAction.class,
+ FavoritesWs.class,
+ UserPropertiesWs.class,
+ UserJsonWriter.class);
+ }
+}
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2016 SonarSource SA
+ * mailto:contact AT sonarsource DOT com
+ *
+ * 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.sonar.server.user.ws;
+
+import org.junit.Test;
+import org.sonar.core.platform.ComponentContainer;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class UsersWsModuleTest {
+ @Test
+ public void verify_count_of_added_components() {
+ ComponentContainer container = new ComponentContainer();
+ new UsersWsModule().configure(container);
+ assertThat(container.size()).isEqualTo(2 + 12);
+ }
+}