Examples of Attachment


Examples of org.jboss.soa.esb.message.Attachment

      this.paramType = paramType;
      this.attachmentParam = attachmentParam;
    }

    public Object getParam(Message message) throws MessageDeliverException {
      Attachment attachment = message.getAttachment();
     
      String attachPartName = AnnotationUtil.getAttachmentName(attachmentParam);
      if(attachPartName != null) {
        Object param = attachment.get(attachPartName);
        if(param != null && !paramType.isInstance(param)) {
          throw new MessageDeliverException("Named Attachment part '" + attachPartName + "' exists on ESB message but is not of type '" + paramType.getName() + "'.");
        }
        return param;
      } else {     
        for(String attachPartNameOnMessage : attachment.getNames()) {
          Object param = attachment.get(attachPartNameOnMessage);
          if(param != null && paramType.isInstance(param)) {
            return param;
          }
        }
      }

Examples of org.jbpm.task.Attachment

                    session.write(resultsCmnd);
                    break;
                }
                case AddAttachmentRequest: {
                    response = CommandName.AddAttachmentResponse;
                    Attachment attachment = (Attachment) cmd.getArguments().get(1);
                    Content content = (Content) cmd.getArguments().get(2);
                    taskSession.addAttachment((Long) cmd.getArguments().get(0),
                            attachment,
                            content);

                    List args = new ArrayList(2);
                    args.add(attachment.getId());
                    args.add(content.getId());
                    Command resultsCmnd = new Command(cmd.getId(),
                            CommandName.AddAttachmentResponse,
                            args);
                    session.write(resultsCmnd);

Examples of org.jclouds.ec2.domain.Attachment

      }

      /* But if attachment size is > 0, then the attachment could be in any state.
         * So we need to check if the status is DETACHED (return true) or not (return false).
         */
      Attachment lastAttachment = getLast(volume.getAttachments());
      logger.trace("%s: looking for status %s: currently: %s", lastAttachment,
              Attachment.Status.DETACHED, lastAttachment.getStatus());
      return lastAttachment.getStatus() == Attachment.Status.DETACHED;
   }

Examples of org.jclouds.openstack.quantum.v1_0.domain.Attachment

            keystoneAuthWithUsernameAndPassword, responseWithKeystoneAccess,
            authenticatedGET().endpoint(endpoint + "/tenants/3456/networks/16dba3bc-f3fa-4775-afdc-237e12c72f6a/ports/77777/attachment").build(),
            HttpResponse.builder().statusCode(200).payload(payloadFromResourceWithContentType("/attachment.json", APPLICATION_JSON)).build())
            .getPortApiForZoneAndNetwork("region-a.geo-1", "16dba3bc-f3fa-4775-afdc-237e12c72f6a");

      Attachment attachment = api.showAttachment("77777");
      assertEquals(attachment, Attachment.builder().id("jclouds-live-test").build());
   }

Examples of org.kuali.rice.krad.bo.Attachment

            HttpServletRequest request,
            HttpServletResponse response) throws IOException {
    try {
      Long attachmentId = Long.valueOf(request.getParameter("attachmentId"));
      // retrieve att
      Attachment att = getBusinessObjectService().findBySinglePrimaryKey(
          Attachment.class, attachmentId);
      if (att == null) {
        log.error("no attachment was found with id '" + attachmentId + "'");
      } else {
        downloadAttachmentAsStream(response, att);

Examples of org.netbeans.server.uihandler.api.Submit.Attachment

    }

    @Override
    public Attachment getAttachment() {
        byte[] sb = Utils.format(getStacktrace());
        return new Attachment("stacktrace-%1$s.txt", "stacktrace", "text/plain", sb);
    }

Examples of org.openbravo.model.ad.utility.Attachment

        throw new OBException("No entity for table with name " + table.getName());
      }
      return entity;
    }
    if (property.getEntity().getName().equals(Attachment.ENTITY_NAME)) {
      final Attachment attachment = (Attachment) obObject;
      final Entity entity = ModelProvider.getInstance().getEntity(attachment.getTable().getName());
      if (entity == null) {
        throw new OBException("No entity for table with name " + attachment.getTable().getName());
      }
      return entity;
    }
    if (property.getEntity().getName().equals(AccountingFact.ENTITY_NAME)) {
      if (property.getName().equals(AccountingFact.PROPERTY_RECORDID2)) {

Examples of org.osforce.connect.entity.commons.Attachment

    File targetFile = getTargetFile(attachment);
    FileUtils.writeByteArrayToFile(targetFile, attachment.getBytes());
  }
 
  public static Attachment parse(MultipartFile file) throws IOException {
    Attachment attachment = new Attachment();
    attachment.setContentType(file.getContentType());
    attachment.setFileName(file.getOriginalFilename());
    attachment.setSize(file.getSize());
    attachment.setBytes(file.getBytes());
    return attachment;
  }

Examples of org.sete.domain.Attachment

    public void testLoadAllProjectFilesForOneFileOnly(){
        int toTestID = 2;
        ScienceProject p = new ScienceProject();
        Set<Attachment> f  = new HashSet<Attachment>();
        p.setForms(f);
        Attachment a = new Attachment();
        a.setId(toTestID);
        p.getForms().add(a);
        p.setId(toTestID);
        List<ScienceProject> l = new ArrayList<ScienceProject>();
        l.add(p);
        EasyMock.expect(mockScienceProjectDao.getAllScienceProjects()).andReturn(l);

Examples of org.spockframework.runtime.model.Attachment

    addAttachments(see, feature);
  }

  private void addAttachments(See see, SpecElementInfo specElement) {
    for (String url : see.value()) {
      specElement.addAttachment(new Attachment(url, url));
    }
  }
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.