Package org.exoplatform.web.application

Examples of org.exoplatform.web.application.ApplicationMessage


         if (Character.isDigit(c) || (s.charAt(0) == '-' && i == 0 && s.length() > 1))
         {
            continue;
         }
         Object[] args = {label, uiInput.getBindingField()};
         throw new MessageException(new ApplicationMessage("NumberFormatValidator.msg.Invalid-number", args));
      }
   }
View Full Code Here


         return;
      Object[] args = {uicomponent.getName()};
      String[] tmp = permission.split(":", 2);
      if (tmp.length != 2)
      {
         throw new MessageException(new ApplicationMessage("PermissionValidator.msg.invalid-permission-input", args));
      }
      String membership = tmp[0];
      String groupId = tmp[1];
      Group group = null;
      MembershipType membershipType = null;
      try
      {
         membershipType = service.getMembershipTypeHandler().findMembershipType(membership);
         group = service.getGroupHandler().findGroupById(groupId);
      }
      catch (Exception e)
      {
         e.printStackTrace();
      }
      if (membership.equals("*"))
      {
         if (membershipType != null && group != null)
            return;
         throw new MessageException(new ApplicationMessage("PermissionValidator.msg.membership-group-not-found", args));
      }
      if (group != null)
         return;
      throw new MessageException(new ApplicationMessage("PermissionValidator.msg.membership-group-not-found", args));
   }
View Full Code Here

         label = label.substring(0, label.length() - 1);
      String s = (String)uiInput.getValue();
      if (Character.isDigit(s.charAt(0)) || s.charAt(0) == '-' || s.charAt(0) == '.' || s.charAt(0) == '_')
      {
         Object[] args = {label, uiInput.getBindingField()};
         throw new MessageException(new ApplicationMessage("FirstCharacterNameValidator.msg", args,
            ApplicationMessage.WARNING));
      }
      for (int i = 0; i < s.length(); i++)
      {
         char c = s.charAt(i);
         if (Character.isLetter(c) || Character.isDigit(c) || c == '_' || c == '-' || c == '.')
         {
            continue;
         }
         Object[] args = {label, uiInput.getBindingField()};
         throw new MessageException(new ApplicationMessage("ResourceValidator.msg.Invalid-char", args,
            ApplicationMessage.WARNING));
      }
   }
View Full Code Here

         label = uiInput.getName();
      }
      if (label.charAt(label.length() - 1) == ':')
         label = label.substring(0, label.length() - 1);
      Object[] args = {label};
      throw new MessageException(new ApplicationMessage(key_, args, ApplicationMessage.WARNING));
   }
View Full Code Here

      }
      label = label;
      if (label.charAt(label.length() - 1) == ':')
         label = label.substring(0, label.length() - 1);
      Object[] args = {label, min_.toString(), max_.toString()};
      throw new MessageException(new ApplicationMessage("StringLengthValidator.msg.length-invalid", args,
         ApplicationMessage.WARNING));
   }
View Full Code Here

      }
      label = label.trim();
      if (label.charAt(label.length() - 1) == ':')
         label = label.substring(0, label.length() - 1);
      Object[] args = {label, min_.toString(), max_.toString()};
      throw new MessageException(new ApplicationMessage("StringLengthValidator.msg.length-invalid", args,
         ApplicationMessage.WARNING));
   }
View Full Code Here

         if (Character.isLetter(c) || Character.isDigit(c) || c == '_' || c == '-' || c == '.' || c == '*')
         {
            continue;
         }
         Object[] args = {label, uiInput.getBindingField()};
         throw new MessageException(new ApplicationMessage("NameValidator.msg.Invalid-char", args));
      }
   }
View Full Code Here

         return;
      String s = (String)uiInput.getValue();
      if (s.matches(EMAIL_REGEX))
         return;
      Object[] args = {label, uiInput.getBindingField()};
      throw new MessageException(new ApplicationMessage("EmailAddressValidator.msg.Invalid-input", args,
         ApplicationMessage.WARNING));
   }
View Full Code Here

         uiPopupMessages_.addMessage(ex.getDetailMessage());
      }
      catch (Throwable t)
      {
         Object[] args = {t.getMessage()};
         ApplicationMessage msg =
            new ApplicationMessage("UIApplication.msg.unknown-error", args, ApplicationMessage.ERROR);
         uiPopupMessages_.addMessage(msg);
         log.error("Error during the processAction phase", t);
      }
   }
View Full Code Here

         label = label.substring(0, label.length() - 1);
      String s = (String)uiInput.getValue();
      if (Character.isDigit(s.charAt(0)) || s.charAt(0) == '-')
      {
         Object[] args = {label, uiInput.getBindingField()};
         throw new MessageException(new ApplicationMessage("FirstCharacterNameValidator.msg", args,
            ApplicationMessage.WARNING));
      }
      for (int i = 0; i < s.length(); i++)
      {
         char c = s.charAt(i);
         if (Character.isLetter(c) || Character.isDigit(c) || c == '_' || c == '-')
         {
            continue;
         }
         Object[] args = {label, uiInput.getBindingField()};
         throw new MessageException(new ApplicationMessage("IdentifierValidator.msg.Invalid-char", args,
            ApplicationMessage.WARNING));
      }
   }
View Full Code Here

TOP

Related Classes of org.exoplatform.web.application.ApplicationMessage

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.