Search in sources :

Example 1 with IEntityComponentNodesFactoryPlugin

use of org.jowidgets.cap.ui.api.plugin.IEntityComponentNodesFactoryPlugin in project jo-client-platform by jo-source.

the class EntityComponentNodesFactoryImpl method createNodes.

@Override
public List<IComponentNodeModel> createNodes(final IEntityApplicationService entityApplicationService) {
    Assert.paramNotNull(entityApplicationService, "entityApplicationService");
    final List<IComponentNodeModel> result = new LinkedList<IComponentNodeModel>();
    Collection<IEntityApplicationNode> entities = entityApplicationService.getApplicationNodes();
    for (final IEntityComponentNodesFactoryPlugin plugin : PluginProvider.getPlugins(IEntityComponentNodesFactoryPlugin.ID)) {
        entities = plugin.modify(entities);
    }
    for (final IEntityApplicationNode entityNode : entities) {
        result.add(createNodeFromEntity(entityNode));
    }
    return result;
}
Also used : IEntityApplicationNode(org.jowidgets.cap.common.api.entity.IEntityApplicationNode) IComponentNodeModel(org.jowidgets.workbench.toolkit.api.IComponentNodeModel) IEntityComponentNodesFactoryPlugin(org.jowidgets.cap.ui.api.plugin.IEntityComponentNodesFactoryPlugin) LinkedList(java.util.LinkedList)

Aggregations

LinkedList (java.util.LinkedList)1 IEntityApplicationNode (org.jowidgets.cap.common.api.entity.IEntityApplicationNode)1 IEntityComponentNodesFactoryPlugin (org.jowidgets.cap.ui.api.plugin.IEntityComponentNodesFactoryPlugin)1 IComponentNodeModel (org.jowidgets.workbench.toolkit.api.IComponentNodeModel)1