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 * $Id$ 019 */ 020 021package org.nuxeo.ecm.core.lifecycle.impl; 022 023import org.nuxeo.ecm.core.lifecycle.LifeCycleTransition; 024 025/** 026 * Life cycle transition implementation. 027 * 028 * @see org.nuxeo.ecm.core.lifecycle.LifeCycleTransition 029 * @author <a href="mailto:[email protected]">Julien Anguenot</a> 030 */ 031public class LifeCycleTransitionImpl implements LifeCycleTransition { 032 033 /** Name of the transition. */ 034 private final String name; 035 036 /** Description of the transition. */ 037 private final String description; 038 039 /** Destination state name for this transition. */ 040 private final String destinationStateName; 041 042 public LifeCycleTransitionImpl(String name, String description, String destinationState) { 043 this.name = name; 044 this.description = description; 045 destinationStateName = destinationState; 046 } 047 048 @Override 049 public String getDestinationStateName() { 050 return destinationStateName; 051 } 052 053 @Override 054 public String getDescription() { 055 return description; 056 } 057 058 @Override 059 public String getName() { 060 return name; 061 } 062 063}