Examples of assertContainsRoleRef()


Examples of org.nightlabs.jfire.security.Authority.assertContainsRoleRef()

    Authority organisationAuthority = Authority.getOrganisationAuthority(getPersistenceManager());
    // userID references the principal, i.e. the currently logged-in user.
    UserID userID = SecurityReflector.getUserDescriptor().getUserObjectID();

    // TODO set problem key instead of assert (which throws an exception and thus rolls the whole transaction back).
    organisationAuthority.assertContainsRoleRef(userID, org.nightlabs.jfire.trade.RoleConstants.editOrder);
    organisationAuthority.assertContainsRoleRef(userID, org.nightlabs.jfire.trade.RoleConstants.editOffer);

    if (!JbpmConstantsRecurringOffer.Vendor.NODE_NAME_RECURRENCE_STARTED.equals(nodeName)) {
      throw new IllegalStateException("The recurrence for RecurringOffer " + JDOHelper.getObjectId(recurringOffer) + " is not started, it is in the state '" + nodeName + "'.");
    }
View Full Code Here

Examples of org.nightlabs.jfire.security.Authority.assertContainsRoleRef()

    // userID references the principal, i.e. the currently logged-in user.
    UserID userID = SecurityReflector.getUserDescriptor().getUserObjectID();

    // TODO set problem key instead of assert (which throws an exception and thus rolls the whole transaction back).
    organisationAuthority.assertContainsRoleRef(userID, org.nightlabs.jfire.trade.RoleConstants.editOrder);
    organisationAuthority.assertContainsRoleRef(userID, org.nightlabs.jfire.trade.RoleConstants.editOffer);

    if (!JbpmConstantsRecurringOffer.Vendor.NODE_NAME_RECURRENCE_STARTED.equals(nodeName)) {
      throw new IllegalStateException("The recurrence for RecurringOffer " + JDOHelper.getObjectId(recurringOffer) + " is not started, it is in the state '" + nodeName + "'.");
    }
    logger.debug("Starting creation of RecurredOffer (with new Order) for RecurringOffer: " + JDOHelper.getObjectId(recurringOffer));
View Full Code Here

Examples of org.nightlabs.jfire.security.Authority.assertContainsRoleRef()

      if(recurringOffer.getRecurringOfferConfiguration().isCreateInvoice()) {
        // If the configuration says so, automatically create an invoice
        logger.debug("Creating invoice for new RecurredOffer");

        // TODO set problem key instead of assert (which throws an exception and thus rolls the whole transaction back).
        organisationAuthority.assertContainsRoleRef(userID, org.nightlabs.jfire.accounting.RoleConstants.editInvoice);

        Accounting accounting = Accounting.getAccounting(pm);
        Invoice invoice = accounting.createInvoice(user, recurredOffer.getArticles(), null);

        logger.debug("Successfully created Invoice " + JDOHelper.getObjectId(invoice));
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.