public.javadoc.org.spincast.plugins.cookies.Cookie.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
The newest version!
Cookie (org.spincast:spincast-framework 0.9.28 API)
org.spincast.plugins.cookies
Class Cookie
- java.lang.Object
-
- org.spincast.plugins.cookies.Cookie
-
-
Constructor Summary
Constructors
Constructor and Description
Cookie(String name,
ISpincastConfig spincastConfig)
Constructor
Cookie(String name,
String value,
ISpincastConfig spincastConfig)
Constructor
Cookie(String name,
String value,
String path,
String domain,
Date expires,
boolean secure,
boolean httpOnly,
boolean discard,
int version,
ISpincastConfig spincastConfig)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
String
getDomain()
Gets the cookie domain.
Date
getExpires()
Gets the date the cookie will expire at.
String
getName()
Gets the cookie name.
String
getPath()
Gets the cookie path.
protected ISpincastConfig
getSpincastConfig()
String
getValue()
Gets the cookie value.
int
getVersion()
Gets the cookie version.
boolean
isDiscard()
Is this cookie to be discarded?
boolean
isExpired()
Is this cookie expired?
boolean
isHttpOnly()
Is the cookie availableto the server
and not to javascript?
boolean
isSecure()
Is the "secure" feature on?
void
setDomain(String domain)
Sets the cookie domain.
void
setExpires(Date expires)
Sets the date the cookie will expire.
void
setExpiresUsingMaxAge(Integer maxAge)
Sets the number of seconds for a cookie to live.
void
setHttpOnly(boolean httpOnly)
Sets if the cookie is available only for to the server
anbd not to javascript.
void
setPath(String path)
Sets the cookie path.
void
setSecure(boolean secure)
Sets the "secure" feature on or off.
void
setValue(String value)
Sets the cookie value.
String
toString()
-
-
Constructor Detail
-
Cookie
public Cookie(String name,
ISpincastConfig spincastConfig)
Constructor
-
Cookie
public Cookie(String name,
String value,
ISpincastConfig spincastConfig)
Constructor
-
Method Detail
-
getSpincastConfig
protected ISpincastConfig getSpincastConfig()
-
setValue
public void setValue(String value)
Description copied from interface: ICookie
Sets the cookie value.
-
setPath
public void setPath(String path)
Description copied from interface: ICookie
Sets the cookie path.
-
getDomain
public String getDomain()
Description copied from interface: ICookie
Gets the cookie domain.
-
setDomain
public void setDomain(String domain)
Description copied from interface: ICookie
Sets the cookie domain.
-
getExpires
public Date getExpires()
Description copied from interface: ICookie
Gets the date the cookie will expire at.
If the date is in the past, the cookie will be deleted.
If null the cookie will live for the current session
(this is the default).
- Specified by:
getExpires in interface ICookie
-
setExpires
public void setExpires(Date expires)
Description copied from interface: ICookie
Sets the date the cookie will expire.
If the date is in the past, the cookie will be deleted.
If null the cookie will live for the current session
(this is the default).
- Specified by:
setExpires in interface ICookie
-
setExpiresUsingMaxAge
public void setExpiresUsingMaxAge(Integer maxAge)
Description copied from interface: ICookie
Sets the number of seconds for a cookie to live.
If maxAge < 0 : The "Expires date" will be in the past and the cookie will
therefore be deleted.
If maxAge == 0 : The "Expires date" will be null and the cookie will live
for the session only.
If maxAge > 0 : The "Expires date" will be the current date + 'maxAge' seconds.
- Specified by:
setExpiresUsingMaxAge in interface ICookie
-
isExpired
public boolean isExpired()
Description copied from interface: ICookie
Is this cookie expired?
-
isSecure
public boolean isSecure()
Description copied from interface: ICookie
Is the "secure" feature on?
-
setSecure
public void setSecure(boolean secure)
Description copied from interface: ICookie
Sets the "secure" feature on or off.
-
isHttpOnly
public boolean isHttpOnly()
Description copied from interface: ICookie
Is the cookie availableto the server
and not to javascript?
- Specified by:
isHttpOnly in interface ICookie
-
setHttpOnly
public void setHttpOnly(boolean httpOnly)
Description copied from interface: ICookie
Sets if the cookie is available only for to the server
anbd not to javascript.
- Specified by:
setHttpOnly in interface ICookie
-
isDiscard
public boolean isDiscard()
Description copied from interface: ICookie
Is this cookie to be discarded?
-
getVersion
public int getVersion()
Description copied from interface: ICookie
Gets the cookie version.
- Specified by:
getVersion in interface ICookie
Copyright © 2016. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy