Package com.changestuffs.shared.actions

Examples of com.changestuffs.shared.actions.OfferRemoveResult


  @Logued
  @Validate
  @Override
  public OfferRemoveResult execute(@Valid OfferRemove action, ExecutionContext context)
      throws ActionException {
    OfferRemoveResult result = null;
    UserService userService = UserServiceFactory.getUserService();
    User user = userService.getCurrentUser();
    ArticlesOAM oam = provider.get();
    result = oam.removeOffer(user.getEmail(), action.getOfferId());
    return result;
View Full Code Here


    return new OfferInfo(user, offer.getProduct().getName(), KeyFactory.keyToString(offer.getProduct().getKey()));
  }
 
  @Transactional
  public OfferRemoveResult removeOffer(String userId, String offerId){
    OfferRemoveResult result = null;
    Offer offer = model.find(Offer.class, offerId);
    if(!userId.equals(offer.getUserId())){
      log.log(Level.WARNING, "User "+userId+" is trying to remove an offer of "+offer.getUserId());
      return null;
    }
    model.remove(offer);
    result = new OfferRemoveResult();
    return result;
  }
View Full Code Here

TOP

Related Classes of com.changestuffs.shared.actions.OfferRemoveResult

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.