Package com.tll.common.data

Examples of com.tll.common.data.Status.addMsg()


        data.put("password", rp);
        final MailManager mailManager = context.getMailManager();
        final MailRouting mr = mailManager.buildAppSenderMailRouting(user.getEmailAddress());
        final IMailContext mailContext = mailManager.buildTextTemplateContext(mr, EMAIL_TEMPLATE_NAME, data);
        mailManager.sendEmail(mailContext);
        status.addMsg("Password reminder email was sent.", MsgLevel.INFO, MsgAttr.STATUS.flag);
      }
      catch(final EntityNotFoundException nfe) {
        exceptionToStatus(nfe, status);
        context.getExceptionHandler().handleException(nfe);
      }
View Full Code Here


    final com.tll.server.AdminContext sac =
      (com.tll.server.AdminContext) rc.getSession().getAttribute(
          com.tll.server.AdminContext.KEY);
    if(sac == null) {
      // presume not logged in yet
      status.addMsg("Admin Context not found.", MsgLevel.INFO, MsgAttr.STATUS.flag);
      return new AdminContextPayload(status, ac.isDebug(), ac.getEnvironment(), null, null);
    }

    final Marshaler entityMarshaller = mec.getMarshaler();
    assert entityMarshaller != null : "No marshaler present";
View Full Code Here

    // NOTE: we want a distinct copy of the account here so we separately
    // marshall the account as opposed to grabbing the nested account from the
    // just marshaled user
    final Model account = entityMarshaller.marshalEntity(sac.getUser().getAccount(), MarshalOptions.NON_RELATIONAL);

    status.addMsg("Admin Context retrieved.", MsgLevel.INFO, MsgAttr.STATUS.flag);
    return new AdminContextPayload(status, ac.isDebug(), ac.getEnvironment(), user, account);
  }

  @Override
  public AdminContextPayload changeCurrentAccount(ModelKey accountRef) {
View Full Code Here

    assert delegate != null && em != null && sac != null;

    final ModelPayload ep = delegate.load(new LoadRequest<PrimaryKeySearch>(new PrimaryKeySearch(accountRef)));
    final Status status = ep.getStatus();

    status.addMsg("Admin Context current account retrieved for " + accountRef.descriptor(), MsgLevel.INFO,
        MsgAttr.STATUS.flag);
    return new AdminContextPayload(status, ep.getModel());
  }
}
View Full Code Here

    Class<? extends Account> accountClass;
    try {
      accountClass = (Class<? extends Account>) pc.getEntityTypeResolver().resolveEntityClass(request.getEntityType());
    }
    catch(final ClassCastException e) {
      s.addMsg("Invalid account type.", MsgLevel.ERROR, MsgAttr.STATUS.flag);
      return p;
    }
    Model maccount = request.getAccount();
    if(maccount == null) {
      s.addMsg("No account specified.", MsgLevel.ERROR, MsgAttr.STATUS.flag);
View Full Code Here

      s.addMsg("Invalid account type.", MsgLevel.ERROR, MsgAttr.STATUS.flag);
      return p;
    }
    Model maccount = request.getAccount();
    if(maccount == null) {
      s.addMsg("No account specified.", MsgLevel.ERROR, MsgAttr.STATUS.flag);
      return p;
    }
    final Collection<Model> maios = request.getAccountInterfaces();
    if(maios == null) {
      s.addMsg("No account interface options specified.", MsgLevel.ERROR, MsgAttr.STATUS.flag);
View Full Code Here

      s.addMsg("No account specified.", MsgLevel.ERROR, MsgAttr.STATUS.flag);
      return p;
    }
    final Collection<Model> maios = request.getAccountInterfaces();
    if(maios == null) {
      s.addMsg("No account interface options specified.", MsgLevel.ERROR, MsgAttr.STATUS.flag);
      return p;
    }
    final Collection<Model> musers = request.getUsers();

    try {
View Full Code Here

        }
      }

      if(Isp.class == accountClass) {
        account = svc.addIsp((Isp) account, aios, users);
        s.addMsg("Isp added", MsgLevel.INFO, MsgAttr.STATUS.flag);
      }
      else if(Merchant.class == accountClass) {
        account = svc.addMerchant((Merchant) account, aios, users);
        s.addMsg("Merchant added", MsgLevel.INFO, MsgAttr.STATUS.flag);
      }
View Full Code Here

        account = svc.addIsp((Isp) account, aios, users);
        s.addMsg("Isp added", MsgLevel.INFO, MsgAttr.STATUS.flag);
      }
      else if(Merchant.class == accountClass) {
        account = svc.addMerchant((Merchant) account, aios, users);
        s.addMsg("Merchant added", MsgLevel.INFO, MsgAttr.STATUS.flag);
      }
      else if(Customer.class == accountClass) {
        account = svc.addCustomer((Customer) account, aios, users);
        s.addMsg("Customer added", MsgLevel.INFO, MsgAttr.STATUS.flag);
      }
View Full Code Here

        account = svc.addMerchant((Merchant) account, aios, users);
        s.addMsg("Merchant added", MsgLevel.INFO, MsgAttr.STATUS.flag);
      }
      else if(Customer.class == accountClass) {
        account = svc.addCustomer((Customer) account, aios, users);
        s.addMsg("Customer added", MsgLevel.INFO, MsgAttr.STATUS.flag);
      }
      else {
        s.addMsg("Unhandled account type: " + accountClass, MsgLevel.ERROR, MsgAttr.STATUS.flag);
        return p;
      }
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.