public class UserCore extends java.lang.Object
UserServiceEvent
for user account modifications with one of the listed UserEvent.EventType
:
UserEvent.EventType.USER_CREATED
for newly created user accounts.UserEvent.EventType.USER_REMOVED
for removed user accounts.UserEvent.EventType.USER_AUTHORIZATION_REVOKED
for removed external account connection. The external connection type will can be retrieved from the service type getter (UserServiceEvent.getUserServiceType()
)Modifier and Type | Class and Description |
---|---|
static class |
UserCore.Registration
User registration details.
|
static class |
UserCore.RegistrationStatus
The status of registration process.
|
Modifier and Type | Method and Description |
---|---|
static UserCore.RegistrationStatus |
createUser(UserCore.Registration registration)
Crate user based on the registration information.
|
static void |
deleteExternalAccountConnections(java.util.EnumSet<ExternalAccountConnection.UserServiceType> serviceTypes,
UserIdentity userId) |
static ExternalAccountConnectionList |
getExternalAccountConnections(java.util.EnumSet<ExternalAccountConnection.UserServiceType> serviceTypes,
UserIdentity userId) |
static org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.String> |
getNonceAndRedirectUri(java.lang.String nonce) |
static UserIdentityList |
getUserDetails(UserIdentity authenticatedUser,
long[] userIdFilter) |
static UserIdentity |
getUserId(ExternalAccountConnection connection) |
static UserIdentity |
getUserIdentity(java.lang.Long userId) |
static UserIdentity |
getUserIdentity(java.lang.String username) |
static void |
insertExternalAccountConnection(ExternalAccountConnection connection,
UserIdentity userId) |
static UserCore.RegistrationStatus |
register(UserCore.Registration registration)
Register a new user, checking for valid system registration password, if one is set in the system properties.
|
static void |
unregister(UserIdentity userId)
Remove the user from the system.
|
static java.lang.String |
urlEncodedCombinedNonce(java.lang.String nonce,
java.lang.String redirectUri)
Combines nonce and redirectUri together for redirecting things after FB has responded
|
public static void deleteExternalAccountConnections(java.util.EnumSet<ExternalAccountConnection.UserServiceType> serviceTypes, UserIdentity userId) throws java.lang.IllegalArgumentException
serviceTypes
- userId
- java.lang.IllegalArgumentException
- on bad valuespublic static UserIdentity getUserIdentity(java.lang.String username)
username
- public static UserIdentity getUserIdentity(java.lang.Long userId)
userId
- public static ExternalAccountConnectionList getExternalAccountConnections(java.util.EnumSet<ExternalAccountConnection.UserServiceType> serviceTypes, UserIdentity userId)
serviceTypes
- optional service type filtersuserId
- public static UserCore.RegistrationStatus register(UserCore.Registration registration)
registration
- public static UserIdentity getUserId(ExternalAccountConnection connection)
connection
- public static void insertExternalAccountConnection(ExternalAccountConnection connection, UserIdentity userId) throws java.lang.IllegalArgumentException
connection
- userId
- java.lang.IllegalArgumentException
public static UserCore.RegistrationStatus createUser(UserCore.Registration registration)
registration
- public static void unregister(UserIdentity userId) throws java.lang.IllegalArgumentException
userId
- java.lang.IllegalArgumentException
public static UserIdentityList getUserDetails(UserIdentity authenticatedUser, long[] userIdFilter) throws java.lang.IllegalArgumentException
authenticatedUser
- userIdFilter
- optional filter for retrieving a list of users, if null, the details of the authenticatedUser will be returnedjava.lang.IllegalArgumentException
public static java.lang.String urlEncodedCombinedNonce(java.lang.String nonce, java.lang.String redirectUri)
nonce
- redirectUri
- public static org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.String> getNonceAndRedirectUri(java.lang.String nonce)
nonce
- Copyright © 2015 Tampere University of Technology, Pori Department.