Examples of UserWrapper


Examples of com.madgnome.jira.plugins.jirachievements.data.ao.UserWrapper

  @Test
  public void createOrUpdateShouldCreateStatisticWithValueIfAny()
  {
    StatisticRefEnum statRef = StatisticRefEnum.CREATED_ISSUE_COUNT;
    createStatisticRef(statRef);
    UserWrapper userWrapper = createUserWrapper();

    int value = 1;
    final String projectKey = "PKEY";
    final String component = "Config";
    daoService.createOrUpdate(userWrapper, projectKey, component, statRef, value);
View Full Code Here

Examples of com.madgnome.jira.plugins.jirachievements.data.ao.UserWrapper

  @Test
  public void createOrUpdateShouldUpdateStatisticWithValueIfAny()
  {
    StatisticRefEnum statRef = StatisticRefEnum.CREATED_ISSUE_COUNT;
    createStatisticRef(statRef);
    UserWrapper userWrapper = createUserWrapper();

    int value = 2;
    final String projectKey = "PKEY";
    final String comppnent = "Config";
    daoService.createOrUpdate(userWrapper, projectKey, comppnent, statRef, 1);
View Full Code Here

Examples of com.madgnome.jira.plugins.jirachievements.data.ao.UserWrapper

  @Test
  public void findShouldReturnStatisticsForProjectOrderedByDescendingValue() throws Exception
  {
    StatisticRefEnum statRef = StatisticRefEnum.CREATED_ISSUE_COUNT;
    createStatisticRef(statRef);
    UserWrapper bobUserWrapper = createUserWrapper("bob", "Sponge Bob");
    UserWrapper patrickUserWrapper = createUserWrapper("patrick", "Patrick Star");

    final String projectKey = "PKEY";
    final String component = "Config";
    daoService.createOrUpdate(bobUserWrapper, projectKey, component, statRef, 1);
    daoService.createOrUpdate(patrickUserWrapper, projectKey, component, statRef, 5);
View Full Code Here

Examples of com.madgnome.jira.plugins.jirachievements.data.ao.UserWrapper

  public void onEvent(IssueEvent issueEvent)
  {
    issueEventRuleEngine.execute(issueEvent);

    final Long eventTypeId = issueEvent.getEventTypeId();
    final UserWrapper userWrapper = userManager.get(issueEvent.getUser());
    if (eventTypeId.equals(EventType.ISSUE_CREATED_ID))
    {
      statisticManager.incrementUserStatistic(StatisticRefEnum.CREATED_ISSUE_COUNT, userWrapper, 1);
    }
    else if (eventTypeId.equals(EventType.ISSUE_RESOLVED_ID))
View Full Code Here

Examples of com.madgnome.jira.plugins.jirachievements.data.ao.UserWrapper

  @GET
  @Path("/count")
  public Response getUserAchievementsCountByLevel()
  {
    UserWrapper userWrapper = userManager.getCurrentUserWrapper();

    if (!userWrapper.isActive())
    {
      return Response.ok().build();
    }

    Map<Difficulty, Integer> achievementsByLevel =  userAchievementDaoService.getAchievementsByLevel(userWrapper);
View Full Code Here

Examples of com.madgnome.jira.plugins.jirachievements.data.ao.UserWrapper

  @GET
  @Produces({MediaType.APPLICATION_JSON})
  public Response getUserAchievements()
  {
    UserWrapper userWrapper = userManager.getCurrentUserWrapper();

    List<AchievementBean> achievements = new ArrayList<AchievementBean>();

    for (Achievement achievement : achievementManager.getUserNewAchievements(userWrapper))
    {
View Full Code Here

Examples of com.madgnome.jira.plugins.jirachievements.data.ao.UserWrapper

  @PUT
  @Path("{id}")
  public Response updateUserAchievementStatus(@PathParam("id") int achievementId,
                                              @FormParam("notified") boolean notified)
  {
    UserWrapper userWrapper = userManager.getCurrentUserWrapper();

    achievementManager.updateNotification(achievementId, userWrapper, notified);

    return Response.ok().build();
  }
View Full Code Here

Examples of com.madgnome.jira.plugins.jirachievements.data.ao.UserWrapper

      kvp.getValue().forEachEntry(new TObjectIntProcedure<String>()
      {
        @Override
        public boolean execute(String userName, int count)
        {
          UserWrapper userWrapper = userManager.get(userName);
          if (userWrapper != null)
          {
            statisticManager.createOrUpdateProjectStatistic(userWrapper, kvp.getKey(), getStatisticRef(), count);
          }
          else
View Full Code Here

Examples of com.madgnome.jira.plugins.jirachievements.data.ao.UserWrapper

    resolvedByUser.forEachEntry(new TObjectIntProcedure<String>()
    {
      @Override
      public boolean execute(String userName, int count)
      {
        UserWrapper userWrapper = userManager.get(userName);
        if (userWrapper != null)
        {
          statisticManager.createOrUpdateUserStatistic(getStatisticRef(), userWrapper, count);
        }
        else
View Full Code Here

Examples of com.madgnome.jira.plugins.jirachievements.data.ao.UserWrapper

      kvp.getValue().forEachEntry(new TObjectIntProcedure<String>()
      {
        @Override
        public boolean execute(String userName, int count)
        {
          UserWrapper userWrapper = userManager.get(userName);
          if (userWrapper != null)
          {
            ProjectComponentKey component = kvp.getKey();
            statisticManager.createOrUpdateComponentStatistic(userWrapper, component.getProject(), component.getComponent(), getStatisticRef(), count);
          }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.