共用方式為


記錄屬性架構

記錄可以具有應用程式特定屬性,這些屬性是 pszAttributes 中以 XML 字串表示的名稱或值組序列,PEER_RECORD 結構 成員。 屬性是用來篩選呼叫peerGroupSearchRecords 所起始的記錄搜尋,其會採用 Record Search Query Format 中所指定的 XML 搜尋篩選作為參數。

記錄屬性可以是下列三種類型之一:

下列清單會識別對等基礎結構所保留的特定屬性名稱:

  • peerlastmodifiedby
  • peercreatorid
  • peerlastmodificationtime
  • peerrecordid
  • peerrecordtype
  • peercreationtime
  • peerlastmodificationtime

定義記錄屬性的範例

下列架構範例示範如何定義記錄屬性:

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema xmlns:xs="https://www.w3.org/2001/XMLSchema">
   <xs:simpleType name="alphanum">
       <xs:restriction base="xs:string">
          <xs:pattern value="\c+" />
       </xs:restriction>
   </xs:simpleType>
   <xs:complexType name="attributeType">
       <xs:simpleContent>
          <xs:extension base="xs:string">
                <xs:attribute name="name" type="alphanum" />
                <xs:attribute name="type">
                    <xs:simpleType>
                        <xs:restriction base="alphanum">
                           <xs:enumeration value="string"/>
                           <xs:enumeration value="date"/>
                           <xs:enumeration value="int"/>
                        </xs:restriction>
                    </xs:simpleType>
                </xs:attribute>
           </xs:extension>
       </xs:simpleContent>
    </xs:complexType>
    <xs:element name="attributes">
       <xs:complexType>
           <xs:sequence>
                <xs:element name="attribute" type="attributeType" minOccurs="0" maxOccurs="unbounded" />
           </xs:sequence>
       </xs:complexType>
    </xs:element>
</xs:schema>  

注意

屬性名稱必須是英數位元序列。 屬性名稱中不允許使用連字元 (“-”) 和底線 (“_”) 等特殊字元。

 

下列 XML 屬性序列範例包含自定義 AuthenticationTypeAuthExpires 属性,這些屬性會出現在 PEER_RECORDpszAttributes 成員中。

<attributes>
  <attribute name="AuthenticationType" type="string">Kerberos</attribute><attribute name="AuthExpires" type="date">2002-01-31</attribute>
<attributes>