net.anotheria.anosite.decorator.NaviItemCMS2Decorator Maven / Gradle / Ivy
package net.anotheria.anosite.decorator;
import net.anotheria.anodoc.data.Document;
import net.anotheria.anodoc.data.NoSuchDocumentException;
import net.anotheria.anodoc.data.NoSuchPropertyException;
import net.anotheria.anoprise.metafactory.MetaFactory;
import net.anotheria.anoprise.metafactory.MetaFactoryException;
import net.anotheria.anosite.gen.assitedata.data.NaviItem;
import net.anotheria.anosite.gen.assitedata.data.Site;
import net.anotheria.anosite.gen.aswebdata.service.IASWebDataService;
import net.anotheria.asg.data.DataObject;
import net.anotheria.asg.exception.ASGRuntimeException;
import net.anotheria.asg.util.decorators.IAttributeDecorator;
import net.anotheria.util.StringUtils;
import org.slf4j.LoggerFactory;
import org.slf4j.MarkerFactory;
import java.util.ArrayList;
import java.util.List;
public class NaviItemCMS2Decorator implements IAttributeDecorator{
private static IASWebDataService service;
/**
* Init.
*/
static {
try {
service = MetaFactory.get(IASWebDataService.class);
} catch (MetaFactoryException e) {
LoggerFactory.getLogger(NaviItemCMS2Decorator.class).error(MarkerFactory.getMarker("FATAL"), "IASSiteDataService init failure", e);
}
}
public String decorate(DataObject doc, String attributeName, String rule) {
try{
//tmp hack
List