Package org.gcube.portal.plugins.util
Class LDAPUtil
- java.lang.Object
-
- org.gcube.portal.plugins.util.LDAPUtil
-
public class LDAPUtil extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_GID_NUMBERstatic StringLDAP_GROUP_FILTERstatic StringLDAP_ORG_FILTERstatic StringLDAP_SERVER_FILTER_NAMEstatic StringLDAP_SERVER_NAMEstatic StringLDAP_SERVER_PRINCPAL_NAMEstatic StringUSER_CONTEXT
-
Constructor Summary
Constructors Constructor Description LDAPUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancheckIfLDAPGroupExists(DirContext ctx, String groupSubctx)static voidcreateGroupVRE(DirContext ctx, String subContext, String vreName)static LDAPInfogetLDAPCoordinates()ask to the Information Systemstatic StringgetOrgSubContext(String orgName)static intgetRandomPOSIXidentifier()static org.gcube.vomanagement.usermanagement.model.GCubeGroupgetRootVO()
-
-
-
Field Detail
-
LDAP_SERVER_NAME
public static final String LDAP_SERVER_NAME
- See Also:
- Constant Field Values
-
LDAP_SERVER_FILTER_NAME
public static final String LDAP_SERVER_FILTER_NAME
- See Also:
- Constant Field Values
-
LDAP_SERVER_PRINCPAL_NAME
public static final String LDAP_SERVER_PRINCPAL_NAME
- See Also:
- Constant Field Values
-
LDAP_ORG_FILTER
public static final String LDAP_ORG_FILTER
- See Also:
- Constant Field Values
-
LDAP_GROUP_FILTER
public static final String LDAP_GROUP_FILTER
- See Also:
- Constant Field Values
-
USER_CONTEXT
public static final String USER_CONTEXT
- See Also:
- Constant Field Values
-
DEFAULT_GID_NUMBER
public static final String DEFAULT_GID_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
checkIfLDAPGroupExists
public static boolean checkIfLDAPGroupExists(DirContext ctx, String groupSubctx)
- Parameters:
ctx-groupSubctx-- Returns:
- true if exists
-
createGroupVRE
public static void createGroupVRE(DirContext ctx, String subContext, String vreName) throws NamingException
- Parameters:
ctx-subContext-vreName-- Throws:
NamingException
-
getLDAPCoordinates
public static LDAPInfo getLDAPCoordinates()
ask to the Information System- Returns:
-
getRootVO
public static org.gcube.vomanagement.usermanagement.model.GCubeGroup getRootVO()
- Returns:
- the Liferay mapped as Root Organization
-
getOrgSubContext
public static String getOrgSubContext(String orgName)
- Parameters:
orgName-- Returns:
-
getRandomPOSIXidentifier
public static int getRandomPOSIXidentifier()
- Returns:
- an integer between 1000 and 2147483647
-
-