config.xml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <?xml version="1.0" encoding="GB2312"?>
  2. <plugin version="1.0" id="components.common.publish">
  3. <!-- Cached-Object Config For ICachePOMgr BEGIN -->
  4. <extension
  5. element-class="com.trs.infra.persistent.cache.CachedObjectConfig"
  6. id="CachedObjs">
  7. <cached-object Name="模板"
  8. ClassName="com.trs.components.common.publish.persistent.template.Template" />
  9. <cached-object Name="文件夹发布配置"
  10. ClassName="com.trs.components.common.publish.persistent.publisher.FolderPublishConfig" />
  11. </extension>
  12. <!-- Cached-Object Config For ICachePOMgr END -->
  13. <!-- Update-Commander Config For UpdateServer BEGIN -->
  14. <!--extension element-class="com.trs.infra.update.UpdateCommanderConfig" id="WCMContentUpdateCommander">
  15. <update-commander Name="模板标准化升级程序"
  16. ClassName="com.trs.components.common.publish.PublishUpdateCommderImpl"/>
  17. </extension-->
  18. <!-- Update-Commander Config For UpdateServer END -->
  19. <!--Object Types BEGIN-->
  20. <extension element-class="com.trs.infra.persistent.ObjectTypeConfig" id="ObjectTypes">
  21. <object-type ObjectType="102" name="模板" ObjectClassName="com.trs.components.common.publish.persistent.template.Template"/>
  22. </extension>
  23. <!--Object Types END-->
  24. <!-- Right Objects BEGIN -->
  25. <extension element-class="com.trs.cms.auth.config.RightObjectConfig"
  26. id="RightObjects">
  27. <right-object name="模板权限判断对象"
  28. ClassName="com.trs.components.common.publish.domain.auth.TemplateRightObjImpl" />
  29. </extension>
  30. <!-- Right Objects END -->
  31. <!--Config For Server BEGIN-->
  32. <extension element-class="com.trs.infra.ServerConfig" id="Server">
  33. <server bean-id="PublishServer" name="发布服务器" />
  34. </extension>
  35. <!--Config For Server END-->
  36. <!-- Config For ObjectLCMonitor BEGIN -->
  37. <!--
  38. Listener默认为监控对象的新增、修改、删除前
  39. EventType:
  40. 1:新增
  41. 2:修改
  42. 3:删除前
  43. 4、删除后
  44. 多个以逗号隔开
  45. -->
  46. <extension
  47. element-class="com.trs.infra.persistent.listener.MonitorHostConfig"
  48. id="ObjectLCMonitor">
  49. <!-- 发布模块 -->
  50. <monitor-host name="TagBean"
  51. class-name="com.trs.components.common.publish.persistent.template.TagBean">
  52. <listener bean-id="TagBeanLCListener" />
  53. </monitor-host>
  54. <!-- 分发模块 -->
  55. <monitor-host name="FileDistribute"
  56. class-name="com.trs.components.common.publish.persistent.distribute.PublishDistribution">
  57. <listener bean-id="PublishDistributionCacheMgr" />
  58. </monitor-host>
  59. <!-- 模板修改 -->
  60. <monitor-host name="TemplateChanged"
  61. class-name="com.trs.components.common.publish.persistent.template.Template">
  62. <listener bean-id="TemplateLCListenerForNestedRename" event-type="2"/>
  63. <listener bean-id="TemplateCacheMgr" event-type="2,4"/>
  64. <listener bean-id="TemplateLCListenerForTypeChanged" event-type="2"/>
  65. </monitor-host>
  66. <!-- 发布元素和模板关系的变化修改 -->
  67. <monitor-host name="TemplateEmployChanged"
  68. class-name="com.trs.components.common.publish.persistent.template.TemplateEmploy">
  69. <listener bean-id="ITemplateEmployCacheMgr"/>
  70. <listener bean-id="TemplateArgumentLCListenerForEmployChanged" event-type="2,4"/>
  71. </monitor-host>
  72. <!-- 模板中定义的参数的实际值发生变化(增删改) -->
  73. <monitor-host name="TemplateArgumentChanged"
  74. class-name="com.trs.components.common.publish.persistent.template.TemplateArgument">
  75. <listener bean-id="TemplateArgumentCacheMgr"/>
  76. </monitor-host>
  77. <!-- 站点分发的监听 -->
  78. <monitor-host name="PublishDistributionLCListener"
  79. class-name="com.trs.components.common.publish.persistent.distribute.PublishDistribution">
  80. <listener bean-id="PublishDistributionLCListener" event-type="1,2" />
  81. </monitor-host>
  82. </extension>
  83. <!-- Config For ObjectLCMonitor END -->
  84. <!--Publish Server Config BEGIN-->
  85. <extension
  86. element-class="com.trs.components.common.publish.config.persistent.PublishServerConfig"
  87. id="CommonPublishServer">
  88. <publish-server>
  89. <detail-page-seperate-to-51style>false</detail-page-seperate-to-51style>
  90. <publish-in-root-path>false</publish-in-root-path>
  91. <dir-divided-by-date>true</dir-divided-by-date>
  92. <dir-divided-by-date-format>
  93. yyyyMM
  94. </dir-divided-by-date-format>
  95. <!--
  96. 完全发布时候集合的PageSize
  97. -->
  98. <load-batch-contents-pagesize>
  99. 30
  100. </load-batch-contents-pagesize>
  101. <!-- if to send warnings when an attached file is not found -->
  102. <send-warning-if-file-not-found>
  103. false
  104. </send-warning-if-file-not-found>
  105. <!-- if to ignore the error if a tag item host is not found -->
  106. <ignore-if-host-not-found>true</ignore-if-host-not-found>
  107. <!-- if to publish automatically the document who has not been
  108. published in its home folder when to publish the link of it -->
  109. <auto-publish-doc-in-home-when-needed>
  110. true
  111. </auto-publish-doc-in-home-when-needed>
  112. <!-- default file encoding for published pages -->
  113. <default-encoding>GBK</default-encoding>
  114. <!-- labor resource config -->
  115. <labor-resource>
  116. <high-priority-labors-max>30</high-priority-labors-max>
  117. <low-priority-labors-max>30</low-priority-labors-max>
  118. <each-task-labors-max>10</each-task-labors-max>
  119. <!-- retry-interval 的时间单位是分钟 -->
  120. <retry-time-limit>60</retry-time-limit>
  121. <retry-interval>2</retry-interval>
  122. </labor-resource>
  123. <template-parse>
  124. <tags-having-src>
  125. BODY,TABLE,TD,IMG,INPUT,LINK,SCRIPT,EMBED
  126. </tags-having-src>
  127. <!-- Notice: TagSrcAttributeNames must be relative with tags-having-src each other -->
  128. <tag-src-attribute-names>
  129. BACKGROUND,BACKGROUND,BACKGROUND,SRC,SRC,HREF,SRC,SRC
  130. </tag-src-attribute-names>
  131. <supported-exts>HTM,HTML,SHTML,XML,JSP,ASP</supported-exts>
  132. <supported-apd-exts>
  133. BMP,GIF,JPG,JPEG,PNG,CSS,SWF,WAV,WMV,RM,EXE,COM,BAT,PDF,RAR,ZIP,JS
  134. </supported-apd-exts>
  135. <name-cache-max-size>1000</name-cache-max-size>
  136. <dom-cache-max-size>200</dom-cache-max-size>
  137. <!-- BEGIN: parse configuration during publishing -->
  138. <wcm-outline-contents-max-num>
  139. 0
  140. </wcm-outline-contents-max-num>
  141. </template-parse>
  142. <publish-distribution>
  143. <max-targets-each-folder>3</max-targets-each-folder>
  144. <target-types>
  145. <target-type>
  146. <name>FILE</name>
  147. <desc>文件系统</desc>
  148. <distributor>
  149. com.trs.components.common.publish.domain.distribute.FileDistributorImpFileLocal
  150. </distributor>
  151. <parameters>DATAPATH=存放路径</parameters>
  152. </target-type>
  153. <target-type>
  154. <name>FTP</name>
  155. <desc>FTP服务</desc>
  156. <distributor>
  157. com.trs.components.common.publish.domain.distribute.FileDistributorImpFtpByTRS
  158. </distributor>
  159. <parameters>
  160. TARGETSERVER=服务器地址&amp;TARGETPORT=服务器端口&amp;ANONYMFTP=匿名登录&amp;LOGINUSER=用户名&amp;LOGINPASSWORD=密码&amp;DATAPATH=存放目录
  161. </parameters>
  162. </target-type>
  163. <target-type>
  164. <name>SFTP</name>
  165. <desc>SFTP服务</desc>
  166. <distributor>
  167. com.trs.components.common.publish.domain.distribute.FileDistributorImpFtpByTRS
  168. </distributor>
  169. <parameters>
  170. TARGETSERVER=服务器地址&amp;TARGETPORT=服务器端口&amp;LOGINUSER=用户名&amp;LOGINPASSWORD=密码&amp;DATAPATH=存放目录
  171. </parameters>
  172. </target-type>
  173. </target-types>
  174. </publish-distribution>
  175. <!-- publish task notification scheme is defined in config.xml which part is for 'Notification Scheme' -->
  176. <!-- to define the publish content types -->
  177. <content-types>
  178. <content name="DefaultObject"
  179. class-name="com.trs.components.common.publish.persistent.element.PublishContentDefaultObjImpl"
  180. />
  181. </content-types>
  182. </publish-server>
  183. </extension>
  184. <!--Publish Server Config END-->
  185. <!--Publish File Naming Style Config BEGIN. 默认的命名方式-->
  186. <extension
  187. element-class="com.trs.components.common.publish.config.persistent.FileNamedStyle"
  188. id="CommonFileNamedStyle">
  189. <file-naming>
  190. <pattern>t{1,date,yyyyMMdd}_{0,number,0}</pattern>
  191. <!--
  192. 整个模式的说明参见java.text.MessageFormat的javadoc,其中参数只有三个,分别是
  193. 0.文档的ID(整数)
  194. 1.文档的日期和时间(java.util.Date)
  195. 3.模板的类型(整数)
  196. -->
  197. <prefix>t</prefix>
  198. <!--
  199. 1: the id of the publish content added;
  200. 2: the publish time of the publish content added;
  201. 3: the multiple template type of the publish content added
  202. -->
  203. <adden>1</adden>
  204. </file-naming>
  205. </extension>
  206. <!--Publish File Naming Style Config END-->
  207. </plugin>