@PublicApi
public interface OrganizationService
Modifier and Type | Method and Description |
---|---|
void |
addOrganizationToServiceDesk(com.atlassian.jira.user.ApplicationUser user,
OrganizationServiceDeskUpdateParameters organizationServiceDeskUpdateParameters)
Adds an organization to a Service Desk if the user is an agent of that Service Desk.
|
void |
addUsersToOrganization(com.atlassian.jira.user.ApplicationUser executingUser,
UsersOrganizationUpdateParameters parameters)
Adds users to a specified organization.
|
CustomerOrganization |
createOrganization(com.atlassian.jira.user.ApplicationUser user,
CreateOrganizationParameters parameters)
Creates a new customer organization.
|
void |
delete(com.atlassian.jira.user.ApplicationUser user,
Integer organizationId)
Deletes a customer organization if the user is a Jira admin and an agent.
|
CustomerOrganization |
getById(com.atlassian.jira.user.ApplicationUser user,
Integer organizationId)
Gets customer organization by ID if user is an agent or a member of the organization.
|
PagedResponse<CustomerOrganization> |
getOrganizations(com.atlassian.jira.user.ApplicationUser user,
OrganizationsQuery requestQuery)
Returns a list of organizations in the Jira instance based on query parameters.
|
PagedResponse<com.atlassian.jira.user.ApplicationUser> |
getUsersInOrganization(com.atlassian.jira.user.ApplicationUser user,
UsersInOrganizationQuery query)
Gets all the applicationUsers in a given organization.
|
CreateOrganizationParameters.Builder |
newCreateBuilder()
Returns a new
CreateOrganizationParameters.Builder to build CreateOrganizationParameters |
OrganizationServiceDeskUpdateParameters.Builder |
newOrganizationServiceDeskUpdateParametersBuilder() |
OrganizationsQuery.Builder |
newOrganizationsQueryBuilder() |
UsersInOrganizationQuery.Builder |
newUsersInOrganizationQuery() |
UsersOrganizationUpdateParameters.Builder |
newUsersOrganizationUpdateParametersBuilder() |
void |
removeOrganizationFromServiceDesk(com.atlassian.jira.user.ApplicationUser user,
OrganizationServiceDeskUpdateParameters organizationServiceDeskUpdateParameters)
Removes an organization from a Service Desk if the user is an agent of that Service Desk.
|
void |
removeUsersFromOrganization(com.atlassian.jira.user.ApplicationUser user,
UsersOrganizationUpdateParameters parameters)
Removes users from a specified organization.
|
CustomerOrganization getById(@Nonnull com.atlassian.jira.user.ApplicationUser user, @Nonnull Integer organizationId)
user
- the user to checkorganizationId
- the ID of the organization to retrieveServiceDeskServiceException
- on errorCustomerOrganization createOrganization(@Nonnull com.atlassian.jira.user.ApplicationUser user, @Nonnull CreateOrganizationParameters parameters)
user
- the user to checkparameters
- parameters to create a new organizationServiceDeskServiceException
- on errorCreateOrganizationParameters.Builder newCreateBuilder()
CreateOrganizationParameters.Builder
to build CreateOrganizationParameters
void delete(@Nonnull com.atlassian.jira.user.ApplicationUser user, @Nonnull Integer organizationId)
user
- the user who you want to checkorganizationId
- the ID of the organization you want delete.ServiceDeskServiceException
- on errorPagedResponse<com.atlassian.jira.user.ApplicationUser> getUsersInOrganization(@Nonnull com.atlassian.jira.user.ApplicationUser user, UsersInOrganizationQuery query)
user
- the user to checkquery
- the query containing the organization and the pageRequestServiceDeskServiceException
- on errorUsersInOrganizationQuery.Builder newUsersInOrganizationQuery()
UsersInOrganizationQuery.Builder
to Build UsersInOrganizationQuery
PagedResponse<CustomerOrganization> getOrganizations(@Nonnull com.atlassian.jira.user.ApplicationUser user, @Nonnull OrganizationsQuery requestQuery)
user
- the user who performs a queryrequestQuery
- the query containing the pageRequestServiceDeskServiceException
- on errorOrganizationsQuery.Builder newOrganizationsQueryBuilder()
OrganizationsQuery.Builder
to build OrganizationsQuery
void addOrganizationToServiceDesk(@Nonnull com.atlassian.jira.user.ApplicationUser user, @Nonnull OrganizationServiceDeskUpdateParameters organizationServiceDeskUpdateParameters)
user
- the user adding the organizationorganizationServiceDeskUpdateParameters
- contains the Service Desk id and the organizationServiceDeskServiceException
- on errorvoid removeOrganizationFromServiceDesk(@Nonnull com.atlassian.jira.user.ApplicationUser user, @Nonnull OrganizationServiceDeskUpdateParameters organizationServiceDeskUpdateParameters)
user
- the user removing the organizationorganizationServiceDeskUpdateParameters
- contains the Service Desk id and the organizationServiceDeskServiceException
- on errorOrganizationServiceDeskUpdateParameters.Builder newOrganizationServiceDeskUpdateParametersBuilder()
OrganizationServiceDeskUpdateParameters.Builder
to build OrganizationServiceDeskUpdateParameters parametersvoid addUsersToOrganization(@Nonnull com.atlassian.jira.user.ApplicationUser executingUser, @Nonnull UsersOrganizationUpdateParameters parameters)
executingUser
- the user who you want to checkparameters
- the parameters containing the organization and users to addServiceDeskServiceException
- on errorvoid removeUsersFromOrganization(@Nonnull com.atlassian.jira.user.ApplicationUser user, @Nonnull UsersOrganizationUpdateParameters parameters)
user
- the user who you want to checkparameters
- parameters containing the users to remove from the given organizationServiceDeskServiceException
- on errorUsersOrganizationUpdateParameters.Builder newUsersOrganizationUpdateParametersBuilder()
UsersOrganizationUpdateParameters.Builder
to Build UsersOrganizationUpdateParameters
Copyright © 2019 Atlassian. All rights reserved.