Class Environment
java.lang.Object
com.aeontronix.enhancedmule.tools.anypoint.AnypointObject<Organization>
com.aeontronix.enhancedmule.tools.anypoint.Environment
- All Implemented Interfaces:
Serializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.aeontronix.enhancedmule.tools.anypoint.AnypointObject
client, httpHelper, json, jsonHelper, parent -
Constructor Summary
ConstructorsConstructorDescriptionEnvironment(Organization organization) Environment(Organization organization, String id) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHeaders(org.apache.http.client.methods.HttpRequestBase method) voidapplyAlert(AlertUpdate alert) createAPI(@NotNull APISpec apiSpec, boolean mule4, @Nullable String implementationUrl, String consumerUrl, @Nullable String label, API.Type type) createAPI(@NotNull APISpec apiSpec, @Nullable String label, Map<String, Object> implementationUrlJson, String consumerUrl) createServerGroup(String name, String... serverIds) voiddelete()findAlertByName(String name) findAPIByExchangeAsset(@NotNull String groupId, @NotNull String assetId, @NotNull String assetVersion) findAPIByExchangeAsset(@NotNull String groupId, @NotNull String assetId, @NotNull String assetVersion, @Nullable String label) findAPIByExchangeAssetIdOrNameAndProductAPIVersion(@NotNull String name, @NotNull String productAPIVersion, @Nullable String label) findAPIByExchangeAssetIdOrNameAndVersion(@NotNull String idOrName, @NotNull String version, @Nullable String label) findAPIByExchangeAssetNameAndProductAPIVersion(@NotNull String name, @NotNull String productAPIVersion, @Nullable String label) findAPIByExchangeAssetNameAndVersion(@NotNull String name, @NotNull String version) findAPIByExchangeAssetNameAndVersion(@NotNull String name, @NotNull String version, @Nullable String label) findAPIById(String id) findAPIsByExchangeAsset(@NotNull String groupId, @NotNull String assetId) findCHApplicationByDomain(String domain) findCHMuleVersion(String muleVersion) static @NotNull EnvironmentfindEnvironmentById(@NotNull String id, @NotNull LegacyAnypointClient client, @NotNull Organization organization) static @NotNull EnvironmentfindEnvironmentByName(@NotNull String name, @NotNull LegacyAnypointClient client, @NotNull Organization organization) static List<Environment>findEnvironmentsByOrg(@NotNull LegacyAnypointClient client, @NotNull Organization organization) @NotNull ServerfindServerByName(@NotNull String name) findWorkerTypeByName(String name) getGroup()getId()getLName()getName()@NotNull StringgetType()booleanrefresh()Refresh environment data (this will retrieve extra data compared to an environment object obtained from an organization)voidsetClientId(String clientId) voidvoidvoidvoidsetProduction(boolean production) voidsetType(Environment.Type type) static Map<String,Environment> toMapIdxById(Collection<Environment> envs) static Map<String,Environment> toMapIdxByName(Collection<Environment> envs) toString()
-
Constructor Details
-
Environment
public Environment() -
Environment
-
Environment
-
-
Method Details
-
getOrganization
-
getId
-
setId
-
getName
-
setName
-
getGroup
-
setGroup
-
isProduction
public boolean isProduction() -
setProduction
public void setProduction(boolean production) -
getType
-
setType
-
getClientId
-
setClientId
-
getClientSecret
- Throws:
HttpException
-
getServerRegistrationKey
- Throws:
HttpException
-
findAllServers
- Throws:
HttpException
-
createServerGroup
- Throws:
HttpException
-
findServerByName
@NotNull public @NotNull Server findServerByName(@NotNull @NotNull String name) throws NotFoundException, HttpException - Throws:
NotFoundExceptionHttpException
-
addHeaders
public void addHeaders(org.apache.http.client.methods.HttpRequestBase method) -
delete
- Throws:
HttpException
-
rename
- Throws:
HttpException
-
toString
-
findAllAPIs
- Throws:
HttpException
-
findAPIs
- Throws:
HttpException
-
findAPIByExchangeAssetNameAndVersion
public API findAPIByExchangeAssetNameAndVersion(@NotNull @NotNull String name, @NotNull @NotNull String version) throws HttpException, NotFoundException - Throws:
HttpExceptionNotFoundException
-
findAPIByExchangeAssetIdOrNameAndVersion
public API findAPIByExchangeAssetIdOrNameAndVersion(@NotNull @NotNull String idOrName, @NotNull @NotNull String version, @Nullable @Nullable String label) throws HttpException, NotFoundException - Throws:
HttpExceptionNotFoundException
-
findAPIByExchangeAssetNameAndVersion
public API findAPIByExchangeAssetNameAndVersion(@NotNull @NotNull String name, @NotNull @NotNull String version, @Nullable @Nullable String label) throws HttpException, NotFoundException - Throws:
HttpExceptionNotFoundException
-
findAPIByExchangeAssetIdOrNameAndProductAPIVersion
public API findAPIByExchangeAssetIdOrNameAndProductAPIVersion(@NotNull @NotNull String name, @NotNull @NotNull String productAPIVersion, @Nullable @Nullable String label) throws HttpException, NotFoundException - Throws:
HttpExceptionNotFoundException
-
findAPIByExchangeAssetNameAndProductAPIVersion
public API findAPIByExchangeAssetNameAndProductAPIVersion(@NotNull @NotNull String name, @NotNull @NotNull String productAPIVersion, @Nullable @Nullable String label) throws HttpException, NotFoundException - Throws:
HttpExceptionNotFoundException
-
findAPIsByExchangeAsset
public List<API> findAPIsByExchangeAsset(@NotNull @NotNull String groupId, @NotNull @NotNull String assetId) throws HttpException, NotFoundException - Throws:
HttpExceptionNotFoundException
-
findAPIByExchangeAsset
public API findAPIByExchangeAsset(@NotNull @NotNull String groupId, @NotNull @NotNull String assetId, @NotNull @NotNull String assetVersion) throws HttpException, NotFoundException - Throws:
HttpExceptionNotFoundException
-
findAPIByExchangeAsset
public API findAPIByExchangeAsset(@NotNull @NotNull String groupId, @NotNull @NotNull String assetId, @NotNull @NotNull String assetVersion, @Nullable @Nullable String label) throws HttpException, NotFoundException - Throws:
HttpExceptionNotFoundException
-
findAPIById
- Throws:
HttpException
-
findCHApplicationByDomain
public CHApplication findCHApplicationByDomain(String domain) throws HttpException, NotFoundException - Throws:
HttpExceptionNotFoundException
-
refresh
Refresh environment data (this will retrieve extra data compared to an environment object obtained from an organization)- Returns:
- Refreshed environment
- Throws:
NotFoundException- If the environment isn't foundHttpException- If an error occurs communicating with anypoint platform
-
getLName
-
getSuffix
-
createAPI
public API createAPI(@NotNull @NotNull APISpec apiSpec, @Nullable @Nullable String label, Map<String, Object> implementationUrlJson, String consumerUrl) throws HttpException- Throws:
HttpException
-
createAPI
public API createAPI(@NotNull @NotNull APISpec apiSpec, boolean mule4, @Nullable @Nullable String implementationUrl, String consumerUrl, @Nullable @Nullable String label, @NotNull API.Type type) throws HttpException - Throws:
HttpException
-
findEnvironmentsByOrg
public static List<Environment> findEnvironmentsByOrg(@NotNull @NotNull LegacyAnypointClient client, @NotNull @NotNull Organization organization) throws HttpException - Throws:
HttpException
-
findEnvironmentByName
@NotNull public static @NotNull Environment findEnvironmentByName(@NotNull @NotNull String name, @NotNull @NotNull LegacyAnypointClient client, @NotNull @NotNull Organization organization) throws HttpException, EnvironmentNotFoundException -
findEnvironmentById
@NotNull public static @NotNull Environment findEnvironmentById(@NotNull @NotNull String id, @NotNull @NotNull LegacyAnypointClient client, @NotNull @NotNull Organization organization) throws HttpException, EnvironmentNotFoundException -
getNameOrId
-
findCHMuleVersions
- Throws:
HttpException
-
findDefaultCHMuleVersion
- Throws:
HttpException
-
findCHMuleVersion
- Throws:
NotFoundExceptionHttpException
-
findAllCHRegions
- Throws:
HttpException
-
findDefaultCHRegion
- Throws:
HttpException
-
findAllWorkerTypes
- Throws:
HttpException
-
findWorkerTypeByName
- Throws:
HttpExceptionNotFoundException
-
findSmallestWorkerType
- Throws:
HttpException
-
findAlerts
- Throws:
HttpException
-
findAlertByName
- Throws:
HttpExceptionNotFoundException
-
applyAlert
- Throws:
HttpException
-
toMapIdxByName
-
toMapIdxById
-