配置驱动的开发(下)

发表于:2009-10-19 15:12

字体: | 上一篇 | 下一篇 | 我要投稿

 作者:未知    来源:51Testing软件测试网采编

   清单 1. 代表资源(或用户)结构的示例代码

 

  Code highlighting produced by Actipro CodeHighlighter (freeware)
  http://www.CodeHighlighter.com/
  <?xml version="1.0"?>
  <object
      class="sample.Resource"
      abstract="false"
      extends="sample.BaseObject"
      testready="false"
      documentation="A resource represents a user of the system.">
      <rule
          type="create"
          documentation="To create a resource,
          the user must have the administrator
          security rights" />
         
      <rule
          type="update"
          documentation="A resource has the right to modify
          itself. Only administrators have the right to modify
          resources otherwise." />
         
      <rule
          type="delete"
          documentation="Administrators have the right
          to delete a resouce." />
      <field
          name="active"
          label="Active"
          type="java.lang.Boolean"
          default="true" />
         
      <field
          name="calendar"
          label="Calendar"
          type="sample.WorkCalendar"
          composite="false" />
         
      <field
          name="contactGroupAssignments"
          type="sample.ContactGroupAssignment[]"
          composite="true">
          <valid-type
              class="sample.ContactGroupAssignment" />
      </field>
     
      <field
          name="name"
          label="Full Name"
          type="java.lang.String"
          mandatory="true"
          max="35" />
         
      <field
          name="password"
          label="Password"
          type="java.lang.String"
          min="3"
          max="16"
          readable="false" />
      <!-- BaseObject -->
      <inherited
          name="parent"
          mandatory="true">
          <valid-type class="sample.ResourceFolder" />
          <invalid-type class="sample.Project" />
      </inherited>
  </object>

32/3<123>
《2023软件测试行业现状调查报告》独家发布~

关注51Testing

联系我们

快捷面板 站点地图 联系我们 广告服务 关于我们 站长统计 发展历程

法律顾问:上海兰迪律师事务所 项棋律师
版权所有 上海博为峰软件技术股份有限公司 Copyright©51testing.com 2003-2024
投诉及意见反馈:webmaster@51testing.com; 业务联系:service@51testing.com 021-64471599-8017

沪ICP备05003035号

沪公网安备 31010102002173号