public abstract class APolicyRule extends java.lang.Object implements IPolicyRule
NOTE: The Policy Framework has been replaced by the Profile Framework.
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
DESC
Deprecated.
|
protected IExpression |
mFilterExp
Deprecated.
|
protected java.lang.String |
mInstanceName
Deprecated.
|
protected ILogger |
mLogger
Deprecated.
|
protected java.lang.String |
NAME
Deprecated.
|
PROP_ENABLE, PROP_IMPLNAME, PROP_PREDICATE| Constructor and Description |
|---|
APolicyRule()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
agentApproved(IRequest req)
Deprecated.
request has previously been approved by an agent
|
abstract PolicyResult |
apply(IRequest req)
Deprecated.
Applies the policy on the given Request.
|
static netscape.security.x509.KeyIdentifier |
createKeyIdentifier(netscape.security.x509.X509Key key)
Deprecated.
|
protected PolicyResult |
deferred(IRequest req)
Deprecated.
determines whether a DEFERRED policy result should be returned
by checking the contents of the AgentApprovals attribute.
|
protected netscape.security.x509.KeyIdentifier |
formSHA1KeyId(netscape.security.x509.X509CertInfo certInfo)
Deprecated.
Form a byte array of octet string key identifier from the sha-1 hash of
the Subject Public Key BIT STRING.
|
protected netscape.security.x509.KeyIdentifier |
formSpkiSHA1KeyId(netscape.security.x509.X509CertInfo certInfo)
Deprecated.
Form a byte array of octet string key identifier from the sha-1 hash of
the Subject Public Key INFO.
|
abstract java.util.Vector<java.lang.String> |
getDefaultParams()
Deprecated.
Return default parameters for a policy implementation.
|
java.lang.String |
getDescription()
Deprecated.
Gets the description for this policy rule.
|
java.lang.String |
getInstanceName()
Deprecated.
Returns the name of the policy rule instance.
|
abstract java.util.Vector<java.lang.String> |
getInstanceParams()
Deprecated.
Return configured parameters for a policy rule instance.
|
java.lang.String |
getName()
Deprecated.
Returns the name of the policy rule.
|
IExpression |
getPredicate()
Deprecated.
Returns the predicate expression for the rule.
|
abstract void |
init(ISubsystem owner,
IConfigStore config)
Deprecated.
Initializes the policy rule.
|
protected void |
log(int level,
java.lang.String msg)
Deprecated.
log a message for this policy rule.
|
void |
setError(IRequest req,
java.lang.String format,
java.lang.Object[] params)
Deprecated.
|
void |
setError(IRequest req,
java.lang.String format,
java.lang.String arg)
Deprecated.
|
void |
setError(IRequest req,
java.lang.String format,
java.lang.String arg1,
java.lang.String arg2)
Deprecated.
|
void |
setInstanceName(java.lang.String instanceName)
Deprecated.
Sets the instance name for a policy rule.
|
void |
setPolicyException(IRequest req,
EBaseException ex)
Deprecated.
|
void |
setPolicyException(IRequest req,
java.lang.String format,
java.lang.Object[] params)
Deprecated.
|
void |
setPredicate(IExpression exp)
Deprecated.
Sets a predicate expression for rule matching.
|
protected java.lang.String NAME
protected java.lang.String DESC
protected IExpression mFilterExp
protected java.lang.String mInstanceName
protected ILogger mLogger
public abstract void init(ISubsystem owner, IConfigStore config) throws EBaseException
init in interface IPolicyRuleconfig - The config store referenceEBaseExceptionpublic java.lang.String getDescription()
getDescription in interface IPolicyRulepublic void setPredicate(IExpression exp)
setPredicate in interface IPolicyRuleexp - The predicate expression for the rule.public IExpression getPredicate()
getPredicate in interface IPolicyRulepublic java.lang.String getName()
getName in interface IPolicyRulepublic void setInstanceName(java.lang.String instanceName)
setInstanceName in interface IPolicyRuleinstanceName - The name of the rule instance.public java.lang.String getInstanceName()
getInstanceName in interface IPolicyRulepublic abstract PolicyResult apply(IRequest req)
apply in interface IPolicyRuleapply in interface IPolicyreq - The request on which to apply policy.public abstract java.util.Vector<java.lang.String> getInstanceParams()
getInstanceParams in interface IPolicyRulepublic abstract java.util.Vector<java.lang.String> getDefaultParams()
getDefaultParams in interface IPolicyRulepublic void setError(IRequest req, java.lang.String format, java.lang.Object[] params)
setError in interface IPolicyRulepublic void setError(IRequest req, java.lang.String format, java.lang.String arg1, java.lang.String arg2)
public void setError(IRequest req, java.lang.String format, java.lang.String arg)
public void setPolicyException(IRequest req, EBaseException ex)
setPolicyException in interface IPolicyRuleprotected PolicyResult deferred(IRequest req)
protected boolean agentApproved(IRequest req)
public void setPolicyException(IRequest req, java.lang.String format, java.lang.Object[] params)
protected void log(int level,
java.lang.String msg)
public static netscape.security.x509.KeyIdentifier createKeyIdentifier(netscape.security.x509.X509Key key)
throws java.security.NoSuchAlgorithmException,
java.security.InvalidKeyException
java.security.NoSuchAlgorithmExceptionjava.security.InvalidKeyExceptionprotected netscape.security.x509.KeyIdentifier formSpkiSHA1KeyId(netscape.security.x509.X509CertInfo certInfo)
throws EBaseException
certInfo - cert info of the certificate.EBaseExceptionprotected netscape.security.x509.KeyIdentifier formSHA1KeyId(netscape.security.x509.X509CertInfo certInfo)
throws EBaseException
certInfo - cert info of the certificate.EBaseException