Examples of required()


Examples of org.springframework.rules.Rules.required()

    }

    private class BusinessRulesSource extends DefaultRulesSource {
        public BusinessRulesSource() {
            Rules rules = new Rules(BusinessObject.class);
            rules.add(BUSINESS_FIELD, rules.required());
            addRules(rules);
        }
    }

    public class BusinessObject {
View Full Code Here

Examples of org.springframework.web.bind.annotation.CookieValue.required()

          annotationsFound++;
        }
        else if (CookieValue.class.isInstance(paramAnn)) {
          CookieValue cookieValue = (CookieValue) paramAnn;
          cookieName = cookieValue.value();
          required = cookieValue.required();
          defaultValue = parseDefaultValueAttribute(cookieValue.defaultValue());
          annotationsFound++;
        }
        else if (PathVariable.class.isInstance(paramAnn)) {
          PathVariable pathVar = (PathVariable) paramAnn;
View Full Code Here

Examples of org.springframework.web.bind.annotation.RequestBody.required()

    final HttpServletRequest servletRequest = webRequest.getNativeRequest(HttpServletRequest.class);
    HttpInputMessage inputMessage = new ServletServerHttpRequest(servletRequest);

    RequestBody annot = methodParam.getParameterAnnotation(RequestBody.class);
    if (!annot.required()) {
      InputStream inputStream = inputMessage.getBody();
      if (inputStream == null) {
        return null;
      }
      else if (inputStream.markSupported()) {
View Full Code Here

Examples of org.springframework.web.bind.annotation.RequestHeader.required()

          annotationsFound++;
        }
        else if (RequestHeader.class.isInstance(paramAnn)) {
          RequestHeader requestHeader = (RequestHeader) paramAnn;
          headerName = requestHeader.value();
          required = requestHeader.required();
          defaultValue = parseDefaultValueAttribute(requestHeader.defaultValue());
          annotationsFound++;
        }
        else if (RequestBody.class.isInstance(paramAnn)) {
          requestBodyFound = true;
View Full Code Here

Examples of org.springframework.web.bind.annotation.RequestParam.required()

      if (args[i] == null) {
        for (Annotation paramAnn : parameters[i].getParameterAnnotations()) {
          if (data != null && RequestParam.class.isInstance(paramAnn)) {
            RequestParam requestParam = (RequestParam) paramAnn;
            String paramName = requestParam.value();
            boolean required = requestParam.required();
            String defaultValue = requestParam.defaultValue();

            Object val = data.get(paramName);
            if (val == null) {
              if (defaultValue != null) {
View Full Code Here

Examples of org.springframework.web.bind.annotation.RequestPart.required()

        arg = null;
      }
    }

    RequestPart annot = parameter.getParameterAnnotation(RequestPart.class);
    boolean isRequired = (annot == null || annot.required());

    if (arg == null && isRequired) {
      throw new MissingServletRequestPartException(partName);
    }
   
View Full Code Here

Examples of org.strecks.injection.annotation.InjectRequestParameter.required()

    InjectRequestParameter input = (InjectRequestParameter) annotation;

    Class converterClass = input.converter();
    Converter converter = RequestParameterFactory.createConverter(propertyDescriptor.getPropertyType(), converterClass);
    String parameterName = AnnotationFactoryUtils.getAttributeName(propertyDescriptor.getName(), input.name());
    boolean required = input.required();

    // make sure that converter has String generic type
    boolean ok = ReflectHelper.checkGenericType(converterClass, Converter.class, String.class);
    if (!ok)
    {
View Full Code Here

Examples of org.strecks.injection.annotation.InjectSessionAttribute.required()

  public InjectionHandler createInjectionHandler(Annotation annotation, Class clazz, PropertyDescriptor propertyDescriptor)
  {
    InjectSessionAttribute input = (InjectSessionAttribute) annotation;
    String attributeName = AnnotationFactoryUtils.getAttributeName(propertyDescriptor.getName(), input.name());
    boolean required = input.required();

    Class autoCreateClass = input.autoCreate() ? propertyDescriptor.getPropertyType() : null;

    SessionAttributeInjectionHandler handler = new SessionAttributeInjectionHandler(attributeName, autoCreateClass,
        required);
View Full Code Here

Examples of org.teiid.deployers.ExtendedPropertyMetadata.required()

    ExtendedPropertyMetadata metadata = new ExtendedPropertyMetadata("x", "java.lang.String", "some-name", null);
   
    Assert.assertEquals("some-name", metadata.display());
    Assert.assertEquals(null, metadata.description());
    Assert.assertEquals(false, metadata.advanced());
    Assert.assertEquals(false, metadata.required());
    Assert.assertEquals(false, metadata.masked());
    Assert.assertEquals(true , metadata.readOnly());
  }
 
  @Test
View Full Code Here

Examples of org.teiid.translator.TranslatorProperty.required()

      String value = caseInsensitivProps.remove(propertyName);
     
      if (value != null) {
        Method setterMethod = getSetter(ef.getClass(), method);
        setterMethod.invoke(ef, convert(value, method.getReturnType()));
      } else if (tp.required()) {
        throw new DeploymentException(RuntimePlugin.Util.getString("required_property_not_exists", tp.display())); //$NON-NLS-1$
      }
    }
    caseInsensitivProps.remove(Translator.EXECUTION_FACTORY_CLASS);
    if (!caseInsensitivProps.isEmpty()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.