Skip to content

Commit

Permalink
Merge branch 'release/7.4.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
yasuflatland-lf committed Jun 20, 2023
2 parents d81173d + 37ff313 commit 1dd6c7e
Show file tree
Hide file tree
Showing 34 changed files with 1,918 additions and 1,971 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -8,3 +8,4 @@ package-lock.json
node_modules
.classpath
.project
.vscode/settings.json
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion bnd.bnd
@@ -1,6 +1,6 @@
Bundle-Name: Liferay Dummy Factory Portlet
Bundle-SymbolicName: liferay.dummy.factory
Bundle-Version: 7.4.2
Bundle-Version: 7.4.3
Web-ContextPath: /liferay-dummy-factory
-dsannotations-options: inherit
-sources: true
Expand Down
11 changes: 8 additions & 3 deletions build.gradle
Expand Up @@ -42,8 +42,8 @@ apply plugin: 'com.github.kt3k.coveralls'
dependencies {
compile 'com.google.errorprone:error_prone_annotations:2.3.1'
compile 'commons-digester:commons-digester:2.1'
compile "com.google.guava:guava:27.1-jre"
compile "commons-io:commons-io:2.5"
compile 'com.google.guava:guava:30.0-jre'
compile 'commons-io:commons-io:2.7'
compile "commons-validator:commons-validator:1.6"
compile "org.apache.commons:commons-lang3:3.9"
compile "com.github.mifmif:generex:1.0.2"
Expand All @@ -64,6 +64,11 @@ dependencies {
compile group: "org.apache.felix", name: "org.apache.felix.gogo.runtime", version: "1.1.+"

compileOnly group: "com.liferay.portal", name: "release.dxp.api"
compileOnly 'com.liferay.portal:com.liferay.portal.kernel'
compileOnly 'com.liferay.portal:com.liferay.portal.impl'
compileOnly 'com.liferay:com.liferay.dynamic.data.mapping.api'
compileOnly 'com.liferay:com.liferay.journal.api'
compileOnly 'com.liferay:com.liferay.message.boards.api'

testCompile 'org.codehaus.groovy:groovy-all:2.5.+'
testCompile group: 'cglib', name: 'cglib-nodep', version: 'latest.integration'
Expand Down Expand Up @@ -93,7 +98,7 @@ test {
jacocoTestReport {
reports {
xml.enabled true
html.enabled = true
html.enabled = false
}
}

Expand Down
Binary file not shown.
8 changes: 4 additions & 4 deletions package.json
Expand Up @@ -2,13 +2,13 @@
"name": "liferay-dummy-factory",
"version": "1.0.0",
"dependencies": {
"jquery": "^3.6.0",
"jquery": "^3.7.0",
"lodash": "^4.17.21"
},
"devDependencies": {
"@liferay/npm-scripts": "^47.6.1",
"liferay-npm-bundler": "^2.28.3",
"liferay-npm-build-support": "^2.28.3"
"@liferay/npm-scripts": "^47.19.0",
"liferay-npm-bundler": "^2.31.2",
"liferay-npm-build-support": "^2.31.2"
},
"scripts": {
"build": "liferay-npm-bundler"
Expand Down
Expand Up @@ -5,13 +5,16 @@
import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.model.Company;
import com.liferay.portal.kernel.security.auth.CompanyThreadLocal;
import com.liferay.portal.kernel.service.CompanyLocalService;
import com.liferay.portal.kernel.util.PortalUtil;
import com.liferay.support.tools.common.DummyGenerator;
import com.liferay.support.tools.utils.ProgressManager;
import javax.portlet.ActionRequest;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;

import javax.portlet.ActionRequest;

/**
* Company Generator
*
Expand Down Expand Up @@ -49,21 +52,22 @@ protected void exec(ActionRequest request, CompanyContext paramContext)

//Create company web id
StringBundler webId = new StringBundler(2);
webId.append(paramContext.getWebId());

//Create company Virtual Host Name
StringBundler virtualHostname = new StringBundler(2);
virtualHostname.append(paramContext.getVirtualHostname());

//Create company Mail Domain
StringBundler mx = new StringBundler(2);
mx.append(paramContext.getMx());

//Add number more then one company
//Add number more than one company
if (1 < paramContext.getNumberOfCompanies()) {
webId.append(i);
virtualHostname.append(i);
mx.append(i);
webId.append(String.valueOf(i)).append(paramContext.getWebId());
virtualHostname.append(String.valueOf(i)).append(paramContext.getVirtualHostname());
mx.append(String.valueOf(i)).append(paramContext.getMx());
} else {
webId.append(paramContext.getWebId());
virtualHostname.append(paramContext.getVirtualHostname());
mx.append(paramContext.getMx());
}

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

Company company = _companyLocalService.addCompany(
null,
webId.toString(),
virtualHostname.toString(),
mx.toString(),
paramContext.isSystem(),
paramContext.getMaxUsers(),
paramContext.isActive());

_portalInstancesLocalService.initializePortalInstance(
company.getCompanyId(), company.getWebId(),
paramContext.getServletContext());

} catch (Exception e) {
//Finish progress
progressManager.finish();
throw e;
} catch (Throwable e) {
_log.error(e,e);
}
}

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

}

}
Expand Up @@ -35,7 +35,7 @@ public class LDFPortletKeys {

// Command
public static final String COMMON = "/ldf/common";
public static final String ORGANIZAION = "/ldf/org";
public static final String ORGANIZATION = "/ldf/org";
public static final String SITES = "/ldf/sites";
public static final String PAGES = "/ldf/pages";
public static final String USERS = "/ldf/users";
Expand Down

0 comments on commit 1dd6c7e

Please sign in to comment.