You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Description

  • org.joget.directory.model.service.DirectoryUtil
  • Under wflow-directory module
  • Utility methods to quick access to Directory Manager 

Code Sample

import java.util.Map;
import org.joget.directory.model.service.DirectoryUtil;


//retrieve all users in map
Map<String, User> users = DirectoryUtil.getUsersMap();

Fields

CUSTOM_IMPL_PROPERTIES
public final static java.lang.String CUSTOM_IMPL_PROPERTIES = "customDirectoryManagerImplProperties";

System setting key to retrieve the plugin properties of the configured custom directory manager plugin.  

IMPL_PROPERTIES
public final static java.lang.String IMPL_PROPERTIES = "directoryManagerImplProperties";

System setting key to retrieve the plugin properties of the configured default directory manager plugin.  

This is only available to OEM package which enable to use different directory manager as default.

ROLE_ANONYMOUS
public final static java.lang.String ROLE_ANONYMOUS = "roleAnonymous";

Username of an Anonymous user.

Methods

getApplicationContext
public static org.springframework.context.ApplicationContext getApplicationContext()

Utility method to retrieve the ApplicationContext of the system

getDepartmentsMap
public static java.util.Map<java.lang.String, org.joget.directory.model.Department> getDepartmentsMap()

Convenient method to retrieve all departments in a map of id-value pair

getGroupsMap
public static java.util.Map<java.lang.String, org.joget.directory.model.Group> getGroupsMap()

Convenient method to retrieve all groups in a map of id-value pair

getLoginFormFooter
public static java.lang.String getLoginFormFooter()

Get the HTML template to inject after a login form from user security enhancements implementation.

getOverriddenDirectoryManagerClassName
public static java.lang.String getOverriddenDirectoryManagerClassName()

Get the class name of the custom Directory Manager in used

getUsersMap
public static java.util.Map<java.lang.String, org.joget.directory.model.User> getUsersMap()

Convenient method to retrieve all users in a map of id-value pair

getUserSecurity
public static org.joget.directory.model.service.UserSecurity getUserSecurity()

Get the user security enhancements implementation of the directory manager in used

isCustomDirectoryManager
public static boolean isCustomDirectoryManager()

Flag to indicate the custom Directory Manager in used is not a extend implementation of the Joget default internal directory manager

isExtDirectoryManager
public static boolean isExtDirectoryManager()

Flag to indicate the custom Directory Manager in used is implemented the ExtDirectoryManager interface.

isOverridden
public static boolean isOverridden()

Flag to indicate there is a custom Directory Manager in used

userIsReadonly
public static java.lang.Boolean userIsReadonly(java.lang.String username)

Flag to indicate the user return by the directory manager is readonly

  • No labels