Skip navigation links

Oracle® Fusion Middleware Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-01


oracle.stellent.wcm.client.script.vm
Class VelocityScriptProvider

java.lang.Object
  extended by oracle.stellent.wcm.client.script.vm.VelocityScriptProvider

All Implemented Interfaces:
ScriptProvider

public class VelocityScriptProvider
extends java.lang.Object
implements ScriptProvider

Control the initialization of the Velocity Engine


Nested Class Summary
static interface VelocityScriptProvider.ContextProvider
          Allow clients to populate the velocity context

 

Field Summary
static java.lang.String EXTENSION
           
static java.lang.String VELOCITY_PROPERTY_PREFIX
           

 

Constructor Summary
VelocityScriptProvider(ClientApplication clientApplication)
           

 

Method Summary
 org.apache.velocity.context.Context createDefaultContext(RequestContext requestContext)
          Create the default execution context for a velocity script
 ScriptTemplate createTemplate(RequestContext requestContext, java.lang.String path)
          Create the remote template for the given request context and path.
 org.apache.velocity.app.VelocityEngine getEngine()
           
static org.apache.commons.collections.ExtendedProperties getVelocityProperties(ClientApplication clientApplication)
           
 void registerContextProvider(VelocityScriptProvider.ContextProvider provider)
          Register a context provider
 void removeContextProvider(VelocityScriptProvider.ContextProvider provider)
          Remove the context provider from the list

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

EXTENSION

public static final java.lang.String EXTENSION
See Also:
Constant Field Values

VELOCITY_PROPERTY_PREFIX

public static final java.lang.String VELOCITY_PROPERTY_PREFIX
See Also:
Constant Field Values

Constructor Detail

VelocityScriptProvider

public VelocityScriptProvider(ClientApplication clientApplication)
                       throws java.lang.Exception
Throws:
java.lang.Exception

Method Detail

getEngine

public org.apache.velocity.app.VelocityEngine getEngine()

registerContextProvider

public void registerContextProvider(VelocityScriptProvider.ContextProvider provider)
Register a context provider
Parameters:
provider - the provider

removeContextProvider

public void removeContextProvider(VelocityScriptProvider.ContextProvider provider)
Remove the context provider from the list
Parameters:
provider - the provider to remove

createDefaultContext

public org.apache.velocity.context.Context createDefaultContext(RequestContext requestContext)
                                                         throws ApplicationException
Create the default execution context for a velocity script
Parameters:
requestContext - the request context
Returns:
the default context objects
Throws:
ApplicationException

getVelocityProperties

public static org.apache.commons.collections.ExtendedProperties getVelocityProperties(ClientApplication clientApplication)

createTemplate

public ScriptTemplate createTemplate(RequestContext requestContext,
                                     java.lang.String path)
                              throws ApplicationException
Create the remote template for the given request context and path.
Specified by:
createTemplate in interface ScriptProvider
Parameters:
requestContext - the request context
path - the web path to the remote template
Returns:
the template object
Throws:
ApplicationException - if the template cannot be created

Skip navigation links

Oracle® Fusion Middleware Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-01


Copyright © 2010, Oracle and/or its affiliates. All rights reserved.