public class

StormpathModuleRestClientAdapter

extends StormpathModuleProcessAdapter
implements MuleContextAware Disposable Initialisable
java.lang.Object
   ↳ org.mule.modules.stormpath.StormpathModule
     ↳ org.mule.modules.stormpath.adapters.StormpathModuleCapabilitiesAdapter
       ↳ org.mule.modules.stormpath.adapters.StormpathModuleMetadataAdapater
         ↳ org.mule.modules.stormpath.adapters.StormpathModuleLifecycleAdapter
           ↳ org.mule.modules.stormpath.adapters.StormpathModuleProcessAdapter
             ↳ org.mule.modules.stormpath.adapters.StormpathModuleRestClientAdapter

Summary

[Expand]
Inherited Constants
From class org.mule.modules.stormpath.adapters.StormpathModuleMetadataAdapater
From interface org.mule.api.lifecycle.Disposable
From interface org.mule.api.lifecycle.Initialisable
From interface org.mule.api.lifecycle.Startable
From interface org.mule.api.lifecycle.Stoppable
Fields
private HttpClient httpClient
private HttpMuleMessageFactory httpMuleMessageFactory
private MuleContext muleContext
private int responseTimeout
[Expand]
Inherited Fields
From class org.mule.modules.stormpath.StormpathModule
Public Constructors
StormpathModuleRestClientAdapter()
Public Methods
LoginSuccess attemptLogin(String applicationId, LoginAttempt loginAttempt)
Attempt a login with the provided credentials.
Account createAccount(String directoryId, Account account)
Create an account.
AccountStoreMapping createAccountStoreMapping(AccountStoreMapping accountStoreMapping)
Create an account store mapping.
Application createApplication(Application application, boolean createDirectory)
Create an application.
Directory createDirectory(Directory directory)
Create a directory.
Group createGroup(String directoryId, Group group)
Create a group in a directory.
GroupMembership createGroupMembership(GroupMembership groupMembership)
Add an account to a group.
PasswordResetToken createPasswordResetToken(String applicationId, Email email)
Create a new password reset token for the provided email.
void deleteAccount(String accountId)
Delete an account.
void deleteAccountStoreMapping(String accountStoreMappingId)
Delete an account store mapping.
void deleteApplication(String applicationId)
Delete an application.
void deleteDirectory(String directoryId)
Delete a directory.
void deleteGroup(String groupId)
Delete a group.
void deleteGroupMembership(String groupMembershipId)
Remove an account from a group.
void initialise()
Account readAccount(String accountId)
Read an account.
Groups readAccountGroups(String accountId, Integer offset, Integer limit)
Read a paginated list of groups that belong to an account.
AccountStoreMapping readAccountStoreMapping(String accountStoreMappingId)
Read an account store mapping.
AccountStoreMappings readAccountStoreMappings(String applicationId)
Read the account store mappings for an application.
Application readApplication(String applicationId)
Read an application.
Accounts readApplicationAccounts(String applicationId, Integer offset, Integer limit)
Read a paginated list of accounts that belong to an application.
Directory readDirectory(String directoryId)
Read a directory.
Accounts readDirectoryAccounts(String directoryId, Integer offset, Integer limit)
Read a paginated list of accounts that belong to a directory.
Groups readDirectoryGroups(String directoryId, Integer offset, Integer limit)
Read a paginated list of groups that belong to a directory.
Group readGroup(String groupId)
Read a group.
Accounts readGroupAccounts(String groupId, Integer offset, Integer limit)
Read a paginated list of accounts that belong to a group.
PasswordResetToken readPasswordResetToken(String applicationId, String passwordResetTokenId)
Read an existing password reset token.
Tenant readTenant(String tenantId)
Read a tenant.
Applications readTenantApplications(String tenantId, Integer offset, Integer limit)
Read a paginated list of applications that belong to a tenant.
Directories readTenantDirectories(String tenantId, Integer offset, Integer limit)
Read a paginated list of directories that belong to a tenant.
void setMuleContext(MuleContext context)
void setResponseTimeout(int value)
Sets responseTimeout
Account updateAccount(String accountId, Account account)
Update an account.
AccountStoreMapping updateAccountStoreMapping(String accountStoreMappingId, AccountStoreMapping accountStoreMapping)
Update an account store mapping.
Application updateApplication(String applicationId, Application application)
Update an application.
Directory updateDirectory(String directoryId, Directory directory)
Update a directory.
Group updateGroup(String groupId, Group group)
Update a group.
Tenant updateTenant(String tenantId, Tenant tenant)
Update a tenant.
[Expand]
Inherited Methods
From class org.mule.modules.stormpath.adapters.StormpathModuleProcessAdapter
From class org.mule.modules.stormpath.adapters.StormpathModuleLifecycleAdapter
From class org.mule.modules.stormpath.adapters.StormpathModuleMetadataAdapater
From class org.mule.modules.stormpath.adapters.StormpathModuleCapabilitiesAdapter
From class org.mule.modules.stormpath.StormpathModule
From class java.lang.Object
From interface org.mule.api.context.MuleContextAware
From interface org.mule.api.lifecycle.Disposable
From interface org.mule.api.lifecycle.Initialisable
From interface org.mule.api.lifecycle.Startable
From interface org.mule.api.lifecycle.Stoppable
From interface org.mule.modules.stormpath.basic.Capabilities
From interface org.mule.modules.stormpath.basic.MetadataAware
From interface org.mule.modules.stormpath.process.ProcessAdapter

