org.apache.shindig.gadgets.spec
Class Feature

java.lang.Object
  extended by org.apache.shindig.gadgets.spec.Feature

public class Feature
extends Object

Represents a Require or Optional tag. No substitutions on any fields.


Field Summary
static Feature CORE_FEATURE
           
static Feature SECURITY_TOKEN_FEATURE
           
 
Constructor Summary
Feature(Element feature)
          Creates a new Feature from an xml node.
 
Method Summary
 String getName()
           
 String getParam(String key)
          Returns the first value for any feature parameter, or null if the parameter does not exist.
 Collection<String> getParamCollection(String key)
          Returns the values for the key, or an empty collection.
 com.google.common.collect.Multimap<String,String> getParams()
           
 boolean getRequired()
           
 String toString()
          Produces an xml representation of the feature.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CORE_FEATURE

public static final Feature CORE_FEATURE

SECURITY_TOKEN_FEATURE

public static final Feature SECURITY_TOKEN_FEATURE
Constructor Detail

Feature

public Feature(Element feature)
        throws SpecParserException
Creates a new Feature from an xml node.

Parameters:
feature - The feature to create
Throws:
SpecParserException - When the Require or Optional tag is not valid
Method Detail

getName

public String getName()

getParams

public com.google.common.collect.Multimap<String,String> getParams()

getParam

public String getParam(String key)
Returns the first value for any feature parameter, or null if the parameter does not exist.


getParamCollection

public Collection<String> getParamCollection(String key)
Returns the values for the key, or an empty collection.


getRequired

public boolean getRequired()

toString

public String toString()
Produces an xml representation of the feature.

Overrides:
toString in class Object


Copyright © 2007-2012. All Rights Reserved.