Package com.thingworx.entities.utils
Class UserUtilities
- java.lang.Object
-
- com.thingworx.entities.utils.UserUtilities
-
@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public final class UserUtilities extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
USER_EDIT_LOCK
-
Constructor Summary
Constructors Constructor Description UserUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static User
findUser(java.lang.String name)
static java.lang.String
getCurrentUser()
Get the current user name from the security context if possible.static EntityReferenceCollection
getGroups(EntityReference userReference)
static User
getSystemUser()
static void
validateAdminMembership()
-
-
-
Field Detail
-
USER_EDIT_LOCK
public static final java.lang.String USER_EDIT_LOCK
- See Also:
- Constant Field Values
-
-
Method Detail
-
getGroups
@ThingworxExtensionApiMethod(since={6,6}) public static EntityReferenceCollection getGroups(EntityReference userReference)
-
getSystemUser
@ThingworxExtensionApiMethod(since={6,6}) public static User getSystemUser()
-
findUser
@ThingworxExtensionApiMethod(since={6,6}) public static User findUser(java.lang.String name)
-
validateAdminMembership
@ThingworxExtensionApiMethod(since={6,6}) public static void validateAdminMembership() throws InvalidRequestException
- Throws:
InvalidRequestException
- If an error occurs
-
getCurrentUser
@ThingworxExtensionApiMethod(since={7,4}) public static java.lang.String getCurrentUser() throws java.lang.Exception
Get the current user name from the security context if possible.- Returns:
- The name of the current user.
- Throws:
java.lang.Exception
-
-