Package com.helger.photon.api
Interface IAPIDescriptor
-
- All Known Implementing Classes:
APIDescriptor
public interface IAPIDescriptorThe read-only part ofAPIDescriptor.- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description com.helger.commons.collection.impl.ICommonsOrderedSet<String>allowedMimeTypes()APIPathgetAPIPath()IAPIExceptionMappergetExceptionMapper()IAPIExecutionFiltergetExecutionFilter()Supplier<? extends IAPIExecutor>getExecutorFactory()default com.helger.commons.http.EHttpMethodgetHttpMethod()PathDescriptorgetPathDescriptor()default booleanhasExceptionMapper()default booleanhasExecutionFilter()com.helger.commons.collection.impl.ICommonsOrderedSet<String>requiredHeaders()com.helger.commons.collection.impl.ICommonsOrderedSet<String>requiredParams()
-
-
-
Method Detail
-
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-
nullfactory 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
nullbut maybe empty.
-
requiredParams
@Nonnull @ReturnsMutableObject com.helger.commons.collection.impl.ICommonsOrderedSet<String> requiredParams()
- Returns:
- The names of all required request parameters. Never
nullbut 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
nullbut maybe empty. Only MIME types without parameters (as in ";x=y") should be added here. Also unified casing should be considered.
-
getExecutionFilter
@Nullable IAPIExecutionFilter getExecutionFilter()
- Returns:
- The current execution filter. May be
null.
-
hasExecutionFilter
default boolean hasExecutionFilter()
- Returns:
trueif an execution filter is present,falseotherwise.
-
getExceptionMapper
@Nullable IAPIExceptionMapper getExceptionMapper()
- Returns:
- The exception mapper for this descriptor. May be
null. - Since:
- 8.1.3
-
hasExceptionMapper
default boolean hasExceptionMapper()
- Returns:
trueif an exception mapper is configured,falseif not.- Since:
- 8.1.3
-
-