com.ibm.portal.outbound.config
Interface PolicyVariable

All Superinterfaces:
Administrable
All Known Subinterfaces:
ModifiablePolicyVariable

public interface PolicyVariable
extends Administrable

Interface for a policy variable.
There are two types of variables:

Endpoint
Denotes a single-value variable that represents a remote server. For example, a Policy variable "my.search.engine" is defined which has an initial value of "http://www.myserver.com/search". Further, A PolicyRule is defined that has the URL pattern "{$my.search.engine}/?k=". The result is that the policy rule applies to URLs that start with "http://www.myserver.com/search/?k=" . If a different search site should be used, then the policy variable can be adapted, but the policy rule itself remains unchanged. The benefit of using policy variables is to separate URL patterns in parts that are subject to portal system administration, and in parts that should not be modified by a portal administrator.
DynamicPolicy
Denotes a dynamic policy. In contrast to Endpoint variables, a dynamic policy contains multiple values. This allows a System Administer to apply the same rule to multiple URL patterns.


Access example:

OutboundConnectionModel model;
OutboundConnectionProfile profile;
˙˙˙
PolicyVariable var = model.getPolicyVariableLocator(profile).findByName("my.search.engine");
System.out.println ("The variable value is " "+var.getEndpointValue());

Since:
8.5.0
See Also:
OutboundConnectionModel, OutboundConnectionProfile, PolicyMappingLocator

Nested Class Summary
static class PolicyVariable.VariableType
           
 
Method Summary
 java.util.Collection<java.lang.String> getDynamicPolicyValues()
          Return the values of the dynamic polivy variable.
 java.lang.String getEndpointValue()
          Return the endpoint value.
 java.lang.String getName()
          return the variable name.
 PolicyVariable.VariableType getType()
          return the variable type.
 
Methods inherited from interface com.ibm.portal.outbound.config.Administrable
isReadOnly
 

Method Detail

getName

java.lang.String getName()
return the variable name.

Specified by:
getName in interface Administrable
Returns:
String the variable name. Never null.

getType

PolicyVariable.VariableType getType()
return the variable type.

Returns:
VariableType the type of the variable.

getDynamicPolicyValues

java.util.Collection<java.lang.String> getDynamicPolicyValues()
Return the values of the dynamic polivy variable. This call is only applicable if the type of the PolicyVariable is VariableType.DynamicPolicy. Otherwise, this method returns an empty Collection.

Returns:
CollectionThe values of the variable, if this variable has the VariableType DynamicPolicy. Otherwise, the method returns an empty colelction.

getEndpointValue

java.lang.String getEndpointValue()
Return the endpoint value. This call is only applicable if the type of the PolicyVariable is VariableType.Endpoint.

Returns:
String the endpoint value. Returns null if the variable type is not VariableType.Endpoint