Package com.tll.common.data.rpc

Examples of com.tll.common.data.rpc.AdminContextPayload


      (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";

    final Model user = entityMarshaller.marshalEntity(sac.getUser(), new MarshalOptions(true, 1, null));
    // 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);
  }
View Full Code Here


    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

TOP

Related Classes of com.tll.common.data.rpc.AdminContextPayload

Copyright © 2018 www.massapicom. 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.