Interface JaacsService
- All Known Implementing Classes:
DefaultJaacsService
public interface JaacsService
Service to support configuration of JIRA as a Crowd Service.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addRemoteAddress
(JiraServiceContext jiraServiceContext, String remoteAddress, long applicationId) Adding a new remote address.void
create
(ApplicationUser remoteUser, com.atlassian.crowd.model.application.Application application) Creates a new Applicationboolean
deleteApplication
(JiraServiceContext jiraServiceContext, long applicationId) Delete a remote address.List<com.atlassian.crowd.model.application.Application>
findAll
(ApplicationUser remoteUser) Returns a list containing all non-permanent Crowd applications.com.atlassian.crowd.model.application.ApplicationImpl
findById
(ApplicationUser remoteUser, Long applicationId) Returns the Application having the given id.Set<com.atlassian.crowd.model.application.RemoteAddress>
getRemoteAddresses
(JiraServiceContext jiraServiceContext, long applicationId) Retrieve a list of configured remote addresses.boolean
resetPassword
(JiraServiceContext jiraServiceContext, String password, long applicationId) Reset a password.void
update
(ApplicationUser remoteUser, com.atlassian.crowd.model.application.Application updatedApplication) Updates an Application.boolean
validateAddRemoteAddress
(JiraServiceContext jiraServiceContext, String remoteAddress, long applicationId) Validate adding a new remote address.boolean
validateDeleteApplication
(JiraServiceContext jiraServiceContext, long applicationId) Validate deleting a remote address.boolean
validateResetPassword
(JiraServiceContext jiraServiceContext, String password, long applicationId) Validate resetting a password.
-
Method Details
-
getRemoteAddresses
Set<com.atlassian.crowd.model.application.RemoteAddress> getRemoteAddresses(JiraServiceContext jiraServiceContext, long applicationId) Retrieve a list of configured remote addresses.- Parameters:
jiraServiceContext
- The service context.applicationId
- Application Id- Returns:
- List of configured remote addresses.
-
validateAddRemoteAddress
boolean validateAddRemoteAddress(JiraServiceContext jiraServiceContext, String remoteAddress, long applicationId) Validate adding a new remote address.- Parameters:
remoteAddress
- A new address to addjiraServiceContext
- The service context.applicationId
- Application Id- Returns:
- true if validation passes
-
addRemoteAddress
boolean addRemoteAddress(JiraServiceContext jiraServiceContext, String remoteAddress, long applicationId) Adding a new remote address.- Parameters:
jiraServiceContext
- The service context.remoteAddress
- A new address to addapplicationId
- Application Id- Returns:
- true if validation passes
-
validateDeleteApplication
Validate deleting a remote address.- Parameters:
jiraServiceContext
- The service context.applicationId
- Application Id- Returns:
- true if validation passes and action succeeds
-
deleteApplication
Delete a remote address.- Parameters:
jiraServiceContext
- The service context.applicationId
- Application Id- Returns:
- true if validation passes
-
validateResetPassword
boolean validateResetPassword(JiraServiceContext jiraServiceContext, String password, long applicationId) Validate resetting a password.- Parameters:
password
- A password stringjiraServiceContext
- The service context.applicationId
- Application Id- Returns:
- true if validation passes
-
resetPassword
Reset a password.- Parameters:
password
- A password stringjiraServiceContext
- The service context.applicationId
- Application Id- Returns:
- true if validation passes and action succeeds
-
findAll
List<com.atlassian.crowd.model.application.Application> findAll(ApplicationUser remoteUser) throws ValidationFailureException Returns a list containing all non-permanent Crowd applications.- Parameters:
remoteUser
- a User representing the user on whose behalf to perform the call- Returns:
- a new List
- Throws:
ValidationFailureException
- if there is a problem
-
findById
com.atlassian.crowd.model.application.ApplicationImpl findById(ApplicationUser remoteUser, Long applicationId) throws ValidationFailureException Returns the Application having the given id.- Parameters:
remoteUser
- a User representing the user on whose behalf to perform the callapplicationId
- a Long containing an application id, or null if it doesn't exist- Returns:
- an Application
- Throws:
ValidationFailureException
- if there is a problem
-
create
void create(ApplicationUser remoteUser, com.atlassian.crowd.model.application.Application application) throws ValidationFailureException Creates a new Application- Parameters:
remoteUser
- a User representing the user on whose behalf to perform the callapplication
- an Application to create- Throws:
ValidationFailureException
- if there is a problem
-
update
void update(ApplicationUser remoteUser, com.atlassian.crowd.model.application.Application updatedApplication) throws ValidationFailureException Updates an Application. The application having the given id will be updated with the remaining contents.- Parameters:
remoteUser
- a User representing the user on whose behalf to perform the callupdatedApplication
- an Application to update- Throws:
ValidationFailureException
- if there is a problem
-