Package org.megatome.frame2.jaxbgen

Examples of org.megatome.frame2.jaxbgen.ObjectFactory


        List<FileItem> fileItems = null;
        try {
            fileItems = upload.parseRequest(request);
        } catch (FileUploadException fue) {
            LOGGER.severe("File Upload Error", fue); //$NON-NLS-1$
            throw new Frame2Exception("File Upload Exception", fue); //$NON-NLS-1$
        }

        for (FileItem fi : fileItems) {
            String fieldName = fi.getFieldName();
View Full Code Here


        try {
            String eventName = getEventName(this.request.getServletPath());
            Event event = getEvent();

            if (this.requestParams == null) {
                Frame2Exception e = null;
                if (this.fileUploadException != null) {
                    e = new Frame2Exception(this.fileUploadException);
                    this.fileUploadException = null;
                } else {
                    e = new Frame2Exception(
                            "File Upload Error: There was an error parsing file upload parameters."); //$NON-NLS-1$
                }
                throw e;
            }
View Full Code Here

        if (isMultipartRequest(rq)) {

            try {
                Class.forName("org.apache.commons.fileupload.DiskFileUpload"); //$NON-NLS-1$
            } catch (ClassNotFoundException e) {
                this.fileUploadException = new Frame2Exception(
                        "The Commons FileUpload library is missing." //$NON-NLS-1$
                                + " It is required to process file uploads."); //$NON-NLS-1$
                LOGGER.severe("File Upload Error", this.fileUploadException); //$NON-NLS-1$
                return null;
            }
View Full Code Here

                throw new ParserException("Error finding config file "); //$NON-NLS-1$
            }

            reader.parse(this.is);
        } catch (ParserException e) {
            throw new Frame2Exception("Unable to load configuration", e); //$NON-NLS-1$
        }
    }
View Full Code Here

    Arg arg = field.getArg(0);
    String validatorKey = va.getMsg();
    if (arg != null) {
      String fieldMsgKey = arg.getKey();
      if (fieldMsgKey != null) {
        Error fieldMsg = ErrorFactory.createError(fieldMsgKey);
        Error validateError = ErrorFactory.createError(validatorKey,
            fieldMsg, validatorErrorValue1, validatorErrorValue2);
        errors.add(validateError);
      }
    }
  }
View Full Code Here

    String value2 = ValidatorUtils.getValueAsString(bean, sProperty2);
    if (!GenericValidator.isBlankOrNull(value)) {
      try {
        if (!value.equals(value2)) {
          Arg arg = field.getArg(1);
          Error fieldMsg = null;
          if (arg != null) {
            String fieldMsgKey = arg.getKey();
            if (fieldMsgKey != null) {
              fieldMsg = ErrorFactory.createError(fieldMsgKey);
            }
View Full Code Here

     * @param value2 Second value to insert into message
     * @param value3 Third value to insert into message
     */
    public Error add(final String key, final Object value1,
            final Object value2, final Object value3) {
        Error e = ErrorFactory.createError(key, value1, value2, value3);
        add(e);
        return e;
    }
View Full Code Here

     * @param value3 Third value to insert into message
     * @see org.megatome.frame2.errors.Errors#add(String,Object,Object,Object)
     */
    public Error addIfUnique(final String key, final Object value1,
            final Object value2, final Object value3) {
        Error error = new ErrorImpl(key, value1, value2, value3);

        if (!contains(error)) {
            add(error);
        }

View Full Code Here

  }

  private boolean setupEmailTest(final String emailAddr) {
    this.testBean.setEmail(emailAddr);
    this.testBean.setEmpty("dude"); //$NON-NLS-1$
    final Errors errors = setupAndRunValidate(this.testBean,
        EMAIL_BEAN_NAME);
    return validateErrors(errors);
  }
View Full Code Here

  }

  private Errors setupAndRunValidate(final CommonsValidatorBean testBean,
      final String fieldBeanName) {
    // Add an error to verify the error is passed in..
    final Errors errors = ErrorsFactory.newInstance();
    errors.add("seed", "dude"); //$NON-NLS-1$ //$NON-NLS-2$

    final Validator validator = new Validator(this.validatorResources,
        fieldBeanName);
    // add the name bean to the validator as a resource
    // for the validations to be performed on.
View Full Code Here

TOP

Related Classes of org.megatome.frame2.jaxbgen.ObjectFactory

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.