@startuml package "services" { interface CrmLookupService { List findStatuses() Status findStatusByCode(String code) throws ItemNotFoundException Status findStatusByLocalizedName(Locale locale, String name) throws ItemNotFoundException List findRoles() Role findRoleByCode(String code) throws ItemNotFoundException Role findRoleByLocalizedName(Locale locale, String name) throws ItemNotFoundException List findCountries() Country findCountryByCode(String code) throws ItemNotFoundException Country findCountryByLocalizedName(Locale locale, String name) throws ItemNotFoundException List findSalutations() Salutation findSalutationByCode(Integer code) throws ItemNotFoundException Salutation findSalutationByLocalizedName(Locale locale, String name) throws ItemNotFoundException } interface CrmOrganizationService { OrganizationDetails createOrganization(String organizationName) OrganizationSummary enableOrganization(Identifier organizationId) OrganizationSummary disableOrganization(Identifier organizationId) OrganizationDetails updateOrganizationName(Identifier organizationId, String name) OrganizationDetails updateOrganizationMainLocation(Identifier organizationId, Identifier locationId) OrganizationSummary findOrganizationSummary(Identifier organizationId) OrganizationDetails findOrganizationDetails(Identifier organizationId) long countOrganizations(OrganizationsFilter filter) Page findOrganizationDetails(OrganizationsFilter filter, Paging paging) Page findOrganizationSummaries(OrganizationsFilter filter, Paging paging) } interface CrmLocationService { LocationDetails createLocation(Identifier organizationId, String locationName, String locationReference, MailingAddress address) LocationSummary enableLocation(Identifier locationId) LocationSummary disableLocation(Identifier locationId) LocationDetails updateLocationName(Identifier locationId, String locationName) LocationDetails updateLocationAddress(Identifier locationId, MailingAddress address) LocationSummary findLocationSummary(Identifier locationId) LocationDetails findLocationDetails(Identifier locationId) long countLocations(LocationsFilter filter) Page findLocationDetails(LocationsFilter filter, Paging paging) Page findLocationSummaries(LocationsFilter filter, Paging paging) } interface CrmPersonService { PersonDetails createPerson(Identifier organizationId, PersonName name, MailingAddress address, Communication communication, BusinessPosition unit) PersonSummary enablePerson(Identifier personId) PersonSummary disablePerson(Identifier personId) PersonDetails updatePersonName(Identifier personId, PersonName name) PersonDetails updatePersonAddress(Identifier personId, MailingAddress address) PersonDetails updatePersonCommunication(Identifier personId, Communication communication) PersonDetails updatePersonBusinessUnit(Identifier personId, BusinessPosition unit) PersonDetails addUserRole(Identifier personId, Role role) PersonDetails removeUserRole(Identifier personId, Role role) PersonSummary findPersonSummary(Identifier personId) PersonDetails findPersonDetails(Identifier personId) long countPersons(PersonsFilter filter) Page findPersonDetails(PersonsFilter filter, Paging paging) Page findPersonSummaries(PersonsFilter filter, Paging paging) } } @enduml