Package com.netscape.certsrv.publish
Interface IPublishRuleSet
-
public interface IPublishRuleSetRepresents a set of publishing rules. Publishing rules are ordered from lowest priority to highest priority. The priority assignment for publishing rules is not enforced by this interface. Various implementation may use different mechanisms such as a linear ordering of publishing rules in a configuration file or explicit assignment of priority levels ..etc. The publishing rule initialization needs to deal with reading the publishing rules, sorting them in increasing order of priority and presenting an ordered vector of publishing rules via the IPublishRuleSet interface. When a request comes, the predicates of the publishing rules will be checked in the order to find the first matched publishing rule as the mapping rule to (un)publish the object.- Version:
- $Revision$, $Date$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddRule(java.lang.String aliasName, ILdapRule rule)Add a publishing ruleintcount()Returns the no of publishing rules in a set.java.lang.StringgetName()Returns the name of the publishing rule set.ILdapRulegetRule(IRequest req)Get the publishing rule identified by a corresponding request.ILdapRulegetRule(java.lang.String ruleName)Get the publishing rule identified by a given name.java.util.Enumeration<ILdapRule>getRules()Get an enumeration of publishing rules.voidinit(ISubsystem sys, IConfigStore conf)voidpublish(netscape.ldap.LDAPConnection conn, IRequest req)Apply publishing rules on a request.voidremoveRule(java.lang.String ruleName)Removes a publishing rule identified by the given name.
-
-
-
Method Detail
-
init
void init(ISubsystem sys, IConfigStore conf) throws EBaseException
- Throws:
EBaseException
-
getName
java.lang.String getName()
Returns the name of the publishing rule set.- Returns:
- The name of the publishing rule set.
-
count
int count()
Returns the no of publishing rules in a set.- Returns:
- the no of publishing rules.
-
addRule
void addRule(java.lang.String aliasName, ILdapRule rule)Add a publishing rule- Parameters:
aliasName- The name of the publishing rule to be added.rule- rule The publishing rule to be added.
-
removeRule
void removeRule(java.lang.String ruleName)
Removes a publishing rule identified by the given name.- Parameters:
ruleName- The name of the publishing rule to be removed.
-
getRule
ILdapRule getRule(java.lang.String ruleName)
Get the publishing rule identified by a given name.- Parameters:
ruleName- The name of the publishing rule to be return.- Returns:
- The publishing rule identified by the given name or null if none exists.
-
getRule
ILdapRule getRule(IRequest req)
Get the publishing rule identified by a corresponding request.- Parameters:
req- The request from which rule will be identified.- Returns:
- The publishing rule or null if none exists.
-
getRules
java.util.Enumeration<ILdapRule> getRules()
Get an enumeration of publishing rules.- Returns:
- An enumeration of publishing rules.
-
publish
void publish(netscape.ldap.LDAPConnection conn, IRequest req) throws ELdapExceptionApply publishing rules on a request. The predicates of the publishing rules will be checked in the order to find the first matched publishing rule. Use the mapper to find the dn of the LDAP entry and use the publisher to publish the object in the request.- Parameters:
conn- The Ldap connectionreq- The request to apply policies on.- Throws:
ELdapException- publish failed due to Ldap error.
-
-