|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.jira.crowd.embedded.DefaultJaacsService
public class DefaultJaacsService
Constructor Summary | |
---|---|
DefaultJaacsService(com.atlassian.crowd.manager.application.ApplicationManager applicationManager,
PermissionManager permissionManager,
I18nHelper.BeanFactory i18nFactory)
|
Method Summary | |
---|---|
boolean |
addRemoteAddress(JiraServiceContext jiraServiceContext,
String remoteAddress,
long applicationId)
Adding a new remote address. |
void |
create(com.atlassian.crowd.embedded.api.User remoteUser,
com.atlassian.crowd.model.application.Application application)
Creates a new Application |
boolean |
deleteApplication(JiraServiceContext jiraServiceContext,
long applicationId)
Delete a remote address. |
protected String |
displayName(com.atlassian.crowd.embedded.api.User remoteUser,
Long applicationId)
Attempts to read the the Application with the given id from the database, and returns its display name. |
protected void |
ensureIsAdmin(com.atlassian.crowd.embedded.api.User remoteUser)
If the remote user is not an administrator, throws a ValidationFailureException with the appropriate error. |
List<com.atlassian.crowd.model.application.Application> |
findAll(com.atlassian.crowd.embedded.api.User remoteUser)
Returns a list containing all non-permanent Crowd applications. |
com.atlassian.crowd.model.application.ApplicationImpl |
findById(com.atlassian.crowd.embedded.api.User 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. |
protected I18nHelper |
i18n(com.atlassian.crowd.embedded.api.User user)
Returns an I18nHelper for the given user. |
boolean |
resetPassword(JiraServiceContext jiraServiceContext,
String password,
long applicationId)
Reset a password. |
void |
update(com.atlassian.crowd.embedded.api.User 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. |
protected void |
validateApplication(com.atlassian.crowd.embedded.api.User user,
com.atlassian.crowd.model.application.Application application)
Validates the application's name, password, and remote addresses fields. |
boolean |
validateDeleteApplication(JiraServiceContext jiraServiceContext,
long applicationId)
Validate deleting a remote address. |
protected void |
validateJiraServiceContext(JiraServiceContext jiraServiceContext)
|
boolean |
validateResetPassword(JiraServiceContext jiraServiceContext,
String password,
long applicationId)
Validate resetting a password. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultJaacsService(com.atlassian.crowd.manager.application.ApplicationManager applicationManager, PermissionManager permissionManager, I18nHelper.BeanFactory i18nFactory)
Method Detail |
---|
public Set<com.atlassian.crowd.model.application.RemoteAddress> getRemoteAddresses(JiraServiceContext jiraServiceContext, long applicationId)
JaacsService
getRemoteAddresses
in interface JaacsService
jiraServiceContext
- The service context.applicationId
- Application Id
public boolean validateAddRemoteAddress(JiraServiceContext jiraServiceContext, String remoteAddress, long applicationId)
JaacsService
validateAddRemoteAddress
in interface JaacsService
jiraServiceContext
- The service context.remoteAddress
- A new address to addapplicationId
- Application Id
public boolean addRemoteAddress(JiraServiceContext jiraServiceContext, String remoteAddress, long applicationId)
JaacsService
addRemoteAddress
in interface JaacsService
jiraServiceContext
- The service context.remoteAddress
- A new address to addapplicationId
- Application Id
public boolean validateDeleteApplication(JiraServiceContext jiraServiceContext, long applicationId)
JaacsService
validateDeleteApplication
in interface JaacsService
jiraServiceContext
- The service context.applicationId
- Application Id
public boolean deleteApplication(JiraServiceContext jiraServiceContext, long applicationId)
JaacsService
deleteApplication
in interface JaacsService
jiraServiceContext
- The service context.applicationId
- Application Id
public boolean validateResetPassword(JiraServiceContext jiraServiceContext, String password, long applicationId)
JaacsService
validateResetPassword
in interface JaacsService
jiraServiceContext
- The service context.password
- A password stringapplicationId
- Application Id
public boolean resetPassword(JiraServiceContext jiraServiceContext, String password, long applicationId)
JaacsService
resetPassword
in interface JaacsService
jiraServiceContext
- The service context.password
- A password stringapplicationId
- Application Id
public List<com.atlassian.crowd.model.application.Application> findAll(com.atlassian.crowd.embedded.api.User remoteUser)
JaacsService
findAll
in interface JaacsService
remoteUser
- a User representing the user on whose behalf to perform the call
public com.atlassian.crowd.model.application.ApplicationImpl findById(com.atlassian.crowd.embedded.api.User remoteUser, Long applicationId)
JaacsService
findById
in interface JaacsService
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
public void create(com.atlassian.crowd.embedded.api.User remoteUser, com.atlassian.crowd.model.application.Application application)
JaacsService
create
in interface JaacsService
remoteUser
- a User representing the user on whose behalf to perform the callapplication
- an Application to createpublic void update(com.atlassian.crowd.embedded.api.User remoteUser, com.atlassian.crowd.model.application.Application updatedApplication)
JaacsService
update
in interface JaacsService
remoteUser
- a User representing the user on whose behalf to perform the callupdatedApplication
- an Application to updateprotected void validateJiraServiceContext(JiraServiceContext jiraServiceContext)
protected void ensureIsAdmin(com.atlassian.crowd.embedded.api.User remoteUser) throws ValidationFailureException
remoteUser
- a User representing the user on whose behalf to perform the call
ValidationFailureException
- if the user is not an adminprotected void validateApplication(com.atlassian.crowd.embedded.api.User user, com.atlassian.crowd.model.application.Application application) throws ValidationFailureException
user
- a User on whose behalfapplication
- the Application to validate
ValidationFailureException
- if any of the field values is not validprotected String displayName(com.atlassian.crowd.embedded.api.User remoteUser, Long applicationId)
remoteUser
- the User on whose behalf this service is operatingapplicationId
- a Long containing an application id
protected I18nHelper i18n(com.atlassian.crowd.embedded.api.User user)
user
- a User
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |