Coverage Report - org.kuali.rice.kew.engine.node.var.PropertyScheme
 
Classes in this File Line Coverage Branch Coverage Complexity
PropertyScheme
N/A
N/A
1
 
 1  
 /**
 2  
  * Copyright 2005-2011 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl2.php
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.kew.engine.node.var;
 17  
 
 18  
 import java.util.Arrays;
 19  
 import java.util.Collection;
 20  
 import java.util.Collections;
 21  
 
 22  
 import org.kuali.rice.kew.engine.RouteContext;
 23  
 import org.kuali.rice.kew.engine.node.var.schemes.LiteralScheme;
 24  
 import org.kuali.rice.kew.engine.node.var.schemes.ResourceScheme;
 25  
 import org.kuali.rice.kew.engine.node.var.schemes.URLScheme;
 26  
 import org.kuali.rice.kew.engine.node.var.schemes.VariableScheme;
 27  
 import org.kuali.rice.kew.engine.node.var.schemes.XPathScheme;
 28  
 
 29  
 
 30  
 /**
 31  
  * Interface representing an implementation that can resolve Property objects to
 32  
  * values.
 33  
  * 
 34  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 35  
  */
 36  
 public interface PropertyScheme {
 37  
     public static final PropertyScheme VARIABLE_SCHEME = new VariableScheme();
 38  
     public static final PropertyScheme LITERAL_SCHEME = new LiteralScheme();
 39  
     public static final PropertyScheme RESOURCE_SCHEME = new ResourceScheme();
 40  
     public static final PropertyScheme URL_SCHEME = new URLScheme();
 41  
     public static final PropertyScheme XPATH_SCHEME = new XPathScheme();
 42  
 
 43  
     /**
 44  
      * Collection/enumeration of PropertyScheme types
 45  
      */
 46  
     /* interfaces can't have static initializers */
 47  
     public static final Collection SCHEMES = Collections.unmodifiableCollection(
 48  
                                                              Arrays.
 49  
                                                                  asList(new PropertyScheme[] {
 50  
                                                                     VARIABLE_SCHEME,
 51  
                                                                     LITERAL_SCHEME,
 52  
                                                                     RESOURCE_SCHEME,
 53  
                                                                     URL_SCHEME,
 54  
                                                                     XPATH_SCHEME}));
 55  
 
 56  
     /**
 57  
      * Scheme name
 58  
      * @return scheme name
 59  
      */
 60  
     public String getName();
 61  
     /**
 62  
      * Short scheme name
 63  
      * @return short scheme name
 64  
      */
 65  
     public String getShortName();
 66  
     /**
 67  
      * Loads/resolves a Property
 68  
      * @param property the property to resolve
 69  
      * @param context the current RouteContext
 70  
      * @return the loaded/resolved value
 71  
      */
 72  
     public Object load(Property property, RouteContext context);
 73  
 }