String scriptName,
Object root) {
if (Renderer.class.equals(artifactType)) {
return new RendererProxy(scriptName);
} else if (PhaseListener.class.equals(artifactType)) {
return new PhaseListenerProxy(scriptName);
} else if (ViewHandler.class.equals(artifactType)) {
return new ViewHandlerProxy(scriptName, (ViewHandler) root);
} else if (NavigationHandler.class.equals(artifactType)) {
return new NavigationHandlerProxy(scriptName, (NavigationHandler) root);
} else if (ActionListener.class.equals(artifactType)) {