org.wso2.carbon.rule.ws.admin
Interface RuleServiceAdminHandler

All Known Implementing Classes:
AbstractRuleServiceAdminHandler, RuleServiceArchiveAdminHandler, RuleServiceFileAdminHandler

public interface RuleServiceAdminHandler

Handler for executing rule service management operations for rule services based on various types of rule service artifacts


Method Summary
 void deleteFactArchive(org.apache.axis2.engine.AxisConfiguration axisConfiguration, String serviceName, String fileName)
          Delete fact archives that are not needed
 void deleteRuleFile(org.apache.axis2.engine.AxisConfiguration axisConfiguration, String serviceName, String fileName)
          Delete the rule script in a rule service
 void deleteTempRuleServiceDirectory(String serviceName)
          Delete the rule temp Directory in a rule service
 String[] getAllFacts(org.apache.axis2.engine.AxisConfiguration axisConfiguration, String serviceName)
          Retrieves the all facts applicable for a rule service
 String[] getFactArchiveList(org.apache.axis2.engine.AxisConfiguration axisConfiguration, String serviceName)
          Retrieves the all facts applicable for a rule service
 String[] getRuleFileList(org.apache.axis2.engine.AxisConfiguration axisConfiguration, String serviceName, String fileName)
          Uploads the rule script for a rule service
 org.apache.axiom.om.OMElement getRuleService(org.apache.axis2.engine.AxisConfiguration axisConfiguration, String serviceName)
          Retrieves an XML representation of the rule service
 void saveRuleService(org.apache.axis2.engine.AxisConfiguration axisConfiguration, org.apache.axis2.description.AxisService axisService, org.wso2.carbon.rule.common.RuleService ruleService)
          Add a new rule service or update an existing one
 String[] uploadFacts(org.apache.axis2.engine.AxisConfiguration axisConfiguration, String serviceName, String fileName, DataHandler dataHandler)
          Uploads the facts to be used in the rule service
 void uploadRuleFile(org.apache.axis2.engine.AxisConfiguration axisConfiguration, String serviceName, String fileName, DataHandler dataHandler)
          Uploads the rule script for a rule service
 

Method Detail

saveRuleService

void saveRuleService(org.apache.axis2.engine.AxisConfiguration axisConfiguration,
                     org.apache.axis2.description.AxisService axisService,
                     org.wso2.carbon.rule.common.RuleService ruleService)
                     throws RuleServiceAdminException
Add a new rule service or update an existing one

Parameters:
axisConfiguration - Axis2 Environment configuration
axisService - AxisService instance
ruleService - information about the rule service
Throws:
RuleServiceAdminException

getRuleService

org.apache.axiom.om.OMElement getRuleService(org.apache.axis2.engine.AxisConfiguration axisConfiguration,
                                             String serviceName)
                                             throws RuleServiceAdminException
Retrieves an XML representation of the rule service

Parameters:
axisConfiguration - Axis2 Environment configuration
serviceName - The name of the service to be retrieved
Returns:
an XML representation of the rule service
Throws:
RuleServiceAdminException

uploadFacts

String[] uploadFacts(org.apache.axis2.engine.AxisConfiguration axisConfiguration,
                     String serviceName,
                     String fileName,
                     DataHandler dataHandler)
                     throws RuleServiceAdminException
Uploads the facts to be used in the rule service

Parameters:
axisConfiguration - Axis2 Environment configuration
serviceName - The name of the service that facts are belonged
fileName - fact file name
dataHandler - Binary representation of the facts
Returns:
A list of uploaded facts
Throws:
RuleServiceAdminException

uploadRuleFile

void uploadRuleFile(org.apache.axis2.engine.AxisConfiguration axisConfiguration,
                    String serviceName,
                    String fileName,
                    DataHandler dataHandler)
                    throws RuleServiceAdminException
Uploads the rule script for a rule service

Parameters:
axisConfiguration - Axis2 Environment configuration
serviceName - the name of the rule service
fileName - the rule script file name
dataHandler - Binary representation of the rule script
Throws:
RuleServiceAdminException

getAllFacts

String[] getAllFacts(org.apache.axis2.engine.AxisConfiguration axisConfiguration,
                     String serviceName)
                     throws RuleServiceAdminException
Retrieves the all facts applicable for a rule service

Parameters:
axisConfiguration - Axis2 Environment configuration
serviceName - the name of the rule service
Returns:
A list of the facts
Throws:
RuleServiceAdminException

getFactArchiveList

String[] getFactArchiveList(org.apache.axis2.engine.AxisConfiguration axisConfiguration,
                            String serviceName)
                            throws RuleServiceAdminException
Retrieves the all facts applicable for a rule service

Parameters:
axisConfiguration - Axis2 Environment configuration
serviceName - the name of the rule service
Returns:
A list of the fact archive list
Throws:
RuleServiceAdminException

deleteFactArchive

void deleteFactArchive(org.apache.axis2.engine.AxisConfiguration axisConfiguration,
                       String serviceName,
                       String fileName)
                       throws RuleServiceAdminException
Delete fact archives that are not needed

Parameters:
axisConfiguration - Axis2 Environment configuration
serviceName - The name of the service that facts are belonged
fileName - fact file name
Throws:
RuleServiceAdminException

getRuleFileList

String[] getRuleFileList(org.apache.axis2.engine.AxisConfiguration axisConfiguration,
                         String serviceName,
                         String fileName)
                         throws RuleServiceAdminException
Uploads the rule script for a rule service

Parameters:
axisConfiguration - Axis2 Environment configuration
serviceName - the name of the rule service
fileName - the rule script file name
Throws:
RuleServiceAdminException

deleteRuleFile

void deleteRuleFile(org.apache.axis2.engine.AxisConfiguration axisConfiguration,
                    String serviceName,
                    String fileName)
                    throws RuleServiceAdminException
Delete the rule script in a rule service

Parameters:
axisConfiguration - Axis2 Environment configuration
serviceName - the name of the rule service
fileName - the rule script file name
Throws:
RuleServiceAdminException

deleteTempRuleServiceDirectory

void deleteTempRuleServiceDirectory(String serviceName)
                                    throws RuleServiceAdminException
Delete the rule temp Directory in a rule service

Parameters:
serviceName - the name of the rule service
Throws:
RuleServiceAdminException


Copyright © 2015 WSO2. All rights reserved.