Package com.adito.setup

Examples of com.adito.setup.ClientRestrictionItem


    osList = new ArrayList();
    osList.add(new LabelValueBean("All", "All"));
    selectedItems = new ArrayList();
    String lastOs = null;
    for(Iterator i  = clientRestrictionItems.iterator(); i.hasNext(); ) {
      ClientRestrictionItem item = (ClientRestrictionItem)i.next();
      if(!item.getClientRestriction().getOsName().equals(lastOs)) {
        lastOs = item.getClientRestriction().getOsName();
        osList.add(new LabelValueBean(lastOs, lastOs));
      }
    }
    buildSelectedList();
  }
View Full Code Here


  public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
    if("commit".equals(request.getParameter("action"))) {
      ActionErrors msgs = new ActionErrors();
        for(Iterator i = selectedItems.iterator(); i.hasNext(); ) {
          ClientRestrictionItem item = (ClientRestrictionItem)i.next();
          String exceptions = item.getClientRestriction().getExceptions();
          StringTokenizer t = new StringTokenizer(exceptions, "\r\n");
          while(t.hasMoreTokens()) {
            String pattern = t.nextToken();
        try {
          Pattern.compile(pattern);
        }
        catch(Exception e) {
          msgs.add(Globals.MESSAGE_KEY, new ActionMessage("clientRestrictions.error.invalidExceptionPattern", e.getMessage(),
                  item.getClientRestriction().getOsName(), item.getClientRestriction().getPropertyName()));       
        }
          }
        }
      return msgs;
    }
View Full Code Here

  }
 
  private void buildSelectedList() {
    selectedItems.clear();
    for(Iterator i = clientRestrictionItems.iterator(); i.hasNext(); ) {
      ClientRestrictionItem item = (ClientRestrictionItem)i.next();
      if("All".equals(selectedOs) || item.getClientRestriction().getOsName().equals(selectedOs)) {
        selectedItems.add(item);
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.adito.setup.ClientRestrictionItem

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.