org.xwiki.velocity.introspection
Class SecureUberspector

java.lang.Object
  extended by org.apache.velocity.util.introspection.UberspectImpl
      extended by org.xwiki.velocity.introspection.SecureUberspector
All Implemented Interfaces:
org.apache.velocity.util.introspection.Uberspect, org.apache.velocity.util.introspection.UberspectLoggable, org.apache.velocity.util.RuntimeServicesAware

public class SecureUberspector
extends org.apache.velocity.util.introspection.UberspectImpl
implements org.apache.velocity.util.RuntimeServicesAware

SecureUberspector is way too restrictive regarding Class methods allowed.

Since:
5.4RC1
Version:
$Id: aa8e3eef1825d21eb4cf4674e716277e5c69b037 $

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.velocity.util.introspection.UberspectImpl
org.apache.velocity.util.introspection.UberspectImpl.VelGetterImpl, org.apache.velocity.util.introspection.UberspectImpl.VelMethodImpl, org.apache.velocity.util.introspection.UberspectImpl.VelSetterImpl
 
Field Summary
 
Fields inherited from class org.apache.velocity.util.introspection.UberspectImpl
introspector, log
 
Constructor Summary
SecureUberspector()
           
 
Method Summary
 Iterator getIterator(Object obj, org.apache.velocity.util.introspection.Info i)
          Get an iterator from the given object.
 void init()
           
 void setRuntimeServices(org.apache.velocity.runtime.RuntimeServices rs)
           
 
Methods inherited from class org.apache.velocity.util.introspection.UberspectImpl
getMethod, getPropertyGet, getPropertySet, setLog, setRuntimeLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecureUberspector

public SecureUberspector()
Method Detail

init

public void init()
Specified by:
init in interface org.apache.velocity.util.introspection.Uberspect
Overrides:
init in class org.apache.velocity.util.introspection.UberspectImpl

getIterator

public Iterator getIterator(Object obj,
                            org.apache.velocity.util.introspection.Info i)
                     throws Exception
Get an iterator from the given object. Since the superclass method this secure version checks for execute permission.

Specified by:
getIterator in interface org.apache.velocity.util.introspection.Uberspect
Overrides:
getIterator in class org.apache.velocity.util.introspection.UberspectImpl
Parameters:
obj - object to iterate over
i - line, column, template info
Returns:
Iterator for object
Throws:
Exception - when failing to get iterator

setRuntimeServices

public void setRuntimeServices(org.apache.velocity.runtime.RuntimeServices rs)
Specified by:
setRuntimeServices in interface org.apache.velocity.util.RuntimeServicesAware


Copyright © 2004–2014 XWiki. All rights reserved.