WidgetService.java 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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.projectDto.ProjectDetail;
  25. import edp.davinci.dto.shareDto.ShareEntity;
  26. import edp.davinci.dto.widgetDto.WidgetWithViewName;
  27. import edp.davinci.service.share.ShareResult;
  28. import edp.davinci.dto.viewDto.ViewExecuteParam;
  29. import edp.davinci.dto.widgetDto.WidgetCreate;
  30. import edp.davinci.dto.widgetDto.WidgetUpdate;
  31. import edp.davinci.model.User;
  32. import edp.davinci.model.Widget;
  33. import java.io.File;
  34. import java.util.List;
  35. import java.util.Map;
  36. import java.util.Set;
  37. public interface WidgetService extends CheckEntityService {
  38. List<WidgetWithViewName> getWidgets(Long projectId, User user) throws NotFoundException, UnAuthorizedException, ServerException;
  39. Widget createWidget(WidgetCreate widgetCreate, User user) throws NotFoundException, UnAuthorizedException, ServerException;
  40. boolean updateWidget(WidgetUpdate widgetUpdate, User user) throws NotFoundException, UnAuthorizedException, ServerException;
  41. boolean deleteWidget(Long id, User user) throws NotFoundException, UnAuthorizedException, ServerException;
  42. ShareResult shareWidget(Long id, User user, ShareEntity shareEntity) throws NotFoundException, UnAuthorizedException, ServerException;
  43. Widget getWidget(Long id, User user) throws NotFoundException, UnAuthorizedException, ServerException;
  44. String generationFile(Long id, ViewExecuteParam executeParam, User user, String type) throws NotFoundException, ServerException, UnAuthorizedException;
  45. File writeExcel(Set<Widget> widgets, ProjectDetail projectDetail, Map<Long, ViewExecuteParam> executeParamMap, String filePath, User user, boolean containType) throws Exception;
  46. String showSql(Long id, ViewExecuteParam executeParam, User user) throws NotFoundException, UnAuthorizedException, ServerException;
  47. }