<commit_before>package services.report.freemarker;

import java.io.IOException;
import java.io.Writer;
import java.util.Base64;
import java.util.Iterator;
import java.util.Map;

import org.skyve.EXT;
import org.skyve.content.AttachmentContent;
import org.skyve.content.ContentManager;
import org.skyve.domain.Bean;
import org.skyve.util.Binder;

import freemarker.core.Environment;
import freemarker.template.TemplateDirectiveBody;
import freemarker.template.TemplateDirectiveModel;
import freemarker.template.TemplateException;
import freemarker.template.TemplateModel;
import freemarker.template.TemplateModelException;
import freemarker.template.TemplateNumberModel;
import freemarker.template.TemplateScalarModel;
import freemarker.template.utility.DeepUnwrap;

/**
 * FreeMarker user-defined directive which loads a specified content image from Skyve's content
 * repository and outputs a HTML img with a data URL set to the loaded image.
 *
 * <p>
 * <b>Directive info</b>
 * </p>
 *
 * <p>
 * Directive parameters:
 * <ul>
 * <li><code>bean</code>: The bean which contains the content attribute, can be a compound binding
 * <li><code>module</code>: The name of the module where the content attribute is located
 * <li><code>document</code>: The name of the document where the content attribute is located
 * <li><code>attribute</code>: The attribute binding for the content
 * <li><code>height</code>: Height of the image element, can be null
 * <li><code>width</code>: Width of the image element, can be null
 * <li><code>class</code>: Class(es) for the image element, can be null
 * <li><code>style</code>: Style(s) for the image element, can be null
 * </ul>
 * <p>
 * Loop variables: None
 * <p>
 * Directive nested content: No
 * 
 * <p>
 * Usage: <code><@content content=bean module="admin" document="Contact" attribute="image" /></code>.
 * </p>
 */
public class ContentDirective implements TemplateDirectiveModel {
<commit_msg>Update ContentDirective javadoc<commit_after>package services.report.freemarker;

import java.io.IOException;
import java.io.Writer;
import java.util.Base64;
import java.util.Iterator;
import java.util.Map;

import org.skyve.EXT;
import org.skyve.content.AttachmentContent;
import org.skyve.content.ContentManager;
import org.skyve.domain.Bean;
import org.skyve.util.Binder;

import freemarker.core.Environment;
import freemarker.template.TemplateDirectiveBody;
import freemarker.template.TemplateDirectiveModel;
import freemarker.template.TemplateException;
import freemarker.template.TemplateModel;
import freemarker.template.TemplateModelException;
import freemarker.template.TemplateNumberModel;
import freemarker.template.TemplateScalarModel;
import freemarker.template.utility.DeepUnwrap;

/**
 * FreeMarker user-defined directive which loads a specified content image from Skyve's content
 * repository and outputs a HTML img with a data URL set to the loaded image.
 *
 * <p>
 * <b>Directive info</b>
 * </p>
 *
 * <p>
 * Directive parameters:
 * <ul>
 * <li><code>bean</code>: The bean which contains the content attribute, can be a compound binding
 * <li><code>module</code>: The name of the module where the content attribute is located
 * <li><code>document</code>: The name of the document where the content attribute is located
 * <li><code>attribute</code>: The attribute binding for the content
 * <li><code>height</code>: Height of the image element, can be null
 * <li><code>width</code>: Width of the image element, can be null
 * <li><code>class</code>: Class(es) for the image element, can be null
 * <li><code>style</code>: Style(s) for the image element, can be null
 * </ul>
 * <p>
 * Loop variables: None
 * <p>
 * Directive nested content: No
 * 
 * <p>
 * Usage: <code><@content bean=content module="admin" document="Contact" attribute="image" /></code>.
 * </p>
 */
public class ContentDirective implements TemplateDirectiveModel {

{'fraction_non_alphanumeric': 0.11629098360655737, 'fraction_numerical': 0.0010245901639344263, 'mean_word_length': 5.349593495934959, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 79, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3438089', 'n_tokens_mistral': 1148, 'n_tokens_neox': 1129, 'n_words': 360}