Fields

private HttpClient httpClient

private HttpMuleMessageFactory httpMuleMessageFactory

private MuleContext muleContext

private int responseTimeout

Public Constructors

public StormpathModuleRestClientAdapter ()

Public Methods

public LoginSuccess attemptLogin (String applicationId, LoginAttempt loginAttempt)

Attempt a login with the provided credentials.

Parameters
applicationId The unique identifier of the application.
loginAttempt A LoginAttempt instance.
Returns
Throws
IOException

public Account createAccount (String directoryId, Account account)

Create an account.

Parameters
directoryId The unique identifier of the directory.
account The Account to create.
Returns
Throws
IOException

public AccountStoreMapping createAccountStoreMapping (AccountStoreMapping accountStoreMapping)

Create an account store mapping.

Parameters
accountStoreMapping An AccountStoreMapping to create.
Returns
Throws
IOException

public Application createApplication (Application application, boolean createDirectory)

Create an application.

Parameters
application The Application to create.
createDirectory Define if a directory should be created and associated with the new application.
Returns
Throws
IOException

public Directory createDirectory (Directory directory)

Create a directory.

Parameters
directory The Directory to create.
Returns
Throws
IOException

public Group createGroup (String directoryId, Group group)

Create a group in a directory.

Parameters
directoryId The unique identifier of the directory.
group The Group to create.
Returns
  • a newly created Group instance.
Throws
IOException

public GroupMembership createGroupMembership (GroupMembership groupMembership)

Add an account to a group.

Parameters
groupMembership A GroupMembership instance that specifies the account and group to link.
Returns
Throws
IOException

public PasswordResetToken createPasswordResetToken (String applicationId, Email email)

Create a new password reset token for the provided email.

Parameters
applicationId The unique identifier of the application.
email An Email instance.
Returns
Throws
IOException

public void deleteAccount (String accountId)

Delete an account.

Parameters
accountId The unique identifier of the account.
Throws
IOException

public void deleteAccountStoreMapping (String accountStoreMappingId)

Delete an account store mapping.

Parameters
accountStoreMappingId The unique identifier of the account store mapping.
Throws
IOException

public void deleteApplication (String applicationId)

Delete an application.

Parameters
applicationId The unique identifier of the application.
Throws
IOException

public void deleteDirectory (String directoryId)

Delete a directory.

Parameters
directoryId The unique identifier of the directory.
Throws
IOException

public void deleteGroup (String groupId)

Delete a group.

Parameters
groupId The unique identifier of the group.
Throws
IOException

public void deleteGroupMembership (String groupMembershipId)

Remove an account from a group.

Parameters
groupMembershipId The unique identifier of the group membership.
Throws
IOException

public void initialise ()

Throws
InitialisationException

public Account readAccount (String accountId)

Read an account.

Parameters
accountId The unique identifier of the account.
Returns
Throws
IOException

public Groups readAccountGroups (String accountId, Integer offset, Integer limit)

Read a paginated list of groups that belong to an account.

Parameters
accountId The unique identifier of the account.
offset The zero-based starting index in the entire collection of the first item to return.
limit The maximum number of collection items to return for a single request.
Returns
Throws
IOException

public AccountStoreMapping readAccountStoreMapping (String accountStoreMappingId)

Read an account store mapping.

Parameters
accountStoreMappingId The unique identifier of the account store mapping.
Returns
Throws
IOException

