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(APISpec apiSpec, boolean mule4, String implementationUrl, String consumerUrl, String label, API.Type type) createAPI(APISpec apiSpec, String label, Map<String, Object> implementationUrlJson, String consumerUrl) createServerGroup(String name, String... serverIds) voiddelete()findAlertByName(String name) findAPIByExchangeAsset(String groupId, String assetId, String assetVersion) findAPIByExchangeAsset(String groupId, String assetId, String assetVersion, String label) findAPIByExchangeAssetIdOrNameAndProductAPIVersion(String name, String productAPIVersion, String label) findAPIByExchangeAssetIdOrNameAndVersion(String idOrName, String version, String label) findAPIByExchangeAssetNameAndProductAPIVersion(String name, String productAPIVersion, String label) findAPIByExchangeAssetNameAndVersion(String name, String version) findAPIByExchangeAssetNameAndVersion(String name, String version, String label) findAPIById(String id) findAPIsByExchangeAsset(String groupId, String assetId) findCHApplicationByDomain(String domain) findCHMuleVersion(String muleVersion) static EnvironmentfindEnvironmentById(String id, LegacyAnypointClient client, Organization organization) static EnvironmentfindEnvironmentByName(String name, LegacyAnypointClient client, Organization organization) static List<Environment>findEnvironmentsByOrg(LegacyAnypointClient client, Organization organization) findServerByName(String name) findWorkerTypeByName(String name) getGroup()getId()getLName()getName()getType()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 Server findServerByName(@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 String name, @NotNull String version) throws HttpException, NotFoundException - Throws:
HttpExceptionNotFoundException
-
findAPIByExchangeAssetIdOrNameAndVersion
public API findAPIByExchangeAssetIdOrNameAndVersion(@NotNull String idOrName, @NotNull String version, @Nullable String label) throws HttpException, NotFoundException - Throws:
HttpExceptionNotFoundException
-
findAPIByExchangeAssetNameAndVersion
public API findAPIByExchangeAssetNameAndVersion(@NotNull String name, @NotNull String version, @Nullable String label) throws HttpException, NotFoundException - Throws:
HttpExceptionNotFoundException
-
findAPIByExchangeAssetIdOrNameAndProductAPIVersion
public API findAPIByExchangeAssetIdOrNameAndProductAPIVersion(@NotNull String name, @NotNull String productAPIVersion, @Nullable String label) throws HttpException, NotFoundException - Throws:
HttpExceptionNotFoundException
-
findAPIByExchangeAssetNameAndProductAPIVersion
public API findAPIByExchangeAssetNameAndProductAPIVersion(@NotNull String name, @NotNull String productAPIVersion, @Nullable String label) throws HttpException, NotFoundException - Throws:
HttpExceptionNotFoundException
-
findAPIsByExchangeAsset
public List<API> findAPIsByExchangeAsset(@NotNull String groupId, @NotNull String assetId) throws HttpException, NotFoundException - Throws:
HttpExceptionNotFoundException
-
findAPIByExchangeAsset
public API findAPIByExchangeAsset(@NotNull String groupId, @NotNull String assetId, @NotNull String assetVersion) throws HttpException, NotFoundException - Throws:
HttpExceptionNotFoundException
-
findAPIByExchangeAsset
public API findAPIByExchangeAsset(@NotNull String groupId, @NotNull String assetId, @NotNull String assetVersion, @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 APISpec apiSpec, @Nullable String label, Map<String, Object> implementationUrlJson, String consumerUrl) throws HttpException- Throws:
HttpException
-
createAPI
public API createAPI(@NotNull APISpec apiSpec, boolean mule4, @Nullable String implementationUrl, String consumerUrl, @Nullable String label, @NotNull API.Type type) throws HttpException - Throws:
HttpException
-
findEnvironmentsByOrg
public static List<Environment> findEnvironmentsByOrg(@NotNull LegacyAnypointClient client, @NotNull Organization organization) throws HttpException - Throws:
HttpException
-
findEnvironmentByName
@NotNull public static Environment findEnvironmentByName(@NotNull String name, @NotNull LegacyAnypointClient client, @NotNull Organization organization) throws HttpException, EnvironmentNotFoundException -
findEnvironmentById
@NotNull public static Environment findEnvironmentById(@NotNull String id, @NotNull LegacyAnypointClient client, @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
-