Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
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 will be are applied and the object's headers will be are modified accordingly. Metadata rules specify that a given header will be is added to the message if it does not exist or will be 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

...