Class UserProfilesMetaData
java.lang.Object
com.kingsrook.qqq.backend.core.model.metadata.profile.UserProfilesMetaData
- All Implemented Interfaces:
MetaDataProducerOutput,QMetaDataObject,QSupplementalInstanceMetaData,TopLevelMetaDataInterface,Serializable
Settings of the core user profile (photo/avatar and display name), installed
by UserProfileMetaDataProvider.defineAll. Absent when an application does not
install profiles; then GET /avatars answers 404 and sessions carry no avatar.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final longstatic final Stringstatic final intstatic final intstatic final longstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final String////////////////////////////////////////////////////////////////////////static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGetter for avatarStorageTableNamebooleanGetter for gravatarOptInlongGetter for maxAvatarBytesgetName()Supplemental metadata registry name.Getter for tableNamestatic UserProfilesMetaDataGet the installed profile settings, or null when profiles are not installed.static UserProfilesMetaDataofOrWithNew(QInstance qInstance) Get or register profile settings.voidsetAvatarStorageTableName(String avatarStorageTableName) Setter for avatarStorageTableNamevoidsetGravatarOptIn(boolean gravatarOptIn) Setter for gravatarOptInvoidsetMaxAvatarBytes(long maxAvatarBytes) Setter for maxAvatarBytesvoidsetTableName(String tableName) Setter for tableNamevoidvalidate(QInstance qInstance, QInstanceValidator validator) The profile table and the avatar storage table must exist, and the profile section must be registered.withAvatarStorageTableName(String avatarStorageTableName) Fluent setter for avatarStorageTableName: a storage (filesystem or S3) table the avatar images are written to, at avatars/{avatarKey}/{size}.png.withGravatarOptIn(boolean gravatarOptIn) Fluent setter for gravatarOptIn: when true, each user may choose to show their Gravatar while they have no uploaded photo (default false: no third-party avatar is ever requested).withMaxAvatarBytes(long maxAvatarBytes) Fluent setter for maxAvatarBytes (largest accepted upload; default 5 MB).withTableName(String tableName) Fluent setter for tableNameMethods 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.QSupplementalInstanceMetaData
addSelfToInstance, enrich
-
Field Details
-
NAME
- See Also:
-
DEFAULT_TABLE_NAME
- See Also:
-
SECTION_NAME
- See Also:
-
SECURITY_KEY_USER
////////////////////////////////////////////////////////////////////////- See Also:
-
SECURITY_KEY_USER_ALL_ACCESS
- See Also:
-
PERMISSION_ADMIN
- See Also:
-
MAX_LOOKUP_USER_IDS
public static final int MAX_LOOKUP_USER_IDS- See Also:
-
MAX_UPLOADS_PER_MINUTE
public static final int MAX_UPLOADS_PER_MINUTE- See Also:
-
MAX_CONCURRENT_DECODES
public static final int MAX_CONCURRENT_DECODES- See Also:
-
AVATAR_SIZES
-
DEFAULT_AVATAR_SIZE
public static final int DEFAULT_AVATAR_SIZE- See Also:
-
DEFAULT_MAX_BYTES
public static final long DEFAULT_MAX_BYTES- See Also:
-
MAX_PIXELS
public static final long MAX_PIXELS- See Also:
-
-
Constructor Details
-
UserProfilesMetaData
public UserProfilesMetaData()
-
-
Method Details
-
of
Get the installed profile settings, or null when profiles are not installed. -
ofOrWithNew
Get or register profile settings. -
getName
Supplemental metadata registry name.- Specified by:
getNamein interfaceTopLevelMetaDataInterface
-
validate
The profile table and the avatar storage table must exist, and the profile section must be registered.- Specified by:
validatein interfaceQSupplementalInstanceMetaData
-
getTableName
Getter for tableName -
setTableName
Setter for tableName -
withTableName
Fluent setter for tableName -
getAvatarStorageTableName
Getter for avatarStorageTableName -
setAvatarStorageTableName
Setter for avatarStorageTableName -
withAvatarStorageTableName
Fluent setter for avatarStorageTableName: a storage (filesystem or S3) table the avatar images are written to, at avatars/{avatarKey}/{size}.png. -
getGravatarOptIn
public boolean getGravatarOptIn()Getter for gravatarOptIn -
setGravatarOptIn
public void setGravatarOptIn(boolean gravatarOptIn) Setter for gravatarOptIn -
withGravatarOptIn
Fluent setter for gravatarOptIn: when true, each user may choose to show their Gravatar while they have no uploaded photo (default false: no third-party avatar is ever requested). -
getMaxAvatarBytes
public long getMaxAvatarBytes()Getter for maxAvatarBytes -
setMaxAvatarBytes
public void setMaxAvatarBytes(long maxAvatarBytes) Setter for maxAvatarBytes -
withMaxAvatarBytes
Fluent setter for maxAvatarBytes (largest accepted upload; default 5 MB).
-