Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contentstoc
minLevel1
maxLevel2
outlinefalse
typelist
printablefalse

The metadata transformation facility allows domain and bucket administrators to define rules to add or replace metadata on incoming objects. These rules are stored in XFORM documents.

As a write operation (PUT, POST, or COPY) passes through the Gateway, rules in the xform sub-resource for a domain and/or bucket are applied and the object's headers are modified accordingly. Metadata rules specify a given header is added to the message if it does not exist or is replaced if it does exist in the request. Headers defined in the domain XFORM take precedence over anything defined in a bucket XFORM.

...

Metadata values are specified as strings, with a small number of variables available for substitution, using a $ ${varname} format where "varname" is the name of the variable.

Specify as a header value ${user}'s stuff stuff on the user rooster's bucket and objects written into that bucket end up with a header value of rooster's stuff.

Metadata Substitution Variables

Variable Name

Description

date:format

Create/update time stamp where format is defined by Java SimpleDateFormat specification

user

Authenticated user ID

domain

Domain name

bucket

Bucket name

XFORM Document Format

Code Block
required Root := dict (
optional "metadata" := MetadataXforms
optional "comments" := any object type )
MetadataXforms := dict ( HttpHeaderName,HttpHeaderValue )
HttpHeaderName := str # Conforms to HTTP spec
HttpHeaderValue := str # Conforms to HTTP spec, plus variables

...