Interface IAPIDescriptor

  • All Known Implementing Classes:
    APIDescriptor

    public interface IAPIDescriptor
    The read-only part of APIDescriptor.
    Author:
    Philip Helger
    • Method Detail

      • getAPIPath

        @Nonnull
        APIPath getAPIPath()
        Returns:
        The API path used. Never null.
      • getHttpMethod

        @Nonnull
        default com.helger.commons.http.EHttpMethod getHttpMethod()
        Returns:
        The HTTP method required to call this API.
      • getPathDescriptor

        @Nonnull
        PathDescriptor getPathDescriptor()
        Returns:
        The path descriptor required to call this API.
      • getExecutorFactory

        @Nonnull
        Supplier<? extends IAPIExecutor> getExecutorFactory()
        Returns:
        The non-null factory used to create the main invoker.
      • requiredHeaders

        @Nonnull
        @ReturnsMutableObject
        com.helger.commons.collection.impl.ICommonsOrderedSet<String> requiredHeaders()
        Returns:
        The names of all required HTTP headers. Never null but maybe empty.
      • requiredParams

        @Nonnull
        @ReturnsMutableObject
        com.helger.commons.collection.impl.ICommonsOrderedSet<String> requiredParams()
        Returns:
        The names of all required request parameters. Never null but maybe empty.
      • allowedMimeTypes

        @Nonnull
        @ReturnsMutableObject
        com.helger.commons.collection.impl.ICommonsOrderedSet<String> allowedMimeTypes()
        Returns:
        The names of all allowed MIME types for the data. Never null but maybe empty. Only MIME types without parameters (as in ";x=y") should be added here. Also unified casing should be considered.
      • hasExecutionFilter

        default boolean hasExecutionFilter()
        Returns:
        true if an execution filter is present, false otherwise.
      • getExceptionMapper

        @Nullable
        IAPIExceptionMapper getExceptionMapper()
        Returns:
        The exception mapper for this descriptor. May be null.
        Since:
        8.1.3
      • hasExceptionMapper

        default boolean hasExceptionMapper()
        Returns:
        true if an exception mapper is configured, false if not.
        Since:
        8.1.3