Skip to content

Commit 1dd6c7e

Browse files
Merge branch 'release/7.4.3'
2 parents d81173d + 37ff313 commit 1dd6c7e

34 files changed

+1918
-1971
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ package-lock.json
88
node_modules
99
.classpath
1010
.project
11+
.vscode/settings.json

.travis.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

bnd.bnd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Bundle-Name: Liferay Dummy Factory Portlet
22
Bundle-SymbolicName: liferay.dummy.factory
3-
Bundle-Version: 7.4.2
3+
Bundle-Version: 7.4.3
44
Web-ContextPath: /liferay-dummy-factory
55
-dsannotations-options: inherit
66
-sources: true

build.gradle

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ apply plugin: 'com.github.kt3k.coveralls'
4242
dependencies {
4343
compile 'com.google.errorprone:error_prone_annotations:2.3.1'
4444
compile 'commons-digester:commons-digester:2.1'
45-
compile "com.google.guava:guava:27.1-jre"
46-
compile "commons-io:commons-io:2.5"
45+
compile 'com.google.guava:guava:30.0-jre'
46+
compile 'commons-io:commons-io:2.7'
4747
compile "commons-validator:commons-validator:1.6"
4848
compile "org.apache.commons:commons-lang3:3.9"
4949
compile "com.github.mifmif:generex:1.0.2"
@@ -64,6 +64,11 @@ dependencies {
6464
compile group: "org.apache.felix", name: "org.apache.felix.gogo.runtime", version: "1.1.+"
6565

6666
compileOnly group: "com.liferay.portal", name: "release.dxp.api"
67+
compileOnly 'com.liferay.portal:com.liferay.portal.kernel'
68+
compileOnly 'com.liferay.portal:com.liferay.portal.impl'
69+
compileOnly 'com.liferay:com.liferay.dynamic.data.mapping.api'
70+
compileOnly 'com.liferay:com.liferay.journal.api'
71+
compileOnly 'com.liferay:com.liferay.message.boards.api'
6772

6873
testCompile 'org.codehaus.groovy:groovy-all:2.5.+'
6974
testCompile group: 'cglib', name: 'cglib-nodep', version: 'latest.integration'
@@ -93,7 +98,7 @@ test {
9398
jacocoTestReport {
9499
reports {
95100
xml.enabled true
96-
html.enabled = true
101+
html.enabled = false
97102
}
98103
}
99104

16.5 MB
Binary file not shown.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
"name": "liferay-dummy-factory",
33
"version": "1.0.0",
44
"dependencies": {
5-
"jquery": "^3.6.0",
5+
"jquery": "^3.7.0",
66
"lodash": "^4.17.21"
77
},
88
"devDependencies": {
9-
"@liferay/npm-scripts": "^47.6.1",
10-
"liferay-npm-bundler": "^2.28.3",
11-
"liferay-npm-build-support": "^2.28.3"
9+
"@liferay/npm-scripts": "^47.19.0",
10+
"liferay-npm-bundler": "^2.31.2",
11+
"liferay-npm-build-support": "^2.31.2"
1212
},
1313
"scripts": {
1414
"build": "liferay-npm-bundler"

src/main/java/com/liferay/support/tools/company/CompanyDefaultDummyGenerator.java

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@
55
import com.liferay.portal.kernel.log.Log;
66
import com.liferay.portal.kernel.log.LogFactoryUtil;
77
import com.liferay.portal.kernel.model.Company;
8+
import com.liferay.portal.kernel.security.auth.CompanyThreadLocal;
89
import com.liferay.portal.kernel.service.CompanyLocalService;
10+
import com.liferay.portal.kernel.util.PortalUtil;
911
import com.liferay.support.tools.common.DummyGenerator;
1012
import com.liferay.support.tools.utils.ProgressManager;
11-
import javax.portlet.ActionRequest;
1213
import org.osgi.service.component.annotations.Component;
1314
import org.osgi.service.component.annotations.Reference;
1415

16+
import javax.portlet.ActionRequest;
17+
1518
/**
1619
* Company Generator
1720
*
@@ -49,21 +52,22 @@ protected void exec(ActionRequest request, CompanyContext paramContext)
4952

5053
//Create company web id
5154
StringBundler webId = new StringBundler(2);
52-
webId.append(paramContext.getWebId());
5355

5456
//Create company Virtual Host Name
5557
StringBundler virtualHostname = new StringBundler(2);
56-
virtualHostname.append(paramContext.getVirtualHostname());
5758

5859
//Create company Mail Domain
5960
StringBundler mx = new StringBundler(2);
60-
mx.append(paramContext.getMx());
6161

62-
//Add number more then one company
62+
//Add number more than one company
6363
if (1 < paramContext.getNumberOfCompanies()) {
64-
webId.append(i);
65-
virtualHostname.append(i);
66-
mx.append(i);
64+
webId.append(String.valueOf(i)).append(paramContext.getWebId());
65+
virtualHostname.append(String.valueOf(i)).append(paramContext.getVirtualHostname());
66+
mx.append(String.valueOf(i)).append(paramContext.getMx());
67+
} else {
68+
webId.append(paramContext.getWebId());
69+
virtualHostname.append(paramContext.getVirtualHostname());
70+
mx.append(paramContext.getMx());
6771
}
6872

6973
try {
@@ -72,21 +76,15 @@ protected void exec(ActionRequest request, CompanyContext paramContext)
7276
}
7377

7478
Company company = _companyLocalService.addCompany(
79+
null,
7580
webId.toString(),
7681
virtualHostname.toString(),
7782
mx.toString(),
78-
paramContext.isSystem(),
7983
paramContext.getMaxUsers(),
8084
paramContext.isActive());
8185

82-
_portalInstancesLocalService.initializePortalInstance(
83-
company.getCompanyId(), company.getWebId(),
84-
paramContext.getServletContext());
85-
86-
} catch (Exception e) {
87-
//Finish progress
88-
progressManager.finish();
89-
throw e;
86+
} catch (Throwable e) {
87+
_log.error(e,e);
9088
}
9189
}
9290

@@ -96,5 +94,4 @@ protected void exec(ActionRequest request, CompanyContext paramContext)
9694
System.out.println("Finished creating " + paramContext.getNumberOfCompanies() + " companies");
9795

9896
}
99-
10097
}

src/main/java/com/liferay/support/tools/constants/LDFPortletKeys.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class LDFPortletKeys {
3535

3636
// Command
3737
public static final String COMMON = "/ldf/common";
38-
public static final String ORGANIZAION = "/ldf/org";
38+
public static final String ORGANIZATION = "/ldf/org";
3939
public static final String SITES = "/ldf/sites";
4040
public static final String PAGES = "/ldf/pages";
4141
public static final String USERS = "/ldf/users";

0 commit comments

Comments
 (0)