#
# Copyright (C) 2011-2015 The XDocReport Team <xdocreport@googlegroups.com>
#
# All rights reserved.
#
# Permission is hereby granted, free  of charge, to any person obtaining
# a  copy  of this  software  and  associated  documentation files  (the
# "Software"), to  deal in  the Software without  restriction, including
# without limitation  the rights to  use, copy, modify,  merge, publish,
# distribute,  sublicense, and/or sell  copies of  the Software,  and to
# permit persons to whom the Software  is furnished to do so, subject to
# the following conditions:
#
# The  above  copyright  notice  and  this permission  notice  shall  be
# included in all copies or substantial portions of the Software.
#
# THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
# EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
# MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#

#velocimacro.library=${velocity.velocimacro.library}
#runtime.log.log_invalid_references=true
#runtime.log=${velocity.runtime.log}
#velocimacro.library.autoreload=true
#parser.pool.size=20


# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.    

# ----------------------------------------------------------------------------
# R U N T I M E  L O G
# ----------------------------------------------------------------------------

# ----------------------------------------------------------------------------
#  default LogChute to use: default: AvalonLogChute, Log4JLogChute, CommonsLogLogChute, ServletLogChute, JdkLogChute
# ----------------------------------------------------------------------------

runtime.log.logsystem.class = org.apache.velocity.runtime.log.AvalonLogChute,org.apache.velocity.runtime.log.Log4JLogChute,org.apache.velocity.runtime.log.CommonsLogLogChute,org.apache.velocity.runtime.log.ServletLogChute,org.apache.velocity.runtime.log.JdkLogChute

# ---------------------------------------------------------------------------
# This is the location of the Velocity Runtime log.
# ----------------------------------------------------------------------------

runtime.log=velocity.log

# ----------------------------------------------------------------------------
# This controls whether invalid references are logged.
# ----------------------------------------------------------------------------

runtime.log.log_invalid_references = true

# ----------------------------------------------------------------------------
# T E M P L A T E  E N C O D I N G
# ----------------------------------------------------------------------------

resource.default_encoding=UTF-8
output.encoding=UTF-8

# ----------------------------------------------------------------------------
# F O R E A C H  P R O P E R T I E S
# ----------------------------------------------------------------------------
# These properties control how the counter is accessed in the #foreach
# directive. By default the reference $velocityCount and $velocityHasNext
# will be available in the body of the #foreach directive.
# The default starting value for $velocityCount is 1.
# ----------------------------------------------------------------------------

directive.foreach.counter.name = velocityCount
directive.foreach.counter.initial.value = 1
directive.foreach.max_loops = -1

directive.foreach.iterator.name = velocityHasNext

# ----------------------------------------------------------------------------
# S E T  P R O P E R T I E S
# ----------------------------------------------------------------------------
# These properties control the behavior of #set.
# For compatibility, the default behavior is to disallow setting a reference
# to null.  This default may be changed in a future version.
# ----------------------------------------------------------------------------

directive.set.null.allowed = false

# ----------------------------------------------------------------------------
# I F  P R O P E R T I E S
# ----------------------------------------------------------------------------
# These properties control the behavior of #if
# Default behavior is to check return value of toString() and treat an object
# with toString() that returns null as null. If all objects have toString()
# methods that never return null, this check is unnecessary and can be disabled
# to gain performance. In Velocity 1.5, no such null check was performed.
directive.if.tostring.nullcheck = true

# ----------------------------------------------------------------------------
# I N C L U D E  P R O P E R T I E S
# ----------------------------------------------------------------------------
# These are the properties that governed the way #include'd content
# is governed.
# ----------------------------------------------------------------------------

directive.include.output_error_start = <!-- include error :
directive.include.output_error_end   =  see error log -->

# ----------------------------------------------------------------------------
# P A R S E  P R O P E R T I E S
# ----------------------------------------------------------------------------

directive.parse.max_depth = 10

# ----------------------------------------------------------------------------
# S C O P E  P R O P E R T I E S
# ----------------------------------------------------------------------------
# These are the properties that govern whether or not a Scope object
# is automatically provided for each of the given scopes to serve as a
# scope-safe reference namespace and "label" for #break calls. The default
# for most of these is false.  Note that <bodymacroname> should be replaced by
# name of macros that take bodies for which you want to suppress the scope.
# ----------------------------------------------------------------------------
# template.provide.scope.control = false
# evaluate.provide.scope.control = false
context.scope_control.foreach = true
# macro.provide.scope.control = false
# define.provide.scope.control = false
# <bodymacroname>.provide.scope.control = false

# ----------------------------------------------------------------------------
# T E M P L A T E  L O A D E R S
# ----------------------------------------------------------------------------
#
#
# ----------------------------------------------------------------------------

resource.loaders = file

resource.loader.file.description = Velocity File Resource Loader
resource.loader.file.class = org.apache.velocity.runtime.resource.loader.FileResourceLoader
resource.loader.file.path = .
resource.loader.file.cache = false
resource.loader.file.modification_check_interval = 2

resource.loader.string.description = Velocity String Resource Loader
resource.loader.string.class = org.apache.velocity.runtime.resource.loader.StringResourceLoader

