001/*
002 * Copyright (c) 2006-2011 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the Eclipse Public License v1.0
006 * which accompanies this distribution, and is available at
007 * http://www.eclipse.org/legal/epl-v10.html
008 *
009 * Contributors:
010 *     Nuxeo - initial API and implementation
011 *
012 * $Id: CoreEventConstants.java 29901 2008-02-05 17:01:22Z ogrisel $
013 */
014
015package org.nuxeo.ecm.core.api.event;
016
017/**
018 * Core event constants.
019 *
020 * @author <a href="mailto:ja@nuxeo.com">Julien Anguenot</a>
021 */
022public final class CoreEventConstants {
023
024    public static final String DOC_LIFE_CYCLE = "documentLifeCycle";
025
026    /**
027     * BBB for NXP-666: change events to manage DocumentModel instances instead of Document instances.
028     * <p>
029     * Document is passed as an option in event in case old listeners need it and cannot handle the document model.
030     */
031    // public static final String DOCUMENT = "document";
032
033    /**
034     * Path the of the container of the empty document model that is being created.
035     */
036    public static final String PARENT_PATH = "parentPath";
037
038    /**
039     * @deprecated since 7.1, use {@link CoreEventConstants#DESTINATION_NAME} instead.
040     */
041    @Deprecated
042    public static final String DOCUMENT_MODEL_ID = "documentModelId";
043
044    public static final String REPOSITORY_NAME = "repositoryName";
045
046    public static final String SESSION_ID = "sessionId";
047
048    public static final String OLD_ACP = "oldACP";
049
050    public static final String NEW_ACP = "newACP";
051
052    /**
053     * @since 7.4
054     */
055    public static final String OLD_ACE = "oldACE";
056
057    /**
058     * @since 7.4
059     */
060    public static final String NEW_ACE = "newACE";
061
062    /**
063     * @since 7.4
064     */
065    public static final String CHANGED_ACL_NAME = "changedACLName";
066
067    public static final String REORDERED_CHILD = "reorderedChild";
068
069    public static final String REPLACED_PROXY_IDS = "replacedProxyRefs";
070
071    /**
072     * @since 7.4
073     */
074    public static final String DOCUMENT_REFS = "documentRefs";
075
076    /**
077     * Passed with beforeDocumentModification and documentModified events to hold the state that is about to be / has
078     * been overwritten by the saveDocument.
079     */
080    public static final String PREVIOUS_DOCUMENT_MODEL = "previousDocumentModel";
081
082    /**
083     * Passed with aboutToCopy, aboutToMove, documentCreatedbyCopy and documentMoved events to be able to change the
084     * destination name
085     *
086     * @since 5.7
087     */
088    public static final String DESTINATION_NAME = "destinationName";
089
090    public static final String DESTINATION_REF = "destinationRef";
091
092    public static final String DESTINATION_PATH = "destinationPath";
093
094    public static final String DESTINATION_EXISTS = "destinationExists";
095
096    public static final String DOCUMENT_DIRTY = "documentIsDirty";
097
098    public static final String SOURCE_REF = "sourceRef";
099
100    /**
101     * Passed with documentMoved event, if the name has changed, to know the original name of the document.
102     *
103     * @since 7.3
104     */
105    public static final String ORIGINAL_NAME = "originalName";
106
107    /**
108     * Passed with documentCreatedbyCopy event to be able to reset the life cycle or not
109     *
110     * @since 5.7
111     */
112    public static final String RESET_LIFECYCLE = "resetLifeCycle";
113
114    // Constant utility class
115    private CoreEventConstants() {
116    }
117
118}