Package org.eurekastreams.server.domain.dto

Examples of org.eurekastreams.server.domain.dto.FeaturedStreamDTO


        // displayInfoSettables.addAll(result.getMostRecentStreams());
        // displayInfoSettables.addAll(result.getMostViewedStreams());
        // displayInfoSettables.addAll(result.getSuggestedStreams());
        // displayInfoSettables.addAll(result.getMostActiveStreams().getResultsSublist());

        FeaturedStreamDTO featured = new FeaturedStreamDTO(111L, "", 111L, ScopeType.RESOURCE, "", 111L);

        result.setFeaturedStreams(Collections.singletonList(featured));
        result.setMostFollowedStreams(Collections.singletonList((StreamDTO) people.get(0)));
        result.setMostRecentStreams(Collections.singletonList((StreamDTO) people.get(0)));
        result.setMostViewedStreams(Collections.singletonList((StreamDTO) people.get(2)));
View Full Code Here


        Long groupId = 989L;
        String groupDisplayName = "groupDisplayName";
        String groupAvatarId = "groupAvatarId";

        FeaturedStreamDTO personStream = new FeaturedStreamDTO();
        FeaturedStreamDTO groupStream = new FeaturedStreamDTO();
        personStream.setStreamType(ScopeType.PERSON);
        personStream.setStreamEntityId(personId);
        personStream.setStreamUniqueKey("personA");
        groupStream.setStreamType(ScopeType.GROUP);
        groupStream.setStreamEntityId(groupId);
        groupStream.setStreamUniqueKey("groupA");

        final PersonModelView p = new PersonModelView();
        p.setEntityId(personId);
        p.setDisplayName(personDisplayName);
        p.setAvatarId("personAvatarId");
View Full Code Here

    }

    @Override
    public void validate(final ActionContext inActionContext) throws ValidationException
    {
        FeaturedStreamDTO dto = (FeaturedStreamDTO) inActionContext.getParams();

        // verify description length.
        String description = dto.getDescription();
        if (StringUtils.isEmpty(description) || (description.length() > maxLength))
        {
            throw new ValidationException("Description must be present and less than " + maxLength + " characters");
        }

        // verify streamscope not null and is correct type.
        StreamScope streamScope = streamScopeMapper.execute(new FindByIdRequest("StreamScope", dto.getStreamId()));
        if (streamScope == null)
        {
            throw new ValidationException("Stream not found");
        }
View Full Code Here

     * Test execute.
     */
    @Test
    public void testExecute()
    {
        final FeaturedStreamDTO featuredDTO = new FeaturedStreamDTO();
        final StreamDTO mostActiveDTO = new PersonModelView();
        final Long mostActiveCount = 82L;
        final StreamDTO mostViewedDTO = new PersonModelView();
        final StreamDTO mostFollowedDTO = new PersonModelView();
        final StreamDTO mostRecentDTO = new PersonModelView();
View Full Code Here

                contactInfo.removeClassName(style.emptyDetailStyle());
                contactInfo.addClassName(style.groupContactInfo());
            }

            updateFollowLink(group.getShortName(), EntityType.GROUP);
            FeaturedStreamDTO featuredStreamDTO = new FeaturedStreamDTO();
            featuredStreamDTO.setDescription(group.getDescription());
            featuredStreamDTO.setStreamId(group.getStreamId());
            featuredStreamDTO.setStreamType(ScopeType.GROUP);
            featuredStreamDTO.setDisplayName(group.getDisplayName());

            currentFeaturedStreamDTO = featuredStreamDTO;

            if (Session.getInstance().getCurrentPersonRoles().contains(Role.SYSTEM_ADMIN))
            {
View Full Code Here

        {
            configureLink.setVisible(false);
        }

        updateFollowLink(person.getAccountId(), EntityType.PERSON);
        FeaturedStreamDTO featuredStreamDTO = new FeaturedStreamDTO();
        featuredStreamDTO.setDescription(person.getDescription());
        featuredStreamDTO.setStreamId(person.getStreamId());
        featuredStreamDTO.setStreamType(ScopeType.PERSON);
        featuredStreamDTO.setDisplayName(person.getDisplayName());

        currentFeaturedStreamDTO = featuredStreamDTO;

        if (Session.getInstance().getCurrentPersonRoles().contains(Role.SYSTEM_ADMIN))
        {
View Full Code Here

     * @return the new entity id
     */
    @Override
    public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext)
    {
        FeaturedStreamDTO dto = (FeaturedStreamDTO) inActionContext.getActionContext().getParams();

        // get streamScope from context state, or create proxy verison if not there.
        StreamScope streamScope = (inActionContext.getActionContext().getState().get("streamScope") == null) ? //
        streamScopeProxyMapper.execute(dto.getStreamId())
                : (StreamScope) inActionContext.getActionContext().getState().get("streamScope");

        FeaturedStream entity = new FeaturedStream(dto.getDescription(), streamScope);

        // insert into datastore.
        Long entityId = insertMapper.execute(new PersistenceRequest<FeaturedStream>(entity));

        // kick off the action to rebuild the Discover Page cache - but don't delete the key now, because it takes
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.domain.dto.FeaturedStreamDTO

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.