public AccountStoreMappings readAccountStoreMappings (String applicationId)

Read the account store mappings for an application.

Parameters
applicationId The unique identifier of the application.
Returns
Throws
IOException

public Application readApplication (String applicationId)

Read an application.

Parameters
applicationId The unique identifier of the application.
Returns
Throws
IOException

public Accounts readApplicationAccounts (String applicationId, Integer offset, Integer limit)

Read a paginated list of accounts that belong to an application.

Parameters
applicationId The unique identifier of the application.
offset The zero-based starting index in the entire collection of the first item to return.
limit The maximum number of collection items to return for a single request.
Returns
Throws
IOException

public Directory readDirectory (String directoryId)

Read a directory.

Parameters
directoryId The unique identifier of the directory.
Returns
Throws
IOException

public Accounts readDirectoryAccounts (String directoryId, Integer offset, Integer limit)

Read a paginated list of accounts that belong to a directory.

Parameters
directoryId The unique identifier of the directory.
offset The zero-based starting index in the entire collection of the first item to return.
limit The maximum number of collection items to return for a single request.
Returns
Throws
IOException

public Groups readDirectoryGroups (String directoryId, Integer offset, Integer limit)

Read a paginated list of groups that belong to a directory.

Parameters
directoryId The unique identifier of the directory.
offset The zero-based starting index in the entire collection of the first item to return.
limit The maximum number of collection items to return for a single request.
Returns
Throws
IOException

public Group readGroup (String groupId)

Read a group.

Parameters
groupId The unique identifier of the group.
Returns
Throws
IOException

public Accounts readGroupAccounts (String groupId, Integer offset, Integer limit)

Read a paginated list of accounts that belong to a group.

Parameters
groupId The unique identifier of the group.
offset The zero-based starting index in the entire collection of the first item to return.
limit The maximum number of collection items to return for a single request.
Returns
Throws
IOException

public PasswordResetToken readPasswordResetToken (String applicationId, String passwordResetTokenId)

Read an existing password reset token.

Parameters
applicationId The unique identifier of the application.
passwordResetTokenId The unique identifier of the password reset token.
Returns
Throws
IOException

public Tenant readTenant (String tenantId)

Read a tenant.

Parameters
tenantId The unique identifier of the tenant or current for the currently authenticated tenant.
Returns
Throws
IOException

public Applications readTenantApplications (String tenantId, Integer offset, Integer limit)

Read a paginated list of applications that belong to a tenant.

Parameters
tenantId The unique identifier of the tenant (current is not a valid value).
offset The zero-based starting index in the entire collection of the first item to return.
limit The maximum number of collection items to return for a single request.
Returns
Throws
IOException

public Directories readTenantDirectories (String tenantId, Integer offset, Integer limit)

Read a paginated list of directories that belong to a tenant.

Parameters
tenantId The unique identifier of the tenant (current is not a valid value).
offset The zero-based starting index in the entire collection of the first item to return.
limit The maximum number of collection items to return for a single request.
Returns
Throws
IOException

public void setMuleContext (MuleContext context)

Parameters
context

public void setResponseTimeout (int value)

Sets responseTimeout

Parameters
value Value to set

public Account updateAccount (String accountId, Account account)

Update an account.

Parameters
accountId The unique identifier of the account.
account The Account to update.
Returns
Throws
IOException

public AccountStoreMapping updateAccountStoreMapping (String accountStoreMappingId, AccountStoreMapping accountStoreMapping)

Update an account store mapping.

Parameters
accountStoreMappingId The unique identifier of the account store mapping.
accountStoreMapping An AccountStoreMapping instance that contains the fields to update.
Returns
Throws
IOException

public Application updateApplication (String applicationId, Application application)

Update an application.

Parameters
applicationId The unique identifier of the application.
application The Application to update.
Returns
Throws
IOException

public Directory updateDirectory (String directoryId, Directory directory)

Update a directory.

Parameters
directoryId The unique identifier of the directory.
directory The Directory to update.
Returns
Throws
IOException

public Group updateGroup (String groupId, Group group)

Update a group.

Parameters
groupId The unique identifier of the group.
group The Group to update.
Returns
  • the updated Group instance.
Throws
IOException

public Tenant updateTenant (String tenantId, Tenant tenant)

Update a tenant.

Parameters
tenantId The unique identifier of the tenant (current is not a valid value).
tenant A Tenant instance.
Returns
Throws
IOException