Package com.tll.common.data

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


    if(context == null) throw new IllegalStateException("Null listing context");

    final Status status = new Status();

    if(request == null) {
      status.addMsg("No listing request specified.", MsgLevel.ERROR, MsgAttr.STATUS.flag);
    }

    final String listingId = request == null ? null : request.getListingId();
    if(listingId == null) {
      status.addMsg("No listing name specified.", MsgLevel.ERROR, MsgAttr.STATUS.flag);
View Full Code Here


      status.addMsg("No listing request specified.", MsgLevel.ERROR, MsgAttr.STATUS.flag);
    }

    final String listingId = request == null ? null : request.getListingId();
    if(listingId == null) {
      status.addMsg("No listing name specified.", MsgLevel.ERROR, MsgAttr.STATUS.flag);
    }

    final ListingOp listingOp = request == null ? null : request.getListingOp();
    if(listingOp == null) {
      status.addMsg("No listing op specified.", MsgLevel.ERROR, MsgAttr.STATUS.flag);
View Full Code Here

      status.addMsg("No listing name specified.", MsgLevel.ERROR, MsgAttr.STATUS.flag);
    }

    final ListingOp listingOp = request == null ? null : request.getListingOp();
    if(listingOp == null) {
      status.addMsg("No listing op specified.", MsgLevel.ERROR, MsgAttr.STATUS.flag);
    }

    ListingHandler<Model> handler = null;
    ListingStatus listingStatus = null;
View Full Code Here

    ListingHandler<Model> handler = null;
    ListingStatus listingStatus = null;

    if(!status.hasErrors() && request != null) {
      if(sessionId == null) {
        status.addMsg("No session id specified.", MsgLevel.ERROR, MsgAttr.STATUS.flag);
      }
      else {
        Integer offset = request.getOffset();
        Sorting sorting = request.getSorting();
View Full Code Here

              catch(final InvalidCriteriaException e) {
                throw new ListingException(listingId, "Invalid criteria: " + e.getMessage(), e);
              }
              catch(final EmptyListException e) {
                // we proceed to allow client to still show the listing
                status.addMsg(e.getMessage(), MsgLevel.WARN, MsgAttr.STATUS.flag);
              }
              catch(final ListHandlerException e) {
                // shouldn't happen
                throw new IllegalStateException("Unable to instantiate the list handler: " + e.getMessage(), e);
              }
View Full Code Here

          if(handler != null && listingOp != null && listingOp.isQuery()) {
            if(log.isDebugEnabled())
              log.debug("Performing : '" + listingOp.getName() + "' for '" + listingId + "'...");
            try {
              handler.query(offset.intValue(), sorting, (listingOp == ListingOp.REFRESH));
              status.addMsg(listingOp.getName() + " for '" + listingId + "' successful.", MsgLevel.INFO,
                  MsgAttr.STATUS.flag);
            }
            catch(final EmptyListException e) {
              // we proceed to allow client to still show the listing
              status.addMsg(e.getMessage(), MsgLevel.WARN, MsgAttr.STATUS.flag);
View Full Code Here

              status.addMsg(listingOp.getName() + " for '" + listingId + "' successful.", MsgLevel.INFO,
                  MsgAttr.STATUS.flag);
            }
            catch(final EmptyListException e) {
              // we proceed to allow client to still show the listing
              status.addMsg(e.getMessage(), MsgLevel.WARN, MsgAttr.STATUS.flag);
            }
            catch(final ListingException e) {
              throw new ListingException(listingId, "An unexpected error occurred performing listing operation: "
                  + e.getMessage(), e);
            }
View Full Code Here

          ListingCache.clearHandler(sessionId, listingId);
          if(!request.getRetainStateOnClear()) {
            ListingCache.clearState(sessionId, listingId);
          }
          listingStatus = ListingStatus.NOT_CACHED;
          status.addMsg("Cleared listing data for " + listingId, MsgLevel.INFO, MsgAttr.STATUS.flag);
        }
        else if(listingOp == ListingOp.CLEAR_ALL) {
          // clear all
          if(log.isDebugEnabled()) log.debug("Clearing ALL listings...");
          ListingCache.clearHandler(sessionId, listingId);
View Full Code Here

          ListingCache.clearHandler(sessionId, listingId);
          if(!request.getRetainStateOnClear()) {
            ListingCache.clearAll(request.getRetainStateOnClear());
          }
          listingStatus = ListingStatus.NOT_CACHED;
          status.addMsg("Cleared ALL listing data", MsgLevel.INFO, MsgAttr.STATUS.flag);
        }
        else if(handler != null && !status.hasErrors()) {
          // cache listing handler
          if(log.isDebugEnabled()) log.debug("[Re-]Caching listing '" + listingId + "'...");
          ListingCache.storeHandler(sessionId, listingId, handler);
View Full Code Here

    final Status status = new Status();
    final Payload p = new Payload(status);
    final Map<String, Object> data = new HashMap<String, Object>();

    if(StringUtil.isEmpty(emailAddress)) {
      status.addMsg("An email address must be specified.", MsgLevel.ERROR, MsgAttr.STATUS.flag);
    }
    else {
      final ForgotPasswordServiceContext context = getContext();
      try {
        final IForgotPasswordHandler handler = context.getForgotPasswordHandler();
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.