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 *     Anahide Tchertchian
018 */
019package org.nuxeo.ecm.core.api;
020
021/**
022 * Holds life cycle related constants that are generic enough to be available at a core level.
023 *
024 * @author Anahide Tchertchian
025 */
026public interface LifeCycleConstants {
027
028    static final String DELETED_STATE = "deleted";
029
030    static final String DELETE_TRANSITION = "delete";
031
032    static final String UNDELETE_TRANSITION = "undelete";
033
034    /**
035     * Event for a lifecycle transition.
036     */
037    static final String TRANSITION_EVENT = "lifecycle_transition_event";
038
039    static final String TRANSTION_EVENT_OPTION_FROM = "from";
040
041    static final String TRANSTION_EVENT_OPTION_TO = "to";
042
043    static final String TRANSTION_EVENT_OPTION_TRANSITION = "transition";
044
045    /**
046     * Event for a document undeleted by the user. Triggers an async listener that undeletes its children too.
047     */
048    static final String DOCUMENT_UNDELETED = "documentUndeleted";
049
050    /**
051     * Key in context map to specify initial lifecycle state on document creation.
052     */
053    static final String INITIAL_LIFECYCLE_STATE_OPTION_NAME = "initialLifecycleState";
054
055}