@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public final class UserUtilities extends java.lang.Object
Constructor and Description |
---|
UserUtilities() |
Modifier and Type | Method and 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() |
@ThingworxExtensionApiMethod(since={6,6}) public static EntityReferenceCollection getGroups(EntityReference userReference)
@ThingworxExtensionApiMethod(since={6,6}) public static User getSystemUser()
@ThingworxExtensionApiMethod(since={6,6}) public static User findUser(java.lang.String name)
@ThingworxExtensionApiMethod(since={6,6}) public static void validateAdminMembership() throws InvalidRequestException
InvalidRequestException
- If an error occurs@ThingworxExtensionApiMethod(since={7,4}) public static java.lang.String getCurrentUser() throws java.lang.Exception
java.lang.Exception