Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
...
After importing the plugin, add the scheduler userview element into your userview. Then, define the schedule frequency using CRON expression. Then select the bean shell option in "Plugin" and click on the "Configure Plugin" button, copy and paste the following bean shell code below. The code below is intended and must be used for Sync LDAP User Directory Manager (can be used along with Security Enhanced Directory Manager).
Save the record.
Code Block | ||||
---|---|---|---|---|
| ||||
import org.joget.directory.model.service.DirectoryManagerProxyImpl;
import org.joget.directory.model.service.DirectoryManager;
import org.joget.apps.app.service.AppUtil;
import org.joget.plugin.ldap.SyncLdapUserDirectoryManagerImpl;
import org.joget.plugin.directory.SecureDirectoryManagerImpl;
DirectoryManagerProxyImpl proxy = (DirectoryManagerProxyImpl) AppUtil.getApplicationContext().getBean("directoryManager");
DirectoryManager dm = proxy.getDirectoryManagerImpl();
if (dm != null) {
if (dm instanceof SecureDirectoryManagerImpl) {
dm = ((SecureDirectoryManagerImpl) dm).getEdm(1);
}
if (dm != null && dm instanceof SyncLdapUserDirectoryManagerImpl) {
int total = ((SyncLdapUserDirectoryManagerImpl) dm).syncUsers();
System.out.println("Total users : " + total);
}
} |
...