public class AvatarComposite<AU extends AppUser> extends AppUserComposite<AU,AvatarComposite> implements AppUserTransitionContributor, SummaryContributer<AU>, AnonymisingComposite<AU>
Modifier and Type | Class and Description |
---|---|
class |
AvatarComposite.AddAvatarTransition |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AVATAR |
static CurrentUserKey |
SET_AVATAR |
static java.lang.String |
SET_AVATAR_RELATIONSHIP |
static java.lang.String |
VIEW_AVATAR_RELATIONSHIP |
Constructor and Description |
---|
AvatarComposite(AppUserFactory<AU> fac) |
Modifier and Type | Method and Description |
---|---|
void |
addAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes,
AU target)
Add to the set of attributes.
|
java.util.Set<java.lang.String> |
addSuppress(java.util.Set<java.lang.String> suppress)
generate the class specific set of suppressed fields to be used in form creation/update
The individual forms can override these so you usually use this method to define fields that should
be suppressed in all forms.
|
void |
anonymise(AU target) |
Image |
getAvatar(SessionService<AU> viewer,
AU user) |
StreamData |
getData(AU user) |
java.awt.image.BufferedImage |
getImage(AU user) |
java.util.Map<AppUserKey,Transition<AppUser>> |
getTransitions(AppUserTransitionProvider provider) |
protected java.lang.Class<? super AvatarComposite> |
getType()
Returns the type the composite should be registered under.
|
boolean |
hasAvatar(SessionService<AU> viewer,
AU user) |
TableSpecification |
modifyDefaultTableSpecification(TableSpecification spec,
java.lang.String table)
Modify the
TableSpecification of the target factory. |
void |
removeAvatar(AU user) |
addDefaults, addFieldHelp, addOptional, addSelectors, addTranslations, customiseForm, customiseUpdateForm, getContext, getFactory, getLogger, getRecord, getRepository, postUpdate, preRegister, release, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addEraseFields
addFieldConstraints, addFormFields
public static final java.lang.String AVATAR
public static final java.lang.String VIEW_AVATAR_RELATIONSHIP
public static final java.lang.String SET_AVATAR_RELATIONSHIP
public static CurrentUserKey SET_AVATAR
public AvatarComposite(AppUserFactory<AU> fac)
fac
- protected final java.lang.Class<? super AvatarComposite> getType()
Composite
getType
in class Composite<AU extends AppUser,AvatarComposite>
public TableSpecification modifyDefaultTableSpecification(TableSpecification spec, java.lang.String table)
TableStructureContributer
TableSpecification
of the target factory.modifyDefaultTableSpecification
in interface TableStructureContributer<AU extends AppUser>
modifyDefaultTableSpecification
in class Composite<AU extends AppUser,AvatarComposite>
public java.util.Set<java.lang.String> addSuppress(java.util.Set<java.lang.String> suppress)
TableStructureContributer
addSuppress
in interface TableStructureContributer<AU extends AppUser>
addSuppress
in class Composite<AU extends AppUser,AvatarComposite>
Set
of fields to suppress in forms.public StreamData getData(AU user) throws DataFault
user
- DataFault
public boolean hasAvatar(SessionService<AU> viewer, AU user)
public Image getAvatar(SessionService<AU> viewer, AU user)
public void removeAvatar(AU user)
public java.util.Map<AppUserKey,Transition<AppUser>> getTransitions(AppUserTransitionProvider provider)
getTransitions
in interface AppUserTransitionContributor
public void addAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes, AU target)
SummaryContributer
Table
so the data should be of a
type that can be displayed by Table
s
The keys should be display text.addAttributes
in interface SummaryContributer<AU extends AppUser>
public void anonymise(AU target)
anonymise
in interface AnonymisingComposite<AU extends AppUser>