Interface ModelDescription


@ProviderType public interface ModelDescription
A description of all collected metadata about a model.
  • Method Details

    • getMapper

      @Nonnull ModelPathMapper getMapper()
      Gets the ModelPathMapper used by the model.
      Returns:
      The ModelPathMapper.
    • getCategory

      @Nonnull String getCategory()
      Gets the model's category.
      Returns:
      The model category.
    • getModel

      Object getModel()
      Gets the model object.
      Returns:
      The model
    • getModelTypes

      @Nonnull String[] getModelTypes()
      Get the model types, as defined by the type property on the ApiModel annotation.
      Returns:
      The array of model types.
    • getNextOffsetValue

      @CheckForNull String getNextOffsetValue()
      Get the value to use as the next offset for paginated requests. This value will be null until after the getEntities method is called since entities are loaded lazily.
      Returns:
      The next offset value.
    • getEntityCount

      int getEntityCount()
      Get the count of entities to be serialized into the response. This value will be 0 until after the getEntities method is called since entities are loaded lazily.
      Returns:
      The entity count.
    • getActions

      @Nonnull Iterable<ActionDescription> getActions()
      Get the descriptions of the actions defined in the model.
      Returns:
      The action descriptions
    • getLinks

      @Nonnull Iterable<LinkDescription> getLinks()
      Get the descriptions of the links defined in the model.
      Returns:
      The link descriptions.
    • getEntities

      @Nonnull Iterable<EntityDescription> getEntities()
      Get the descriptions of the entities defined in the model.
      Returns:
      The entity descriptions.
    • getProperties

      @Nonnull Iterable<PropertyDescription> getProperties()
      Get the descriptions of properties defined in the model.
      Returns:
      The property descriptions.
    • getProperty

      @CheckForNull PropertyDescription getProperty(String name)
      Get the description for a specific property defined in the model by name.
      Parameters:
      name - The property name.
      Returns:
      The property description.
    • getHeaders

      @Nonnull Iterable<HeaderDescription> getHeaders()
      Get the descriptions of the headers defined in the model.
      Returns:
      The header descriptions.