001 /*
002 * Copyright 2005-2008 The Kuali Foundation
003 *
004 *
005 * Licensed under the Educational Community License, Version 2.0 (the "License");
006 * you may not use this file except in compliance with the License.
007 * You may obtain a copy of the License at
008 *
009 * http://www.opensource.org/licenses/ecl2.php
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017
018 package org.kuali.rice.kew.engine.node.var.schemes;
019
020 import org.kuali.rice.kew.engine.RouteContext;
021 import org.kuali.rice.kew.engine.node.var.Property;
022 import org.kuali.rice.kew.engine.node.var.PropertyScheme;
023
024 /**
025 * A property scheme that just returns the literal value of the locator portion.
026 *
027 * @author Kuali Rice Team (rice.collab@kuali.org)
028 */
029 public final class LiteralScheme implements PropertyScheme {
030 public String getName() {
031 return "literal";
032 }
033 public String getShortName() {
034 return "lit";
035 }
036
037 public Object load(Property property, RouteContext context) {
038 // just returns the literal text
039 return property.locator;
040 }
041
042 public String toString() {
043 return "[LiteralScheme]";
044 }
045 }