Examples of Attachment


Examples of org.springframework.ws.mime.Attachment

            mimeMessage.addAttachment(contentId, dataHandler);
        }

        @Override
        public DataHandler getAttachment(String contentId) {
            Attachment attachment = mimeMessage.getAttachment(contentId);
            return attachment != null ? attachment.getDataHandler() : null;
        }

Examples of org.springmodules.email.Attachment

                }
                if (email.getReplyTo() != null) {
                    message.setReplyTo(email.getReplyTo());
                }
                for (Iterator iter = email.getAttachments().iterator(); iter.hasNext();) {
                    Attachment attachment = (Attachment) iter.next();
                    message.addAttachment(attachment.getName(), attachment.getResource());
                }
                for (Iterator iter = email.getInlineAttachments().iterator(); iter.hasNext();) {
                    Attachment attachment = (Attachment) iter.next();
                    message.addInline(attachment.getName(), attachment.getResource());
                }
            }
        };
    }

Examples of org.trzcinka.intellitrac.dto.Attachment

    List<Attachment> result = new ArrayList<Attachment>();
    try {
      Object response = retrieveClient().execute("ticket.listAttachments", new Object[]{ticketId});
      Object[] array = (Object[]) response;
      for (Object o : array) {
        Attachment attachment = new AttachmentAdapter(o);
        result.add(attachment);
      }
    } catch (XmlRpcException e) {
      handleException(e);
    }

Examples of org.waveprotocol.wave.client.doodad.attachment.SimpleAttachmentManager.Attachment

      view.setFullSizeMode(ImageThumbnail.STYLE_FULL.equals(newValue));
    } else if (ImageThumbnail.ATTACHMENT_ATTR.equals(name)) {
      ImageThumbnailWrapper w = ImageThumbnailWrapper.of(element);
      assert w != null;

      Attachment newAttachment = manager.getAttachment(newValue);
      Attachment oldAttachment = w.getAttachment();
      if (newAttachment != oldAttachment) {
        if (oldAttachment != null) {
          attachmentHandler.cleanup(element, oldAttachment);
        }
        if (newAttachment != null) {

Examples of org.waveprotocol.wave.media.model.Attachment

      view.setFullSizeMode(ImageThumbnail.STYLE_FULL.equals(newValue));
    } else if (ImageThumbnail.ATTACHMENT_ATTR.equals(name)) {
      ImageThumbnailWrapper w = ImageThumbnailWrapper.of(element);
      assert w != null;

      Attachment newAttachment = manager.getAttachment(newValue);
      Attachment oldAttachment = w.getAttachment();
      if (newAttachment != oldAttachment) {
        if (oldAttachment != null) {
          attachmentHandler.cleanup(element, oldAttachment);
        }
        if (newAttachment != null) {

Examples of org.xwiki.rest.model.jaxb.Attachment

                    .toString();

            PutMethod putMethod = executePut(attachmentUri, content, MediaType.TEXT_PLAIN, "Admin", "admin");
            Assert.assertEquals(getHttpMethodInfo(putMethod), HttpStatus.SC_CREATED, putMethod.getStatusCode());

            Attachment attachment = (Attachment) this.unmarshaller.unmarshal(putMethod.getResponseBodyAsStream());
            pageVersions[i] = attachment.getPageVersion();
        }

        /*
         * For each page version generated, check that the attachments that are supposed to be there are actually there.
         * We do the following: at pageVersion[i] we check that all attachmentNames[0..i] are there.
         */
        for (int i = 0; i < NUMBER_OF_ATTACHMENTS; i++) {
            String attachmentsUri =
                getUriBuilder(AttachmentsAtPageVersionResource.class).build(getWiki(), SPACE_NAME, PAGE_NAME,
                    pageVersions[i]).toString();

            GetMethod getMethod = executeGet(attachmentsUri);
            Assert.assertEquals(getHttpMethodInfo(getMethod), HttpStatus.SC_OK, getMethod.getStatusCode());

            Attachments attachments = (Attachments) this.unmarshaller.unmarshal(getMethod.getResponseBodyAsStream());

            /*
             * Check that all attachmentNames[0..i] are present in the list of attachments of page at version
             * pageVersions[i]
             */
            for (int j = 0; j <= i; j++) {
                boolean found = false;
                for (Attachment attachment : attachments.getAttachments()) {
                    if (attachment.getName().equals(attachmentNames[j])) {
                        if (attachment.getPageVersion().equals(pageVersions[i])) {                           
                            found = true;
                            break;
                        }
                    }
                }

Examples of plugins.Freetalk.Message.Attachment

    messageList.storeWithoutCommit();
    Persistent.checkedCommit(db, this);
    mMessageListID = messageList.getID();
   
    List<Attachment> attachments = new ArrayList<Attachment>();
    attachments.add(new Attachment(new FreenetURI("KSK@attachment1"), new MimeType("text/plain"), 10001));
    attachments.add(new Attachment(new FreenetURI("KSK@attachment2"), new MimeType("audio/ogg"), 10002));
   
    final GregorianCalendar calendar = new GregorianCalendar(TimeZone.getTimeZone("UTC"));
    calendar.set(2009, 05-1, 03, 16, 15, 14); final Date date = calendar.getTime();
   
    WoTMessage message = WoTMessage.construct(mFreetalk, messageList, mMessageFreenetURI, myMessageID,

Examples of ru.yandex.qatools.allure.annotations.Attachment

    }

    @AfterReturning(pointcut = "anyMethod() && withAttachmentAnnotation()", returning = "result")
    public void attachment(JoinPoint joinPoint, Object result) {
        MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature();
        Attachment attachment = methodSignature.getMethod().getAnnotation(Attachment.class);
        String attachTitle = AllureAspectUtils.getTitle(
                attachment.value(),
                methodSignature.getName(),
                joinPoint.getThis(),
                joinPoint.getArgs()
        );

        Charset charset = AllureConfig.newInstance().getAttachmentsEncoding();
        byte[] bytes = (result instanceof byte[]) ? (byte[]) result : result.toString().getBytes(charset);
        Allure.LIFECYCLE.fire(new MakeAttachmentEvent(bytes, attachTitle, attachment.type()));
    }

Examples of ru.yandex.qatools.allure.model.Attachment

     *
     * @param step to change
     */
    @Override
    public void process(Step step) {
        Attachment attachment = writeAttachmentSafely(getAttachment(), getTitle(), getType());
        step.getAttachments().add(attachment);
    }
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.