org.wso2.carbon.jarservices
Class JarServiceCreatorAdmin

java.lang.Object
  extended by org.wso2.carbon.core.AbstractAdmin
      extended by org.wso2.carbon.jarservices.JarServiceCreatorAdmin

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


Field Summary
static org.osgi.framework.BundleContext bundleContext
           
 
Fields inherited from class org.wso2.carbon.core.AbstractAdmin
axisConfig, configurationContext
 
Constructor Summary
JarServiceCreatorAdmin()
           
 
Method Summary
 void createAndDeployService(String directoryPath, String serviceHierarchy, String serviceGroupName, Service[] data)
          Creates and deploys a service.
 Service[] getClassMethods(String directoryPath, Service[] services)
          This method will list all the public methods for the given classes.
 UploadArtifactsResponse upload(String serviceGroupName, Resource wsdl, Resource[] resources)
           
 
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

bundleContext

public static org.osgi.framework.BundleContext bundleContext
Constructor Detail

JarServiceCreatorAdmin

public JarServiceCreatorAdmin()
Method Detail

upload

public UploadArtifactsResponse upload(String serviceGroupName,
                                      Resource wsdl,
                                      Resource[] resources)
                               throws DuplicateServiceGroupException,
                                      JarUploadException
Throws:
DuplicateServiceGroupException
JarUploadException

getClassMethods

public Service[] getClassMethods(String directoryPath,
                                 Service[] services)
                          throws org.apache.axis2.AxisFault,
                                 DuplicateServiceException
This method will list all the public methods for the given classes.

Parameters:
directoryPath - Temp dir innto which all jars were uploaded
services - Selected classes
Returns:
All methods in the selected classes
Throws:
org.apache.axis2.AxisFault - Error
DuplicateServiceException - If a service with a given name already exists

createAndDeployService

public void createAndDeployService(String directoryPath,
                                   String serviceHierarchy,
                                   String serviceGroupName,
                                   Service[] data)
                            throws org.apache.axis2.AxisFault,
                                   DuplicateServiceException,
                                   DuplicateServiceGroupException
Creates and deploys a service. This AAR will contain all the classe from the jar file corresponding to archiveId. In addition, a services.xml will be created, and all of the serviceClasses will be added as services.

Parameters:
directoryPath - archive id
serviceHierarchy - hierarchical part of the service
serviceGroupName - the serviceGroupName
data - info array. data contains the excluded method names.
Throws:
org.apache.axis2.AxisFault - will be thrown
DuplicateServiceException - If a service which already exists is trying to be created
DuplicateServiceGroupException - If the sepcified service group already exists


Copyright © 2015 WSO2. All rights reserved.