mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-06 17:08:29 +08:00
static&synchronizers
This commit is contained in:
parent
0f11af5a16
commit
bcdabe095d
@ -424,13 +424,20 @@ project('maxkey-common') {
|
||||
task copyMaxKey(type: Copy) {
|
||||
from "$rootDir/build/maxkey-jars/maxkey-authentication-social-${project.version}.jar"
|
||||
from "$rootDir/build/maxkey-jars/maxkey-web-maxkey-${project.version}.jar"
|
||||
from "$rootDir/build/maxkey-jars/maxkey-web-maxkey-static-${project.version}.jar"
|
||||
into "$rootDir/build/MaxKey-v${project.version}GA/maxkey/";
|
||||
}
|
||||
|
||||
task copyMaxKeyMgt(type: Copy) {
|
||||
from "$rootDir/build/maxkey-jars/maxkey-identity-rest-${project.version}.jar"
|
||||
from "$rootDir/build/maxkey-jars/maxkey-identity-scim-${project.version}.jar"
|
||||
from "$rootDir/build/maxkey-jars/maxkey-web-manage-${project.version}.jar"
|
||||
from "$rootDir/build/maxkey-jars/maxkey-web-mgt-${project.version}.jar"
|
||||
from "$rootDir/build/maxkey-jars/maxkey-web-mgt-static-${project.version}.jar"
|
||||
from "$rootDir/build/maxkey-jars/maxkey-synchronizers-${project.version}.jar"
|
||||
from "$rootDir/build/maxkey-jars/maxkey-synchronizers-activedirectory-${project.version}.jar"
|
||||
from "$rootDir/build/maxkey-jars/maxkey-synchronizers-ldap-${project.version}.jar"
|
||||
from "$rootDir/build/maxkey-jars/maxkey-synchronizers-dingding-${project.version}.jar"
|
||||
from "$rootDir/build/maxkey-jars/maxkey-synchronizers-workweixin-${project.version}.jar"
|
||||
into "$rootDir/build/MaxKey-v${project.version}GA/maxkey_mgt/";
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
description = "maxkey-synchronizers"
|
||||
|
||||
apply plugin: 'java'
|
||||
|
||||
dependencies {
|
||||
//local jars
|
||||
implementation fileTree(dir: '../maxkey-lib/*/', include: '*.jar')
|
||||
|
||||
implementation project(":maxkey-common")
|
||||
implementation project(":maxkey-core")
|
||||
implementation project(":maxkey-persistence")
|
||||
implementation project(":maxkey-identitys:maxkey-synchronizers")
|
||||
|
||||
}
|
||||
@ -30,7 +30,6 @@ import org.maxkey.persistence.ldap.ActiveDirectoryUtils;
|
||||
import org.maxkey.persistence.ldap.LdapUtils;
|
||||
import org.maxkey.synchronizer.AbstractSynchronizerService;
|
||||
import org.maxkey.synchronizer.ISynchronizerService;
|
||||
import org.maxkey.web.WebContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -41,11 +40,9 @@ public class ActiveDirectoryOrganizationService extends AbstractSynchronizerSer
|
||||
|
||||
ActiveDirectoryUtils ldapUtils;
|
||||
|
||||
|
||||
public void sync() {
|
||||
loadOrgsById("1");
|
||||
_logger.info("Sync Organizations ...");
|
||||
genSessionId();
|
||||
try {
|
||||
SearchControls constraints = new SearchControls();
|
||||
constraints.setSearchScope(ldapUtils.getSearchScope());
|
||||
@ -128,7 +125,6 @@ public class ActiveDirectoryOrganizationService extends AbstractSynchronizerSer
|
||||
organizationsService.insert(org);
|
||||
HistorySynchronizer historySynchronizer =new HistorySynchronizer();
|
||||
historySynchronizer.setId(historySynchronizer.generateId());
|
||||
historySynchronizer.setSessionId(this.getSessionId());
|
||||
historySynchronizer.setSyncId(this.synchronizer.getId());
|
||||
historySynchronizer.setSyncName(this.synchronizer.getName());
|
||||
historySynchronizer.setObjectId(org.getId());
|
||||
@ -44,7 +44,6 @@ public class ActiveDirectoryUsersService extends AbstractSynchronizerService
|
||||
public void sync() {
|
||||
_logger.info("Sync Users...");
|
||||
loadOrgsById("1");
|
||||
genSessionId();
|
||||
try {
|
||||
SearchControls constraints = new SearchControls();
|
||||
constraints.setSearchScope(ldapUtils.getSearchScope());
|
||||
@ -161,7 +160,6 @@ public class ActiveDirectoryUsersService extends AbstractSynchronizerService
|
||||
userInfoService.insert(userInfo);
|
||||
HistorySynchronizer historySynchronizer =new HistorySynchronizer();
|
||||
historySynchronizer.setId(historySynchronizer.generateId());
|
||||
historySynchronizer.setSessionId(this.getSessionId());
|
||||
historySynchronizer.setSyncId(this.synchronizer.getId());
|
||||
historySynchronizer.setSyncName(this.synchronizer.getName());
|
||||
historySynchronizer.setObjectId(userInfo.getId());
|
||||
14
maxkey-identitys/maxkey-synchronizers-dingding/build.gradle
Normal file
14
maxkey-identitys/maxkey-synchronizers-dingding/build.gradle
Normal file
@ -0,0 +1,14 @@
|
||||
description = "maxkey-synchronizers-dingding"
|
||||
|
||||
apply plugin: 'java'
|
||||
|
||||
dependencies {
|
||||
//local jars
|
||||
implementation fileTree(dir: '../maxkey-lib/*/', include: '*.jar')
|
||||
|
||||
implementation project(":maxkey-common")
|
||||
implementation project(":maxkey-core")
|
||||
implementation project(":maxkey-persistence")
|
||||
implementation project(":maxkey-identitys:maxkey-synchronizers")
|
||||
|
||||
}
|
||||
14
maxkey-identitys/maxkey-synchronizers-ldap/build.gradle
Normal file
14
maxkey-identitys/maxkey-synchronizers-ldap/build.gradle
Normal file
@ -0,0 +1,14 @@
|
||||
description = "maxkey-synchronizers-ldap"
|
||||
|
||||
apply plugin: 'java'
|
||||
|
||||
dependencies {
|
||||
//local jars
|
||||
implementation fileTree(dir: '../maxkey-lib/*/', include: '*.jar')
|
||||
|
||||
implementation project(":maxkey-common")
|
||||
implementation project(":maxkey-core")
|
||||
implementation project(":maxkey-persistence")
|
||||
implementation project(":maxkey-identitys:maxkey-synchronizers")
|
||||
|
||||
}
|
||||
@ -43,7 +43,6 @@ public class LdapOrganizationService extends AbstractSynchronizerService implem
|
||||
public void sync() {
|
||||
_logger.info("Sync Organizations ...");
|
||||
loadOrgsById("1");
|
||||
genSessionId();
|
||||
try {
|
||||
SearchControls constraints = new SearchControls();
|
||||
constraints.setSearchScope(ldapUtils.getSearchScope());
|
||||
@ -124,7 +123,6 @@ public class LdapOrganizationService extends AbstractSynchronizerService implem
|
||||
HistorySynchronizer historySynchronizer =new HistorySynchronizer();
|
||||
historySynchronizer.setId(historySynchronizer.generateId());
|
||||
historySynchronizer.setSyncId(this.synchronizer.getId());
|
||||
historySynchronizer.setSessionId(this.getSessionId());
|
||||
historySynchronizer.setSyncName(this.synchronizer.getName());
|
||||
historySynchronizer.setObjectId(org.getId());
|
||||
historySynchronizer.setObjectName(org.getName());
|
||||
@ -43,7 +43,6 @@ public class LdapUsersService extends AbstractSynchronizerService implements IS
|
||||
public void sync() {
|
||||
_logger.info("Sync Users...");
|
||||
loadOrgsById("1");
|
||||
genSessionId();
|
||||
try {
|
||||
SearchControls constraints = new SearchControls();
|
||||
constraints.setSearchScope(ldapUtils.getSearchScope());
|
||||
@ -147,7 +146,6 @@ public class LdapUsersService extends AbstractSynchronizerService implements IS
|
||||
userInfoService.insert(userInfo);
|
||||
HistorySynchronizer historySynchronizer =new HistorySynchronizer();
|
||||
historySynchronizer.setId(historySynchronizer.generateId());
|
||||
historySynchronizer.setSessionId(this.getSessionId());
|
||||
historySynchronizer.setSyncId(this.synchronizer.getId());
|
||||
historySynchronizer.setSyncName(this.synchronizer.getName());
|
||||
historySynchronizer.setObjectId(userInfo.getId());
|
||||
@ -0,0 +1,14 @@
|
||||
description = "maxkey-synchronizers-workweixin"
|
||||
|
||||
apply plugin: 'java'
|
||||
|
||||
dependencies {
|
||||
//local jars
|
||||
implementation fileTree(dir: '../maxkey-lib/*/', include: '*.jar')
|
||||
|
||||
implementation project(":maxkey-common")
|
||||
implementation project(":maxkey-core")
|
||||
implementation project(":maxkey-persistence")
|
||||
implementation project(":maxkey-identitys:maxkey-synchronizers")
|
||||
|
||||
}
|
||||
@ -8,7 +8,6 @@ import org.maxkey.entity.Synchronizers;
|
||||
import org.maxkey.persistence.service.HistorySynchronizerService;
|
||||
import org.maxkey.persistence.service.OrganizationsService;
|
||||
import org.maxkey.persistence.service.UserInfoService;
|
||||
import org.maxkey.web.WebContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -32,7 +31,6 @@ public abstract class AbstractSynchronizerService {
|
||||
|
||||
protected Organizations rootOrganization = null;
|
||||
|
||||
protected String sessionId;
|
||||
|
||||
public void loadOrgsById(String orgId) {
|
||||
List<Organizations> orgsList = organizationsService.query(null);
|
||||
@ -128,17 +126,4 @@ public abstract class AbstractSynchronizerService {
|
||||
}
|
||||
|
||||
|
||||
public String getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
public void setSessionId(String sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
public void genSessionId(){
|
||||
this.sessionId = WebContext.genId();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
2
maxkey-web-manage/.gitignore
vendored
2
maxkey-web-manage/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
/build/
|
||||
/bin/
|
||||
8
maxkey-web-maxkey-static/build.gradle
Normal file
8
maxkey-web-maxkey-static/build.gradle
Normal file
@ -0,0 +1,8 @@
|
||||
description = "maxkey-web-maxkey-static"
|
||||
|
||||
//add support for Java
|
||||
apply plugin: 'java'
|
||||
|
||||
dependencies {
|
||||
|
||||
}
|
||||
|
Before Width: | Height: | Size: 434 KiB After Width: | Height: | Size: 434 KiB |
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user