public class RuleServiceAdminClient extends Object
Modifier and Type | Field and Description |
---|---|
static String |
FACTS |
static String |
RULE_SERVIE |
static String |
SCRIPTS |
Constructor and Description |
---|
RuleServiceAdminClient(org.apache.axis2.context.ConfigurationContext ctx,
String serverURL,
String cookie) |
RuleServiceAdminClient(javax.servlet.ServletContext servletContext,
javax.servlet.http.HttpSession httpSession) |
Modifier and Type | Method and Description |
---|---|
void |
deleteAllRuleFiles(org.wso2.carbon.rule.common.RuleService ruleService,
javax.servlet.http.HttpSession session) |
void |
deleteFactArchive(org.wso2.carbon.rule.common.RuleService ruleService,
String fileName,
javax.servlet.http.HttpSession session)
Delete fact archives that are not needed
|
void |
deleteRuleFile(org.wso2.carbon.rule.common.RuleService ruleService,
String fileName,
javax.servlet.http.HttpSession session) |
void |
deleteTempRuleDirectory(org.wso2.carbon.rule.common.RuleService ruleService,
javax.servlet.http.HttpSession session)
Delete rule temp directory that are not needed
|
String[] |
getAllFacts(org.wso2.carbon.rule.common.RuleService ruleService,
javax.servlet.http.HttpSession session)
Gets all facts belong to the service with the given name
|
ArrayList<String> |
getFactArchiveList(org.wso2.carbon.rule.common.RuleService ruleService,
javax.servlet.http.HttpSession session)
Gets all facts belong to the service with the given name
|
String[] |
getRuleFileList(org.wso2.carbon.rule.common.RuleService ruleService,
javax.servlet.http.HttpSession session) |
org.wso2.carbon.rule.common.RuleService |
getRuleService(String name)
retrieves the rule service for the given service name
|
org.wso2.carbon.rule.common.RuleService |
getRuleServiceDescription(javax.servlet.http.HttpServletRequest request)
Retrieves the
RuleServiceDescription |
void |
saveService(org.wso2.carbon.rule.common.RuleService ruleService)
Save the rule service based on the information in the given
RuleServiceDescription |
String[] |
uploadFacts(String serviceName,
String fileName,
DataHandler dataHandler,
javax.servlet.http.HttpServletRequest request)
Uploads facts
|
void |
uploadRuleFile(String serviceName,
String fileName,
DataHandler dataHandler,
javax.servlet.http.HttpServletRequest request)
Upload a ruleset as a file
|
public static final String RULE_SERVIE
public static final String FACTS
public static final String SCRIPTS
public RuleServiceAdminClient(org.apache.axis2.context.ConfigurationContext ctx, String serverURL, String cookie) throws org.apache.axis2.AxisFault
org.apache.axis2.AxisFault
public org.wso2.carbon.rule.common.RuleService getRuleServiceDescription(javax.servlet.http.HttpServletRequest request)
RuleServiceDescription
request
- HttpServletRequest
RuleServiceDescription
instance containing information about
rule service being edited or created.public String[] uploadFacts(String serviceName, String fileName, DataHandler dataHandler, javax.servlet.http.HttpServletRequest request)
serviceName
- name of the service facts belongsfileName
- fact file namedataHandler
- DataHandler representing facts in binaryrequest
- HttpServletRequest
public void uploadRuleFile(String serviceName, String fileName, DataHandler dataHandler, javax.servlet.http.HttpServletRequest request)
serviceName
- name of the service rule script belongsfileName
- rule file namedataHandler
- DataHandler representing rule script in binaryrequest
- HttpServletRequest
public String[] getRuleFileList(org.wso2.carbon.rule.common.RuleService ruleService, javax.servlet.http.HttpSession session)
public void deleteRuleFile(org.wso2.carbon.rule.common.RuleService ruleService, String fileName, javax.servlet.http.HttpSession session)
public void deleteAllRuleFiles(org.wso2.carbon.rule.common.RuleService ruleService, javax.servlet.http.HttpSession session)
public String[] getAllFacts(org.wso2.carbon.rule.common.RuleService ruleService, javax.servlet.http.HttpSession session)
ruleService
- information about the servicesession
- HttpSessionpublic ArrayList<String> getFactArchiveList(org.wso2.carbon.rule.common.RuleService ruleService, javax.servlet.http.HttpSession session)
ruleService
- information about the servicesession
- HttpSessionpublic void deleteFactArchive(org.wso2.carbon.rule.common.RuleService ruleService, String fileName, javax.servlet.http.HttpSession session)
@param
- session HttpSessionruleService
- The name of the service that fact archives are belongedfileName
- archive file namepublic void deleteTempRuleDirectory(org.wso2.carbon.rule.common.RuleService ruleService, javax.servlet.http.HttpSession session)
@param
- session HttpSessionruleService
- The name of the service that fact archives are belongedpublic void saveService(org.wso2.carbon.rule.common.RuleService ruleService)
RuleServiceDescription
ruleService
- RuleServiceDescription
public org.wso2.carbon.rule.common.RuleService getRuleService(String name)
name
- name of the rule serviceRuleServiceDescription
representing the information of the rule serviceCopyright © 2021 WSO2. All rights reserved.