001/* 002 * (C) Copyright 2010 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * Contributors: 016 * Nuxeo - initial API and implementation 017 */ 018 019package org.nuxeo.ecm.platform.rendition; 020 021/** 022 * Constants used by the {@link org.nuxeo.ecm.platform.rendition.service.RenditionService}. 023 * 024 * @author <a href="mailto:[email protected]">Thomas Roger</a> 025 * @since 5.4.1 026 */ 027public class Constants { 028 029 public static final String ALL_PUBLICATION_QUERY = "SELECT * FROM Document WHERE ecm:isProxy = 1 AND (rend:sourceVersionableId = %s OR ecm:proxyVersionableId = %s)"; 030 031 private Constants() { 032 // Constants class 033 } 034 035 public static final String RENDITION_FACET = "Rendition"; 036 037 public static final String FILES_SCHEMA = "files"; 038 039 public static final String FILES_FILES_PROPERTY = "files:files"; 040 041 public static final String RENDITION_SCHEMA = "rendition"; 042 043 // version from which the rendition was derived (or live doc if not versionable) 044 public static final String RENDITION_SOURCE_ID_PROPERTY = "rend:sourceId"; 045 046 // live doc if the rendition was derived from a versionable doc, otherwise null 047 public static final String RENDITION_SOURCE_VERSIONABLE_ID_PROPERTY = "rend:sourceVersionableId"; 048 049 // date the source doc was modified according to property named 050 // RenditionDefinition#sourceDocumentModificationDatePropertyName 051 public static final String RENDITION_SOURCE_MODIFICATION_DATE_PROPERTY = "rend:sourceModificationDate"; 052 053 public static final String RENDITION_NAME_PROPERTY = "rend:renditionName"; 054 055 /** 056 * Rendition variant property name. 057 * 058 * @since 8.1 059 */ 060 public static final String RENDITION_VARIANT_PROPERTY = "rend:renditionVariant"; 061 062 /** 063 * Rendition variant property value prefix for a user. 064 * 065 * @since 8.1 066 */ 067 public static final String RENDITION_VARIANT_PROPERTY_USER_PREFIX = "user:"; 068 069 /** 070 * Rendition variant property value for an administrator. 071 * 072 * @since 8.1 073 */ 074 public static final String RENDITION_VARIANT_PROPERTY_ADMINISTRATOR_USER = "administratoruser:"; 075 076 /** 077 * @since 10.3 078 */ 079 public static final String DEFAULT_RENDTION_PUBLISH_REASON = "publish"; 080 081}