Examples of addAttachment()


Examples of org.dspace.core.Email.addAttachment()

            email.addRecipient(eperson.getEmail());
            email.addArgument(ConfigurationManager.getProperty("dspace.url")
                    + "/rp/tools/stats/subscription/unsubscribe?clear=all");
            email.addArgument(ConfigurationManager.getProperty("dspace.url")
                    + "/rp/tools/stats/subscription/list.htm");
            email.addAttachment(file, "stat-" + sfreq + "-update.xls");
            email.send();
            file.delete();
        }
        log.info(LogManager.getHeader(context, "sent_statsubscription",
                "eperson_id=" + eperson.getID() + ", freq=" + sfreq));
View Full Code Here

Examples of org.exoplatform.services.mail.Message.addAttachment()

      message.setBody(MAIL_CONTENTS);
      message.setMimeType(TEXT_HTML);
      Attachment attachment = new Attachment();
      attachment.setInputStream(new ByteArrayInputStream(ATTACHMENT.getBytes()));
      attachment.setMimeType(TEXT_PLAIN);
      message.addAttachment(attachment);

      assertEquals("SMTP server should be now empty", 0, mailServer.getMessages().size());
      assertFalse(isEmailMessageSent(MAIL_SUBJECT));
      service.sendMessage(message);
      Thread.sleep(ONE_SECOND);
View Full Code Here

Examples of org.intalio.tempo.workflow.task.PATask.addAttachment()

        String task1ID = nextRandom();
        PATask task1 = new PATask(task1ID, new URI("http://localhost/1"), "processID", "urn:completeSOAPAction", Utils.createXMLDocument());
        task1.getUserOwners().add("test.system-test");
        task1.getUserOwners().add("intalio\\admin");
        Attachment attachment1 = new Attachment(new AttachmentMetadata(), new URL("http://localhost/a1"));
        task1.addAttachment(attachment1);
        Attachment attachment2 = new Attachment(new AttachmentMetadata(), new URL("http://localhost/a2"));
        task1.addAttachment(attachment2);
        tms.create(task1);

        PATask task2 = (PATask) tms.getTask(task1.getID());
View Full Code Here

Examples of org.intalio.tempo.workflow.task.traits.ITaskWithAttachments.addAttachment()

        checkIsAvailable(taskID, task, credentials);
        if (task instanceof ITaskWithAttachments == false) {
            throw new UnavailableTaskException("Task does not support attachments");
        }
        ITaskWithAttachments taskWithAttachments = (ITaskWithAttachments) task;
        taskWithAttachments.addAttachment(attachment);
        dao.updateTask(task);
        dao.commit();
        if (_logger.isDebugEnabled())
            _logger.debug(credentials.getUserID() + " has added attachment " + attachment + "to Workflow Task " + task);
    }
View Full Code Here

Examples of org.intalio.tempo.workflow.tms.ITaskManagementService.addAttachment()

        Attachment[] attachments = tms.getAttachments(task1.getID());
        Assert.assertEquals(1, attachments.length);
        Assert.assertEquals(attachment2.getPayloadURL(), attachments[0].getPayloadURL());

        tms.removeAttachment(task1.getID(), attachment2.getPayloadURL());
        tms.addAttachment(task1.getID(), attachment1);

        PATask task4 = (PATask) tms.getTask(task1.getID());
        Assert.assertEquals(1, task4.getAttachments().size());
        Assert.assertEquals(attachment1.getPayloadURL(), task4.getAttachments().iterator().next().getPayloadURL());
    }
View Full Code Here

Examples of org.jayasoft.woj.common.services.mail.BasicMail.addAttachment()

            params.put("clause", _rbTE.build(PAYMENT_CONFIRMATION_USER_CLAUSE, params));
        } else {
            params.put("clause", "");
        }
        m.setContent(getMailContent(PAYMENT_CONFIRMATION, params));
        m.addAttachment(invoice.getPdf(), "woj-invoice-" + TimeUtil.getGMTMillis(), ".pdf");
        return m;
    }

  public Mail createNewBuyConfirmationMailAdmin(User user, Order order, List licenses) {
        BasicMail m = new BasicMail();
View Full Code Here

Examples of org.jboss.aop.joinpoint.InvocationResponse.addAttachment()

               // Marshall the response
               response = marshallResponse(invocation, returnValue, newSi.getResponseContextInfo());
               if (sessionId != null)
               {
                  response.addAttachment(StatefulConstants.NEW_ID, sessionId);
               }
              
//               response = marshallResponse(invocation, rtn, newSi.getResponseContextInfo());
//               if (newId != null) response.addAttachment(StatefulConstants.NEW_ID, newId);
              
View Full Code Here

Examples of org.jboss.aop.joinpoint.InvocationResponse.addAttachment()

         // Create a new EJB2.x Proxy
         Object proxy = proxyFactory.createProxyEjb2x((Serializable)newStatefulInvocation.getSessionId());
        
         InvocationResponse response = marshallResponse(statefulInvocation, proxy, newStatefulInvocation.getResponseContextInfo());
         if (newStatefulInvocation.getSessionId() != null)
            response.addAttachment(StatefulConstants.NEW_ID,
                    newStatefulInvocation.getSessionId());
         return response;
      }
      else if (unadvisedMethod.getName().equals("remove"))
      {
View Full Code Here

Examples of org.jboss.aop.joinpoint.InvocationResponse.addAttachment()

               // Marshall the response
               response = marshallResponse(invocation, returnValue, newSi.getResponseContextInfo());
               if (sessionId != null)
               {
                  response.addAttachment(StatefulConstants.NEW_ID, sessionId);
               }
              
//               response = marshallResponse(invocation, rtn, newSi.getResponseContextInfo());
//               if (newId != null) response.addAttachment(StatefulConstants.NEW_ID, newId);
              
View Full Code Here

Examples of org.jboss.aop.joinpoint.InvocationResponse.addAttachment()

                

               rtn = newSi.invokeNext();

               response = marshallResponse(invocation, rtn, newSi.getResponseContextInfo());
               if (newId != null) response.addAttachment(StatefulConstants.NEW_ID, newId);
            }
         }
         catch (Throwable throwable)
         {
            Throwable exception = throwable;
View Full Code Here
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.