public class APIExportUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
createDirectory(String path)
Create directory at the given path
|
static void |
exportAPIDocumentation(List<org.wso2.carbon.apimgt.api.model.Documentation> docList,
org.wso2.carbon.apimgt.api.model.APIIdentifier apiIdentifier,
org.wso2.carbon.registry.api.Registry registry)
Retrieve documentation for the exporting API and store it in the archive directory
FILE, INLINE and URL documentations are handled
|
static void |
exportSequences(org.wso2.carbon.apimgt.api.model.API api,
org.wso2.carbon.apimgt.api.model.APIIdentifier apiIdentifier,
org.wso2.carbon.registry.api.Registry registry)
Retrieve available custom sequences and API specific sequences for API export
|
static void |
exportWSDL(org.wso2.carbon.apimgt.api.model.APIIdentifier apiIdentifier,
org.wso2.carbon.registry.api.Registry registry)
Retrieve WSDL for the exporting API and store it in the archive directory
|
static org.wso2.carbon.apimgt.api.APIProvider |
getProvider(String userName)
Retrieve API provider
|
static org.wso2.carbon.registry.api.Registry |
getRegistry()
Retrieve registry for the current tenant
|
static javax.ws.rs.core.Response |
retrieveApiToExport(org.wso2.carbon.apimgt.api.model.APIIdentifier apiID,
String userName)
This method retrieves all meta information and registry resources required for an API to
recreate
|
static void |
setArchiveBasePath(String path)
Set base path where exporting archive should be generated
|
public static void setArchiveBasePath(String path)
path - Temporary directory locationpublic static org.wso2.carbon.apimgt.api.APIProvider getProvider(String userName) throws APIExportException
userName - User nameAPIExportException - If an error occurs while retrieving the providerpublic static org.wso2.carbon.registry.api.Registry getRegistry()
public static javax.ws.rs.core.Response retrieveApiToExport(org.wso2.carbon.apimgt.api.model.APIIdentifier apiID,
String userName)
throws APIExportException
apiID - Identifier of the exporting APIuserName - User name of the requesterAPIExportException - If an error occurs while retrieving API related resourcespublic static void exportAPIDocumentation(List<org.wso2.carbon.apimgt.api.model.Documentation> docList, org.wso2.carbon.apimgt.api.model.APIIdentifier apiIdentifier, org.wso2.carbon.registry.api.Registry registry) throws APIExportException
apiIdentifier - ID of the requesting APIregistry - Current tenant registrydocList - documentation list of the exporting APIAPIExportException - If an error occurs while retrieving documents from the
registry or storing in the archive directorypublic static void exportWSDL(org.wso2.carbon.apimgt.api.model.APIIdentifier apiIdentifier,
org.wso2.carbon.registry.api.Registry registry)
throws APIExportException
apiIdentifier - ID of the requesting APIregistry - Current tenant registryAPIExportException - If an error occurs while retrieving WSDL from the registry or
storing in the archive directorypublic static void exportSequences(org.wso2.carbon.apimgt.api.model.API api,
org.wso2.carbon.apimgt.api.model.APIIdentifier apiIdentifier,
org.wso2.carbon.registry.api.Registry registry)
throws APIExportException
api - exporting APIapiIdentifier - ID of the requesting APIregistry - current tenant registryAPIExportException - If an error occurs while exporting sequencespublic static void createDirectory(String path) throws APIExportException
path - Path of the directoryAPIExportException - If directory creation failedCopyright © 2018 WSO2 Inc. All rights reserved.