001/*
002 * (C) Copyright 2009 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 *     arussel
018 */
019package org.nuxeo.ecm.platform.routing.api;
020
021import java.util.List;
022
023import org.nuxeo.ecm.core.api.CoreSession;
024
025/**
026 * A DocumentRoute model or instance. A route is a set of step that processes documents. If a method is called that
027 * change the state of this object, the {@link #save(CoreSession)} method should be called to persist its state.
028 *
029 * @author arussel
030 */
031public interface DocumentRoute extends DocumentRouteStepsContainer {
032
033    /**
034     * Set the list of id of documents attached to this instance of RouteModel replacing the previous list if any.
035     *
036     * @param documents
037     */
038    void setAttachedDocuments(List<String> documentIds);
039
040    /**
041     * The list of documents processed by this route.
042     *
043     * @return
044     */
045    List<String> getAttachedDocuments();
046
047
048    /**
049     * Get the username of the initiator.
050     *
051     * @since 7.2
052     */
053    String getInitiator();
054
055    /**
056     * @since 7.2
057     */
058    String getModelId();
059
060    /**
061     * @since 7.2
062     */
063    String getModelName();
064
065}