Package evolaris.framework.async.business

Examples of evolaris.framework.async.business.SmsDbManager


    }
    long interactionListId = ((Long)interactionListIdParam).longValue();
    if (interactionListId == -1) {
      throw new BugException("interactionList id -1 in session");
    }
    SmsDbManager smsDbManager = new SmsDbManager(locale,session);
    InteractionList interactionList = smsDbManager.getInteractionList(interactionListId);
    if(interactionList == null) {
      throw new ConfigurationException("There is no interactionList with id: " + interactionListId + " -> cannot add a new interaction");
    }
    if (!req.isUserInRole(UserManagerBase.ADMINISTRATOR) && (!req.isUserInRole(SmsDbManager.INTERACTION_ADMINISTRATOR) || webUser.getGroup() != interactionList.getGroup())){
      throw new InputException(getResources(req).getMessage(locale, "smssvc.insufficientRights"));
View Full Code Here


    Date now = new Date(System.currentTimeMillis());
    if(Boolean.TRUE.equals(f.getOutdatedServices())){
      now = null;
    }
   
    SmsDbManager smsDbManager = new SmsDbManager(locale, session);
   
    @SuppressWarnings("unused")
    String notAllowedString = getResources(req).getMessage(locale, "smssvc.notAllowed");
    List<InvocationListForm.DisplayableInvocation> displayableInvocations = new LinkedList<InvocationListForm.DisplayableInvocation>();
    List<Invocation> invocations = smsDbManager.getInvocations(groupToDisplay,now);
    for (Invocation invocation : invocations) {
      Group group = invocation.getGroup();
      group.getGroupname(); // fill the cache
      Long msisdn = invocation.getMsisdn();
      String email = invocation.getEmail();
      String keywords = invocation.getKeywords();
      String displayableMsisdn = msisdn == null ? "" : msisdn + "";
      if (msisdn != null && !smsDbManager.isMsisdnAllowedForAllKeywords(group, msisdn, keywords)){
        displayableMsisdn = msisdn + "!";
      }
      String displayableEmail = email;
      if (email != null && !smsDbManager.isEmailAllowedForAllKeywords(group, email, keywords)){
        displayableEmail = email + " !";
      }
      displayableInvocations.add(new InvocationListForm.DisplayableInvocation(invocation,displayableMsisdn,displayableEmail));
    }
   
View Full Code Here

    CommandEntryManager commandEntryManager = new CommandEntryManager(locale,session);
    Set<CommandEntry> commandEntries = interactionList.getCommandEntries();
    for (CommandEntry entry : commandEntries) {
      commandEntryManager.delete(entry);
    }
    SmsDbManager smsDbManager = new SmsDbManager(locale,session);
    smsDbManager.modifyInteractionList(interactionList)// update edited-at attribute to allow recognizing the change
    LOGGER.info("User " + req.getUserPrincipal().getName().toLowerCase() + ": deleted interactions of interaction list #"+ f.getId());
    delete(mapping,form,req,resp);
    return mapping.findForward("deleted");
  }
View Full Code Here

TOP

Related Classes of evolaris.framework.async.business.SmsDbManager

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.