|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.mulesoft.cloudhub.client.Connection
public class Connection
Base class for CloudHub interaction.
| Nested Class Summary | |
|---|---|
static class |
Connection.ObjectMapper
|
| Field Summary | |
|---|---|
static String |
DEFAULT_URL
|
| Constructor Summary | |
|---|---|
Connection(String url,
String username,
String password)
|
|
Connection(String url,
String username,
String password,
boolean debug)
|
|
| Method Summary | |
|---|---|
Notification |
create(Notification notification)
Connects to CH to create a notification |
Tenant |
create(Tenant tenant,
String domain)
Creates a tenant |
protected com.sun.jersey.api.client.WebResource.Builder |
createBuilder(String path)
|
Notification |
createNotification(String text,
Notification.Priority priority,
String domain,
Map<String,String> customProperties)
Deprecated. |
void |
delete(String tenantId,
String domain)
Deletes a given tenant |
void |
deleteTenants(String domain,
List<String> tenantIds)
Deletes the tenants matching one of many given ids |
void |
dismissAllNotifications()
Does what CloudhubConnection.dismissNotification(String) to all the queued notifications in CH |
void |
dismissNotification(String href)
Removes the notification form the read queue |
protected String |
getAPIURL()
|
protected String |
getPassword()
|
Tenant |
getTenant(String domain,
String tenantId)
Returns an specific tenant |
protected String |
getUrl()
|
protected String |
getUsername()
|
protected void |
handleErrors(com.sun.jersey.api.client.ClientResponse response)
|
List<Application> |
listApplications()
|
NotificationResults |
listNotifications(Integer maxResults,
Integer offset,
String tenantId)
Lists all the notifications of an app. |
TenantResults |
listTenants(String domain,
Integer limit,
Integer offset,
String query)
Lists tenants for a given domain |
DomainConnection |
on(String domain)
|
boolean |
test()
|
Tenant |
update(Tenant tenant,
String domain)
Updates a tenant |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_URL
| Constructor Detail |
|---|
public Connection(String url,
String username,
String password)
public Connection(String url,
String username,
String password,
boolean debug)
| Method Detail |
|---|
protected final String getUrl()
protected final String getUsername()
protected final String getPassword()
protected final String getAPIURL()
protected com.sun.jersey.api.client.WebResource.Builder createBuilder(String path)
public final DomainConnection on(String domain)
on in interface CloudhubConnectiondomain - The domain of the required connection
A connection for a specific domain
public final boolean test()
test in interface CloudhubConnectionpublic final List<Application> listApplications()
listApplications in interface CloudhubConnection
@Deprecated
public final Notification createNotification(String text,
Notification.Priority priority,
String domain,
Map<String,String> customProperties)
CloudhubConnection.create(Notification) instead
createNotification in interface CloudhubConnectionpublic final Notification create(Notification notification)
Connects to CH to create a notification
create in interface CloudhubConnectionnotification - The notification information that needs to be created in CH
The created notification
public final NotificationResults listNotifications(Integer maxResults,
Integer offset,
String tenantId)
Lists all the notifications of an app.
In the case of a multitenant application those notifications will be filtered by tenant id.
listNotifications in interface CloudhubConnectionmaxResults - Maximum number of results. For pagination.
offset - Since which notification. For pagination.
tenantId - Filter by tenant id. If null then don't apply the filter
all existing applications
public final void dismissNotification(String href)
Removes the notification form the read queue
dismissNotification in interface CloudhubConnectionhref - href id of the notification that needs to be dismissed
public final void dismissAllNotifications()
Does what CloudhubConnection.dismissNotification(String) to all the queued notifications in CH
dismissAllNotifications in interface CloudhubConnection
public final TenantResults listTenants(String domain,
Integer limit,
Integer offset,
String query)
Lists tenants for a given domain
listTenants in interface CloudhubConnectiondomain - the domain owning the tenantslimit - The maximum number of results to return by default. Maximum of 100.offset - The offset to start searching atquery - The company name, contact name, and email of the tenant to search form. Performs a case insensitive match to any part of the tenant name.
TenantResults
public final Tenant getTenant(String domain,
String tenantId)
Returns an specific tenant
getTenant in interface CloudhubConnectiondomain - the domain owning the tenantstenantId - the id of the tenant you want
Tenant
public final Tenant create(Tenant tenant,
String domain)
Creates a tenant
create in interface CloudhubConnectiontenant - an instance of Tenant representing the tenantdomain - the domain that will own the tenant
Tenant carrying the state of the newly created tenant
public final Tenant update(Tenant tenant,
String domain)
Updates a tenant
update in interface CloudhubConnectiontenant - an instance of Tenant with the tenant's new statedomain - the domain that will own the tenant
Tenant carrying the tenant's updated state
public final void delete(String tenantId,
String domain)
Deletes a given tenant
delete in interface CloudhubConnectiontenantId - the id of the tenant to be deleteddomain - the domain that owns the tenant to be deleted
public void deleteTenants(String domain,
List<String> tenantIds)
Deletes the tenants matching one of many given ids
deleteTenants in interface CloudhubConnectiondomain - the domain you want to clear of tenantstenantIds - a list with tenant ids to be deletedprotected void handleErrors(com.sun.jersey.api.client.ClientResponse response)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||