Class PublisherProcessor

  • All Implemented Interfaces:
    IXcertPublisherProcessor

    public class PublisherProcessor
    extends java.lang.Object
    implements IXcertPublisherProcessor
    Controls the publishing process from the top level. Maintains a collection of Publishers , Mappers, and Publish Rules.
    • Constructor Detail

      • PublisherProcessor

        public PublisherProcessor​(java.lang.String id)
    • Method Detail

      • getId

        public java.lang.String getId()
      • setId

        public void setId​(java.lang.String id)
      • getLdapConnModule

        public ILdapConnModule getLdapConnModule()
        Returns LdapConnModule belonging to this Processor.
        Returns:
        LdapConnModule.
      • setLdapConnModule

        public void setLdapConnModule​(ILdapConnModule m)
        Sets the LdapConnModule belonging to this Processor.
        Parameters:
        m - ILdapConnModule.
      • shutdown

        public void shutdown()
      • getRulePlugins

        public java.util.Hashtable<java.lang.String,​RulePlugin> getRulePlugins()
        Returns Hashtable of rule plugins.
      • getRuleInsts

        public java.util.Hashtable<java.lang.String,​ILdapRule> getRuleInsts()
        Returns Hashtable of rule instances.
      • getMapperPlugins

        public java.util.Hashtable<java.lang.String,​MapperPlugin> getMapperPlugins()
        Returns Hashtable of mapper plugins.
      • getPublisherPlugins

        public java.util.Hashtable<java.lang.String,​PublisherPlugin> getPublisherPlugins()
        Returns Hashtable of publisher plugins.
      • getMapperInsts

        public java.util.Hashtable<java.lang.String,​MapperProxy> getMapperInsts()
        Returns Hashtable of rule mapper instances.
      • getPublisherInsts

        public java.util.Hashtable<java.lang.String,​PublisherProxy> getPublisherInsts()
        Returns Hashtable of rule publisher instances.
      • getRules

        public java.util.Enumeration<ILdapRule> getRules​(java.lang.String publishingType)
        Returns list of rules based on publishing type. certType can be client,server,ca,crl,smime
        Parameters:
        publishingType - Type for which to retrieve rule list.
      • getRules

        public java.util.Enumeration<ILdapRule> getRules​(java.lang.String publishingType,
                                                         IRequest req)
        Returns list of rules based on publishing type and publishing request.
        Parameters:
        publishingType - Type for which to retrieve rule list.
        req - Corresponding publish request.
      • getMapperDefaultParams

        public java.util.Vector<java.lang.String> getMapperDefaultParams​(java.lang.String implName)
                                                                  throws ELdapException
        Returns mapper initial default parameters.
        Parameters:
        implName - name of MapperPlugin.
        Throws:
        ELdapException
      • getMapperInstanceParams

        public java.util.Vector<java.lang.String> getMapperInstanceParams​(java.lang.String insName)
                                                                   throws ELdapException
        Returns mapper current instance parameters.
        Parameters:
        insName - name of MapperProxy.
        Throws:
        ELdapException - failed due to Ldap error.
      • getPublisherDefaultParams

        public java.util.Vector<java.lang.String> getPublisherDefaultParams​(java.lang.String implName)
                                                                     throws ELdapException
        Returns publisher initial default parameters.
        Parameters:
        implName - name of PublisherPlugin.
        Throws:
        ELdapException - failed due to Ldap error.
      • isMapperInstanceEnable

        public boolean isMapperInstanceEnable​(java.lang.String insName)
        Returns true if MapperInstance is enabled.
        Parameters:
        insName - name of MapperProxy.
        Returns:
        true if enabled. false if disabled.
      • getActiveMapperInstance

        public ILdapMapper getActiveMapperInstance​(java.lang.String insName)
        Returns ILdapMapper instance that is currently active.
        Parameters:
        insName - name of MapperProxy.
        Returns:
        instance of ILdapMapper.
      • getMapperInstance

        public ILdapMapper getMapperInstance​(java.lang.String insName)
        Returns ILdapMapper instance based on name of MapperProxy.
        Parameters:
        insName - name of MapperProxy.
        Returns:
        instance of ILdapMapper.
      • isPublisherInstanceEnable

        public boolean isPublisherInstanceEnable​(java.lang.String insName)
        Returns true publisher instance is currently enabled.
        Parameters:
        insName - name of PublisherProxy.
        Returns:
        true if enabled.
      • getActivePublisherInstance

        public ILdapPublisher getActivePublisherInstance​(java.lang.String insName)
        Returns ILdapPublisher instance that is currently active.
        Parameters:
        insName - name of PublisherProxy.
        Returns:
        instance of ILdapPublisher.
      • getPublisherInstance

        public ILdapPublisher getPublisherInstance​(java.lang.String insName)
        Returns ILdapPublisher instance.
        Parameters:
        insName - name of PublisherProxy.
        Returns:
        instance of ILdapPublisher.
      • getPublisherInstanceParams

        public java.util.Vector<java.lang.String> getPublisherInstanceParams​(java.lang.String insName)
                                                                      throws ELdapException
        Returns Vector of PublisherIntance's current instance parameters.
        Parameters:
        insName - name of PublisherProxy.
        Returns:
        Vector of current instance parameters.
        Throws:
        ELdapException
      • getRuleDefaultParams

        public java.util.Vector<java.lang.String> getRuleDefaultParams​(java.lang.String implName)
                                                                throws ELdapException
        Returns Vector of RulePlugin's initial default parameters.
        Parameters:
        implName - name of RulePlugin.
        Returns:
        Vector of initial default parameters.
        Throws:
        ELdapException - failed due to Ldap error.
      • getRuleInstanceParams

        public java.util.Vector<java.lang.String> getRuleInstanceParams​(java.lang.String implName)
                                                                 throws ELdapException
        Returns Vector of RulePlugin's current instance parameters.
        Parameters:
        implName - name of RulePlugin.
        Returns:
        Vector of current instance parameters.
        Throws:
        ELdapException - failed due to Ldap error.
      • setPublishedFlag

        public void setPublishedFlag​(java.math.BigInteger serialNo,
                                     boolean published)
        Set published flag - true when published, false when unpublished. Not exist means not published.
        Parameters:
        serialNo - serial number of publishable object.
        published - true for published, false for not.
      • publishCACert

        public void publishCACert​(java.security.cert.X509Certificate cert)
                           throws ELdapException
        Publish ca cert, UpdateDir.java, jobs, request listeners
        Parameters:
        cert - X509 certificate to be published.
        Throws:
        ELdapException - publish failed due to Ldap error.
        ELdapException
      • unpublishCACert

        public void unpublishCACert​(java.security.cert.X509Certificate cert)
                             throws ELdapException
        This function is never called. CMS does not unpublish CA certificate.
        Throws:
        ELdapException
      • publishCert

        public void publishCert​(java.security.cert.X509Certificate cert,
                                IRequest req)
                         throws ELdapException
        Publishs regular user certificate based on the criteria set in the request.
        Parameters:
        cert - X509 certificate to be published.
        req - request which provides the criteria
        Throws:
        ELdapException - publish failed due to Ldap error.
        ELdapException
      • unpublishCert

        public void unpublishCert​(java.security.cert.X509Certificate cert,
                                  IRequest req)
                           throws ELdapException
        Unpublish user certificate. This is used by UnpublishExpiredJob.
        Parameters:
        cert - X509 certificate to be unpublished.
        req - request which provides the criteria
        Throws:
        ELdapException - unpublish failed due to Ldap error.
        ELdapException
      • publishCRL

        public void publishCRL​(org.mozilla.jss.netscape.security.x509.X509CRLImpl crl,
                               java.lang.String crlIssuingPointId)
                        throws ELdapException
        publishes a crl by mapping the issuer name in the crl to an entry and publishing it there. entry must be a certificate authority. Note that this is used by cmsgateway/cert/UpdateDir.java
        Parameters:
        crl - Certificate Revocation List
        crlIssuingPointId - name of the issuing point.
        Throws:
        ELdapException - publish failed due to Ldap error.
        ELdapException
      • publishCRL

        public void publishCRL​(java.lang.String dn,
                               java.security.cert.X509CRL crl)
                        throws ELdapException
        publishes a crl by mapping the issuer name in the crl to an entry and publishing it there. entry must be a certificate authority.
        Parameters:
        dn - Distinguished name to publish.
        crl - Certificate Revocation List
        Throws:
        ELdapException - publish failed due to Ldap error.
        ELdapException
      • ldapEnabled

        public boolean ldapEnabled()
        Return true if Ldap is enabled.
        Returns:
        true if Ldap is enabled,otherwise false.
      • isCertPublishingEnabled

        public boolean isCertPublishingEnabled()
        Return true if Certificate Publishing is enabled.
        Returns:
        true if enabled, false otherwise
      • isCRLPublishingEnabled

        public boolean isCRLPublishingEnabled()
        Return true if CRL publishing is enabled,
        Returns:
        true if enabled, false otherwise.
      • getAuthority

        public ISubsystem getAuthority()
        Return Authority for which this Processor operates.
        Returns:
        Authority.
      • isClone

        public boolean isClone()