You are here

Property Aliases

workorder:
  namespace: http://www.example.com/service
  attribute: workorder
documentType
  namespace: http://www.example.com/document
  attribute: documentType

Text 1: Defines two property aliases; "workorder" = "{http://www.example.com/service}workorder" and "documentType" = "{http://www.example.com/document}documentType".

Property aliases, defined in /dav/Administration/PropertyAliases.yaml provide short names for object properties. Primarily property aliases are used when storing documents via AttachFS when some meta-data needs to be stored along with the document. Use of property aliases is also supported for constructing the file-to path when a document is processed for auto-filing.

The normal representation of an object property's use of name-spaces makes specification of the property in a URI parameter cumbersome and unreliable. By allowing properties to be aliased to short-names they can be referenced more easily. It is expected that most object properties will not be aliases, but only those for which it is useful to refer to in URIs, etc...

In the upload URI for an AttachFS PUT the object property aliases can be referenced as parameters by using a "pa." prefix on the alias [object property aliases are case-sensitive]. An object property specified in the URL using a "pa." prefix but having no value will be assigned a value of "YES".

$ curl -u adam -T snapper.log -H 'Content-Type: text/plain' \ 'http://coils.example.com/attachfs/30330610/george.txt?mode=file&pa.workorder=123456&pa.documentType=note'

Text 2: Upload the document "george.txt" and setting object property values for the object properites with the aliases of "workorder" and "documentType".

In addition to setting defined object properties the URL parameters "abstract", "appointment", and "company" may be used to set the corresponding attributes of a document entity [when you are uploading a document via AttachFS]. "abstract" must be a string, this sets the long human-readable description of the document. "appointment" and "company" values must be integers; these set the linkage attributes of the document to establish a 1:1 relation between the specified entity and the document. Assigning a non-integer value to "appointment" or "company" parameters will result in an exception and the AttachFS opertation will fail; but beyond the type of the value the server does not validate that the provided value refers to an available appointment or company [contact or enterprise] entity. A client may discover object-property aliases by providing the alias information in the "DefinedProperties.yaml" file using the "alias" field of the defined property description.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer