org.apache.shindig.gadgets.spec
Class Preload

java.lang.Object
  extended by org.apache.shindig.gadgets.spec.Preload
All Implemented Interfaces:
RequestAuthenticationInfo

public class Preload
extends Object
implements RequestAuthenticationInfo

Represents an addressable piece of content that can be preloaded by the server to satisfy makeRequest calls


Constructor Summary
Preload(Element preload, Uri base)
          Creates a new Preload from an xml node.
 
Method Summary
 Map<String,String> getAttributes()
           
 AuthType getAuthType()
           
 Uri getHref()
           
 Set<String> getViews()
           
 boolean isSignOwner()
           
 boolean isSignViewer()
           
 Preload substitute(Substitutions substituter)
           
 String toString()
          Produces an xml representation of the Preload.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Preload

public Preload(Element preload,
               Uri base)
        throws SpecParserException
Creates a new Preload from an xml node.

Parameters:
preload - The Preload to create
Throws:
SpecParserException - When the href is not specified
Method Detail

getHref

public Uri getHref()
Specified by:
getHref in interface RequestAuthenticationInfo
Returns:
The destination URI for making authenticated requests to.

getAuthType

public AuthType getAuthType()
Specified by:
getAuthType in interface RequestAuthenticationInfo
Returns:
The type of authentication to use.

isSignOwner

public boolean isSignOwner()
Specified by:
isSignOwner in interface RequestAuthenticationInfo
Returns:
True if owner signing is needed.

isSignViewer

public boolean isSignViewer()
Specified by:
isSignViewer in interface RequestAuthenticationInfo
Returns:
True if viewer signing is needed.

getAttributes

public Map<String,String> getAttributes()
Specified by:
getAttributes in interface RequestAuthenticationInfo
Returns:
A map of all relevant auth-related attributes.

getViews

public Set<String> getViews()

substitute

public Preload substitute(Substitutions substituter)

toString

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

Overrides:
toString in class Object


Copyright © 2007-2012. All Rights Reserved.