| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.silverpeas.web.RESTWebService
com.silverpeas.gallery.web.AbstractGalleryResource
public abstract class AbstractGalleryResource
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from class com.silverpeas.web.RESTWebService | 
|---|
com.silverpeas.web.RESTWebService.WebProcess<RETURN_VALUE>, com.silverpeas.web.RESTWebService.WebTreatment<RETURN_VALUE> | 
| Field Summary | 
|---|
| Fields inherited from class com.silverpeas.web.RESTWebService | 
|---|
RESPONSE_HEADER_ARRAYSIZE, REST_WEB_SERVICES_URI_BASE | 
| Constructor Summary | |
|---|---|
AbstractGalleryResource()
 | 
|
| Method Summary | |
|---|---|
protected  AlbumEntity | 
asWebEntity(AlbumDetail album)
Converts the album into its corresponding web entity.  | 
protected  void | 
checkNotFoundStatus(Object object)
Centralization  | 
 String | 
getComponentId()
 | 
protected  javax.ws.rs.core.Response | 
getMediaContent(MediaType expectedMediaType,
                String mediaId,
                MediaResolution requestedMediaResolution)
Centralization of getting of media content.  | 
protected  com.sun.jersey.api.view.Viewable | 
getMediaEmbed(MediaType expectedMediaType,
              String mediaId,
              MediaResolution requestedMediaResolution)
Centralization of getting of media embed.  | 
protected  AbstractMediaEntity | 
getMediaEntity(MediaType expectedMediaType,
               String albumId,
               String mediaId)
Centralization of getting of media data.  | 
protected  GalleryBm | 
getMediaService()
Gets Gallery EJB.  | 
protected  javax.ws.rs.core.Response | 
getMediaThumbnail(MediaType expectedMediaType,
                  String mediaId,
                  String thumbnailId,
                  String sizeDirective)
Centralization of getting video media thumbnail.  | 
protected  boolean | 
hasUserMediaAccess(Media media)
Centralization  | 
protected  boolean | 
isUserPrivileged()
Indicates if the current user is a privileged one.  | 
protected  boolean | 
isViewAllPhotoAuthorized()
Checking if the authenticated user is authorized to view all photos.  | 
protected  void | 
verifyMediaIsInAlbum(Media media,
                     AlbumDetail album)
Verifying that the given photo is included in the given album.  | 
protected  void | 
verifyUserMediaAccess(Media media)
Verifying that the authenticated user is authorized to view the given photo.  | 
| Methods inherited from class com.silverpeas.web.RESTWebService | 
|---|
getBundle, getBundleLocation, getGreaterUserRole, getHttpRequest, getHttpServletRequest, getHttpServletResponse, getOrganisationController, getUriInfo, getUserDetail, getUserPreferences, getUserRoles, process, validateUserAuthentication, validateUserAuthorization | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public AbstractGalleryResource()
| Method Detail | 
|---|
public String getComponentId()
getComponentId in class com.silverpeas.web.RESTWebServiceprotected AlbumEntity asWebEntity(AlbumDetail album)
album - the album.
protected AbstractMediaEntity getMediaEntity(MediaType expectedMediaType,
                                             String albumId,
                                             String mediaId)
expectedMediaType - albumId - the identifier of the album in which the media must existmediaId - the identifier of the expected media
protected javax.ws.rs.core.Response getMediaContent(MediaType expectedMediaType,
                                                    String mediaId,
                                                    MediaResolution requestedMediaResolution)
expectedMediaType - mediaId - requestedMediaResolution - 
protected com.sun.jersey.api.view.Viewable getMediaEmbed(MediaType expectedMediaType,
                                                         String mediaId,
                                                         MediaResolution requestedMediaResolution)
expectedMediaType - mediaId - requestedMediaResolution - 
protected javax.ws.rs.core.Response getMediaThumbnail(MediaType expectedMediaType,
                                                      String mediaId,
                                                      String thumbnailId,
                                                      String sizeDirective)
expectedMediaType - mediaId - thumbnailId - sizeDirective - the size directive with pattern (optional)
protected boolean isUserPrivileged()
protected void checkNotFoundStatus(Object object)
object - any objectprotected boolean hasUserMediaAccess(Media media)
media - 
protected void verifyUserMediaAccess(Media media)
media - protected boolean isViewAllPhotoAuthorized()
protected void verifyMediaIsInAlbum(Media media,
                                    AlbumDetail album)
protected GalleryBm getMediaService()
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||