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     * @since 6.0
143     */
144    public static final String DOCUMENT_TAG_UPDATED = "documentTagUpdated";
145
146    /**
147     * Event triggered when one or more ACE status have been updated.
148     *
149     * @since 7.4
150     */
151    public static final String ACE_STATUS_UPDATED = "ACEStatusUpdated";
152
153    // Constant utility class
154    private DocumentEventTypes() {
155    }
156
157}