OrganizationService.java 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * <<
  3. * Davinci
  4. * ==
  5. * Copyright (C) 2016 - 2019 EDP
  6. * ==
  7. * Licensed under the Apache License, Version 2.0 (the "License");
  8. * you may not use this file except in compliance with the License.
  9. * You may obtain a copy of the License at
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. * >>
  17. *
  18. */
  19. package edp.davinci.service;
  20. import edp.core.exception.NotFoundException;
  21. import edp.core.exception.ServerException;
  22. import edp.core.exception.UnAuthorizedException;
  23. import edp.davinci.core.service.CheckEntityService;
  24. import edp.davinci.dto.organizationDto.*;
  25. import edp.davinci.model.User;
  26. import org.springframework.web.multipart.MultipartFile;
  27. import java.util.List;
  28. import java.util.Map;
  29. public interface OrganizationService extends CheckEntityService {
  30. List<OrganizationInfo> getOrganizations(User user);
  31. boolean updateOrganization(OrganizationPut organizationPut, User user) throws NotFoundException, UnAuthorizedException, ServerException;
  32. OrganizationBaseInfo createOrganization(OrganizationCreate organizationCreate, User user) throws ServerException;
  33. Map<String, String> uploadAvatar(Long id, MultipartFile file, User user) throws NotFoundException, UnAuthorizedException, ServerException;
  34. boolean deleteOrganization(Long id, User user) throws NotFoundException, UnAuthorizedException, ServerException;
  35. OrganizationInfo getOrganization(Long id, User user) throws NotFoundException, UnAuthorizedException;
  36. List<OrganizationMember> getOrgMembers(Long id);
  37. void inviteMember(Long orgId, Long memId, User user) throws NotFoundException, UnAuthorizedException, ServerException;
  38. BatchInviteMemberResult batchInviteCustomMembers(Long orgId, InviteMembers inviteMembers, User user) throws NotFoundException, UnAuthorizedException, ServerException;
  39. OrganizationInfo confirmInvite(String token, User user) throws ServerException;
  40. boolean deleteOrgMember(Long relationId, User user) throws NotFoundException, UnAuthorizedException, ServerException;
  41. boolean updateMemberRole(Long relationId, User user, int role) throws NotFoundException, UnAuthorizedException, ServerException;
  42. void confirmInviteNoLogin(String token) throws NotFoundException, ServerException;
  43. }