Package evolaris.framework.um.datamodel

Examples of evolaris.framework.um.datamodel.Group


   *      javax.servlet.http.HttpServletRequest,
   *      javax.servlet.http.HttpServletResponse)
   */
  public ActionForward enter(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
    InteractionLogInteractionEnterOrEditForm interactionLogForm = (InteractionLogInteractionEnterOrEditForm)form;
    Group group = groupFromSession(req);
    checkAccessRights(req, group);
    interactionLogForm.setSortLabel(sortLabelProposalFromSession(req));
    interactionLogForm.setCommandType(0)// default create entry
    interactionLogForm.setParameterSelection(0)// default (empty) constant
    interactionLogForm.setUserSetId(-1)// no user set preselected
View Full Code Here


    if (interactionLogForm.getSortLabel() == null ||  interactionLogForm.getSortLabel().equals("")){
      throw new InputException(resources.getMessage(locale, "smssvc.labelMustBeProvided"));
    }

    InteractionLogCommandEntry commandEntry = new InteractionLogCommandEntry();
    Group group = groupFromSession(req);
    checkAccessRights(req, group);
    commandEntry.setGroup(group);

    evaluateForm(req, interactionLogForm, commandEntry);
    LOGGER.info("User " + req.getUserPrincipal().getName().toLowerCase() + ": Create interaction log entry with operation: " + commandEntry.getOperation() + "; parameter: " + commandEntry.getParameter());
View Full Code Here

      throw new InputException(resources.getMessage(locale, "smssvc.labelMustBeProvided"));
    }

   
    ImageRecognitionCommandEntry commandEntry = new ImageRecognitionCommandEntry();
    Group group = groupFromSession(req);
    checkAccessRights(req, group);
    commandEntry.setGroup(group);
    commandEntry.setSortLabel(f.getSortLabel());
    commandEntry.setFolderSuffix(Integer.parseInt(f.getFolderSuffix()));
    LOGGER.info("User " + req.getUserPrincipal().getName().toLowerCase() + ": Created image recognition entry ");
