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

java.lang.Object
  extended by org.wso2.carbon.core.AbstractAdmin
      extended by org.wso2.carbon.rule.ws.admin.RuleServiceAdmin

public class RuleServiceAdmin
extends org.wso2.carbon.core.AbstractAdmin

Admin service for rule service management


Field Summary
 
Fields inherited from class org.wso2.carbon.core.AbstractAdmin
axisConfig, configurationContext
 
Constructor Summary
RuleServiceAdmin()
           
 
Method Summary
 void addRuleService(String fileExtension, String name, org.apache.axiom.om.OMElement ruleServiceXML)
          Adds a rule service based on the given name and other information in the serviceXML
 void deleteFactArchive(String serviceName, String fileName)
           
 void deleteRuleFile(String serviceName, String fileName)
           
 void deleteTempRuleDirectory(String serviceName)
           
 void editRuleService(String fileExtension, String name, org.apache.axiom.om.OMElement ruleServiceXML)
          Updates an existing service
 String[] getAllFacts(String fileExtension, String serviceName)
          Gets all facts belong to the service with the given name
 String[] getAllRuleServices()
          Retrieves names of all existing rule services
 String[] getFactArchiveList(String serviceName)
           
 String[] getRuleFileList(String serviceName, String fileName)
           
 org.apache.axiom.om.OMElement getRuleService(String serviceName)
          retrieves the rule service for the given service name
 String[] uploadFacts(String serviceName, String fileName, DataHandler dataHandler)
          Uploads facts
 void uploadRuleFile(String serviceName, String fileName, DataHandler dataHandler)
          Upload a ruleset as a file
 
Methods inherited from class org.wso2.carbon.core.AbstractAdmin
getAxisConfig, getConfigContext, getConfigSystemRegistry, getConfigUserRegistry, getGovernanceRegistry, getGovernanceSystemRegistry, getGovernanceUserRegistry, getHttpSession, getLocalRepo, getRegistry, getTenantDomain, getUsername, getUserRealm, setConfigurationContext, setPermissionUpdateTimestamp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleServiceAdmin

public RuleServiceAdmin()
Method Detail

addRuleService

public void addRuleService(String fileExtension,
                           String name,
                           org.apache.axiom.om.OMElement ruleServiceXML)
                    throws RuleServiceAdminException
Adds a rule service based on the given name and other information in the serviceXML

Parameters:
fileExtension - rule service file extension
name - name of the service to be created
ruleServiceXML - meta data required to create a rule service
Throws:
RuleServiceAdminException - for any errors during service add operation

editRuleService

public void editRuleService(String fileExtension,
                            String name,
                            org.apache.axiom.om.OMElement ruleServiceXML)
                     throws RuleServiceAdminException
Updates an existing service

Parameters:
fileExtension - rule service file extension
name - name of the service to be updated
ruleServiceXML - eta data required to update the rule service
Throws:
RuleServiceAdminException - for any errors during service edit operation

getAllRuleServices

public String[] getAllRuleServices()
                            throws RuleServiceAdminException
Retrieves names of all existing rule services

Returns:
a array of existing rule services' names
Throws:
RuleServiceAdminException - for any errors during service list operation

uploadFacts

public String[] uploadFacts(String serviceName,
                            String fileName,
                            DataHandler dataHandler)
                     throws RuleServiceAdminException
Uploads facts

Parameters:
serviceName - name of the service facts belongs
fileName - fact file name
dataHandler - DataHandler representing facts in binary
Returns:
A string array contains names of the uploaded facts
Throws:
RuleServiceAdminException - for any errors during fact uploading

uploadRuleFile

public void uploadRuleFile(String serviceName,
                           String fileName,
                           DataHandler dataHandler)
                    throws RuleServiceAdminException
Upload a ruleset as a file

Parameters:
serviceName - name of the service rule script belongs
fileName - rule file name
dataHandler - DataHandler representing rule script in binary
Throws:
RuleServiceAdminException - for any errors during rule script uploading

getAllFacts

public String[] getAllFacts(String fileExtension,
                            String serviceName)
                     throws RuleServiceAdminException
Gets all facts belong to the service with the given name

Parameters:
fileExtension - rule service file extension
serviceName - name of the service
Returns:
A string array of the facts' names
Throws:
RuleServiceAdminException - for any errors during facts retrieving

getRuleService

public org.apache.axiom.om.OMElement getRuleService(String serviceName)
                                             throws RuleServiceAdminException
retrieves the rule service for the given service name

Parameters:
serviceName - name of the rule service
Returns:
OMElement representing the information of the rule service
Throws:
org.apache.axis2.AxisFault - for any errors during accessing service
RuleServiceAdminException

getFactArchiveList

public String[] getFactArchiveList(String serviceName)
                            throws RuleServiceAdminException
Throws:
RuleServiceAdminException

deleteFactArchive

public void deleteFactArchive(String serviceName,
                              String fileName)
                       throws RuleServiceAdminException
Throws:
RuleServiceAdminException

getRuleFileList

public String[] getRuleFileList(String serviceName,
                                String fileName)
                         throws RuleServiceAdminException
Throws:
RuleServiceAdminException

deleteRuleFile

public void deleteRuleFile(String serviceName,
                           String fileName)
                    throws RuleServiceAdminException
Throws:
RuleServiceAdminException

deleteTempRuleDirectory

public void deleteTempRuleDirectory(String serviceName)
                             throws RuleServiceAdminException
Throws:
RuleServiceAdminException


Copyright © 2015 WSO2. All rights reserved.