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 ABOUT_TO_REMOVE_VERSION = "aboutToRemoveVersion";
059
060    public static final String VERSION_REMOVED = "versionRemoved";
061
062    public static final String BEFORE_DOC_UPDATE = "beforeDocumentModification";
063
064    public static final String BEFORE_DOC_SECU_UPDATE = "beforeDocumentSecurityModification";
065
066    public static final String DOCUMENT_UPDATED = "documentModified";
067
068    public static final String DOCUMENT_SECURITY_UPDATED = "documentSecurityUpdated";
069
070    public static final String DOCUMENT_LOCKED = "documentLocked";
071
072    public static final String DOCUMENT_UNLOCKED = "documentUnlocked";
073
074    public static final String ABOUT_TO_COPY = "aboutToCopy";
075
076    public static final String DOCUMENT_CREATED_BY_COPY = "documentCreatedByCopy";
077
078    public static final String DOCUMENT_DUPLICATED = "documentDuplicated";
079
080    public static final String ABOUT_TO_MOVE = "aboutToMove";
081
082    public static final String DOCUMENT_MOVED = "documentMoved";
083
084    public static final String DOCUMENT_PUBLISHED = "documentPublished";
085
086    public static final String DOCUMENT_PROXY_PUBLISHED = "documentProxyPublished";
087
088    public static final String DOCUMENT_PROXY_UPDATED = "documentProxyUpdated";
089
090    public static final String SECTION_CONTENT_PUBLISHED = "sectionContentPublished";
091
092    public static final String BEFORE_DOC_RESTORE = "beforeRestoringDocument";
093
094    public static final String DOCUMENT_RESTORED = "documentRestored";
095
096    public static final String SESSION_SAVED = "sessionSaved";
097
098    public static final String DOCUMENT_CHILDREN_ORDER_CHANGED = "childrenOrderChanged";
099
100    /** This event is too general and should be used with care. */
101    public static final String ABOUT_TO_CHECKOUT = "aboutToCheckout";
102
103    /**
104     * Document checked out. Listeners can increment version numbers. Listeners will be passed a pristine DocumentModel
105     * where changes will not be seen by the main DocumentModel being saved.
106     */
107    public static final String DOCUMENT_CHECKEDOUT = "documentCheckedOut";
108
109    /**
110     * Listeners can increment version numbers. Listeners will be passed a pristine DocumentModel where changes will not
111     * be seen by the main DocumentModel being saved.
112     */
113    public static final String INCREMENT_BEFORE_UPDATE = "incrementBeforeUpdate";
114
115    /** This event is too general and should be used with care. */
116    public static final String ABOUT_TO_CHECKIN = "aboutToCheckIn";
117
118    /** This event is too general and should be used with care. */
119    public static final String DOCUMENT_CHECKEDIN = "documentCheckedIn";
120
121    public static final String SUBSCRIPTION_ASSIGNED = "subscriptionAssigned";
122
123    public static final String EMAIL_DOCUMENT_SEND = "emailDocumentSend";
124
125    /**
126     * Event triggered when a personal user workspace is created
127     *
128     * @since 5.7
129     */
130    public static final String USER_WORKSPACE_CREATED = "userWorkspaceCreated";
131
132    /**
133     * A binary fulltext field has been updated.
134     *
135     * @since 5.9.3
136     */
137    public static final String BINARYTEXT_UPDATED = "binaryTextUpdated";
138
139    /**
140     * @since 6.0
141     */
142    public static final String DOCUMENT_TAG_UPDATED = "documentTagUpdated";
143
144    /**
145     * Event triggered when one or more ACE status have been updated.
146     *
147     * @since 7.4
148     */
149    public static final String ACE_STATUS_UPDATED = "ACEStatusUpdated";
150
151    // Constant utility class
152    private DocumentEventTypes() {
153    }
154
155}