001 package railo.runtime.type.scope; 002 003 import railo.runtime.exp.PageException; 004 import railo.runtime.type.Collection; 005 006 /** 007 * interface for the cookie scope 008 */ 009 public interface Cookie extends Scope, UserScope { 010 011 /** 012 * set a cookie value 013 * @param name name of the cookie 014 * @param value value of the cookie 015 * @param expires expirs of the cookie (Date, number in seconds or keyword as string ) 016 * @param secure set secure or not 017 * @param path path of the cookie 018 * @param domain domain of the cookie 019 * @throws PageException 020 * @deprecated 021 */ 022 public abstract void setCookie(Collection.Key name, Object value, Object expires, boolean secure, String path, String domain) throws PageException; 023 024 025 /** 026 * set a cookie value 027 * @param name Name of the cookie 028 * @param value value of the cookie 029 * @param expires expires in seconds 030 * @param secure secute or not 031 * @param path path of the cookie 032 * @param domain domain of the cookie 033 * @throws PageException 034 * @deprecated 035 */ 036 public abstract void setCookie(Collection.Key name, Object value, int expires, boolean secure, String path, String domain) throws PageException; 037 038 039 /** 040 * set a cookie value 041 * @param name Name of the cookie 042 * @param value value of the cookie 043 * @param expires expires in seconds 044 * @param secure secute or not 045 * @param path path of the cookie 046 * @param domain domain of the cookie 047 * @deprecated 048 */ 049 public abstract void setCookieEL(Collection.Key name, Object value, int expires, boolean secure, String path, String domain); 050 051 052 053 /** 054 * set a cookie value 055 * @param name name of the cookie 056 * @param value value of the cookie 057 * @param expires expirs of the cookie (Date, number in seconds or keyword as string ) 058 * @param secure set secure or not 059 * @param path path of the cookie 060 * @param domain domain of the cookie 061 * @param httpOnly if true, sets cookie as httponly so that it cannot be accessed using JavaScripts. Note that the browser must have httponly compatibility. 062 * @param preserveCase if true, keep the case of the name as it is 063 * @param encode if true, url encode the name and the value 064 * @throws PageException 065 */ 066 public abstract void setCookie(Collection.Key name, Object value, Object expires, boolean secure, String path, String domain, 067 boolean httpOnly, boolean preserveCase, boolean encode) throws PageException; 068 069 070 /** 071 * set a cookie value 072 * @param name Name of the cookie 073 * @param value value of the cookie 074 * @param expires expires in seconds 075 * @param secure secute or not 076 * @param path path of the cookie 077 * @param domain domain of the cookie 078 * @param httpOnly if true, sets cookie as httponly so that it cannot be accessed using JavaScripts. Note that the browser must have httponly compatibility. 079 * @param preserveCase if true, keep the case of the name as it is 080 * @param encode if true, url encode the name and the value 081 * @throws PageException 082 */ 083 public abstract void setCookie(Collection.Key name, Object value, int expires, boolean secure, String path, String domain, 084 boolean httpOnly, boolean preserveCase, boolean encode) throws PageException; 085 086 087 /** 088 * set a cookie value 089 * @param name Name of the cookie 090 * @param value value of the cookie 091 * @param expires expires in seconds 092 * @param secure secute or not 093 * @param path path of the cookie 094 * @param domain domain of the cookie 095 * @param httpOnly if true, sets cookie as httponly so that it cannot be accessed using JavaScripts. Note that the browser must have httponly compatibility. 096 * @param preserveCase if true, keep the case of the name as it is 097 * @param encode if true, url encode the name and the value 098 */ 099 public abstract void setCookieEL(Collection.Key name, Object value, int expires, boolean secure, String path, String domain, 100 boolean httpOnly, boolean preserveCase, boolean encode); 101 102 103 104 105 }