Package org.azd.extensionmanagement
Class ExtensionManagementApi
java.lang.Object
org.azd.utils.AzDAsyncApi<ExtensionManagementApi>
org.azd.extensionmanagement.ExtensionManagementApi
- All Implemented Interfaces:
ExtensionManagementDetails
public class ExtensionManagementApi
extends AzDAsyncApi<ExtensionManagementApi>
implements ExtensionManagementDetails
ExtensionManagementApi class to manage installed extensions API
-
Constructor Summary
ConstructorDescriptionExtensionManagementApi
(Connection connection) Pass the connection object to work with Member Entitlement Management Api -
Method Summary
Modifier and TypeMethodDescriptiongetExtension
(String extensionId, String publisherId) Get an installed extension by its publisher and extension id.getExtension
(String extensionId, String publisherId, String[] assetTypes) Get an installed extension by its publisher and extension id.List the installed extensionsinstallExtension
(String publisherId, String extensionId, String version) Install the specified extensionuninstallExtension
(String publisherId, String extensionId) Uninstall the specified extensionuninstallExtension
(String publisherId, String extensionId, String reason, String reasonCode) Uninstall the specified extensionupdateExtension
(String publisherId, String extensionId, ExtensionStateFlags extensionState) Enable/disable an extensionMethods inherited from class org.azd.utils.AzDAsyncApi
createAsync
-
Constructor Details
-
ExtensionManagementApi
Pass the connection object to work with Member Entitlement Management Api- Parameters:
connection
- Connection object
-
-
Method Details
-
getExtension
Get an installed extension by its publisher and extension id.- Specified by:
getExtension
in interfaceExtensionManagementDetails
- Parameters:
extensionId
- Id of the extension. Example: "sonarqube".publisherId
- Id of the publisher. Example: "sonarsource".- Returns:
- InstalledExtension
InstalledExtension
- Throws:
AzDException
- Default Api Exception handler.
-
getExtension
public InstalledExtension getExtension(String extensionId, String publisherId, String[] assetTypes) throws AzDException Get an installed extension by its publisher and extension id.- Specified by:
getExtension
in interfaceExtensionManagementDetails
- Parameters:
extensionId
- Id of the extension. Example: "sonarqube".publisherId
- Id of the publisher. Example: "sonarsource".assetTypes
- type of asset- Returns:
- InstalledExtension
InstalledExtension
- Throws:
AzDException
- Default Api Exception handler.
-
getExtensions
List the installed extensions- Specified by:
getExtensions
in interfaceExtensionManagementDetails
- Returns:
- InstalledExtensions
InstalledExtensions
- Throws:
AzDException
- Default Api Exception handler.
-
installExtension
public InstalledExtension installExtension(String publisherId, String extensionId, String version) throws AzDException Install the specified extension- Specified by:
installExtension
in interfaceExtensionManagementDetails
- Parameters:
publisherId
- Id of the publisher. Example: "sonarsource".extensionId
- Id of the extension. Example: "sonarqube".version
- if null latest version will be selected- Returns:
- InstalledExtension
InstalledExtension
- Throws:
AzDException
- Default Api Exception handler.
-
uninstallExtension
Uninstall the specified extension- Specified by:
uninstallExtension
in interfaceExtensionManagementDetails
- Parameters:
publisherId
- Id of the publisher. Example: "sonarsource".extensionId
- Id of the extension. Example: "sonarqube".- Throws:
AzDException
- Default Api Exception handler.
-
uninstallExtension
public Void uninstallExtension(String publisherId, String extensionId, String reason, String reasonCode) throws AzDException Uninstall the specified extension- Specified by:
uninstallExtension
in interfaceExtensionManagementDetails
- Parameters:
publisherId
- Id of the publisher. Example: "sonarsource".extensionId
- Id of the extension. Example: "sonarqube".reason
- reason for uninstallreasonCode
- reason code for uninstall- Throws:
AzDException
- Default Api Exception handler.
-
updateExtension
public InstalledExtension updateExtension(String publisherId, String extensionId, ExtensionStateFlags extensionState) throws AzDException Enable/disable an extension- Specified by:
updateExtension
in interfaceExtensionManagementDetails
- Parameters:
publisherId
- Id of the publisher. Example: "sonarsource".extensionId
- Id of the extension. Example: "sonarqube".extensionState
- If none extension will be enabled.ExtensionStateFlags
- Returns:
- InstalledExtension
InstalledExtension
- Throws:
AzDException
- Default Api Exception handler.
-