view src/treecms/proto/simple/SimpleNodeAPITreeBuilder.java @ 8:8fbe7ba1d820

added EditableNodeAPI
author shoshi
date Sat, 28 Aug 2010 17:34:57 +0900
parents 18f696e9fc1e
children 3bccd745f2e2
line wrap: on
line source

package treecms.proto.simple;

import treecms.proto.api.*;

import java.util.*;

public class SimpleNodeAPITreeBuilder implements NodeAPITreeBuilder
{
	private NodeAPI m_root;
	
	public SimpleNodeAPITreeBuilder()
	{
		m_root = new SimpleNodeAPI(generateUUID());
		return;
	}
	
	public NodeAPI getContents()
	{
		return m_root;
	}
	
	public NodeAPI createNode()
	{
		return new SimpleNodeAPI(generateUUID());
	}
	
	String generateUUID()
	{
		return UUID.randomUUID().toString();
	}
	
}