|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ModifiablePolicyRule
The interface is provided by OutboundConnectionModelController#getModifiableNode()
.
It contains functions to modify outbound connection policy 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 policy rules settings:
OutboundConnectionModelController ctrl;
OutboundConnectionModel model;
PolicyMapping mapping;
˙˙˙
PolicyMapping mapping = model.getPolicyRuleLocator(profile).getDefaultMapping();
PolicyRule rule = model.getPolicyRuleLocator(mapping).findByName("rule2");
ModifiablePolicyRule mrule = ctrl.getModifiableNode(rule);
mrules.setAllowedMethods (new String[] {"GET","POST"} );
mrules.setBasicAuth(false);
mrules.setUrlPattern("http://the.new.server/myserver");
ctrl.commit();
OutboundConnectionModel
,
OutboundConnectionModelController
,
PolicyRule
Method Summary | |
---|---|
void |
setActive(boolean active)
Set the policy rule active or inactive |
void |
setAllowedMethods(java.lang.String[] allowedMethods)
Override the set of allowed methods. |
void |
setBasicAuth(boolean isBasicAuth)
set the basicauth flag |
void |
setFilterChain(java.util.Collection<CustomFilterItem> filterChain)
Override the custom filter chain setting. |
void |
setHeaders(java.lang.String[] headers)
Override the set of custom headers. |
void |
setMetaData(java.util.Map<java.lang.String,java.lang.String> metaData)
Replace the metadata settings with the given map. |
void |
setMimeTypes(java.lang.String[] mimeTypes)
Override the set of supported mime types. |
void |
setUrlPattern(java.lang.String urlPattern)
Set a new URL pattern |
Methods inherited from interface com.ibm.portal.outbound.config.PolicyRule |
---|
getAllowedMethods, getFilterChain, getHeaders, getMetaData, getMimeTypes, getUrlPattern, hasAllowedMethods, hasFilterChain, hasHeaders, hasMimeType, isActive, isBasicAuth |
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 |
---|
void setUrlPattern(java.lang.String urlPattern) throws CannotModifyPropertyException
urlPattern
- The new URL pattern. Never null.
CannotModifyPropertyException
- Invalid URL pattern specified.void setAllowedMethods(java.lang.String[] allowedMethods) throws CannotModifyPropertyException
allowedMethods
- An array that contains the new set of allowed methods. May be null or empty. In that case, all
existing allowed methods will be removed
CannotModifyPropertyException
- Invalid array specifiedvoid setHeaders(java.lang.String[] headers) throws CannotModifyPropertyException
headers
- An array that contains the new set of headers. May be null or empty. In that case, all
existing custom header settings will be removed
CannotModifyPropertyException
- Invalid array specifiedvoid setMimeTypes(java.lang.String[] mimeTypes) throws CannotModifyPropertyException
mimeTypes
- An array that contains the new set of supported mime types. May be null or empty. In that case, all
existing mime type settings will be removed
CannotModifyPropertyException
- Invalid array specifiedvoid setFilterChain(java.util.Collection<CustomFilterItem> filterChain) throws CannotModifyPropertyException
filterChain
- The new custom filter chain. May be null or empty. In that case, the existing
custom filter chain will be removed
CannotModifyPropertyException
- Invalid collection specifiedvoid setMetaData(java.util.Map<java.lang.String,java.lang.String> metaData) throws CannotModifyPropertyException
metaData
- The new metadata. null or an empty map deletes the existing metadata.
CannotModifyPropertyException
void setBasicAuth(boolean isBasicAuth) throws CannotModifyPropertyException
isBasicAuth
- true if the policy rule assumes that this connection is basicauth protected, False if not
CannotModifyPropertyException
void setActive(boolean active) throws CannotModifyPropertyException
active
- set true to activate the policy rule, false to set the policy rule inactive.
CannotModifyPropertyException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |