001/* 002 * Copyright 2010 Anyware Services 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 */ 016package org.ametys.plugins.repository; 017 018/** 019 * Constants 020 */ 021public interface RepositoryConstants 022{ 023 /** Name of the JCR default workspace */ 024 public static final String DEFAULT_WORKSPACE = "default"; 025 026 /** Namespace prefix for properties and node types. */ 027 public static final String NAMESPACE_PREFIX = "ametys"; 028 029 /** Namespace URI for properties and node types. */ 030 public static final String NAMESPACE_URI = "http://www.ametys.org/jcr/repository/1.0"; 031 032 /** Namespace prefix for internal properties * */ 033 public static final String NAMESPACE_PREFIX_INTERNAL = "ametys-internal"; 034 035 /** Namespace URI for internal properties * */ 036 public static final String NAMESPACE_URI_INTERNAL = "http://www.ametys.org/jcr/repository/internal/1.0"; 037 038 /** Metadata name for storing a Node's lockToken */ 039 public static final String METADATA_LOCKTOKEN = NAMESPACE_PREFIX_INTERNAL + ":lockToken"; 040 041 /** Metadata name for storing the real lockOwner of a Node */ 042 public static final String METADATA_LOCKOWNER = NAMESPACE_PREFIX_INTERNAL + ":lockOwner"; 043 044 /** Comments suffix */ 045 public static final String COMMENTS_SUFFIX = "_comments"; 046 047 /** Node type for resources */ 048 public static final String RESOURCE_NODETYPE = "nt:resource"; 049 050 /** Node type for folders */ 051 public static final String FOLDER_NODETYPE = "nt:folder"; 052 053 /** Node type for files */ 054 public static final String FILE_NODETYPE = "nt:file"; 055 056 /** JCR type for users. */ 057 public static final String USER_NODETYPE = NAMESPACE_PREFIX + ":user"; 058 059 /** JCR type for geocodes. */ 060 public static final String GEOCODE_NODETYPE = NAMESPACE_PREFIX + ":geocode"; 061 062 /** JCR type for multilingual strings. */ 063 public static final String MULTILINGUAL_STRING_METADATA_NODETYPE = NAMESPACE_PREFIX + ":multilingualString"; 064 065 /** JCR type for references. */ 066 public static final String REFERENCE_NODETYPE = NAMESPACE_PREFIX + ":referenceItem"; 067 068 /** JCR type for binaries. */ 069 public static final String BINARY_NODETYPE = NAMESPACE_PREFIX + ":binaryMetadata"; 070 071 /** JCR type for rich texts. */ 072 public static final String RICH_TEXT_NODETYPE = NAMESPACE_PREFIX + ":richText"; 073 074 /** JCR type for complex multiple values parent data. */ 075 public static final String MULTIPLE_ITEM_NODETYPE = NAMESPACE_PREFIX + ":multipleItem"; 076 077 /** JCR type for composites. */ 078 public static final String COMPOSITE_NODETYPE = NAMESPACE_PREFIX + ":composite"; 079 080 /** JCR type for repeaters. */ 081 public static final String REPEATER_NODETYPE = NAMESPACE_PREFIX + ":repeater"; 082 083 /** JCR type for composite metadata */ 084 public static final String COMPOSITE_METADTA_NODETYPE = NAMESPACE_PREFIX + ":compositeMetadata"; 085 086 /** 087 * The request attribute in which the JCR session is stored 088 */ 089 public static final String JCR_SESSION_REQUEST_ATTRIBUTE = "jcr-sessions"; 090}