Principal URLs

Principal Retrieval

/**
 * Provides virtualized principal retrieval from Cloud CMS.
 *
 * This handler checks to see if the requested resource is already cached to disk.  If not, it makes an attempt
 * to retrieve the content from Cloud CMS (and cache to disk).
 *
 * If nothing found, this handler passes through, allowing other handlers downstream to serve back the content.
 *
 * URIs may include the following structures:
 *
 *    /static/principal/{principalId}
 *    /static/principal/{principalId}/{attachmentId}
 *    /static/principal/{principalId}/{attachmentId}/{filename}
 *    /static/domain/{domainId}/principal/{principalId}/
 *    /static/domain/{domainId}/principal/{principalId}/{attachmentId}
 *    /static/domain/{domainId}/principal/{principalId}/{attachmentId}/{filename}
 *    /preview/principal/{principalId}
 *    /preview/domain/{domainId}/principal/{principalId}
 *
 * And the following flags are supported:
 *
 *    metadata          - set to true to retrieve JSON metadata for object
 *    full              - set to true to retrieve JSON recordset data
 *    attachment        - the ID of the attachment ("default")
 *    force             - whether to overwrite saved state
 *    a                 - set to true to set Content Disposition response header
 *
 * For preview, the following are also supported:
 *
 *    name              - sets the name of the preview attachment id to be written / cached
 *    mimetype          - sets the desired mimetype of response
 *    size              - for images, sets the width in px of response image
 */