# Class CookieProcessorBase

java.lang.Object
org.apache.tomcat.util.http.CookieProcessorBase

All Implemented Interfaces:
  `CookieProcessor`

Direct Known Subclasses:
  `LegacyCookieProcessor, Rfc6265CookieProcessor`

public abstract class CookieProcessorBase extends Object implements CookieProcessor
Base implementation of `CookieProcessor`.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected static final String`
  `ANCIENT_DATE`
  A date far in the past used to expire cookies.
  `protected static final ThreadLocal<DateFormat>`
  `COOKIE_DATE_FORMAT`
  Thread-local date format for cookie dates.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CookieProcessorBase()`
  Default constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getCookiesWithoutEquals()`
  Get the current cookiesWithoutEquals setting as a string.
  `protected CookiesWithoutEquals`
  `getCookiesWithoutEqualsInternal()`
  Get the current cookiesWithoutEquals setting as an enum.
  `boolean`
  `getPartitioned()`
  Should the `Partitioned` attribute be added by default to cookies created for this web application.
  `SameSiteCookies`
  `getSameSiteCookies()`
  Get the current sameSiteCookies setting.
  `void`
  `setCookiesWithoutEquals(String cookiesWithoutEquals)`
  Set the cookiesWithoutEquals setting.
  `void`
  `setPartitioned(boolean partitioned)`
  Configure whether the `Partitioned` attribute should be added by default to cookies created for this web application.
  `void`
  `setSameSiteCookies(String sameSiteCookies)`
  Set the sameSiteCookies setting.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface CookieProcessor

  `generateHeader, generateHeader, getCharset, parseCookieHeader`

- ## Field Details

  - ### COOKIE_DATE_FORMAT

    protected static final ThreadLocal<DateFormat> COOKIE_DATE_FORMAT
    Thread-local date format for cookie dates.

  - ### ANCIENT_DATE

    protected static final String ANCIENT_DATE
    A date far in the past used to expire cookies.

- ## Constructor Details

  - ### CookieProcessorBase

    public CookieProcessorBase()
    Default constructor.

- ## Method Details

  - ### getCookiesWithoutEquals

    public String getCookiesWithoutEquals()
    Get the current cookiesWithoutEquals setting as a string.
    Returns:
      The cookiesWithoutEquals value

  - ### getCookiesWithoutEqualsInternal

    protected CookiesWithoutEquals getCookiesWithoutEqualsInternal()
    Get the current cookiesWithoutEquals setting as an enum.
    Returns:
      The cookiesWithoutEquals value

  - ### setCookiesWithoutEquals

    public void setCookiesWithoutEquals(String cookiesWithoutEquals)
    Set the cookiesWithoutEquals setting.
    Parameters:
      `cookiesWithoutEquals` - The new cookiesWithoutEquals value

  - ### getSameSiteCookies

    public SameSiteCookies getSameSiteCookies()
    Get the current sameSiteCookies setting.
    Returns:
      The sameSiteCookies value

  - ### setSameSiteCookies

    public void setSameSiteCookies(String sameSiteCookies)
    Set the sameSiteCookies setting.
    Parameters:
      `sameSiteCookies` - The new sameSiteCookies value

  - ### getPartitioned

    public boolean getPartitioned()
    Should the `Partitioned` attribute be added by default to cookies created for this web application.

    The name of the attribute used to indicate a partitioned cookie as part of CHIPS is not defined by an RFC and may change in a non-backwards compatible way once equivalent functionality is included in an RFC.

    Returns:
      `true` if the `Partitioned` attribute should be added by default to cookies created for this web application, otherwise `false`

  - ### setPartitioned

    public void setPartitioned(boolean partitioned)
    Configure whether the `Partitioned` attribute should be added by default to cookies created for this web application.

    The name of the attribute used to indicate a partitioned cookie as part of CHIPS is not defined by an RFC and may change in a non-backwards compatible way once equivalent functionality is included in an RFC.

    Parameters:
      `partitioned` - `true` if the `Partitioned` attribute should be added by default to cookies created for this web application, otherwise `false`