001/* 002 * Copyright 2025 devteam@scivicslab.com 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, 011 * software distributed under the License is distributed on an 012 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 013 * either express or implied. See the License for the 014 * specific language governing permissions and limitations 015 * under the License. 016 */ 017 018package com.scivicslab.actoriac.report; 019 020/** 021 * Report section for actor JsonState data in YAML format. 022 * 023 * <p>Displays collected data from an actor's JsonState as YAML.</p> 024 * 025 * @author devteam@scivicslab.com 026 * @since 2.15.0 027 */ 028public class JsonStateSection implements ReportSection { 029 030 private final String actorName; 031 private final String yamlContent; 032 033 /** 034 * Creates a JsonState section. 035 * 036 * @param actorName the name of the actor whose data is displayed 037 * @param yamlContent the YAML-formatted content from JsonState 038 */ 039 public JsonStateSection(String actorName, String yamlContent) { 040 this.actorName = actorName; 041 this.yamlContent = yamlContent; 042 } 043 044 @Override 045 public String getTitle() { 046 return "Collected Data (" + actorName + ")"; 047 } 048 049 @Override 050 public String getContent() { 051 return yamlContent; 052 } 053}