本文整理汇总了Java中jetbrains.buildServer.users.UserModel类的典型用法代码示例。如果您正苦于以下问题:Java UserModel类的具体用法?Java UserModel怎么用?Java UserModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UserModel类属于jetbrains.buildServer.users包,在下文中一共展示了UserModel类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: UserTelegramSettingsExtension
import jetbrains.buildServer.users.UserModel; //导入依赖的package包/类
public UserTelegramSettingsExtension(@NotNull WebControllerManager manager,
@NotNull NotificationRulesManager rulesManager,
@NotNull UserModel userModel,
@NotNull PluginDescriptor descriptor,
@NotNull TelegramSettingsManager settingsManager) {
super(manager);
this.rulesManager = rulesManager;
this.userModel = userModel;
this.settingsManager = settingsManager;
setPluginName(TelegramSettingsPage.PLUGIN_NAME);
setIncludeUrl(descriptor.getPluginResourcesPath("userTelegramSettings.jsp"));
// This extension required by two places. Don't looks clear
// but works...
setPlaceId(PlaceId.NOTIFIER_SETTINGS_FRAGMENT);
register();
setPlaceId(PlaceId.MY_SETTINGS_NOTIFIER_SECTION);
register();
}
开发者ID:dancing-elf,项目名称:teamcity-telegram-plugin,代码行数:20,代码来源:UserTelegramSettingsExtension.java
示例2: AuthHelper
import jetbrains.buildServer.users.UserModel; //导入依赖的package包/类
public AuthHelper(@NotNull LoginConfiguration loginConfiguration,
@NotNull UserModel userModel,
@NotNull HttpAuthenticationManager authManager) {
myLoginConfiguration = loginConfiguration;
myUserModel = userModel;
myAuthManager = authManager;
}
开发者ID:JetBrains,项目名称:teamcity-symbol-server,代码行数:8,代码来源:AuthHelper.java
示例3: testUserAccountCreated_whenUserMappingIsFound_DoesNothing
import jetbrains.buildServer.users.UserModel; //导入依赖的package包/类
@Test
public void testUserAccountCreated_whenUserMappingIsFound_DoesNothing() throws Exception {
long userId = 1;
final SBuildServer sBuildServer = mock(SBuildServer.class);
final UsernameMapperConfig mapperConfig = mock(UsernameMapperConfig.class);
when(mapperConfig.getDomainName()).thenReturn("MYDOMAIN");
final UserModel userModel = mock(UserModel.class);
when(sBuildServer.getUserModel()).thenReturn(userModel);
final VcsUsernamePropertyKey propertyKey = new VcsUsernamePropertyKey(new VcsRootImpl(1, "tfs"));
final SUser sUser = mock(SUser.class);
when(sUser.getVcsUsernameProperties()).thenReturn(new ArrayList<VcsUsernamePropertyKey>() {{
add(propertyKey);
}});
when(userModel.findUserById(userId)).thenReturn(sUser);
final TfsUsernameMapperListener listener = new TfsUsernameMapperListener(sBuildServer, mapperConfig);
User user = mock(User.class);
when(user.getId()).thenReturn(userId);
when(user.getUsername()).thenReturn("bob");
when(user.getPropertyValue(propertyKey)).thenReturn("MYDOMAIN\\bob");
listener.userAccountCreated(user);
verify(sBuildServer).getUserModel();
verify(userModel).findUserById(userId);
verify(sUser).getVcsUsernameProperties();
verify(user).getUsername();
verifyNoMoreInteractions(sBuildServer);
verifyNoMoreInteractions(userModel);
verifyNoMoreInteractions(sUser);
}
开发者ID:dpiessens,项目名称:tfs-worktiem-plugin,代码行数:40,代码来源:TfsUsernameMapperListenerTest.java
示例4: testUserAccountCreated_whenUserMappingIsFoundButEmpty_UpdatesMapping
import jetbrains.buildServer.users.UserModel; //导入依赖的package包/类
@Test
public void testUserAccountCreated_whenUserMappingIsFoundButEmpty_UpdatesMapping() throws Exception {
long userId = 1;
final SBuildServer sBuildServer = mock(SBuildServer.class);
final UsernameMapperConfig mapperConfig = mock(UsernameMapperConfig.class);
when(mapperConfig.getDomainName()).thenReturn("MYDOMAIN");
final UserModel userModel = mock(UserModel.class);
when(sBuildServer.getUserModel()).thenReturn(userModel);
final VcsUsernamePropertyKey propertyKey = new VcsUsernamePropertyKey(new VcsRootImpl(1, "tfs"));
final SUser sUser = mock(SUser.class);
when(sUser.getVcsUsernameProperties()).thenReturn(new ArrayList<VcsUsernamePropertyKey>() {{
add(propertyKey);
}});
when(userModel.findUserById(userId)).thenReturn(sUser);
final TfsUsernameMapperListener listener = new TfsUsernameMapperListener(sBuildServer, mapperConfig);
User user = mock(User.class);
when(user.getId()).thenReturn(userId);
when(user.getUsername()).thenReturn("bob");
when(user.getPropertyValue(propertyKey)).thenReturn(null);
listener.userAccountCreated(user);
verify(sBuildServer).getUserModel();
verify(userModel).findUserById(userId);
verify(sUser).getVcsUsernameProperties();
verify(user).getUsername();
verify(sUser).setUserProperty(propertyKey, "MYDOMAIN\\bob");
verifyNoMoreInteractions(sBuildServer);
verifyNoMoreInteractions(userModel);
verifyNoMoreInteractions(sUser);
}
开发者ID:dpiessens,项目名称:tfs-worktiem-plugin,代码行数:41,代码来源:TfsUsernameMapperListenerTest.java
示例5: Piazza
import jetbrains.buildServer.users.UserModel; //导入依赖的package包/类
public Piazza(SBuildServer server, ProjectManager projectManager, ProjectSettingsManager projectSettingsManager, WebControllerManager webControllerManager,
PluginDescriptor pluginDescriptor, UserModel userManager, SecurityContext securityContext, PiazzaConfiguration piazzaConfiguration) {
this.pluginDescriptor = pluginDescriptor;
this.securityContext = securityContext;
guestUser = userManager.getGuestUser();
this.piazzaConfiguration = piazzaConfiguration;
this.piazzaUserAdapter = new PiazzaUserAdapter(server, userManager, piazzaConfiguration);
webControllerManager.registerController(PATH, new BuildMonitorController(server, projectManager, projectSettingsManager, this));
webControllerManager.getPlaceById(PlaceId.ALL_PAGES_FOOTER).addExtension(new PiazzaLinkPageExtension(this));
}
开发者ID:timomeinen,项目名称:team-piazza,代码行数:13,代码来源:Piazza.java
示例6: VSONotificatorSettingsController
import jetbrains.buildServer.users.UserModel; //导入依赖的package包/类
public VSONotificatorSettingsController(@NotNull PluginDescriptor pluginDescriptor,
@NotNull WebControllerManager webControllerManager,
@NotNull VSONotificatorConfigHolder configHolder,
@NotNull UserModel users) {
super(pluginDescriptor, webControllerManager, SETTINGS_BEAN_KEY, "VS Online Notifier");
myUsers = users;
myConfig = configHolder.getConfig();
registerDisableActions();
}
开发者ID:JetBrains,项目名称:tc-vso-rooms,代码行数:10,代码来源:VSONotificatorSettingsController.java
示例7: VSONotifierMySettingsPageExtension
import jetbrains.buildServer.users.UserModel; //导入依赖的package包/类
public VSONotifierMySettingsPageExtension(@NotNull WebControllerManager manager,
@NotNull NotificationRulesManager rulesManager,
@NotNull UserModel userModel,
@NotNull PluginDescriptor pluginDescriptor,
@NotNull VSONotificatorConfigHolder configHolder) {
super(manager);
myRulesManager = rulesManager;
myUserModel = userModel;
myConfig = configHolder.getConfig();
setPluginName(Constants.NOTIFICATOR_TYPE);
setIncludeUrl(pluginDescriptor.getPluginResourcesPath("viewUserSettings.jsp"));
setPlaceId(PlaceId.MY_SETTINGS_NOTIFIER_SECTION);
register();
}
开发者ID:JetBrains,项目名称:tc-vso-rooms,代码行数:16,代码来源:VSONotifierMySettingsPageExtension.java
示例8: VSONotifierSettingsPageExtension
import jetbrains.buildServer.users.UserModel; //导入依赖的package包/类
public VSONotifierSettingsPageExtension(@NotNull WebControllerManager web,
@NotNull UserModel userModel,
@NotNull PluginDescriptor pluginDescriptor) {
super(web);
myUserModel = userModel;
setPluginName(Constants.NOTIFICATOR_TYPE);
setIncludeUrl(pluginDescriptor.getPluginResourcesPath("editUserSettings.jsp"));
setPlaceId(PlaceId.NOTIFIER_SETTINGS_FRAGMENT);
register();
web.registerController("/vso/userSettings.html", new EditUserSettingsController());
}
开发者ID:JetBrains,项目名称:tc-vso-rooms,代码行数:14,代码来源:VSONotifierSettingsPageExtension.java
示例9: Piazza
import jetbrains.buildServer.users.UserModel; //导入依赖的package包/类
public Piazza(SBuildServer server, ProjectManager projectManager, ProjectSettingsManager projectSettingsManager, WebControllerManager webControllerManager,
PluginDescriptor pluginDescriptor, UserModel userManager, SecurityContext securityContext, PiazzaConfiguration piazzaConfiguration) {
this.pluginDescriptor = pluginDescriptor;
this.securityContext = securityContext;
guestUser = userManager.getGuestUser();
this.piazzaConfiguration = piazzaConfiguration;
this.piazzaUserAdapter = new PiazzaUserAdapter(server, userManager);
webControllerManager.registerController(PATH, new BuildMonitorController(server, projectManager, projectSettingsManager, this));
webControllerManager.getPlaceById(PlaceId.ALL_PAGES_FOOTER).addExtension(new PiazzaLinkPageExtension(this));
}
开发者ID:mironych,项目名称:Team-Piazza,代码行数:13,代码来源:Piazza.java
示例10: LoggedInUserService
import jetbrains.buildServer.users.UserModel; //导入依赖的package包/类
public LoggedInUserService(
UserGroupManager userGroupManager,
PluginCrowdClient pluginCrowdClient,
UserModel userModel,
LoggerFactory loggerFactory,
CrowdPluginConfiguration crowdPluginConfiguration) {
groupNameToGroupKey = new GroupNameToGroupKey(userGroupManager);
this.userGroupManager = userGroupManager;
this.pluginCrowdClient = pluginCrowdClient;
this.userModel = userModel;
this.loggerFactory = loggerFactory;
this.shouldCreateGroups = crowdPluginConfiguration.shouldCreateGroups();
this.doNotRemoveInternalGroups = crowdPluginConfiguration.doNotRemoveInternalGroups();
}
开发者ID:greggigon,项目名称:TeamCity-Crowd-Plugin,代码行数:15,代码来源:LoggedInUserService.java
示例11: serverPrincipalFactory
import jetbrains.buildServer.users.UserModel; //导入依赖的package包/类
@Bean
public ServerPrincipalFactory serverPrincipalFactory(UserModel userModel) {
return new ServerPrincipalFactory(userModel);
}
开发者ID:pwielgolaski,项目名称:teamcity-oauth,代码行数:5,代码来源:PluginConfiguration.java
示例12: ServerPrincipalFactory
import jetbrains.buildServer.users.UserModel; //导入依赖的package包/类
public ServerPrincipalFactory(@NotNull UserModel userModel) {
this.userModel = userModel;
}
开发者ID:pwielgolaski,项目名称:teamcity-oauth,代码行数:4,代码来源:ServerPrincipalFactory.java
示例13: testListenerRegister
import jetbrains.buildServer.users.UserModel; //导入依赖的package包/类
@Test
public void testListenerRegister() throws Exception {
final SBuildServer sBuildServer = mock(SBuildServer.class);
final UsernameMapperConfig mapperConfig = mock(UsernameMapperConfig.class);
final UserModel userModel = mock(UserModel.class);
when(sBuildServer.getUserModel()).thenReturn(userModel);
final TfsUsernameMapperListener listener = new TfsUsernameMapperListener(sBuildServer, mapperConfig);
listener.register();
verify(userModel).addListener(listener);
verify(sBuildServer).getUserModel();
verifyZeroInteractions(mapperConfig);
}
开发者ID:dpiessens,项目名称:tfs-worktiem-plugin,代码行数:19,代码来源:TfsUsernameMapperListenerTest.java
示例14: testUserAccountCreated_whenNoServerUserIsFound_DoesNothing
import jetbrains.buildServer.users.UserModel; //导入依赖的package包/类
@Test
public void testUserAccountCreated_whenNoServerUserIsFound_DoesNothing() throws Exception {
long userId = 1;
final SBuildServer sBuildServer = mock(SBuildServer.class);
final UsernameMapperConfig mapperConfig = mock(UsernameMapperConfig.class);
when(mapperConfig.getDomainName()).thenReturn("MYDOMAIN");
final UserModel userModel = mock(UserModel.class);
when(sBuildServer.getUserModel()).thenReturn(userModel);
when(userModel.findUserById(userId)).thenReturn(null);
final TfsUsernameMapperListener listener = new TfsUsernameMapperListener(sBuildServer, mapperConfig);
User user = mock(User.class);
when(user.getId()).thenReturn(userId);
listener.userAccountCreated(user);
verify(sBuildServer).getUserModel();
verify(userModel).findUserById(userId);
}
开发者ID:dpiessens,项目名称:tfs-worktiem-plugin,代码行数:26,代码来源:TfsUsernameMapperListenerTest.java
示例15: testUserAccountCreated_whenUserMappingIsNotFound_CreatesMapping
import jetbrains.buildServer.users.UserModel; //导入依赖的package包/类
@Test
public void testUserAccountCreated_whenUserMappingIsNotFound_CreatesMapping() throws Exception {
long userId = 1;
final SBuildServer sBuildServer = mock(SBuildServer.class);
final UsernameMapperConfig mapperConfig = mock(UsernameMapperConfig.class);
when(mapperConfig.getDomainName()).thenReturn("MYDOMAIN");
final UserModel userModel = mock(UserModel.class);
final VcsSupportCore supportConfig = mock(VcsSupportCore.class);
when(supportConfig.getName()).thenReturn("vcs");
final VcsManager vcsManager = mock(VcsManager.class);
when(vcsManager.findVcsByName("tfs")).thenReturn(supportConfig);
when(sBuildServer.getUserModel()).thenReturn(userModel);
when(sBuildServer.getVcsManager()).thenReturn(vcsManager);
final SUser sUser = mock(SUser.class);
when(sUser.getVcsUsernameProperties()).thenReturn(new ArrayList<VcsUsernamePropertyKey>());
when(userModel.findUserById(userId)).thenReturn(sUser);
final TfsUsernameMapperListener listener = new TfsUsernameMapperListener(sBuildServer, mapperConfig);
User user = mock(User.class);
when(user.getId()).thenReturn(userId);
when(user.getUsername()).thenReturn("bob");
listener.userAccountCreated(user);
verify(sBuildServer).getUserModel();
verify(sBuildServer).getVcsManager();
verify(userModel).findUserById(userId);
verify(sUser).getVcsUsernameProperties();
verify(user).getUsername();
verify(sUser).setUserProperty(any(VcsUsernamePropertyKey.class), eq("MYDOMAIN\\bob"));
verify(vcsManager).findVcsByName("tfs");
verifyNoMoreInteractions(sBuildServer);
verifyNoMoreInteractions(userModel);
verifyNoMoreInteractions(sUser);
verifyNoMoreInteractions(vcsManager);
}
开发者ID:dpiessens,项目名称:tfs-worktiem-plugin,代码行数:49,代码来源:TfsUsernameMapperListenerTest.java
示例16: testUserAccountCreated_whenUserVcsMappingIsNotFound_CreatesMapping
import jetbrains.buildServer.users.UserModel; //导入依赖的package包/类
@Test
public void testUserAccountCreated_whenUserVcsMappingIsNotFound_CreatesMapping() throws Exception {
long userId = 1;
final SBuildServer sBuildServer = mock(SBuildServer.class);
final UsernameMapperConfig mapperConfig = mock(UsernameMapperConfig.class);
when(mapperConfig.getDomainName()).thenReturn("MYDOMAIN");
final UserModel userModel = mock(UserModel.class);
final VcsSupportCore supportConfig = mock(VcsSupportCore.class);
when(supportConfig.getName()).thenReturn("foo");
final VcsManager vcsManager = mock(VcsManager.class);
when(vcsManager.findVcsByName("tfs")).thenReturn(supportConfig);
when(sBuildServer.getUserModel()).thenReturn(userModel);
when(sBuildServer.getVcsManager()).thenReturn(vcsManager);
final SUser sUser = mock(SUser.class);
when(sUser.getVcsUsernameProperties()).thenReturn(new ArrayList<VcsUsernamePropertyKey>());
when(userModel.findUserById(userId)).thenReturn(sUser);
final TfsUsernameMapperListener listener = new TfsUsernameMapperListener(sBuildServer, mapperConfig);
User user = mock(User.class);
when(user.getId()).thenReturn(userId);
when(user.getUsername()).thenReturn("bob");
listener.userAccountCreated(user);
verify(sBuildServer).getUserModel();
verify(sBuildServer).getVcsManager();
verify(userModel).findUserById(userId);
verify(sUser).getVcsUsernameProperties();
verify(user).getUsername();
verify(sUser).setUserProperty(any(VcsUsernamePropertyKey.class), eq("MYDOMAIN\\bob"));
verify(vcsManager).findVcsByName("tfs");
verifyNoMoreInteractions(sBuildServer);
verifyNoMoreInteractions(userModel);
verifyNoMoreInteractions(sUser);
verifyNoMoreInteractions(vcsManager);
}
开发者ID:dpiessens,项目名称:tfs-worktiem-plugin,代码行数:49,代码来源:TfsUsernameMapperListenerTest.java
示例17: PiazzaUserAdapter
import jetbrains.buildServer.users.UserModel; //导入依赖的package包/类
public PiazzaUserAdapter(SBuildServer server, UserModel userModel) {
this.userModel = userModel;
reloadUsers();
server.getUserModel().addListener(this);
}
开发者ID:mironych,项目名称:Team-Piazza,代码行数:7,代码来源:PiazzaUserAdapter.java
注:本文中的jetbrains.buildServer.users.UserModel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论