"WEBNMS_5 API Docs"

com.adventnet.nms.provisioning.server
Interface PreProvisioningFilter


public interface PreProvisioningFilter

The PreProvisioningFilter is an interface implemented for processing the provisioning operation data prior to executing the operation. This allows special rules to be applied to provisioning operations on specific templates. The configured filters are applied after the populated template has been received from the client and just before configuration is applied to the network elements. These filters will be executed for each Stage element.

The filter implementation must have a no-argument constructor. A single instance of this filter will be used for every execution of template to which it is associated, so it is the responsibility of the filter to ensure it is thread safe.The implementation of this interface must be specified in the <Provisioning Home>/conf/ProvisioningFilters.xml file under PreProvisioningFilters tag as follows:
<PreProvisioningFilter>
    template=template-name to which this filter is applied
    class=full class path of the implementation
<PreProvisioningFilter/> in order to filter the specified template before executing it.
Format of PreProvisioningFilter is available in ProvisioningFilters.dtd under <Provisioning Home>/conf directory.

For example, implement this class to check specific conditions, or verify whether the operation should be permitted. The OperationFailedException should be thrown to stop the operation from proceeding.

Special cases of this kind of filter will read rules from XML configuration files or the database, to make it easier to add and change rules dynamically.
A template can have any number of PreProvisioningFilters and each will be invoked one by one in the order it is specified in the <Provisioning Home>/conf/ProvisioningFilters.xml file.

Since:
2.3
See Also:
Template

Method Summary
 Template preProvision(Template template)
          Process the template to be executed.
 

Method Detail

preProvision

Template preProvision(Template template)
                      throws OperationFailedException
Process the template to be executed. Template to be executed is passed to this method and it will return the filtered template.

Parameters:
template - template to be executed.
Returns:
filtered template.
Throws:
OperationFailedException - if an error occurs

"WEBNMS_5 API Docs"

Copyright © 2011 ZOHO Corp., All Rights Reserved.