org.apache.shindig.gadgets.templates
Class TemplateResource

java.lang.Object
  extended by org.apache.shindig.gadgets.templates.TemplateResource

public final class TemplateResource
extends Object

Encapsulation of a single resource imported by a library for template execution.


Nested Class Summary
static class TemplateResource.Type
           
 
Method Summary
 String getContent()
           
 TemplateResource.Type getType()
           
 boolean isSafe()
           
static TemplateResource newJavascriptResource(String javascript, TemplateLibrary library)
          Create a Javascript resource.
static TemplateResource newStyleResource(String style, TemplateLibrary library)
          Create a CSS resource.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

newJavascriptResource

public static TemplateResource newJavascriptResource(String javascript,
                                                     TemplateLibrary library)
Create a Javascript resource.

Parameters:
javascript - the script content
library - the library that is the source of the script

newStyleResource

public static TemplateResource newStyleResource(String style,
                                                TemplateLibrary library)
Create a CSS resource.

Parameters:
style - the CSS content
library - the library that is the source of the content

getContent

public String getContent()

getType

public TemplateResource.Type getType()

isSafe

public boolean isSafe()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2012. All Rights Reserved.