001/* 002 * (C) Copyright 2006-2011 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 * 016 * Contributors: 017 * Nuxeo - initial API and implementation 018 * 019 * $Id: JOOoConvertPluginImpl.java 18651 2007-05-13 20:28:53Z sfermigier $ 020 */ 021 022package org.nuxeo.ecm.core.api.event; 023 024/** 025 * TODO: write description. 026 * 027 * @author DM 028 */ 029// TODO a better id-zation is to define concrete instances of a "EventType" 030// class, so the id-s won't be checked against ordinar strings. This has to be 031// redefined in CoreEvent API 032// TODO ...or use enums... 033public final class DocumentEventTypes { 034 035 public static final String ABOUT_TO_CREATE = "aboutToCreate"; 036 037 /** 038 * Empty document mode created by the DocumentModelFactory. 039 * <p> 040 * Useful for initialization of the fields with computed contextual data. 041 */ 042 public static final String EMPTY_DOCUMENTMODEL_CREATED = "emptyDocumentModelCreated"; 043 044 /** 045 * At this point the document is filled with data from DocumentModel. 046 */ 047 public static final String DOCUMENT_CREATED = "documentCreated"; 048 049 /** @since 5.8 **/ 050 public static final String ABOUT_TO_IMPORT = "aboutToImport"; 051 052 public static final String DOCUMENT_IMPORTED = "documentImported"; 053 054 public static final String ABOUT_TO_REMOVE = "aboutToRemove"; 055 056 public static final String DOCUMENT_REMOVED = "documentRemoved"; 057 058 public static final String DOCUMENT_REMOVAL_CANCELED = "documentRemovalCanceled"; 059 060 public static final String ABOUT_TO_REMOVE_VERSION = "aboutToRemoveVersion"; 061 062 public static final String VERSION_REMOVED = "versionRemoved"; 063 064 public static final String BEFORE_DOC_UPDATE = "beforeDocumentModification"; 065 066 public static final String BEFORE_DOC_SECU_UPDATE = "beforeDocumentSecurityModification"; 067 068 public static final String DOCUMENT_UPDATED = "documentModified"; 069 070 public static final String DOCUMENT_SECURITY_UPDATED = "documentSecurityUpdated"; 071 072 public static final String DOCUMENT_LOCKED = "documentLocked"; 073 074 public static final String DOCUMENT_UNLOCKED = "documentUnlocked"; 075 076 public static final String ABOUT_TO_COPY = "aboutToCopy"; 077 078 public static final String DOCUMENT_CREATED_BY_COPY = "documentCreatedByCopy"; 079 080 public static final String DOCUMENT_DUPLICATED = "documentDuplicated"; 081 082 public static final String ABOUT_TO_MOVE = "aboutToMove"; 083 084 public static final String DOCUMENT_MOVED = "documentMoved"; 085 086 public static final String DOCUMENT_PUBLISHED = "documentPublished"; 087 088 public static final String DOCUMENT_PROXY_PUBLISHED = "documentProxyPublished"; 089 090 public static final String DOCUMENT_PROXY_UPDATED = "documentProxyUpdated"; 091 092 public static final String SECTION_CONTENT_PUBLISHED = "sectionContentPublished"; 093 094 public static final String BEFORE_DOC_RESTORE = "beforeRestoringDocument"; 095 096 public static final String DOCUMENT_RESTORED = "documentRestored"; 097 098 public static final String SESSION_SAVED = "sessionSaved"; 099 100 public static final String DOCUMENT_CHILDREN_ORDER_CHANGED = "childrenOrderChanged"; 101 102 /** This event is too general and should be used with care. */ 103 public static final String ABOUT_TO_CHECKOUT = "aboutToCheckout"; 104 105 /** 106 * Document checked out. Listeners can increment version numbers. Listeners will be passed a pristine DocumentModel 107 * where changes will not be seen by the main DocumentModel being saved. 108 */ 109 public static final String DOCUMENT_CHECKEDOUT = "documentCheckedOut"; 110 111 /** 112 * Listeners can increment version numbers. Listeners will be passed a pristine DocumentModel where changes will not 113 * be seen by the main DocumentModel being saved. 114 */ 115 public static final String INCREMENT_BEFORE_UPDATE = "incrementBeforeUpdate"; 116 117 /** This event is too general and should be used with care. */ 118 public static final String ABOUT_TO_CHECKIN = "aboutToCheckIn"; 119 120 /** This event is too general and should be used with care. */ 121 public static final String DOCUMENT_CHECKEDIN = "documentCheckedIn"; 122 123 public static final String SUBSCRIPTION_ASSIGNED = "subscriptionAssigned"; 124 125 public static final String EMAIL_DOCUMENT_SEND = "emailDocumentSend"; 126 127 /** 128 * Event triggered when a personal user workspace is created 129 * 130 * @since 5.7 131 */ 132 public static final String USER_WORKSPACE_CREATED = "userWorkspaceCreated"; 133 134 /** 135 * A binary fulltext field has been updated. 136 * 137 * @since 5.9.3 138 */ 139 public static final String BINARYTEXT_UPDATED = "binaryTextUpdated"; 140 141 /** 142 * The event property containing the system property updated. 143 * <p> 144 * Available for the event {@link #BINARYTEXT_UPDATED}. 145 * 146 * @since 10.3 147 */ 148 public static final String SYSTEM_PROPERTY = "systemProperty"; 149 150 /** 151 * The event property containing the value of the system property updated. 152 * <p> 153 * Available for the event {@link #BINARYTEXT_UPDATED}. 154 * 155 * @since 10.3 156 */ 157 public static final String SYSTEM_PROPERTY_VALUE = "systemPropertyValue"; 158 159 /** 160 * @since 6.0 161 */ 162 public static final String DOCUMENT_TAG_UPDATED = "documentTagUpdated"; 163 164 /** 165 * Event triggered when one or more ACE status have been updated. 166 * 167 * @since 7.4 168 */ 169 public static final String ACE_STATUS_UPDATED = "ACEStatusUpdated"; 170 171 /** 172 * Event triggered when a document is about to be turned into a record. 173 * 174 * @since 11.1 175 */ 176 public static final String BEFORE_MAKE_RECORD = "beforeMakeRecord"; 177 178 /** 179 * Event triggered when a document has been turned into a record. 180 * 181 * @since 11.1 182 */ 183 public static final String AFTER_MAKE_RECORD = "afterMakeRecord"; 184 185 /** 186 * Event triggered when a retention is about to be set on a document. 187 * <p> 188 * The event's options map contains {@link CoreEventConstants#RETAIN_UNTIL} (a {@link java.util.Calendar} object). 189 * 190 * @since 11.1 191 */ 192 public static final String BEFORE_SET_RETENTION = "beforeSetRetention"; 193 194 /** 195 * Event triggered when a retention is about to be extended on a document. 196 * <p> 197 * The event's options map contains {@link CoreEventConstants#RETAIN_UNTIL} (a {@link java.util.Calendar} object). 198 * 199 * @since 11.1 200 */ 201 public static final String BEFORE_EXTEND_RETENTION = "beforeExtendRetention"; 202 203 /** 204 * Event triggered after a retention has been set on a document. 205 * <p> 206 * The event's options map contains {@link CoreEventConstants#RETAIN_UNTIL} (a {@link java.util.Calendar} object). 207 * 208 * @since 11.1 209 */ 210 public static final String AFTER_SET_RETENTION = "afterSetRetention"; 211 212 /** 213 * Event triggered after a retention has been extended on a document. 214 * <p> 215 * The event's options map contains {@link CoreEventConstants#RETAIN_UNTIL} (a {@link java.util.Calendar} object). 216 * 217 * @since 11.1 218 */ 219 public static final String AFTER_EXTEND_RETENTION = "afterExtendRetention"; 220 221 /** 222 * Event triggered (some time) after the retention of a document has expired. 223 * <p> 224 * The event's options map contains {@link CoreEventConstants#RETAIN_UNTIL} (a {@link java.util.Calendar} object), 225 * which was the previous retention date. 226 * 227 * @since 11.1 228 */ 229 public static final String RETENTION_EXPIRED = "retentionExpired"; 230 231 /** 232 * Event triggered when a legal hold is about to be set on a document. 233 * 234 * @since 11.1 235 */ 236 public static final String BEFORE_SET_LEGAL_HOLD = "beforeSetLegalHold"; 237 238 /** 239 * Event triggered when a legal hold is about to be removed on a document. 240 * 241 * @since 11.1 242 */ 243 public static final String BEFORE_REMOVE_LEGAL_HOLD = "beforeRemoveLegalHold"; 244 245 /** 246 * Event triggered after a legal hold has been set on a document. 247 * 248 * @since 11.1 249 */ 250 public static final String AFTER_SET_LEGAL_HOLD = "afterSetLegalHold"; 251 252 /** 253 * Event triggered after a legal hold has been removed on a document. 254 * 255 * @since 11.1 256 */ 257 public static final String AFTER_REMOVE_LEGAL_HOLD = "afterRemoveLegalHold"; 258 259 /** 260 * Event triggered when the active state of the retention changes. 261 * 262 * @since 9.3 263 * @deprecated since 11.1 264 */ 265 @Deprecated 266 public static final String RETENTION_ACTIVE_CHANGED = "retentionActiveChanged"; 267 268 // Constant utility class 269 private DocumentEventTypes() { 270 } 271 272}