# ----------------------------------------------------------------------------
# VELOCIMACRO PROPERTIES
# ----------------------------------------------------------------------------
# global : name of default global library.  It is expected to be in the regular
# template path.  You may remove it (either the file or this property) if
# you wish with no harm.
# ----------------------------------------------------------------------------
# velocimacro.library = VM_global_library.vm
#velocimacro.library=${velocity.velocimacro.library}

velocimacro.inline.allow = true
velocimacro.inline.replace_global = false
velocimacro.inline.local_scope = false

velocimacro.context.localscope = false
velocimacro.max_depth = 20

# ----------------------------------------------------------------------------
# VELOCIMACRO STRICT MODE
# ----------------------------------------------------------------------------
# if true, will throw an exception for incorrect number 
# of arguments.  false by default (for backwards compatibility)
# but this option will eventually be removed and will always
# act as if true
# ----------------------------------------------------------------------------
velocimacro.arguments.strict = false

# ----------------------------------------------------------------------------
# VELOCIMACRO BODY REFERENCE 
# ----------------------------------------------------------------------------
# Defines name of the reference that can be used to render the AST block passed to
# block macro call as an argument inside a macro.
# ----------------------------------------------------------------------------
velocimacro.body_reference=bodyContent

# ----------------------------------------------------------------------------
# STRICT REFERENCE MODE
# ----------------------------------------------------------------------------
# if true, will throw a MethodInvocationException for references
# that are not defined in the context, or have not been defined
# with a #set directive. This setting will also throw an exception
# if an attempt is made to call a non-existing property on an object
# or if the object is null.  When this property is true then property
# 'directive.set.null.allowed' is also set to true.
# ----------------------------------------------------------------------------
runtime.strict_mode.enable = false

# ----------------------------------------------------------------------------
# INTERPOLATION
# ----------------------------------------------------------------------------
# turn off and on interpolation of references and directives in string
# literals.  ON by default :)
# ----------------------------------------------------------------------------
runtime.interpolate_string_literals = true


# ----------------------------------------------------------------------------
# RESOURCE MANAGEMENT
# ----------------------------------------------------------------------------
# Allows alternative ResourceManager and ResourceCache implementations
# to be plugged in.
# ----------------------------------------------------------------------------
resource.manager.class = org.apache.velocity.runtime.resource.ResourceManagerImpl
resource.manager.cache.class = org.apache.velocity.runtime.resource.ResourceCacheImpl

# ----------------------------------------------------------------------------
# PARSER POOL
# ----------------------------------------------------------------------------
# Selects a custom factory class for the parser pool.  Must implement
# ParserPool.  parser.pool.size is used by the default implementation
# ParserPoolImpl
# ----------------------------------------------------------------------------

parser.pool.class = org.apache.velocity.runtime.ParserPoolImpl
parser.pool.size = 20


# ----------------------------------------------------------------------------
# EVENT HANDLER
# ----------------------------------------------------------------------------
# Allows alternative event handlers to be plugged in.  Note that each
# class property is actually a comma-separated list of classes (which will
# be called in order).
# ----------------------------------------------------------------------------
# event_handler.reference_insertion.class =
# eventhandler.nullset.class =
# eventhandler.methodexception.class =
# eventhandler.include.class =


# ----------------------------------------------------------------------------
# EVALUATE
# ----------------------------------------------------------------------------
# Evaluate VTL dynamically in template.  Select a class for the Context, if
# you want all #set calls within it to be locally scoped.  This feature is
# deprecated; please use $evaluate to hold local references instead.
# ----------------------------------------------------------------------------

#directive.evaluate.context.class = org.apache.velocity.VelocityContext


# ----------------------------------------------------------------------------
# PLUGGABLE / SECURE INTROSPECTOR
# ----------------------------------------------------------------------------
# Configure a secure introspector to prevent access to dangerous classes and
# packages from templates, while keeping normal template operations working.
# See: Velocity 2.x SecureUberspector documentation.
# ----------------------------------------------------------------------------

# Use SecureUberspector instead of the default UberspectImpl to enforce the
# restrictions defined below and to mitigate SSTI → RCE attacks.
runtime.introspector.uberspect = org.apache.velocity.util.introspection.SecureUberspector

# Secure introspector configuration: forbid reflective access to sensitive
# JDK classes and packages but allow regular POJO/property access.
introspector.restrict.packages = java.lang.reflect

# The most dangerous classes that must not be reachable from templates
introspector.restrict.classes = java.lang.Class, java.lang.ClassLoader, java.lang.Compiler, java.lang.InheritableThreadLocal, java.lang.Package, java.lang.Process, java.lang.Runtime, java.lang.RuntimePermission, java.lang.SecurityManager, java.lang.System, java.lang.Thread, java.lang.ThreadGroup, java.lang.ThreadLocal


### XDOCREPORT velocity config
# Use org.apache.velocity.runtime.log.NullLogChute for disable log for Velocity to avoid to generate velocity.log (by default)
runtime.log.logsystem.class = org.apache.velocity.runtime.log.NullLogChute
# If you want activate the log comment last line and uncomment the next one
#runtime.log=${velocity.runtime.log}
resource.loaders=file, class, jar ,report
resource.loader.report.class=fr.opensagres.xdocreport.template.velocity.cache.XDocReportEntryResourceLoader
resource.loader.report.cache=true
resource.loader.file.modification_check_interval=1
