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 |
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 |
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 IPolicyRule
config
- The config store referenceEBaseException
public java.lang.String getDescription()
getDescription
in interface IPolicyRule
public void setPredicate(IExpression exp)
setPredicate
in interface IPolicyRule
exp
- The predicate expression for the rule.public IExpression getPredicate()
getPredicate
in interface IPolicyRule
public java.lang.String getName()
getName
in interface IPolicyRule
public void setInstanceName(java.lang.String instanceName)
setInstanceName
in interface IPolicyRule
instanceName
- The name of the rule instance.public java.lang.String getInstanceName()
getInstanceName
in interface IPolicyRule
public abstract PolicyResult apply(IRequest req)
apply
in interface IPolicyRule
apply
in interface IPolicy
req
- The request on which to apply policy.public abstract java.util.Vector getInstanceParams()
getInstanceParams
in interface IPolicyRule
public abstract java.util.Vector getDefaultParams()
getDefaultParams
in interface IPolicyRule
public void setError(IRequest req, java.lang.String format, java.lang.Object[] params)
setError
in interface IPolicyRule
public 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 IPolicyRule
protected 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.NoSuchAlgorithmException
java.security.InvalidKeyException
protected netscape.security.x509.KeyIdentifier formSpkiSHA1KeyId(netscape.security.x509.X509CertInfo certInfo) throws EBaseException
certInfo
- cert info of the certificate.EBaseException
protected netscape.security.x509.KeyIdentifier formSHA1KeyId(netscape.security.x509.X509CertInfo certInfo) throws EBaseException
certInfo
- cert info of the certificate.EBaseException