|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.Component
org.apache.wicket.markup.html.WebComponent
org.apache.wicket.markup.html.image.Image
org.sakaiproject.profile2.tool.components.ProfileImageRenderer
public class ProfileImageRenderer
Profile2 ProfileImageRenderer component.
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)
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.wicket.Component |
|---|
org.apache.wicket.Component.ComponentModelChange, org.apache.wicket.Component.EnabledChange, org.apache.wicket.Component.IVisitor<T extends org.apache.wicket.Component>, org.apache.wicket.Component.VisibilityChange |
| Field Summary |
|---|
| Fields inherited from class org.apache.wicket.Component |
|---|
ENABLE, FLAG_CONFIGURED, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PATH_SEPARATOR, RENDER |
| Fields inherited from interface org.apache.wicket.IResourceListener |
|---|
INTERFACE |
| Constructor Summary | |
|---|---|
ProfileImageRenderer(String id,
Person person)
Full constructor that takes a Person object instead of split data. |
|
ProfileImageRenderer(String id,
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,
ProfilePreferences prefs)
Minimal constructor. |
|
ProfileImageRenderer(String id,
String userUuid,
ProfilePreferences prefs,
int size,
boolean cache)
Minimal constructor. |
|
ProfileImageRenderer(String id,
String userUuid,
ProfilePreferences prefs,
ProfilePrivacy privacy)
Minimal constructor. |
|
ProfileImageRenderer(String id,
String userUuid,
ProfilePreferences prefs,
ProfilePrivacy privacy,
int size,
boolean cache)
Full constructor where each item is explicitly provided. |
|
| Method Summary | |
|---|---|
void |
onComponentTag(org.apache.wicket.markup.ComponentTag tag)
Render the tag |
void |
onResourceRequested()
|
| Methods inherited from class org.apache.wicket.markup.html.image.Image |
|---|
getImageResource, getImageResourceReference, getStatelessHint, initModel, onComponentTagBody, setDefaultModel, setImageResource, setImageResourceReference, setImageResourceReference |
| Methods inherited from class org.apache.wicket.markup.html.WebComponent |
|---|
onRender |
| Methods inherited from class org.apache.wicket.Component |
|---|
add, addStateChange, afterRender, beforeRender, callOnBeforeRenderIfNotVisible, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachBehaviors, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, 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, wrap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ProfileImageRenderer(String id,
String userUuid)
id - markup IDuserUuid - uuid of the user to retrieve the image for
public ProfileImageRenderer(String id,
String userUuid,
ProfilePreferences prefs)
id - markup IDuserUuid - uuid of the user to retrieve the image forprefs - ProfilePreferences object for the user
public ProfileImageRenderer(String id,
String userUuid,
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,
ProfilePreferences prefs,
ProfilePrivacy privacy)
id - markup IDuserUuid - uuid of the user to retrieve the image forprefs - ProfilePreferences object for the userprivacy - ProfilePrivacy object for the user
public ProfileImageRenderer(String id,
String userUuid,
ProfilePreferences prefs,
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,
Person person)
id - markup IDperson - Person object for the user containing all data
public ProfileImageRenderer(String id,
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.| Method Detail |
|---|
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.Image
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||