Package javax.portlet

Examples of javax.portlet.ValidatorException


          }
      }

      if (!failedKeys.isEmpty())
      {
          throw new ValidatorException("One or more preferences do not comply with the validation criteria",failedKeys);
      }
    }
View Full Code Here


                }
            }
        }

        if (!failedNames.isEmpty()) {
            throw new ValidatorException(
                "One or more preferences do not pass the validation.",
                failedNames);
        }
    }
View Full Code Here

      if (LOG.isDebugEnabled()) {
        LOG.debug("Method validate() invoked " + validateInvoked + " times.");
        LOG.debug("Validator created " + instanceCreated.intValue() + " times.");
      }
      if (instanceCreated.intValue() != 1) {
        throw new ValidatorException(instanceCreated.toString()
            + " validator instances were created, "
            + "expected 1 validator instance per portlet definition.",
            null);
      }
    }
View Full Code Here

                    Class<?> clazz = loader.loadClass(className);
                    validator = (PreferencesValidator) clazz.newInstance();
                    cache.put(portletDD, validator);
                } catch (InstantiationException ex) {
                    LOG.error("Error instantiating validator.", ex);
                    throw new ValidatorException(ex, null);
                } catch (IllegalAccessException ex) {
                    LOG.error("Error instantiating validator.", ex);
                    throw new ValidatorException(ex, null);
                } catch (ClassNotFoundException ex) {
                    LOG.error("Error instantiating validator.", ex);
                    throw new ValidatorException(ex, null);
                } catch (ClassCastException ex) {
                    LOG.error("Error casting instance to PreferencesValidator.", ex);
                    throw new ValidatorException(ex, null);
                }
            }
        }
        return validator;
    }
View Full Code Here

public class InvalidationCancelsStoreValidator implements PreferencesValidator
{

   public void validate(PortletPreferences preferences) throws ValidatorException
   {
      throw new ValidatorException("message", Collections.EMPTY_SET);
   }
View Full Code Here

TOP

Related Classes of javax.portlet.ValidatorException

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.