SiteMinder
Java SDK r12.51


com.netegrity.sdk.policyapi
Class SmPolicy

java.lang.Object
  extended by com.netegrity.sdk.policyapi.SmObjectImpl
      extended by com.netegrity.sdk.policyapi.SmDomainObjectImpl
          extended by com.netegrity.sdk.policyapi.SmPolicy
All Implemented Interfaces:
SmDomainObject, SmObject, java.lang.Cloneable

public class SmPolicy
extends SmDomainObjectImpl

Represents a SiteMinder Policy object.

This object has domain scope.

Since:
SDK 2.0

Field Summary
static java.lang.String PropActiveExpr
          Constant to indicate the property Active Expression.
static java.lang.String PropEnable
          Constant to indicate the property Enable.
static java.lang.String PropIPAddress
          Constant to indicate the property Internet Address.
static java.lang.String PropPolicyLinks
          Constant to indicate the property Policy Link.
static java.lang.String PropTime
          Constant to indicate the property Time.
static java.lang.String PropUserPolicies
          Constant to indicate the property User Policy.
static java.lang.String PropVariableExpr
          Constant to indicate the property Variable Expression.
 
Fields inherited from class com.netegrity.sdk.policyapi.SmObjectImpl
PropObjectClassName
 
Fields inherited from interface com.netegrity.sdk.policyapi.SmDomainObject
PropDomain
 
Fields inherited from interface com.netegrity.sdk.policyapi.SmObject
ConfigurationClassName, PropDesc, PropName, PropOid
 
Constructor Summary
SmPolicy()
          Constructs a Policy object.
SmPolicy(java.lang.String name)
          Constructs a Policy object with the specified name.
 
Method Summary
 java.lang.String getActiveExpression()
          Gets the active expression associated with the policy.
 boolean getEnabled()
          Checks whether the policy is enabled.
 java.util.Vector getIPRestriction()
          Gets the Internet address restriction on the policy.
 SmTime getTime()
          Gets any time restriction on the policy.
 java.lang.String getVariableExpr()
          Gets the variable expression associated with the policy.
 void readProperties(java.util.Hashtable properties)
          Copies the object properties from the specified hashtable.
 void setActiveExpression(java.lang.String szActiveExpr)
          Sets the active expression for the policy.
 void setEnabled(boolean enable)
          Enables the policy.
 void setIPRestriction(java.util.Vector ipRestriction)
          Sets the Internet address restriction on the policy.
 void setTime(SmTime timeRestriction)
          Sets a time restriction on the policy.
 void setVariableExpr(java.lang.String szVariableExpr)
          Creating Variable Expression in a Policy is not supported as of now.
 void writeProperties(java.util.Hashtable properties)
          Copies the object properties to the specified hashtable.
 
Methods inherited from class com.netegrity.sdk.policyapi.SmDomainObjectImpl
getDomain, getDomainName, isDomainObject, isWriteable, setDomain, setDomainName
 
Methods inherited from class com.netegrity.sdk.policyapi.SmObjectImpl
getDescription, getName, getObjectClassname, getOid, newObject, setDescription, setName, setObjectClassname, setOid, setOid, toString, writeSearchProperties
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.netegrity.sdk.policyapi.SmObject
getDescription, getName, getObjectClassname, getOid, setDescription, setName, setObjectClassname, setOid, setOid, toString, writeSearchProperties
 

Field Detail

PropActiveExpr

public static final java.lang.String PropActiveExpr
Constant to indicate the property Active Expression.

See Also:
Constant Field Values

PropTime

public static final java.lang.String PropTime
Constant to indicate the property Time.

See Also:
Constant Field Values

PropPolicyLinks

public static final java.lang.String PropPolicyLinks
Constant to indicate the property Policy Link.

See Also:
Constant Field Values

PropUserPolicies

public static final java.lang.String PropUserPolicies
Constant to indicate the property User Policy.

See Also:
Constant Field Values

PropEnable

public static final java.lang.String PropEnable
Constant to indicate the property Enable.

See Also:
Constant Field Values

PropIPAddress

public static final java.lang.String PropIPAddress
Constant to indicate the property Internet Address.

See Also:
Constant Field Values

PropVariableExpr

public static final java.lang.String PropVariableExpr
Constant to indicate the property Variable Expression.

See Also:
Constant Field Values
Constructor Detail

SmPolicy

public SmPolicy()
Constructs a Policy object. Name and description are not set.


SmPolicy

public SmPolicy(java.lang.String name)
Constructs a Policy object with the specified name.

Parameters:
name - Name of the Policy.
Method Detail

getActiveExpression

public java.lang.String getActiveExpression()
Gets the active expression associated with the policy. For information about active expression format, see setActiveExpression().


setActiveExpression

public void setActiveExpression(java.lang.String szActiveExpr)
Sets the active expression for the policy.

The expression is a string of variable definitions in the following format.:
Note: The non-alphanumeric characters are required characters.

<@lib="LibName" func="FuncName" param="FuncParam"@>

In the format example:

setIPRestriction

public void setIPRestriction(java.util.Vector ipRestriction)
Sets the Internet address restriction on the policy.

Parameters:
ipRestriction - List of SmIPAddress restrictions.

getIPRestriction

public java.util.Vector getIPRestriction()
                                  throws SmApiException
Gets the Internet address restriction on the policy.

Returns:
List of SmIPAddress restrictions.
Throws:
SmApiException

setTime

public void setTime(SmTime timeRestriction)
Sets a time restriction on the policy.

Parameters:
timeRestriction - The time restriction.

getTime

public SmTime getTime()
Gets any time restriction on the policy.

Returns:
time restriction on the Policy.

getEnabled

public boolean getEnabled()
Checks whether the policy is enabled.

Returns:
true if the policy is enabled. false otherwise.

setEnabled

public void setEnabled(boolean enable)
Enables the policy.

Parameters:
enable - If true the policy is enabled. false otherwise.

getVariableExpr

public java.lang.String getVariableExpr()
Gets the variable expression associated with the policy. For information about variable expression format, see setVariableExpression().


setVariableExpr

public void setVariableExpr(java.lang.String szVariableExpr)
Creating Variable Expression in a Policy is not supported as of now. This support will be provided once Java PM API has ability for creating variables.
Using this function as of now will cause policy-server to return an error.

Parameters:
szVariableExpr - String representing variable expression.

writeProperties

public void writeProperties(java.util.Hashtable properties)
Description copied from interface: SmObject
Copies the object properties to the specified hashtable.

Specified by:
writeProperties in interface SmObject
Overrides:
writeProperties in class SmDomainObjectImpl
Parameters:
properties - The hashtable where the object properties will be copied.

readProperties

public void readProperties(java.util.Hashtable properties)
Description copied from interface: SmObject
Copies the object properties from the specified hashtable.

Specified by:
readProperties in interface SmObject
Overrides:
readProperties in class SmDomainObjectImpl
Parameters:
properties - The new properties of the object.

SiteMinder
Java SDK r12.51

Mon 04/08/2013

http://ca.com
Copyright (c) 2013 CA.