Package org.c3s.test

Source Code of org.c3s.test.TestModule

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package org.c3s.test;

import java.util.LinkedHashMap;
import java.util.Map;

import org.c3s.annotations.Controller;
import org.c3s.annotations.Parameter;
import org.c3s.content.ContentObject;
import org.c3s.content.DataHolder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
*
* @author admin
*/
@Controller
public class TestModule {

  private static Logger logger = LoggerFactory.getLogger(TestModule.class);
 
  public void process(@Parameter("template") String template, @Parameter("tag") String tag) throws Exception {
    logger.debug("template: " + template);
    logger.debug("tag: " + tag);
    Map<String, String> data = new LinkedHashMap<String, String>() {
      private static final long serialVersionUID = 1L;
    {
      put("firstName", "Jopa");
      put("secondName", "SRuchkoi");
    }};
    ContentObject.getInstance().setData(new DataHolder(tag, data, template, null, false));
  }
}
TOP

Related Classes of org.c3s.test.TestModule

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.