001/* 002 * (C) Copyright 2009-2020 Nuxeo (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 * 016 * Contributors: 017 * mcedica 018 * Nuno Cunha <ncunha@nuxeo.com> 019 */ 020package org.nuxeo.ecm.platform.comment.workflow.utils; 021 022import org.nuxeo.ecm.platform.comment.api.CommentConstants; 023 024/** 025 * Utility class used for registering constants. 026 */ 027public final class CommentsConstants { 028 029 /* 030 * Constants used for Comments 031 */ 032 public static final String PERMISSION_COMMENT = "Comment"; 033 034 public static final String PERMISSION_MODERATE = "Moderate"; 035 036 public static final String PERMISSION_WRITE = "Write"; 037 038 public static final String PERMISSION_MANAGE_EVERYTHING = "Everything"; 039 040 public static final String TRANSITION_TO_PUBLISHED_STATE = "moderation_publish"; 041 042 public static final String PUBLISHED_STATE = "moderation_published"; 043 044 public static final String PENDING_STATE = "moderation_pending"; 045 046 public static final String REJECT_STATE = "moderation_reject"; 047 048 public static final String MODERATION_PROCESS = "comments_moderation"; 049 050 public static final String COMMENT_ID = "commentId"; 051 052 public static final String COMMENT_PUBLISHED = "commentPublished"; 053 054 public static final String COMMENT_LIFECYCLE = "comment_moderation"; 055 056 public static final String ACCEPT_CHAIN_NAME = "acceptComment"; 057 058 public static final String REJECT_CHAIN_NAME = "rejectComment"; 059 060 public static final String MODERATION_DIRECTIVE_NAME = "moderate"; 061 062 /** 063 * Schemas and fields. 064 * 065 * @deprecated since 11.1, use {@link CommentConstants#COMMENT_DOC_TYPE} instead 066 */ 067 @Deprecated(since = "11.1") 068 public static final String COMMENT_DOC_TYPE = CommentConstants.COMMENT_DOC_TYPE; 069 070 /** 071 * @since 10.3 072 * @deprecated since 11.1, use {@link CommentConstants#COMMENT_SCHEMA} instead 073 */ 074 @Deprecated(since = "11.1") 075 public static final String COMMENT_SCHEMA = CommentConstants.COMMENT_SCHEMA; 076 077 /** 078 * @deprecated since 11.1, use {@link CommentConstants#COMMENT_CREATION_DATE_PROPERTY} instead 079 */ 080 @Deprecated(since = "11.1") 081 public static final String COMMENT_CREATION_DATE = CommentConstants.COMMENT_CREATION_DATE_PROPERTY; 082 083 /** 084 * @deprecated since 11.1, use {@link CommentConstants#COMMENT_AUTHOR_PROPERTY} instead 085 */ 086 @Deprecated(since = "11.1") 087 public static final String COMMENT_AUTHOR = CommentConstants.COMMENT_AUTHOR_PROPERTY; 088 089 /** 090 * @deprecated since 11.1, use {@link CommentConstants#COMMENT_TEXT_PROPERTY} instead 091 */ 092 @Deprecated(since = "11.1") 093 public static final String COMMENT_TEXT = CommentConstants.COMMENT_TEXT_PROPERTY; 094 095 /** 096 * @since 10.3 097 * @deprecated since 11.1, use {@link CommentConstants#COMMENT_PARENT_ID_PROPERTY} instead 098 */ 099 @Deprecated(since = "11.1") 100 public static final String COMMENT_PARENT_ID = CommentConstants.COMMENT_PARENT_ID_PROPERTY; 101 102 /** 103 * @since 10.3 104 * @deprecated since 11.1, use {@link CommentConstants#COMMENT_MODIFICATION_DATE_PROPERTY} instead 105 */ 106 @Deprecated(since = "11.1") 107 public static final String COMMENT_MODIFICATION_DATE = CommentConstants.COMMENT_MODIFICATION_DATE_PROPERTY; 108 109 /** 110 /** 111 * @since 10.3 112 * @deprecated since 11.1, use {@link CommentConstants#COMMENT_ANCESTOR_IDS_PROPERTY} instead 113 */ 114 @Deprecated(since = "11.1") 115 public static final String COMMENT_ANCESTOR_IDS = CommentConstants.COMMENT_ANCESTOR_IDS_PROPERTY; 116 117 // JSON constant part 118 119 /** 120 * @since 10.3 121 * @deprecated since 11.1, use {@link CommentConstants#COMMENT_ENTITY_TYPE} instead 122 */ 123 @Deprecated(since = "11.1") 124 public static final String COMMENT_ENTITY_TYPE = CommentConstants.COMMENT_ENTITY_TYPE; 125 126 /** 127 * @since 10.3 128 * @deprecated since 11.1, use {@link CommentConstants#COMMENTS_ENTITY_TYPE} instead 129 */ 130 @Deprecated(since = "11.1") 131 public static final String COMMENTS_ENTITY_TYPE = CommentConstants.COMMENTS_ENTITY_TYPE; 132 133 /** 134 * @since 10.3 135 * @deprecated since 11.1, use {@link CommentConstants#COMMENT_ID_FIELD} instead 136 */ 137 @Deprecated(since = "11.1") 138 public static final String COMMENT_ID_FIELD = CommentConstants.COMMENT_ID_FIELD; 139 140 /** 141 * @since 10.3 142 * @deprecated since 11.1, use {@link CommentConstants#COMMENT_PARENT_ID_FIELD} instead 143 */ 144 @Deprecated(since = "11.1") 145 public static final String COMMENT_PARENT_ID_FIELD = CommentConstants.COMMENT_PARENT_ID_FIELD; 146 147 /** 148 * @since 10.3 149 * @deprecated since 11.1, use {@link CommentConstants#COMMENT_ANCESTOR_IDS_FIELD} instead 150 */ 151 @Deprecated(since = "11.1") 152 public static final String COMMENT_ANCESTOR_IDS_FIELD = CommentConstants.COMMENT_ANCESTOR_IDS_FIELD; 153 154 /** 155 * @since 10.3 156 * @deprecated since 11.1, use {@link CommentConstants#COMMENT_AUTHOR_FIELD} instead 157 */ 158 @Deprecated(since = "11.1") 159 public static final String COMMENT_AUTHOR_FIELD = CommentConstants.COMMENT_AUTHOR_FIELD; 160 161 /** 162 * @since 10.3 163 * @deprecated since 11.1, use {@link CommentConstants#COMMENT_TEXT_FIELD} instead 164 */ 165 @Deprecated(since = "11.1") 166 public static final String COMMENT_TEXT_FIELD = CommentConstants.COMMENT_TEXT_FIELD; 167 168 /** 169 * Creation Date in ISO-8601 representation. 170 * 171 * @since 10.3 172 * @deprecated since 11.1, use {@link CommentConstants#COMMENT_CREATION_DATE_FIELD} instead 173 */ 174 @Deprecated(since = "11.1") 175 public static final String COMMENT_CREATION_DATE_FIELD = CommentConstants.COMMENT_CREATION_DATE_FIELD; 176 177 /** 178 * Modification Date in ISO-8601 representation. 179 * 180 * @since 10.3 181 * @deprecated since 11.1, use {@link CommentConstants#COMMENT_MODIFICATION_DATE_FIELD} instead 182 */ 183 @Deprecated(since = "11.1") 184 public static final String COMMENT_MODIFICATION_DATE_FIELD = CommentConstants.COMMENT_MODIFICATION_DATE_FIELD; 185 186 /** 187 * Number of direct replies. 188 * 189 * @since 10.3 190 * @deprecated since 11.1, use {@link CommentConstants#COMMENT_NUMBER_OF_REPLIES_FIELD} instead 191 */ 192 @Deprecated(since = "11.1") 193 public static final String COMMENT_NUMBER_OF_REPLIES = CommentConstants.COMMENT_NUMBER_OF_REPLIES_FIELD; 194 195 /** 196 * Last Reply Date in ISO-8601 representation. 197 * 198 * @since 10.3 199 * @deprecated since 11.1, use {@link CommentConstants#COMMENT_LAST_REPLY_DATE_FIELD} instead 200 */ 201 @Deprecated(since = "11.1") 202 public static final String COMMENT_LAST_REPLY_DATE = CommentConstants.COMMENT_LAST_REPLY_DATE_FIELD; 203 204 /** 205 * @since 10.3 206 * @deprecated since 11.1, use {@link CommentConstants#COMMENT_PERMISSIONS_FIELD} instead 207 */ 208 @Deprecated(since = "11.1") 209 public static final String COMMENT_PERMISSIONS = CommentConstants.COMMENT_PERMISSIONS_FIELD; 210 211 private CommentsConstants() { 212 } 213 214}