Package org.eurekastreams.server.persistence.mappers.requests

Examples of org.eurekastreams.server.persistence.mappers.requests.FindByIdRequest


        List<FeedSubscriber> feedSubs = getFeeds.execute(
            new GetFeedSubscriberRequest(0L, entityId, EntityType.PERSON, 0));
        assertEquals(4, feedSubs.size());
       
        // Delete feed 1.
        sut.execute(new FindByIdRequest("FeedSubscriber", 1L));
       
        List<FeedSubscriber> feedSubs2 = getFeeds.execute(
            new GetFeedSubscriberRequest(0L, entityId, EntityType.PERSON, 0));
        // Make sure he has 3 left.
        assertEquals(3, feedSubs2.size());
View Full Code Here


        catch (ClassCastException ex)
        {
            throw new ValidationException("Unable to retreive information expects a Person Id.");
        }

        Person user = pMapper.execute(new FindByIdRequest("Person", id));
        if (user == null)
        {
            throw new ValidationException("Unable to retreive information Person does not exist.");
        }
    }
View Full Code Here

     * @exception AuthorizationException
     *                exception.
     */
    public void authorize(final PrincipalActionContext inActionContext) throws AuthorizationException
    {
        Person person = personMapper.execute(new FindByIdRequest("Person", inActionContext.getPrincipal().getId()));

        inActionContext.getState().put("person", person);

        boolean found = false;
        List<Stream> streams = person.getStreams();
View Full Code Here

     */
    @SuppressWarnings("unchecked")
    @Override
    public Boolean execute(final PrincipalActionContext inActionContext)
    {
        Person currentUser = (Person) findById.execute(new FindByIdRequest("Person", inActionContext.getPrincipal()
                .getId()));

        GalleryTabTemplate gtt = (GalleryTabTemplate) findById.execute(new FindByIdRequest("GalleryTabTemplate",
                (Long) inActionContext.getParams()));

        TabTemplate newTabTemplate = new TabTemplate(gtt.getTabTemplate());
        newTabTemplate.setGalleryTabTemplate(gtt);
        for (Gadget gadget : newTabTemplate.getGadgets())
View Full Code Here

        Long galleryTabTemplateId = StringUtils.isNotEmpty(galleryTabTemplateStringId) ? Long
                .parseLong(galleryTabTemplateStringId) : null;

        // find/create the GalleryTabTemplate.
        GalleryTabTemplate gtt = getGalleryTabTemplateByIdMapper.execute(galleryTabTemplateId == null ? null
                : new FindByIdRequest("GalleryTabTemplate", galleryTabTemplateId));

        // if required set the tab template.
        if (tabId != null)
        {
            // look up source tab by id.
            Tab tab = findTabByIdMapper.execute(new FindByIdRequest("Tab", tabId));

            // create new tabTemplate from source.
            TabTemplate newTabTemplate = new TabTemplate(tab.getTemplate());

            gtt.setTabTemplate(newTabTemplate);
View Full Code Here

        // No unescaping/decoding required

        logger.debug("Updating user prefs for gadget: " + currentRequest.getGadgetId() + " with: "
                + currentRequest.getGadgetUserPref());

        Gadget currentGadgetInstance = findGadgetByIdMapper.execute(new FindByIdRequest("Gadget", currentRequest
                .getGadgetId()));

        String oldVal = currentGadgetInstance.getGadgetUserPref();
        String newVal = currentRequest.getGadgetUserPref();
View Full Code Here

    // TODO: for now this comes from entity as it did before. Should create new mapper and set up cache for group
    // capabilities to improve performance.
    private List<String> getCapabilities(final Long groupId)
    {
        List<String> results = new ArrayList<String>();
        DomainGroup g = groupEntityMapper.execute(new FindByIdRequest("DomainGroup", groupId));
        List<BackgroundItem> caps = g.getCapabilities();
        for (BackgroundItem bgi : caps)
        {
            results.add(bgi.getName());
        }
View Full Code Here

    @Override
    public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext)
    {
        // get theme info needed.
        Long themeId = (Long) inActionContext.getActionContext().getParams();
        Theme theme = findByIdMapper.execute(new FindByIdRequest("Theme", themeId));
        String themeUuid = theme.getUUID();

        // Create list of cacheKeys to delete, initialized with the two keys for the theme being deleted.
        HashSet<String> cacheKeysToDelete = new HashSet<String>(Arrays.asList(CacheKeys.THEME_CSS_BY_UUID + themeUuid,
                CacheKeys.THEME_HASH_BY_UUID + themeUuid));
View Full Code Here

        Feed feed = sut.execute(request);
        assertEquals("http://www.google2.com", feed.getUrl());
        assertEquals(2L, feed.getPlugin().getId());
       
        Feed persisted = findByIdMapper.execute(new FindByIdRequest("Feed", feed.getId()));
        assertEquals(persisted.getId(), feed.getId());
    }
View Full Code Here

        Feed feed = sut.execute(request);
        assertEquals("http://www.google8.com", feed.getUrl());
        assertEquals(2L, feed.getPlugin().getId());
       
        Feed persisted = findByIdMapper.execute(new FindByIdRequest("Feed", feed.getId()));
        assertEquals(persisted.getId(), feed.getId());
    }
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.persistence.mappers.requests.FindByIdRequest

Copyright © 2018 www.massapicom. 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.