Class JakartaCookie

java.lang.Object
com.oorian.jakarta.JakartaCookie

public final class JakartaCookie extends Object
Utility class for converting between OorianCookie and Cookie.

This class provides static methods to convert in both directions, preserving all cookie attributes (name, value, path, domain, maxAge, secure, httpOnly).

Since:
2.1
Version:
1.0
Author:
Oorian Framework
See Also:
  • Method Details

    • toWebCookie

      public static OorianCookie toWebCookie(jakarta.servlet.http.Cookie cookie)
      Converts a Jakarta Cookie to a framework-agnostic OorianCookie.
      Parameters:
      cookie - The Jakarta cookie to convert.
      Returns:
      A new OorianCookie with the same attributes.
    • toJakartaCookie

      public static jakarta.servlet.http.Cookie toJakartaCookie(OorianCookie webCookie)
      Converts a framework-agnostic OorianCookie to a Jakarta Cookie.
      Parameters:
      webCookie - The framework cookie to convert.
      Returns:
      A new Jakarta Cookie with the same attributes.