org.jboss.kernel.plugins.deployment.props.vertex
Class DefaultVertexFactory

java.lang.Object
  extended by org.jboss.kernel.plugins.deployment.props.vertex.DefaultVertexFactory
All Implemented Interfaces:
VertexFactory

public class DefaultVertexFactory
extends Object
implements VertexFactory

Default vertex factory.

Author:
Ales Justin

Field Summary
protected  Map<Integer,Set<LevelVertexFactory>> levelFactories
          The level factories
protected  org.jboss.logging.Logger logger
          The logger
 
Constructor Summary
DefaultVertexFactory()
           
 
Method Summary
 void addLevelFactory(int level, LevelVertexFactory factory)
           
 TreeVertex<?> createVertex(int level, String name)
          Create simple vertex.
protected  boolean isValueComplex(String value)
          Is value complex.
 DeploymentVertex rootVertex()
          Create root/deploymenent vertex.
 TreeVertex<? extends org.jboss.util.graph.Vertex<String>> valueVertex(String value)
          Create value vertext.
 org.jboss.util.graph.Visitor<String> visitor()
          Get the visitor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected org.jboss.logging.Logger logger
The logger


levelFactories

protected Map<Integer,Set<LevelVertexFactory>> levelFactories
The level factories

Constructor Detail

DefaultVertexFactory

public DefaultVertexFactory()
Method Detail

addLevelFactory

public void addLevelFactory(int level,
                            LevelVertexFactory factory)

rootVertex

public DeploymentVertex rootVertex()
Description copied from interface: VertexFactory
Create root/deploymenent vertex.

Specified by:
rootVertex in interface VertexFactory
Returns:
DeploymentVertex instance

createVertex

public TreeVertex<?> createVertex(int level,
                                  String name)
Description copied from interface: VertexFactory
Create simple vertex.

Specified by:
createVertex in interface VertexFactory
Parameters:
level - current level
name - full name
Returns:
new tree vertex

isValueComplex

protected boolean isValueComplex(String value)
Is value complex. e.g. injection

Parameters:
value -
Returns:
true when it is complex

valueVertex

public TreeVertex<? extends org.jboss.util.graph.Vertex<String>> valueVertex(String value)
Description copied from interface: VertexFactory
Create value vertext.

Specified by:
valueVertex in interface VertexFactory
Parameters:
value - the text value
Returns:
new value vertex

visitor

public org.jboss.util.graph.Visitor<String> visitor()
Description copied from interface: VertexFactory
Get the visitor.

Specified by:
visitor in interface VertexFactory
Returns:
visitor instance


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.