|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sakaiproject.profile2.model.ProfileImage
public class ProfileImage
ProfileImageResource
This is a wrapper class which contains fields for all types of profile images. Only one field will be set at any given time.
Use the getBinary or getUrl methods to do the work and return the data as either a String or byte[]. If String, this will be a URL/URI you can use directly. If byte[] this will be the uploaded image. Consult both.
Note. Eventually, this will return only Strings. The byte[] will be base64 encoded and returned as a data URI you can use, however this is not supported in browsers older than IE8 (Safari, Firefox, Chrome, all ok though).
You can get alt text for the image via getAltText()
This is not related to the similarly named hibernate model (hbm.model.ProfileImage)
| Constructor Summary | |
|---|---|
ProfileImage()
|
|
| Method Summary | |
|---|---|
byte[] |
getBinary()
Get access to the binary data from either the uploaded image or the base64 encoded data |
String |
getUrl()
Get access to the URL from either the external image that a user can set, or an official image. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProfileImage()
| Method Detail |
|---|
public byte[] getBinary()
public String getUrl()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||