Package org.eurekastreams.server.domain

Examples of org.eurekastreams.server.domain.Identifiable


        final String sourceUniqueId = "Source Unique ID";
        final EntityType sourceType = EntityType.GROUP;
        final String actorUniqueId = "Actor Unique ID";
        final EntityType actorType = EntityType.PERSON;

        final Identifiable source = context.mock(Identifiable.class, "source");
        final Identifiable actor = context.mock(Identifiable.class, "actor");

        context.checking(new Expectations()
        {
            {
                oneOf(placeholderPersonMapper).execute(RECIPIENT1);
View Full Code Here


        ServiceAction action = typeToFetchActionIndex.get(streamType);
        if (action == null)
        {
            throw new ExecutionException("Stream type not supported.");
        }
        Identifiable entity = (Identifiable) serviceActionController.execute(new ServiceActionContext(id, principal),
                action);

        // Get address
        String address = (String) serviceActionController.execute(new ServiceActionContext(new EntityIdentifier(
                streamType, id), principal), getTokenForStreamAction);

        ModelAndView mv = new ModelAndView("vcardView");
        mv.addObject("streamEntity", entity);
        mv.addObject("email", address);

        // This really should be part of the view, not the controller, but the Spring view classes (VelocityView and
        // parents) don't provide a way to set content disposition, nor a way to set arbitrary headers.
        response.setHeader("Content-Disposition", "attachment; filename=" + streamType.name().toLowerCase() + "-"
                + entity.getUniqueId() + ".vcf");
        response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate, max-age=0");
        response.addHeader("Pragma", "no-cache");

        return mv;
    }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public String execute(final Long inRequest)
    {
        Identifiable item = dao.execute(inRequest);
        return (item != null) ? item.getUniqueId() : null;
    }
View Full Code Here

     * Tests execute.
     */
    @Test
    public void testExecute()
    {
        final Identifiable item = context.mock(Identifiable.class);
        context.checking(new Expectations()
        {
            {
                allowing(dao).execute(9L);
                will(returnValue(item));
View Full Code Here

        dbNotif.setHighPriority(Boolean.TRUE.equals(inProperties.get(NotificationPropertyKeys.HIGH_PRIORITY)));

        Object obj = inProperties.get(NotificationPropertyKeys.SOURCE);
        if (obj instanceof Identifiable)
        {
            Identifiable source = (Identifiable) obj;
            dbNotif.setSourceType(source.getEntityType());
            dbNotif.setSourceUniqueId(source.getUniqueId());
            dbNotif.setSourceName(source.getDisplayName());
        }
        obj = inProperties.get(NotificationPropertyKeys.ACTOR);
        if (obj instanceof Identifiable)
        {
            Identifiable actor = (Identifiable) obj;
            dbNotif.setAvatarOwnerType(actor.getEntityType());
            dbNotif.setAvatarOwnerUniqueId(actor.getUniqueId());
        }

        String template = templates.get(inType);
        if (template == null)
        {
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.domain.Identifiable

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.