View Full Code Here

   *      javax.servlet.http.HttpServletResponse)
   */
  public ActionForward create(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp)  {
    AccessCheckInteractionEnterOrEditForm accessCheckForm = (AccessCheckInteractionEnterOrEditForm)form;
    MessageResources resources = getResources(req);
    Group group = groupFromSession(req);
    checkAccessRights(req, group);
    AccessCheckCommandEntry accessCheckCommandEntry = accessCheckForm.toEntry(new AccessCheckCommandEntry(), group, locale, session, resources);
    LOGGER.info("User " + req.getUserPrincipal().getName().toLowerCase() + ": Created access check entry. id: " + accessCheckCommandEntry.getId() + " begin DateTime: " + accessCheckForm.getBeginDate() + " end DateTime: " + accessCheckForm.getEndDate());
    setCommandEntryInRequest(req, accessCheckCommandEntry);
    return mapping.findForward("created");
View Full Code Here

  /**
   * @see org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
   */
  public ActionForward list(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
    InvocationListForm f = (InvocationListForm)form;
    Group groupToDisplay = getCurrentGroup(req);
    if (Boolean.TRUE.equals(f.getAllGroups()) && UserManager.isUserInRole(webUser, UserManagerBase.ADMINISTRATOR)) {
      groupToDisplay = null;
    }
   
    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)){
View Full Code Here

    if (simpleInteractionForm.getSortLabel() == null ||  simpleInteractionForm.getSortLabel().equals("")){
      throw new InputException(resources.getMessage(locale, "smssvc.labelMustBeProvided"));
    }

    SimpleCommandEntry commandEntry = new SimpleCommandEntry();
    Group group = groupFromSession(req);
    checkAccessRights(req, group);
    commandEntry.setGroup(group);
    commandEntry.setSimpleCommandEntryType(simpleInteractionForm.getCommandTypeSelection());
    commandEntry.setSortLabel(simpleInteractionForm.getSortLabel());
    LOGGER.info("User " + req.getUserPrincipal().getName().toLowerCase() + ": Created simple command entry of type: " + simpleInteractionForm.getCommandTypeSelection());
View Full Code Here

   *      javax.servlet.http.HttpServletRequest,
   *      javax.servlet.http.HttpServletResponse)
   */
  public ActionForward enter(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp)  {
    UserSetInteractionEnterOrEditForm userSetInteractionEnterOrEditForm = (UserSetInteractionEnterOrEditForm) form;
    Group group = groupFromSession(req);
    checkAccessRights(req, group);
    userSetInteractionEnterOrEditForm.setSortLabel(sortLabelProposalFromSession(req));
    userSetInteractionEnterOrEditForm.setCommandType(1)// default: add to user set
    userSetInteractionEnterOrEditForm.setNofUsers(null);
   
    Set<UserSet> userSets = group.getUserSets();
    req.getSession().setAttribute("userSets", userSets)// may be empty
    if (userSets.size() >= 1){
      userSetInteractionEnterOrEditForm.setUserSetId(userSets.iterator().next().getId());
    }
    req.getSession().setAttribute("enterOrEdit", "enter");
View Full Code Here

   *      javax.servlet.http.HttpServletResponse)
   */
  public ActionForward edit(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp)  {
    UserSetInteractionEnterOrEditForm userSetInteractionEnterOrEditForm = (UserSetInteractionEnterOrEditForm) form;
    UserSetCommandEntry userSetCommandEntry = (UserSetCommandEntry)commandEntryFromRequest(req);
    Group group = userSetCommandEntry.getGroup();
    checkAccessRights(req, group);
    userSetInteractionEnterOrEditForm.setCommandEntryId(userSetCommandEntry.getId())// not to be used when editing
    userSetInteractionEnterOrEditForm.setSortLabel(userSetCommandEntry.getSortLabel());
    userSetInteractionEnterOrEditForm.setUserSetId(userSetCommandEntry.getUserSet() != null ? userSetCommandEntry.getUserSet().getId() : -2);
    userSetInteractionEnterOrEditForm.setCommandType(userSetCommandEntry.getUserSetCommandEntryType());
    if(userSetCommandEntry.getNofUsers() != null){
      userSetInteractionEnterOrEditForm.setNofUsers(userSetCommandEntry.getNofUsers().toString());
      userSetInteractionEnterOrEditForm.setNofDrawings(userSetCommandEntry.getNofUsers().toString());
    }
   
    Set<UserSet> userSets = group.getUserSets();
   
    if(userSetCommandEntry.getUserSetCommandEntryType().intValue() == 6){
      userSetInteractionEnterOrEditForm.setAssignUserSetId(userSetCommandEntry.getUserSetOperand() != null ? userSetCommandEntry.getUserSetOperand().getId() : -2);
    } else {
      userSetInteractionEnterOrEditForm.setAssignUserSetId(userSets.iterator().next().getId());
View Full Code Here

   *      javax.servlet.http.HttpServletRequest,
   *      javax.servlet.http.HttpServletResponse)
   */
  public ActionForward create(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp)  {
    UserSetInteractionEnterOrEditForm f = (UserSetInteractionEnterOrEditForm) form;
    Group group = groupFromSession(req);
    checkAccessRights(req, group);
    UserSetManager userSetManager = new UserSetManager(locale,session);
    UserSet userSet = f.getUserSetId() == -2 ? null : userSetManager.getUserSet(f.getUserSetId());
    if (f.getUserSetId() != -2
      && (userSet == null || userSet.getGroup() != group)) {
View Full Code Here

    if (emailInteractionEnterOrEditForm.getDestinationSelection() == null || emailInteractionEnterOrEditForm.getDestinationSelection() <= 0){
      emailInteractionEnterOrEditForm.setDestinationSelection(0)// initially select the sender as destination
    }
   
   
    Group group = groupFromSession(req);
    checkAccessRights(req, group);

    prepareEmailSenderAddress(emailInteractionEnterOrEditForm);
   
    // user sets
    prepareUserSets(req, emailInteractionEnterOrEditForm, group);
   
    // prepare templates
    prepareTemplate(req, emailInteractionEnterOrEditForm);
   
    emailInteractionEnterOrEditForm.setSortLabel(sortLabelProposalFromSession(req));
   
    // destination users
    Set<User> users = new HashSet<User>()// no user selection possible here
    SortedSet<EmailAddress> userAddresses = EmailAddress.availableAddresses(users);
    prepareUser(req, emailInteractionEnterOrEditForm, userAddresses);
   
    req.getSession().setAttribute("interactionGroupName",group.getGroupname());   
    req.getSession().setAttribute("enterOrEdit", "enter");
    req.getSession().setAttribute("formActionPath", req.getParameter("formActionPath"));
    return mapping.findForward("enter");
  }
View Full Code Here

TOP

Related Classes of evolaris.framework.um.datamodel.Group

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.