Package org.springframework.data.rest.core.annotation

Examples of org.springframework.data.rest.core.annotation.Description


    Assert.hasText(name, "Parameter must not be null or empty!");
    Assert.hasText(baseRel, "Method rel must not be null!");

    ResourceDescription fallback = TypedResourceDescription.defaultFor(baseRel.concat(".").concat(name),
        parameter.getParameterType());
    Description annotation = parameter.getParameterAnnotation(Description.class);

    this.description = annotation == null ? fallback : new AnnotationBasedResourceDescription(annotation, fallback);
  }
View Full Code Here


    this.fallback = fallback;
  }

  public AnnotationBasedResourceDescription(Class<?> type, ResourceDescription fallback) {

    Description description = AnnotationUtils.findAnnotation(type, Description.class);

    this.message = description == null ? null : description.value();
    this.fallback = fallback;
  }
View Full Code Here

    List<Descriptor> descriptors = new ArrayList<Descriptor>();

    for (BeanPropertyDefinition definition : new JacksonMetadata(mapper, type)) {

      AnnotatedMethod getter = definition.getGetter();
      Description description = getter.getAnnotation(Description.class);
      ResourceDescription fallback = SimpleResourceDescription.defaultFor(String.format("%s.%s", name,
          definition.getName()));
      ResourceDescription resourceDescription = description == null ? null : new AnnotationBasedResourceDescription(
          description, fallback);
View Full Code Here

TOP

Related Classes of org.springframework.data.rest.core.annotation.Description

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.