com.ibm.portal.outbound.config
Interface CookieRule
- All Superinterfaces:
- Administrable
- All Known Subinterfaces:
- ModifiableCookieRule
-
public interface CookieRule
- extends Administrable
The model object for cookie rules.
Cookie rules are defined for all cookies that should be explicitly handled.
The cookieNames array define a set of names (or name wildcards) for which this cookie rule applies.
The following cookie rule handling types are defined:
- Block
- Do not pass the cookie to the outbound connection.
- Passthru
- Pass the cookie to the outbound connection
- Wrap
- Wrap cookies that are set in the response header of the remote connection
- StorePersist
- Store remote cookies in the persistent cookie store.
- StoreSession
- Store remote cookies in a session-scoped cookie store.
- StoreRequest
- Store remote cookies in a request-scoped cookie store.
Note that the cookie expiration of stored cookies is influenced by two factors: The type of cookie store
(request stored cookies are deleted as soon as the request expired. session stored cookies
are deleted when the session expires) and the expiration value that is set by the server.
The cookie scope defines the owner of the cookie. A cookie can belong to either the
- Application
- In this case, all users of the same application share the same cookie
- User
- Cookies that apply to this cookie rule are valid for the user when the cookie was created
- System
- Cookies that apply to this cookie rule are shared among all users and applications
Cookies that have a handling type Wrap define the transformation rules for wrapping in the
transformations setting.
CookieRules are owned by a PolicyRule. The following code example shows how a cookie rule can be accessed:
OutboundConnectionModel model;
PolicyRule thePolicyRule;
˙˙˙
ListModelcookies = model.getCookieRuleLocator(thePolicyRule).listAll();
for (CookieRule aCookieRule : cookies) {
System.out.println("This is a cookie rule: "+aCookieRule);
}
- Since:
- 8.5.0
- See Also:
- OutboundConnectionModel,
CookieRuleLocator,
PolicyRule
getCookieNames
java.lang.String[] getCookieNames()
- Return the cookie name (patterns) that this cookie rule should apply to.
- Returns:
- an array of cookie name for which this rule applies. Never null
getScope
CookieRule.Scope getScope()
- Return the cookie scope
- Returns:
- CookieScope the scope reference.
getHandling
CookieRule.Handling getHandling()
- Return the storage type for this cookie.
- Returns:
- Handling the storage type. Never null.
getTransformations
java.util.Collection<CookieTransformationItem> getTransformations()
- return the list of transformations that are defined for this cookie rule
- Returns:
- Collection the associated transformations. Returns an empty list if no transformations are defined.