org.wso2.carbon.module.mgt.service
Class ModuleAdminService

java.lang.Object
  extended by org.wso2.carbon.core.AbstractAdmin
      extended by org.wso2.carbon.module.mgt.service.ModuleAdminService

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

Admin service for managing Axis2 Modules


Field Summary
static String ADDRESSING_MODULE
           
static String CACHING_MODULE
           
static String THROTTLE_MODULE
           
 
Fields inherited from class org.wso2.carbon.core.AbstractAdmin
axisConfig, configurationContext
 
Constructor Summary
ModuleAdminService()
           
ModuleAdminService(org.apache.axis2.engine.AxisConfiguration ac)
           
 
Method Summary
 boolean disengageModuleForOperation(String moduleId, String serviceName, String operationName)
           
 boolean disengageModuleForService(String moduleId, String serviceName)
           
 boolean disengageModuleForServiceGroup(String moduleId, String serviceGroupName)
           
 boolean disengageModuleFromSystem(String moduleId)
           
 boolean engageModuleForOperation(String moduleId, String serviceName, String operationName)
           
 boolean engageModuleForService(String moduleId, String serviceName)
           
 boolean engageModuleForServiceGroup(String moduleID, String serviceGroupName)
           
 ModuleMetaData getModuleInfo(String moduleName, String moduleVersion)
          Return all available module meta-data (not counts)
 String[] getModuleParameters(String moduleName, String moduleVersion)
          return all parameters for this module (including inherited ones), where each parameter is an XML fragment representing the "parameter" element
 boolean globallyDisengageModule(String moduleId)
           
 boolean globallyEngageModule(String moduleId)
           
 ModuleMetaData[] listGloballyEngagedModules()
          List all the globally engaged modules
 ModuleMetaData[] listModules()
          List all the available modules
 ModuleMetaData[] listModulesForOperation(String serviceName, String operationName)
          List modules medatadata about given operation
 ModuleMetaData[] listModulesForService(String serviceName)
           
 ModuleMetaData[] listModulesForServiceGroup(String serviceGroupName)
           
 String removeModule(String moduleId)
          Delete a module
 String removeModuleParameter(String moduleName, String moduleVersion, String parameterName)
           
 void setModuleParameters(String moduleName, String moduleVersion, String[] parameters)
           
 String uploadModule(ModuleUploadData[] moduleUploadData)
           
 
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
 

Field Detail

THROTTLE_MODULE

public static final String THROTTLE_MODULE
See Also:
Constant Field Values

CACHING_MODULE

public static final String CACHING_MODULE
See Also:
Constant Field Values

ADDRESSING_MODULE

public static final String ADDRESSING_MODULE
See Also:
Constant Field Values
Constructor Detail

ModuleAdminService

public ModuleAdminService()
                   throws Exception
Throws:
Exception

ModuleAdminService

public ModuleAdminService(org.apache.axis2.engine.AxisConfiguration ac)
                   throws Exception
Throws:
Exception
Method Detail

listModules

public ModuleMetaData[] listModules()
List all the available modules

Returns:
list of modules as a ModuleMetadata[].

listGloballyEngagedModules

public ModuleMetaData[] listGloballyEngagedModules()
List all the globally engaged modules

Returns:
list of globally engaged modules

listModulesForOperation

public ModuleMetaData[] listModulesForOperation(String serviceName,
                                                String operationName)
                                         throws ModuleMgtException
List modules medatadata about given operation

Parameters:
serviceName - Axis service
operationName - Axis Operation
Returns:
Array of module metadata
Throws:
ModuleMgtException - when we can't get module metadata

listModulesForService

public ModuleMetaData[] listModulesForService(String serviceName)
                                       throws ModuleMgtException
Throws:
ModuleMgtException

listModulesForServiceGroup

public ModuleMetaData[] listModulesForServiceGroup(String serviceGroupName)
                                            throws ModuleMgtException
Throws:
ModuleMgtException

getModuleInfo

public ModuleMetaData getModuleInfo(String moduleName,
                                    String moduleVersion)
                             throws ModuleMgtException
Return all available module meta-data (not counts)

Parameters:
moduleName - - moduleName
moduleVersion - - moduleVersion
Returns:
moduleMetaData info of the module
Throws:
ModuleMgtException - - error accessing axis config

globallyEngageModule

public boolean globallyEngageModule(String moduleId)
                             throws ModuleMgtException
Throws:
ModuleMgtException

engageModuleForServiceGroup

public boolean engageModuleForServiceGroup(String moduleID,
                                           String serviceGroupName)
                                    throws ModuleMgtException
Throws:
ModuleMgtException

disengageModuleForServiceGroup

public boolean disengageModuleForServiceGroup(String moduleId,
                                              String serviceGroupName)
                                       throws ModuleMgtException
Throws:
ModuleMgtException

engageModuleForService

public boolean engageModuleForService(String moduleId,
                                      String serviceName)
                               throws ModuleMgtException
Throws:
ModuleMgtException

disengageModuleForService

public boolean disengageModuleForService(String moduleId,
                                         String serviceName)
                                  throws ModuleMgtException
Throws:
ModuleMgtException

engageModuleForOperation

public boolean engageModuleForOperation(String moduleId,
                                        String serviceName,
                                        String operationName)
                                 throws ModuleMgtException
Throws:
ModuleMgtException

disengageModuleForOperation

public boolean disengageModuleForOperation(String moduleId,
                                           String serviceName,
                                           String operationName)
                                    throws ModuleMgtException
Throws:
ModuleMgtException

globallyDisengageModule

public boolean globallyDisengageModule(String moduleId)
                                throws ModuleMgtException
Throws:
ModuleMgtException

uploadModule

public String uploadModule(ModuleUploadData[] moduleUploadData)
                    throws org.apache.axis2.AxisFault
Throws:
org.apache.axis2.AxisFault

getModuleParameters

public String[] getModuleParameters(String moduleName,
                                    String moduleVersion)
                             throws ModuleMgtException
return all parameters for this module (including inherited ones), where each parameter is an XML fragment representing the "parameter" element

Parameters:
moduleName - module name of the module of which parameters are required
moduleVersion - module version of the module of which parameters are required
Returns:
params module parameter array
Throws:
ModuleMgtException - is thrown in case of error

setModuleParameters

public void setModuleParameters(String moduleName,
                                String moduleVersion,
                                String[] parameters)
                         throws ModuleMgtException
Throws:
ModuleMgtException

removeModuleParameter

public String removeModuleParameter(String moduleName,
                                    String moduleVersion,
                                    String parameterName)
                             throws ModuleMgtException
Throws:
ModuleMgtException

removeModule

public String removeModule(String moduleId)
                    throws ModuleMgtException
Delete a module

Parameters:
moduleId - module id of the module to be removed
Returns:
status of the operation
Throws:
ModuleMgtException - if we can't remove the module

disengageModuleFromSystem

public boolean disengageModuleFromSystem(String moduleId)
                                  throws ModuleMgtException
Parameters:
moduleId - module to be globally disenaged
Returns:
True if the module the engagement was successful, false otherwise.
Throws:
ModuleMgtException - if we can't disengage the module globally


Copyright © 2015 WSO2. All rights reserved.