public class ProfileImageRenderer
extends org.apache.wicket.markup.html.image.Image
implements org.apache.wicket.IResourceListener
This component should be used whenever you want to render a user's profile image. Choose the most appropriate constructor for your needs and situation.
Note that in order to request another user's image you should supply either a full Person object containing the Privacy settings, or the ProfilePrivacy settings directly. If you do not have this information you can pass null as the ProfilePrivacy attribute and it will be consulted for you.
If you do not provide a ProfilePreferences object (or Person object containing this info), it will be looked up.
If you do not provide the size or cache settings, they will be defaults (size=main, cache=true).
In short, always provide all information (and preferably a full Person object)
| Constructor and Description |
|---|
ProfileImageRenderer(String id,
org.sakaiproject.profile2.model.Person person)
Full constructor that takes a Person object instead of split data.
|
ProfileImageRenderer(String id,
org.sakaiproject.profile2.model.Person person,
int size,
boolean cache)
Full constructor that takes a Person object and allows control over the size and cache settings.
|
ProfileImageRenderer(String id,
String userUuid)
Minimal constructor.
|
ProfileImageRenderer(String id,
String userUuid,
org.sakaiproject.profile2.model.ProfilePreferences prefs)
Minimal constructor.
|
ProfileImageRenderer(String id,
String userUuid,
org.sakaiproject.profile2.model.ProfilePreferences prefs,
int size,
boolean cache)
Minimal constructor.
|
ProfileImageRenderer(String id,
String userUuid,
org.sakaiproject.profile2.model.ProfilePreferences prefs,
org.sakaiproject.profile2.model.ProfilePrivacy privacy)
Minimal constructor.
|
ProfileImageRenderer(String id,
String userUuid,
org.sakaiproject.profile2.model.ProfilePreferences prefs,
org.sakaiproject.profile2.model.ProfilePrivacy privacy,
int size,
boolean cache)
Full constructor where each item is explicitly provided.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onComponentTag(org.apache.wicket.markup.ComponentTag tag)
Render the tag
|
void |
onResourceRequested() |
getImageResource, getImageResourceReference, getStatelessHint, initModel, onComponentTagBody, setDefaultModel, setImageResource, setImageResourceReference, setImageResourceReferenceadd, addStateChange, afterRender, beforeRender, callOnBeforeRenderIfNotVisible, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachBehaviors, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviors, getBehaviors, getBehaviorsRawList, getClassRelativePath, getComponentBorder, getConverter, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessage, getFlag, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdImpl, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getResponse, getSession, getSizeInBytes, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, internalAttach, internalDetach, internalOnAttach, internalOnDetach, internalOnModelChanged, isActionAuthorized, isAncestorOf, isAttached, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, locateMarkupStream, markAttached, markRendering, modelChanged, modelChanging, onAfterRender, onAttach, onBeforeRender, onBeginRequest, onConfigure, onDetach, onEndRequest, onInitialize, onModelChanged, onModelChanging, onRemove, prepareForRender, prepareForRender, redirectToInterceptPage, remove, remove, render, render, renderComponent, renderComponent, renderComponentTag, rendered, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, setAuto, setComponentBorder, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setFlag, setIgnoreAttributeModifier, setMarkupId, setMarkupIdImpl, setMarkupStream, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setRedirect, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, toString, toString, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, warn, wrappublic ProfileImageRenderer(String id, String userUuid)
id - markup IDuserUuid - uuid of the user to retrieve the image forpublic ProfileImageRenderer(String id, String userUuid, org.sakaiproject.profile2.model.ProfilePreferences prefs)
id - markup IDuserUuid - uuid of the user to retrieve the image forprefs - ProfilePreferences object for the userpublic ProfileImageRenderer(String id, String userUuid, org.sakaiproject.profile2.model.ProfilePreferences prefs, int size, boolean cache)
id - markup IDuserUuid - uuid of the user to retrieve the image for.prefs - ProfilePreferences object for the user.size - image size: 1 for main, 2 for thumbnail.cache - if this image is allowed to be cached by the browser or not. If having issues with
dynamic images sticking from AJAX updates, set this to false to ensure the image is updated every request.public ProfileImageRenderer(String id, String userUuid, org.sakaiproject.profile2.model.ProfilePreferences prefs, org.sakaiproject.profile2.model.ProfilePrivacy privacy)
id - markup IDuserUuid - uuid of the user to retrieve the image forprefs - ProfilePreferences object for the userprivacy - ProfilePrivacy object for the userpublic ProfileImageRenderer(String id, String userUuid, org.sakaiproject.profile2.model.ProfilePreferences prefs, org.sakaiproject.profile2.model.ProfilePrivacy privacy, int size, boolean cache)
id - markup IDuserUuid - uuid of the user to retrieve the image forprefs - ProfilePreferences object for the userprivacy - ProfilePrivacy object for the usersize - image size: 1 for main, 2 for thumbnail.cache - if this image is allowed to be cached by the browser or not. If having issues with
dynamic images sticking from AJAX updates, set this to false to ensure the image is updated every request.public ProfileImageRenderer(String id, org.sakaiproject.profile2.model.Person person)
id - markup IDperson - Person object for the user containing all datapublic ProfileImageRenderer(String id, org.sakaiproject.profile2.model.Person person, int size, boolean cache)
id - markup IDperson - Person object for the user containing all datasize - image size: 1 for main, 2 for thumbnail.cache - if this image is allowed to be cached by the browser or not. If having issues with
dynamic images sticking from AJAX updates, set this to false to ensure the image is updated every request.public void onResourceRequested()
onResourceRequested in interface org.apache.wicket.IResourceListeneronResourceRequested in class org.apache.wicket.markup.html.image.ImageIResourceListener.onResourceRequested()public void onComponentTag(org.apache.wicket.markup.ComponentTag tag)
onComponentTag in class org.apache.wicket.markup.html.image.ImageCopyright © 2008-2015 The Sakai Foundation. All Rights Reserved.