Class ApiMethodSignature

java.lang.Object
org.gcube.smartgears.extensions.ApiMethodSignature

public class ApiMethodSignature extends Object
Represents a method signature for API operations. This class encapsulates HTTP method information along with accepted and produced content types.
Author:
Luca Frosini (ISTI-CNR)
  • Constructor Details

    • ApiMethodSignature

      public ApiMethodSignature(HttpExtension.Method method)
      Creates a new API method signature with the specified HTTP method.
      Parameters:
      method - the HTTP method
  • Method Details

    • accepts

      public ApiMethodSignature accepts(String... types)
      Specifies the content types that this method accepts.
      Parameters:
      types - the accepted content types
      Returns:
      this signature for method chaining
    • produces

      public ApiMethodSignature produces(String... types)
      Specifies the content types that this method produces.
      Parameters:
      types - the produced content types
      Returns:
      this signature for method chaining