Commit 2112b9e3 authored by Bert Leunis's avatar Bert Leunis

ESSENTIALS-1051 Merge master changes in bugfix/ESSENTIALS-1051

parents 94367235 457a5637
This diff is collapsed.
......@@ -8,9 +8,15 @@
},
"dependencies": {
"angular": "1.4.8",
"angular-animate": "1.4.8",
"angular-aria": "1.4.8",
"angular-chosen-localytics": "1.4.0",
"angular-sanitize": "1.4.8",
"angular-tablesort": "1.1.1",
"angular-ui-bootstrap": "0.14.3",
"angular-ui-router": "0.2.15",
"angular-ui-tree": "2.11.0",
"google-code-prettify": "1.0.1",
"hippo-theme": "./target/dependency/hippo-theme.tar.gz",
"jquery": "2.1.4"
},
......
......@@ -115,7 +115,7 @@ public class ContentBeansService {
// check if directly extending compound:
final Set<String> superTypes = missingBean.getSuperTypes();
if (superTypes.size() == 1 && superTypes.iterator().next().equals(BASE_COMPOUND_TYPE)) {
createBaseBean(missingBean);
createCompoundBaseBean(missingBean);
missingBeanIterator.remove();
} else {
final String parent = findExistingParent(missingBean, existing);
......@@ -400,11 +400,11 @@ public class ContentBeansService {
}
private void createBaseBean(final HippoContentBean bean) {
private void createCompoundBaseBean(final HippoContentBean bean) {
final Path javaClass = createJavaClass(bean);
JavaSourceUtils.createHippoBean(javaClass, context.beansPackageName(), bean.getName(), bean.getName());
JavaSourceUtils.addExtendsClass(javaClass, "HippoDocument");
JavaSourceUtils.addImport(javaClass, EssentialConst.HIPPO_DOCUMENT_IMPORT);
JavaSourceUtils.addExtendsClass(javaClass, "HippoCompound");
JavaSourceUtils.addImport(javaClass, EssentialConst.HIPPO_COMPOUND_IMPORT);
}
......@@ -756,7 +756,6 @@ public class ContentBeansService {
JavaSourceUtils.createHippoBean(javaClass, context.beansPackageName(), bean.getName(), bean.getName());
final String extendsName = FilenameUtils.removeExtension(parentPath.toFile().getName());
JavaSourceUtils.addExtendsClass(javaClass, extendsName);
JavaSourceUtils.addImport(javaClass, EssentialConst.HIPPO_DOCUMENT_IMPORT);
}
......
/*
* Copyright 2014-2016 Hippo B.V. (http://www.onehippo.com)
* Copyright 2014-2017 Hippo B.V. (http://www.onehippo.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -163,8 +163,9 @@ public final class EssentialConst {
public static final String HIPPOSYSEDIT_PROTOTYPE = "hipposysedit:prototype";
public static final String HIPPOSYSEDIT_NODETYPE = "hipposysedit:nodetype";
public static final String HIPPO_COMPOUND = "hippo:compound";
public static final String HIPPO_COMPOUND_BASE_CLASS = "HippoDocument";
public static final String HIPPO_COMPOUND_BASE_CLASS = "HippoCompound";
public static final String HIPPO_DOCUMENT_IMPORT = "org.hippoecm.hst.content.beans.standard.HippoDocument";
public static final String HIPPO_COMPOUND_IMPORT = "org.hippoecm.hst.content.beans.standard.HippoCompound";
public static final String HIPPO_ITEM_IMPORT = "org.hippoecm.hst.content.beans.standard.HippoItem";
public static final String HIPPO_BEAN_IMPORT = "org.hippoecm.hst.content.beans.standard.HippoBean";
public static final String HIPPO_RELATED_DOCS_IMPORT = "org.onehippo.forge.beans.RelatedDocsBean";
......
......@@ -37,6 +37,16 @@
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-essentials-plugin-sdk-implementation</artifactId>
</dependency>
<dependency>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-cms-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-cms-gallery-frontend</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>package</defaultGoal>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment