org.wso2.carbon.rule.ws.admin
Class RuleServiceArchiveAdminHandler

java.lang.Object
  extended by org.wso2.carbon.rule.ws.admin.AbstractRuleServiceAdminHandler
      extended by org.wso2.carbon.rule.ws.admin.RuleServiceArchiveAdminHandler
All Implemented Interfaces:
RuleServiceAdminHandler

public class RuleServiceArchiveAdminHandler
extends AbstractRuleServiceAdminHandler

Handler for executing rule service management operations for rule services based on the rule service archive files


Field Summary
 
Fields inherited from class org.wso2.carbon.rule.ws.admin.AbstractRuleServiceAdminHandler
log, NULL_NS, OM_FACTORY
 
Constructor Summary
RuleServiceArchiveAdminHandler()
           
 
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 name)
          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
 
Methods inherited from class org.wso2.carbon.rule.ws.admin.AbstractRuleServiceAdminHandler
cleanUp, createServiceRepository, createXML, getServicePath, getTempDir
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleServiceArchiveAdminHandler

public RuleServiceArchiveAdminHandler()
Method Detail

saveRuleService

public void saveRuleService(org.apache.axis2.engine.AxisConfiguration axisConfiguration,
                            org.apache.axis2.description.AxisService axisService,
                            org.wso2.carbon.rule.common.RuleService ruleService)
                     throws RuleServiceAdminException
Description copied from interface: RuleServiceAdminHandler
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

public org.apache.axiom.om.OMElement getRuleService(org.apache.axis2.engine.AxisConfiguration axisConfiguration,
                                                    String name)
                                             throws RuleServiceAdminException
Description copied from interface: RuleServiceAdminHandler
Retrieves an XML representation of the rule service

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

uploadFacts

public String[] uploadFacts(org.apache.axis2.engine.AxisConfiguration axisConfiguration,
                            String serviceName,
                            String fileName,
                            DataHandler dataHandler)
                     throws RuleServiceAdminException
Description copied from interface: RuleServiceAdminHandler
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

public void uploadRuleFile(org.apache.axis2.engine.AxisConfiguration axisConfiguration,
                           String serviceName,
                           String fileName,
                           DataHandler dataHandler)
                    throws RuleServiceAdminException
Description copied from interface: RuleServiceAdminHandler
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

public String[] getAllFacts(org.apache.axis2.engine.AxisConfiguration axisConfiguration,
                            String serviceName)
                     throws RuleServiceAdminException
Description copied from interface: RuleServiceAdminHandler
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

public String[] getFactArchiveList(org.apache.axis2.engine.AxisConfiguration axisConfiguration,
                                   String serviceName)
                            throws RuleServiceAdminException
Description copied from interface: RuleServiceAdminHandler
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

public void deleteFactArchive(org.apache.axis2.engine.AxisConfiguration axisConfiguration,
                              String serviceName,
                              String fileName)
                       throws RuleServiceAdminException
Description copied from interface: RuleServiceAdminHandler
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

public String[] getRuleFileList(org.apache.axis2.engine.AxisConfiguration axisConfiguration,
                                String serviceName,
                                String fileName)
                         throws RuleServiceAdminException
Description copied from interface: RuleServiceAdminHandler
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

public void deleteRuleFile(org.apache.axis2.engine.AxisConfiguration axisConfiguration,
                           String serviceName,
                           String fileName)
                    throws RuleServiceAdminException
Description copied from interface: RuleServiceAdminHandler
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

public void deleteTempRuleServiceDirectory(String serviceName)
                                    throws RuleServiceAdminException
Description copied from interface: RuleServiceAdminHandler
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.