public interface CloudHubConnectionI
| Modifier and Type | Method and Description |
|---|---|
CloudHubDomainConnectionI |
connectWithDomain(String domain)
Returns a connection against a given domain of the CloudHub account
|
com.mulesoft.ch.rest.model.Application |
createApplication(com.mulesoft.ch.rest.model.Application application)
Creates an application on your CloudHub account.
|
CloudHubConnectionI |
createConnection(String url,
String username,
String password,
String sandbox)
Creates a connection against an specific CloudHub Account
|
com.mulesoft.ch.rest.model.Notification |
createNotification(com.mulesoft.ch.rest.model.Notification notification)
Creates a notification based on the given object
|
String |
getAccessToken() |
String |
getEnvironmentId() |
String |
getPassword() |
List<String> |
getSupportedMuleVersions()
This method returns all the supported mule versions by CloudHub
|
String |
getUrl() |
String |
getUsername() |
boolean |
isCsAuthentication() |
boolean |
isDomainAvailable(String domain)
Checks if the domain is valid and available
|
com.mulesoft.ch.rest.model.Account |
retrieveAccount()
Retrieves the CloudHub Account
|
Collection<com.mulesoft.ch.rest.model.Application> |
retrieveApplications()
Retrieves All Applications from an specific CloudHub account
|
com.mulesoft.ch.rest.model.Notification |
retrieveNotification(String notificationId)
Retrieves a single notification, based on the given id.
|
com.mulesoft.ch.rest.model.NotificationResults |
retrieveNotifications(String domain,
String tenantId,
Integer limit,
Integer offset,
com.mulesoft.ch.rest.model.Notification.NotificationStatus status,
String message)
Retrieves a bunch of notifications based on given filters
|
void |
updateNotificationsStatus(String domain,
String tenantId,
com.mulesoft.ch.rest.model.Notification.NotificationStatus newStatus)
Updates all notifications status.
|
void |
updateNotificationStatus(String notificationId,
com.mulesoft.ch.rest.model.Notification.NotificationStatus newStatus)
Updates a notification status.
|
String getUrl()
String getUsername()
String getPassword()
String getAccessToken()
String getEnvironmentId()
boolean isCsAuthentication()
CloudHubConnectionI createConnection(String url, String username, String password, String sandbox)
url - Optional. CloudHub URL. If null, default value is https://cloudhub.io/username - CloudHub username to log inpassword - CloudHub password to log insandbox - Optional. Only necessary if you want to connect to the non-default sandbox of the account.
If null, the connection will be established against the default sandboxCloudHubConnectionImplCloudHubDomainConnectionI connectWithDomain(String domain)
domain - the domain to which you want to connectCloudHubDomainConnectionImpl connected with the specified domaincom.mulesoft.ch.rest.model.Account retrieveAccount()
throws CloudHubException
AccountCloudHubException - if there is an error when retrieving the accountboolean isDomainAvailable(String domain) throws CloudHubException
domain - the domain to be validatedCloudHubException - if there is an error when validating the domainCollection<com.mulesoft.ch.rest.model.Application> retrieveApplications() throws CloudHubException
ApplicationCloudHubException - if there is an error when retrieving the applicationscom.mulesoft.ch.rest.model.Application createApplication(com.mulesoft.ch.rest.model.Application application)
throws CloudHubException
application - an instance of Application containing all the application's informationApplication containing all the recently created application's information provided by CloudHubCloudHubException - if there was an error while creating the applicationcom.mulesoft.ch.rest.model.NotificationResults retrieveNotifications(String domain, String tenantId, Integer limit, Integer offset, com.mulesoft.ch.rest.model.Notification.NotificationStatus status, String message) throws CloudHubException
domain - the domain you want to retrieve the notifications fromtenantId - the id of the tenant you want to retrieve the notifications fromlimit - Optional. The maximum number of notifications you want to retrieveoffset - Optional. The beginning index from which notifications will be retrieved. For example, if you have an offset of 5, and your original
search returns 10 notifications, only the last 5 notifications will be returned.status - Optional. One of Notification.NotificationStatusmessage - Optional. If provided, only notifications containing this message in their body will be returned.NotificationResultsCloudHubException - if there was an error while retrieving of filtering the notificationscom.mulesoft.ch.rest.model.Notification retrieveNotification(String notificationId) throws CloudHubException
notificationId - The id of the notification you want to retrieveNotificationCloudHubException - if there was an error while retrieving the specified notificationcom.mulesoft.ch.rest.model.Notification createNotification(com.mulesoft.ch.rest.model.Notification notification)
throws CloudHubException
notification - an instance of Notification you want to createNotification with the created notification's information provided by CloudHubCloudHubException - if there was an error while creating the notificationvoid updateNotificationsStatus(String domain, String tenantId, com.mulesoft.ch.rest.model.Notification.NotificationStatus newStatus) throws CloudHubException
domain - The domain of the notifications you want to update.tenantId - The id of the tenant from which the notifications you want to update belong to.newStatus - one of Notification.NotificationStatus representing the new status for the notificationCloudHubException - if there was an error while updating the notification statusvoid updateNotificationStatus(String notificationId, com.mulesoft.ch.rest.model.Notification.NotificationStatus newStatus) throws CloudHubException
notificationId - The id of the notification you want to updatenewStatus - one of Notification.NotificationStatus representing the new status for the notificationCloudHubException - if there was an error while updating the notification statusList<String> getSupportedMuleVersions() throws CloudHubException
CloudHubExceptionCopyright © 2012-2016. All Rights Reserved.