Examples of Recipient


Examples of no.sws.invoice.recipient.Recipient

  }

  public static List<Element> getOptionalRecipientValuesAsXmlElements(final Invoice invoice) throws SwsNoRecipientForInvoiceException {

    // get the recipient object from the invoice
    final Recipient recipient = invoice.getRecipient();

    if(recipient != null) {
      // let RecipientHelper generate the list of XML elements
      return RecipientHelper.getOptionalRecipientValuesAsXmlElements(recipient);
    }
View Full Code Here

Examples of no.sws.invoice.recipient.Recipient

      throw new IllegalArgumentException("Param invoice can't be null. I'm trying to add the Recipient object to that object");
    }

    if(invoiceElement != null && invoiceElement.getName().equalsIgnoreCase("invoice")) {

      final Recipient recipient = RecipientFactory.getInstance();

      // get name, zip and city from invoice element (these are required)
      recipient.setName(getElementValue(invoiceElement, "name", true));
      recipient.setZip(getElementValue(invoiceElement, "zip", true));
      recipient.setCity(getElementValue(invoiceElement, "city", true));

      // get recipientNo, address1, address2, country from the optional element
      final Element optionalElement = invoiceElement.getChild("optional");

      if(optionalElement == null) {
        log.info("No <optional> element in <invoice> element:\n" + XmlUtils.xmlElement2String(invoiceElement, Format.getPrettyFormat()));
      }
      else {

        recipient.setRecipientNo(getElementValue(optionalElement, "recipientNo", false));
                recipient.setOrgNo(getElementValue(optionalElement, "recipientOrgNo", false));
        recipient.setAddress1(getElementValue(optionalElement, "address1", false));
        recipient.setAddress2(getElementValue(optionalElement, "address2", false));
        recipient.setCountry(getElementValue(optionalElement, "country", false));
        recipient.setEmail(getElementValue(optionalElement, "email", false));
      }

      // add recipient to invoice
      invoice.setRecipient(recipient);
    }
View Full Code Here

Examples of no.sws.invoice.recipient.Recipient

        // get all recipients
        List<Recipient> recipients = swsClient.getAllRecipients();

        // get one recipient
        Recipient recipient = swsClient.getRecipientByRecipientNo("1");

        // get all recipients named "Ola"
        recipients = swsClient.findRecipientByName("Ola");

        // get all recipient categories
View Full Code Here

Examples of no.sws.invoice.recipient.Recipient

     * @return A demo Recipient
     */
    private static Recipient generateDemoRecipient() {

        // Instantiate a new Recipient
        Recipient result = RecipientFactory.getInstance();

        // set demo name and address
        result.setRecipientNo("demo1");
        result.setName("Ola Nordmann");
        result.setAddress1("Drammensveien 1");
        result.setZip("0012");
        result.setCity("OSLO");

        return result;
    }
View Full Code Here

Examples of org.bouncycastle.cms.Recipient

   * @param certificateKeyProvider
   * @return
   * @throws CMSException
   */
  public static byte[] getContent(RecipientInformation recipientInfo, PrivateKey certificateKey, String certificateKeyProvider) throws CMSException {
     Recipient jceKeyTransRecipient = new JceKeyTransEnvelopedRecipient(certificateKey).setProvider(certificateKeyProvider);
    return recipientInfo.getContent(jceKeyTransRecipient);
  }
View Full Code Here

Examples of org.bouncycastle.cms.Recipient

   * @param certificateKeyProvider
   * @return
   * @throws CMSException
   */
  public static byte[] getContent(RecipientInformation recipientInfo, PrivateKey certificateKey, String certificateKeyProvider) throws CMSException {
     Recipient jceKeyTransRecipient = new JceKeyTransEnvelopedRecipient(certificateKey).setProvider(certificateKeyProvider);
    return recipientInfo.getContent(jceKeyTransRecipient);
  }
View Full Code Here

Examples of org.fenixedu.academic.domain.util.email.Recipient

        final String groupName =
                BundleUtil.getString(Bundle.GLOBAL, "label.group", new String[] { submission.getStudentGroup().getGroupNumber()
                        .toString() });
        Sender sender = ExecutionCourseSender.newInstance(course);
        Recipient recipient = new Recipient(groupName, UserGroup.of(Person.convertToUsers(recievers)));
        new Message(sender, sender.getConcreteReplyTos(), recipient.asCollection(), submission.getProject().getName(),
                submission.getTeacherObservation(), "");
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.util.email.Recipient

        final String toGroupName =
                BundleUtil.getString(Bundle.ACADEMIC, "label.send.email.to.candidates.group.to.name",
                        mobilityGroup.getDescription(), period.getExecutionInterval().getName());
        final Group group = UnionGroup.of(getCandidateGroups(mobilityGroup, period));

        final Recipient recipient = Recipient.newInstance(toGroupName, group);
        final EmailBean bean = new EmailBean();
        bean.setRecipients(Collections.singletonList(recipient));

        final Person person = AccessControl.getPerson();
        if (person != null) {
View Full Code Here

Examples of org.fenixedu.academic.domain.util.email.Recipient

            if (thesisParticipationType == ThesisParticipationType.ORIENTATOR
                    || thesisParticipationType == ThesisParticipationType.COORIENTATOR) {
                persons.add(thesisEvaluationParticipant.getPerson());
            }
        }
        final Recipient recipient =
                new Recipient("Membros da tese " + getTitle().toString(), UserGroup.of(Person.convertToUsers(persons)));
        final String studentNumber = getStudent().getNumber().toString();
        final String title = getFinalFullTitle().getContent();
        final String subject = getMessage("message.thesis.reject.submission.email.subject", studentNumber);
        final String body = getMessage("message.thesis.reject.submission.email.body", studentNumber, title, rejectionComment);

        //
        final Sender sender = ScientificCouncilUnit.getScientificCouncilUnit().getUnitBasedSenderSet().iterator().next();

        new Message(sender, sender.getConcreteReplyTos(), recipient.asCollection(), subject, body, "");
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.util.email.Recipient

            studentsGroup = degreeStudentsGroup.getUserGroup();
            ExecutionDegree executionDegree = FenixFramework.getDomainObject(executionDegreeId);
            sender = CoordinatorSender.newInstance(executionDegree.getDegree());
        }

        Recipient recipient = Recipient.newInstance(label, studentsGroup);
        return EmailsDA.sendEmail(request, sender, recipient);
    }
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.