if (componentAnnotation == null) {
throw new InvalidComponentClassException();
}
ContentParameters parameters = new ContentParameters();
parameters.setAllowedChildren(getAllowedChildrenForComponent(componentAnnotation));
parameters.setAllowedParents(getAllowedParentsForComponent(componentAnnotation));
parameters.setComponentGroup(getGroupForComponent(componentClass, componentAnnotation, defaultGroup));
parameters.setCellName(getCellNameForComponent(componentAnnotation));
parameters.setIsContainer(getIsContainerForComponent(componentClass, componentAnnotation));
parameters.setNoDecoration(getNoDecorationForComponent(componentAnnotation));
parameters.setTemplatePath(getTemplatePathForComponent(componentAnnotation));
parameters.setDialogPath(getDialogPathForComponent(componentAnnotation));
parameters.setCreated(getCreatedForComponent(componentAnnotation));
parameters.setDescription(getDescriptionForComponent(componentAnnotation));
parameters.setTitle(getTitleForComponent(componentClass, componentAnnotation));
parameters.setResourceSuperType(getResourceSuperTypeForComponent(componentAnnotation));
parameters.setAdditionalProperties(getAdditionalPropertiesForComponent(componentAnnotation));
parameters.setClassName(componentClass.getName());
if (componentAnnotation.htmlTag().length > 0) {
List<XmlElement> containedElements = Lists.newArrayList();
containedElements.add(getHtmlTagForComponent(componentAnnotation));
parameters.setContainedElements(containedElements);
}
return new Content(parameters);
}