在样例应用程序中使用定制字段。
创建一个包含定制字段的属性表类型。
使用REST编程模型管理定制字段
要创建定制字段,必须先创建属性表类型。
To create custom fields, we must first create a property sheet type.
现在,文档已经带有我们定义的定制字段。
Now the document is attached with the custom fields that we have defined.
更新带定制字段的文档。
创建带定制字段的文档。
更新带定制字段的文档与创建它们非常相似。
Updating a document with custom fields is quite similar to creating one.
请注意,__c约定将定制字段名称与此里程对象名称区分开来。
Notice the __c convention that clarifies names of the custom fields from the mileage object.
这个应用程序以文档的UUID为输入更新现有文档的定制字段。
This application updates an existing document's custom fields, taking a document's UUID as its input.
现在我们有一个带有定制字段的文档条目,接下来要更新它的字段。
Here we get an existing document's entry with custom fields and then update the fields.
现在,构建表示带定制字段的文档的Atom条目的步骤已经完成。
That's it for constructing the Atom entry representing the document with custom fields.
因此引入了定制字段,它是一组用户针对特定类型的文档定义的扩展属性。
As a result, custom fields were introduced, which are a set of extended properties that users can define and provide for a specific type of document.
但是,在REST编程模型中使用术语“属性表类型”来描述定制字段的定义。
In the REST programming model, however, the term "property sheet type" is used to describe the definition of custom fields.
图6展示了一个图书文档示例,其中在WebUI上添加了定制字段。
Figure 6 shows an example of a book document, with custom fields added, on a Web UI.
清单4中的示例代码显示了用于创建带有定制字段的文档的HTTP请求。
The example code in listing 4 shows the HTTP request to create a document with custom fields.
如前所述,我们在LotusQuickr中通过创建属性表类型来描述定制字段。
As stated above, in Lotus Quickr we describe custom fields by creating property sheet types.
通过关联文档类型和在AtomEntry中指定属性值来创建带定制字段的文档。
Creating a document with custom fields by associating a document type and specifying property values in an Atom entry.
除了预定义的字段外,通过对映射定义定制属性,您还可以向扩展映射添加额外的定制字段。
In addition to the predefined fields, you can add extra custom fields to the extension mappings by defining custom attributes on the mappings.
文档类型提供一个可以定义文档行为的机制,包括文档模板、版本化、工作流定义和定制字段。
A document type provides a mechanism by which the behaviors of a document can be defined, including document templates, versioning, workflow definition, and custom fields.
您还可以通过向文档条目url发送一个GET或PUT操作来获取或更新文档的定制字段值。
You can also get or update the document custom field values by sending a get or PUT operation to the document entry URL as follows.
现在,我们向文档添加定制字段。这些定制字段通过向图书文档添加属性表类型来描述图书。
We now add custom fields to the documents that describe the books by attaching the property sheet type to the book document.
我们为书店的每本书创建文档,并且为了完全地描述关于图书的信息,我们使用定制字段来扩展常规文档。
We create documents for every book we have, and, to fully describe the book's information, we use custom fields as an extension of an ordinary document.
我们已经拥有描述定制字段所需的属性表类型并将其添加到文档类型中,接下来可以创建带定制字段的文档。
Because we already have a property sheet type to describe our custom fields and have added it to a document type, we can create documents with the custom fields.
如前所述,定制字段不是在文档类型中直接定义的;相反,它们是在属性表中定义的,然后再添加到文档类型。
As described above, the custom fields are not defined in the document type directly; instead, they are defined in a property sheet and then added to the document type.
注意:在本文的上一节中,我们使用同一个术语“属性表”来描述定制字段的定义和在文档中实现的定制字段。
NOTE: in the previous section of this article, we used the term "property sheet" to describe both the custom field definitions and the custom fields implemented in a document.
在创建了属性表类型之后,我们必须将它添加到文档类型,这样才能在文档中将该属性表类型用作定制字段。
After the property sheet type is created, we must add it to a document type, so that we can use this property sheet type as custom fields in a document.
以上的Atom条目包含一个元素,它存储支持定义定制字段的property- sheet模板xml定义。
The above Atom entry contains a element that stores the property-sheet template XML definition that enables custom fields to be defined.
<propertySheetTemplate>元素可以包含0 个或多个在系统中定义单个定制字段的元素。
The <propertySheetTemplate> element can contain zero or more elements that define an individual piece of custom fields in the system.
根据REST文档服务提供的定制字段支持,用户可以开发出能够处理LotusQuickr中的定制字段的应用程序。
Based on the custom field support provided by the REST document service, users can develop their own applications that can work with custom fields in Lotus Quickr.
应用推荐