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.cms.contenttype; 017 018import org.ametys.runtime.model.type.ElementType; 019 020/** 021 * Metadata type 022 * @deprecated Use {@link ElementType} instead 023 */ 024@Deprecated 025public enum MetadataType 026{ 027 /** String type. */ 028 STRING, 029 /** Multilingual string */ 030 MULTILINGUAL_STRING 031 { 032 @Override 033 public String getId() 034 { 035 return super.getId().replaceAll("_", "-"); 036 } 037 }, 038 /** Date type. */ 039 DATE, 040 /** Date time type. */ 041 DATETIME, 042 /** Long type. */ 043 LONG, 044 /** Geocode type. */ 045 GEOCODE, 046 /** Double type. */ 047 DOUBLE, 048 /** Boolean type. */ 049 BOOLEAN, 050 /** Composite type. */ 051 COMPOSITE, 052 /** Binary type. */ 053 BINARY, 054 /** Rich text type. */ 055 RICH_TEXT 056 { 057 @Override 058 public String getId() 059 { 060 return super.getId().replaceAll("_", "-"); 061 } 062 }, 063 /** User type. */ 064 USER, 065 /** Reference type (Resources explorer / dn of a directory / ...). */ 066 REFERENCE, 067 /** Reference to a content. */ 068 CONTENT, 069 /** Sub-content. */ 070 SUB_CONTENT, 071 /** File type, may be a binary or a reference (symbolic link). */ 072 FILE; 073 074 /** 075 * Retrieves the type identifier 076 * @return the type identifier 077 */ 078 public String getId() 079 { 080 return name(); 081 } 082}