Class Environment
java.lang.Object
com.aeontronix.enhancedmule.tools.anypoint.AnypointObject<Organization>
com.aeontronix.enhancedmule.tools.anypoint.Environment
- All Implemented Interfaces:
Serializable
public class Environment extends AnypointObject<Organization>
- See Also:
- Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEnvironment.Type -
Field Summary
Fields inherited from class com.aeontronix.enhancedmule.tools.anypoint.AnypointObject
client, httpHelper, json, jsonHelper, parent -
Constructor Summary
Constructors Constructor Description Environment()Environment(Organization organization)Environment(Organization organization, String id) -
Method Summary
-
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 AnypointClient client, @NotNull @NotNull Organization organization) throws HttpException- Throws:
HttpException
-
findEnvironmentByName
@NotNull public static @NotNull Environment findEnvironmentByName(@NotNull @NotNull String name, @NotNull @NotNull AnypointClient client, @NotNull @NotNull Organization organization) throws HttpException, NotFoundException- Throws:
HttpExceptionNotFoundException
-
findEnvironmentById
@NotNull public static @NotNull Environment findEnvironmentById(@NotNull @NotNull String id, @NotNull @NotNull AnypointClient client, @NotNull @NotNull Organization organization) throws HttpException, NotFoundException- Throws:
HttpExceptionNotFoundException
-
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
-