package apps.gmc.components.events.settings; import org.apache.sling.api.resource.ValueMap; import org.apache.sling.commons.json.JSONObject; import com.adobe.cq.sightly.WCMUsePojo; import java.util.ArrayList; public class Settings extends WCMUsePojo { private String settings = ""; public Settings() { } @Override public void activate() throws Exception { //Node node = CurrentPage.getContentResource("eventSettings").adaptTo(Node.class); //settings = node.getProperty("jcr:focusText").getString(); //String sponsor = node.getProperty("jcr:sponsorText").getString(); this.settings = "Translation Text"; // String resourcePath = "path/to/resource"; // req is the SlingHttpServletRequest // ResourceResolver resourceResolver = req.getResourceResolver(); // Resource res = resourceResolver.getResource(resourcePath); // JSP: /* <% String resourcePath = "path/to/resource"; Resource res = resourceResolver.getResource(resourcePath); ValueMap properties = res.adaptTo(ValueMap.class); String rule = properties.get(propName, (String) null); %>*/ } public String getSettings() { return this.settings; } }