IRecipeService.cs 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections.ObjectModel;
  4. using System.IO;
  5. using System.ServiceModel;
  6. using Aitex.Core.RT.RecipeCenter;
  7. using MECF.Framework.Common.Equipment;
  8. namespace MECF.Framework.Common.RecipeCenter
  9. {
  10. [ServiceContract]
  11. public interface IRecipeService
  12. {
  13. [OperationContract]
  14. string LoadRecipe(ModuleName chamId, string recipeName);
  15. /// <summary>
  16. ///
  17. /// </summary>
  18. /// <param name="chamId"></param>
  19. /// <returns> recipeName + recipeContent </returns>
  20. [OperationContract]
  21. Tuple<string, string> LoadRunTimeRecipeInfo(ModuleName chamId);
  22. [OperationContract]
  23. IEnumerable<string> GetRecipes(ModuleName chamId, bool includeUsedRecipe);
  24. [OperationContract]
  25. IEnumerable<string> GetAllRecipes(string chamId);
  26. [OperationContract]
  27. ObservableCollection<RecipeNode> GetRecipesByType(string recipeType);
  28. /// <summary>
  29. /// 获取工程指定类型的Recipe
  30. /// </summary>
  31. /// <param name="recipeType"></param>
  32. /// <returns></returns>
  33. [OperationContract]
  34. ObservableCollection<RecipeNode> GetEngineeringRecipesByType(string recipeType);
  35. /// <summary>
  36. /// 获取目录集合节点
  37. /// </summary>
  38. /// <param name="directories"></param>
  39. /// <returns></returns>
  40. [OperationContract]
  41. ObservableCollection<RecipeNode> GetRecipeByDirectoryList(List<string> directories);
  42. /// <summary>
  43. /// 加载 Recipe
  44. /// </summary>
  45. /// <param name="recipeFullName"></param>
  46. /// <returns></returns>
  47. [OperationContract]
  48. string LoadGenericityRecipe(string type, string recipeFullName);
  49. /// <summary>
  50. /// 保存 recipe
  51. /// </summary>
  52. /// <param name="root"></param>
  53. /// <param name="recipeName"></param>
  54. /// <param name="recipe"></param>
  55. [OperationContract]
  56. void SaveRecipeTypeRecipe(string root, string recipeName, string recipeType, string recipe, string dataType);
  57. [OperationContract]
  58. string GetXmlRecipeList(ModuleName chamId, bool includeUsedRecipe);
  59. [OperationContract]
  60. bool DeleteRecipe(ModuleName chamId, string recipeName);
  61. [OperationContract]
  62. bool DeleteFolder(ModuleName chamId, string folderName);
  63. [OperationContract]
  64. bool SaveAsRecipe(ModuleName chamId, string recipeName, string recipeContent);
  65. [OperationContract]
  66. bool SaveAsRecipe2(ModuleName chamId,string type, string recipeName, string recipeContent);
  67. [OperationContract]
  68. bool SaveRecipe(ModuleName chamId, string recipeName, string recipeContent);
  69. [OperationContract]
  70. bool CreateFolder(ModuleName chamId, string folderName);
  71. [OperationContract]
  72. bool MoveRecipeFile(ModuleName chamId, string folderName, string tragetFolderName);
  73. [OperationContract]
  74. bool RenameRecipe(ModuleName chamId, string oldName, string newName);
  75. [OperationContract]
  76. bool RenameFolder(ModuleName chamId, string oldName, string newName);
  77. [OperationContract]
  78. string GetRecipeFormatXml(ModuleName chamId);
  79. [OperationContract]
  80. string GetRecipeTemplate(ModuleName chamId);
  81. [OperationContract]
  82. string GetRecipeByBarcode(ModuleName chamId, string barcode);
  83. [OperationContract]
  84. bool DeleteRecipeByFullPath(string fullPath);
  85. [OperationContract]
  86. bool PromoteRecipe(List<string> FilePaths);
  87. #region Sequence
  88. [OperationContract]
  89. string GetXmlSequenceList(ModuleName chamId);
  90. [OperationContract]
  91. string GetSequence(string sequenceName);
  92. [OperationContract]
  93. List<string> GetSequenceNameList();
  94. [OperationContract]
  95. bool DeleteSequence(string sequenceName);
  96. [OperationContract]
  97. bool SaveSequence(string sequenceName, string sequenceContent);
  98. [OperationContract]
  99. bool SaveAsSequence(string sequenceName, string sequenceContent);
  100. [OperationContract]
  101. bool RenameSequence(string oldName, string newName);
  102. [OperationContract]
  103. string GetSequenceFormatXml();
  104. [OperationContract]
  105. bool RenameSequenceFolder(string oldName, string newName);
  106. [OperationContract]
  107. bool CreateSequenceFolder(string folderName);
  108. [OperationContract]
  109. bool DeleteSequenceFolder(string folderName);
  110. #endregion
  111. #region extended recipe interface
  112. [OperationContract]
  113. string LoadRecipeByPath(string path);
  114. [OperationContract]
  115. Tuple<string, string> LoadRunTimeRecipeInfoByPath(string pathName);
  116. [OperationContract]
  117. IEnumerable<string> GetRecipesByPath(string pathName, bool includeUsedRecipe);
  118. [OperationContract]
  119. string GetXmlRecipeListByPath(string pathName, bool includeUsedRecipe);
  120. [OperationContract]
  121. bool DeleteRecipeByPath(string pathName, string recipeName);
  122. [OperationContract]
  123. bool DeleteFolderByPath(string pathName, string folderName);
  124. [OperationContract]
  125. bool SaveAsRecipeByPath(string pathName, string recipeName, string recipeContent);
  126. [OperationContract]
  127. bool SaveRecipeByPath(string pathName, string recipeName, string recipeContent);
  128. [OperationContract]
  129. bool CreateFolderByPath(string pathName, string folderName);
  130. [OperationContract]
  131. bool RenameRecipeByPath(string pathName, string oldName, string newName);
  132. [OperationContract]
  133. bool RenameFolderByPath(string pathName, string oldName, string newName);
  134. [OperationContract]
  135. string GetRecipeFormatXmlByPath(string pathName);
  136. [OperationContract]
  137. string GetRecipeTemplateByPath(string pathName);
  138. [OperationContract]
  139. string GetRecipeByBarcodeByPath(string pathName, string barcode);
  140. [OperationContract]
  141. List<string> GetSequenceList(string recipeType, string sequenceType);
  142. #endregion
  143. }
  144. }