Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Controls module for Magnolia CMS ( Copyright(C) 2008-2013, Openmind S.r.l. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <>.
 package net.sourceforge.openutils.mgnlcontrols.configuration;
 import  info.magnolia.cms.beans.config.ObservedManager;
 import  info.magnolia.cms.core.Content;
 import  info.magnolia.cms.util.ContentUtil;
 import  info.magnolia.cms.util.NodeDataUtil;
 import  info.magnolia.content2bean.Content2BeanUtil;
 import  info.magnolia.objectfactory.Components;
 import java.util.Map;
 import  javax.inject.Singleton;
Collects and exposes all the configured column types.

$Id: 4282 2013-08-22 11:06:56Z lucaboati $
 public class GridColumnTypeManager extends ObservedManager
     public static GridColumnTypeManager getInstance()
         return Components.getSingleton(GridColumnTypeManager.class);
     private Logger log = LoggerFactory.getLogger(getClass());
     private final Map<StringGridColumnTypecolumnTypes = new HashMap<StringGridColumnType>();

Returns the types.

the types
     public Map<StringGridColumnTypegetColumnTypes()
         return ;

     protected void onClear()

     protected void onRegister(Content node)
         for (Iterator iter = ContentUtil.getAllChildren(node).iterator(); iter.hasNext();)
             Content columnTypeNode = (Content);
             if (!NodeDataUtil.getBoolean(columnTypeNode"enabled"true))
                 GridColumnType columnType = (GridColumnType) Content2BeanUtil.toBean(columnTypeNode);
                 .put(columnTypeNode.getName(), columnType);
             catch (Throwable e)
                 .error("Error getting column type {}"columnTypeNode.getHandle(), e);
New to GrepCode? Check out our FAQ X