com.ibm.portal.outbound.config
Interface ModifiableCookieRule

All Superinterfaces:
Administrable, CookieRule, Modifiable, ModifiableNode

public interface ModifiableCookieRule
extends CookieRule, ModifiableNode


Objects of this interface are produced by the method ModelController#getModifiableNode() or . It contains functions to modify settings of a cookie rules. Note that the settings are immediately effective in the model, but they are not stored in the database unless commit() has been applied on the OutboundConnectionModelController object.

The following code excerpt changes cookie rules settings:

OutboundConnectionModelController ctrl;
OutboundConnectionModel model;
PolicyMapping mapping;
˙˙˙

PolicyMapping mapping = model.getPolicyRuleLocator(profile).getDefaultMapping();
PolicyRule rule = model.getPolicyRuleLocator(mapping).findByName("rule2");
ModifiableCookieRule mrule = ctrl.getModifiableNode(rule);

mrule.setCookieNames(new String [] {"NewCookieName"} );
mcookie.setHandling(Handling.StoreSession);
mcookie.setScope(Scope.User);

ctrl.commit();

Since:
8.5.0
See Also:
OutboundConnectionModel, OutboundConnectionModelController, CookieRule

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.ibm.portal.outbound.config.CookieRule
CookieRule.Handling, CookieRule.Scope
 
Method Summary
 void setCookieNames(java.lang.String[] names)
          Define a new set of cookie names to which this cookie rule applies
 void setHandling(CookieRule.Handling handling)
          set a new cookie handling type.
 void setScope(CookieRule.Scope scope)
          Define a new cookie scope.
 void setTransformations(java.util.Collection<CookieTransformationItem> transformations)
          Override the cookie transformation rules
 
Methods inherited from interface com.ibm.portal.outbound.config.CookieRule
getCookieNames, getHandling, getScope, getTransformations
 
Methods inherited from interface com.ibm.portal.outbound.config.Administrable
getName, isReadOnly
 
Methods inherited from interface com.ibm.portal.outbound.config.ModifiableNode
setName
 

Method Detail

setCookieNames

void setCookieNames(java.lang.String[] names)
                    throws CannotModifyPropertyException
Define a new set of cookie names to which this cookie rule applies

Parameters:
names - a new set of cookie names. The cookie names can contain wildcards. Note that the array must not be null or empty.
Throws:
CannotModifyPropertyException - Invalid cookie names array specified

setScope

void setScope(CookieRule.Scope scope)
              throws CannotModifyPropertyException
Define a new cookie scope.

Parameters:
scope - The new cookie scope
Throws:
CannotModifyPropertyException

setHandling

void setHandling(CookieRule.Handling handling)
                 throws CannotModifyPropertyException
set a new cookie handling type.

Parameters:
handling - The new handling type.
Throws:
CannotModifyPropertyException

setTransformations

void setTransformations(java.util.Collection<CookieTransformationItem> transformations)
                        throws CannotModifyPropertyException
Override the cookie transformation rules

Parameters:
transformations - A new list of transformation rules. Note that existing rules are overridden by this value. null or an empty collection means to remove transformations
Throws:
CannotModifyPropertyException - An invalid transformations list has been presented.