Class UserProfilePreferenceProvider
java.lang.Object
com.kingsrook.qqq.backend.core.actions.profile.UserProfilePreferenceProvider
- All Implemented Interfaces:
UserPreferenceProviderInterface
public class UserProfilePreferenceProvider
extends Object
implements UserPreferenceProviderInterface
Preferences provider of the core "profile" section (photo, display name and,
when the app allows it, Gravatar). Always the signed-in user's own row.
The avatar field reads as the photo's URL and is written with a ref from
POST /uploads (or null to remove the photo). The hidden, read-only avatarUrl
is what others see: the photo, else the chosen Gravatar, else null. Writing a value equal to the
current URL changes nothing, so a client may send the whole form back.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionload(UserPreferenceRequestContext context) Load the user's values and fixed rows.voidstore(UserPreferenceRequestContext context, UserPreferenceChange change) Store only the supplied fields and rows using ordinary audited table actions.validate(UserPreferenceRequestContext context, UserPreferenceChange change) Add domain validation after core has validated and coerced the partial change.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.kingsrook.qqq.backend.core.model.metadata.preferences.UserPreferenceProviderInterface
runAction
-
Field Details
-
FIELD_AVATAR
- See Also:
-
FIELD_DISPLAY_NAME
- See Also:
-
FIELD_USE_GRAVATAR
- See Also:
-
FIELD_AVATAR_URL
- See Also:
-
-
Constructor Details
-
UserProfilePreferenceProvider
public UserProfilePreferenceProvider()
-
-
Method Details
-
load
Description copied from interface:UserPreferenceProviderInterfaceLoad the user's values and fixed rows.- Specified by:
loadin interfaceUserPreferenceProviderInterface- Throws:
QException
-
validate
public List<String> validate(UserPreferenceRequestContext context, UserPreferenceChange change) throws QException Description copied from interface:UserPreferenceProviderInterfaceAdd domain validation after core has validated and coerced the partial change.- Specified by:
validatein interfaceUserPreferenceProviderInterface- Throws:
QException
-
store
public void store(UserPreferenceRequestContext context, UserPreferenceChange change) throws QException Description copied from interface:UserPreferenceProviderInterfaceStore only the supplied fields and rows using ordinary audited table actions.- Specified by:
storein interfaceUserPreferenceProviderInterface- Throws:
QException
-