Examples of GroupId


Examples of org.apache.agila.services.user.GroupID

        assertNotNull( "Tasks should not be null", tasks );
        assertTrue( tasks.size() > 0 );
    }

    public void testGetTasksForTeams() {
        GroupID groupID = new GroupID( 1 );
        TaskImpl task = new TaskImpl();

        task.setTeamID( groupID );
        task.setTaskDescription( "Task Description" );
        task.setTaskExpirationDate( new Date() );
        task.setSourceTokenID( new TokenID( 1 ) );
        task.setTaskStatus( Task.TASK_INCOMPLETE );
        task.setInstanceID( new InstanceID( 1 ) );

        dao.insertTask( task );

        List tasks = dao.getTasksForGroups(new GroupID[] { groupID, new GroupID( 2 )}, Task.TASK_INCOMPLETE );
        assertNotNull( "Tasks should not be null", tasks );
        assertTrue("No tasks found for team!", tasks.size() > 0);
    }
View Full Code Here

Examples of org.apache.jcs.engine.control.group.GroupId

    KeyAndModel keyAndModel = getKeyAndModel(keyAndModelIndex);
    JcsCachingModel model = (JcsCachingModel) keyAndModel.model;

    String cacheName = model.getCacheName();
    CompositeCache cache = cacheManager.getCache(cacheName);
    GroupId groupId = new GroupId(cacheName, model.getGroup());
    GroupAttrName groupAttrName = new GroupAttrName(groupId, keyAndModel.key);
    return cache.get(groupAttrName);
  }
View Full Code Here

Examples of org.apache.jcs.engine.control.group.GroupId

  }

  public void testGetKeyWithGroupName() {
    cachingModel.setGroup("empire");
    Serializable key = "Vader";
    GroupId groupId = new GroupId(CACHE_NAME, cachingModel.getGroup());
    GroupAttrName expected = new GroupAttrName(groupId, key);
    Serializable actual = jcsFacade.getKey(key, cachingModel);
    assertEquals(expected, actual);
  }
View Full Code Here

Examples of org.apache.jcs.engine.control.group.GroupId

  private Serializable updateCache(CacheEntry cacheEntry) throws Exception {
    Serializable key = cacheEntry.key;
    String group = cacheEntry.group;

    if (StringUtils.hasText(group)) {
      GroupId groupId = new GroupId(CACHE_NAME, group);
      GroupAttrName groupAttrName = new GroupAttrName(groupId, key);
      key = groupAttrName;
    }

    ICacheElement cacheElement = new CacheElement(CACHE_NAME, key,
View Full Code Here

Examples of org.apache.jcs.engine.control.group.GroupId

  protected Serializable getKey(Serializable key, JcsCachingModel model) {
    Serializable newKey = key;

    String group = model.getGroup();
    if (StringUtils.hasText(group)) {
      GroupId groupId = new GroupId(model.getCacheName(), group);
      newKey = new GroupAttrName(groupId, key);
    }

    return newKey;
  }
View Full Code Here

Examples of org.apache.jcs.engine.control.group.GroupId

        CompositeCache cache = getCache(cacheName);

        if (!ObjectUtils.isEmpty(groups)) {
          int groupCount = groups.length;
          for (int j = 0; j < groupCount; j++) {
            GroupId groupId = new GroupId(cacheName, groups[j]);
            cache.remove(groupId);
          }
        } else {
          cache.removeAll();
        }
View Full Code Here

Examples of org.apache.shindig.social.opensocial.spi.GroupId

        Set<UserId> userIds = new HashSet<UserId>(Arrays.asList(new UserId(UserId.Type.userId, VALID_USER_ID)));

        SecurityToken securityToken = getMockSecurityToken(ownerId, viewerId, applicationId, VALID_MODULE_ID);

        List<Person> users = Arrays.asList(validPerson);
        GroupId groupId = new GroupId(GroupId.Type.self, "@self");
        expect(personService.getPeople(userIds, groupId, null, securityToken)).andReturn(users);
        replay(personService);

        expect(appDataRepository.getApplicationData(convertPeopleToUserIds(users), applicationId)).andReturn(
                applicationData == null ? new ArrayList<ApplicationData>() : Arrays.asList(applicationData));
View Full Code Here

Examples of org.apache.shindig.social.opensocial.spi.GroupId

        Set<UserId> userIds = new HashSet<UserId>(Arrays.asList(userId));

        SecurityToken securityToken = getMockSecurityToken(ownerId, viewerId, VALID_APPLICATION_ID, VALID_MODULE_ID);

        List<Person> users = Arrays.asList(validPerson);
        GroupId groupId = new GroupId(GroupId.Type.self, "@self");
        expect(personService.getPeople(userIds, groupId, null, securityToken)).andReturn(users);
        replay(personService);

        expect(appDataRepository.getApplicationData(VALID_USER_ID, VALID_APPLICATION_ID)).andReturn(applicationData);
        Capture<ApplicationData> capturedApplicationData = new Capture<ApplicationData>();
View Full Code Here

Examples of org.apache.shindig.social.opensocial.spi.GroupId

        Set<UserId> userIds = new HashSet<UserId>(Arrays.asList(userId));

        SecurityToken securityToken = getMockSecurityToken(VALID_OWNER_ID, VALID_VIEWER_ID, VALID_APPLICATION_ID, VALID_MODULE_ID);

        List<Person> users = Arrays.asList(validPerson);
        GroupId groupId = new GroupId(GroupId.Type.self, "@self");
        expect(personService.getPeople(userIds, groupId, null, securityToken)).andReturn(users);
        replay(personService);

        expect(appDataRepository.getApplicationData(VALID_USER_ID, VALID_APPLICATION_ID)).andReturn(applicationData);
        replay(appDataRepository);
View Full Code Here

Examples of org.apache.shindig.social.opensocial.spi.GroupId

        Set<UserId> userIds = new HashSet<UserId>(Arrays.asList(userId));

        SecurityToken securityToken = getMockSecurityToken(VALID_OWNER_ID, VALID_VIEWER_ID, VALID_APPLICATION_ID, VALID_MODULE_ID);

        List<Person> users = Arrays.asList(validPerson);
        GroupId groupId = new GroupId(GroupId.Type.self, "@self");
        expect(personService.getPeople(userIds, groupId, null, securityToken)).andReturn(users);
        replay(personService);

        expect(appDataRepository.getApplicationData(VALID_USER_ID, VALID_APPLICATION_ID)).andReturn(applicationData);
        Capture<ApplicationData> capturedApplicationData = new Capture<ApplicationData>();
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.