Package org.springframework.data.rest.core.mapping

Examples of org.springframework.data.rest.core.mapping.ResourceDescription


    for (Entry<String, Class<?>> projection : projections.entrySet()) {

      Class<?> type = projection.getValue();
      String key = String.format("%s.%s.%s", metadata.getRel(), projectionParameterName, projection.getKey());
      ResourceDescription fallback = SimpleResourceDescription.defaultFor(key);
      AnnotationBasedResourceDescription projectionDescription = new AnnotationBasedResourceDescription(type, fallback);

      projectionDescriptors.add(//
          descriptor().//
              type(Type.SEMANTIC).//
View Full Code Here


    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);

      descriptors.add(//
          descriptor().//
              name(definition.getName()).//
View Full Code Here

      // Skip projection parameter
      if (projectionConfiguration.getParameterName().equals(variable.getName())) {
        continue;
      }

      ResourceDescription description = SimpleResourceDescription.defaultFor(variable.getDescription());

      descriptors.add(//
          descriptor().//
              name(variable.getName()).//
              type(Type.SEMANTIC).//
View Full Code Here

        Class<?> propertyType = persistentProperty.getType();
        String type = uncapitalize(propertyType.getSimpleName());

        ResourceMapping propertyMapping = metadata.getMappingFor(persistentProperty);
        ResourceDescription description = propertyMapping.getDescription();
        String message = resolveMessage(description);

        Property property = persistentProperty.isCollectionLike() ? //
        new ArrayProperty("array", message, false)
            : new Property(type, message, false);
View Full Code Here

TOP

Related Classes of org.springframework.data.rest.core.mapping.ResourceDescription

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.