All Known Subinterfaces:
WpRestClient
All Known Implementing Classes:
ApacheWpRestClient, WpBaseRestClient

public interface StatusOperations
Defines operations for retrieving WordPress post statuses through the WordPress REST API.

This interface provides methods for retrieving individual post status definitions as well as the complete collection of registered post statuses available on a WordPress site.

Post statuses describe the publication state and visibility of content resources, including statuses such as publish, draft, pending, future, and private.

Implementations are expected to communicate with the /wp-json/wp/v2/statuses endpoint or compatible APIs.

  • Method Summary

    Modifier and Type
    Method
    Description
    getStatus(@NonNull String name)
    Retrieves a post status definition by its unique slug.
    Retrieves all registered post statuses.
  • Method Details

    • getStatus

      WpStatus getStatus(@NonNull @NonNull String name)
      Retrieves a post status definition by its unique slug.

      Examples include publish, draft, pending, future, and private.

      Parameters:
      name - the status slug; must not be null
      Returns:
      the matching WpStatus
    • getStatuses

      Map<String,WpStatus> getStatuses()
      Retrieves all registered post statuses.

      The returned map is keyed by status slug and contains the corresponding WpStatus definitions.

      Returns:
      a map of status slugs to status definitions