}
protected ComponentContextImpl buildComponentContext(String name) throws IOException {
ComponentNameSpace cns = new ComponentNameSpace(container.getName(), name, name);
ComponentContextImpl context = new ComponentContextImpl(container, cns);
ComponentEnvironment env = new ComponentEnvironment();
File componentRoot = environmentContext.getComponentRootDirectory(name);
FileUtil.buildDirectory(componentRoot);
File privateWorkspace = environmentContext.createWorkspaceDirectory(name);
env.setWorkspaceRoot(privateWorkspace);
env.setComponentRoot(componentRoot);
context.setEnvironment(env);
return context;
}