private NestedState createComponentNestedState(ComponentTemplate<?> component) { NestedState nestedState = new NestedState(); nestedState.object = (ServiceDocument) component.data; nestedState.children = component.children; ResourceType resourceType = ResourceType.fromContentType(component.type); String factoryLink = CompositeComponentRegistry .descriptionFactoryLinkByType(resourceType.getName()); nestedState.factoryLink = factoryLink; return nestedState; }