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    /** JCR type for users. */
045    public static final String USER_NODETYPE = NAMESPACE_PREFIX + ":user";
046
047    /** JCR type for geocodes. */
048    public static final String GEOCODE_NODETYPE = NAMESPACE_PREFIX + ":geocode";
049
050    /** JCR type for multilingual strings. */
051    public static final String MULTILINGUAL_STRING_METADATA_NODETYPE = NAMESPACE_PREFIX + ":multilingualString";
052
053    /** JCR type for references. */
054    public static final String REFERENCE_NODETYPE = NAMESPACE_PREFIX + ":referenceItem";
055
056    /** JCR type for binaries. */
057    public static final String BINARY_NODETYPE = NAMESPACE_PREFIX + ":binaryMetadata";
058
059    /** JCR type for rich texts. */
060    public static final String RICH_TEXT_NODETYPE = NAMESPACE_PREFIX + ":richText";
061
062    /** JCR type for complex multiple values parent data. */
063    public static final String MULTIPLE_ITEM_NODETYPE = NAMESPACE_PREFIX + ":multipleItem";
064
065    /** JCR type for composites. */
066    public static final String COMPOSITE_NODETYPE = NAMESPACE_PREFIX + ":composite";
067
068    /** JCR type for repeaters. */
069    public static final String REPEATER_NODETYPE = NAMESPACE_PREFIX + ":repeater";
070    
071    /** JCR type for composite metadata */
072    public static final String COMPOSITE_METADTA_NODETYPE = NAMESPACE_PREFIX + ":compositeMetadata";
073    
074    /**
075     * The request attribute in which the JCR session is stored
076     */
077    public static final String JCR_SESSION_REQUEST_ATTRIBUTE = "jcr-sessions";
078}