Jive API (3.0.13) Core Javadocs

com.jivesoftware.community.media.authz
Class VideoPermHelper

java.lang.Object
  extended by BasePermHelper
      extended by com.jivesoftware.community.media.authz.VideoPermHelper

public class VideoPermHelper
extends BasePermHelper

Helper utility to encapsulate CRUD permissions for videos


Method Summary
static boolean canViewVideo(String token)
          Returns true if the user represented in the given playback token is permitted to view the video also encapsulated in the token.
static boolean getCanCreateVideo(JiveContainer jiveContainer)
          Returns true if the effective user can create videos in the given container, false otherwise.
static boolean getCanCreateVideo(User user, JiveContainer container)
          Returns true if the given user can create videos in the given container, false otherwise.
static boolean getCanDeleteVideo(User user, Video video)
          Returns true if the given user is permitted to delete the given video, false otherwise.
static boolean getCanDeleteVideo(Video video)
          Returns true if the effective user is permitted to delete the given video, false otherwise.
static boolean getCanEditVideo(User user, Video video)
          Returns true if the given user is permitted to edit the given video, false otherwise.
static boolean getCanEditVideo(Video video)
          Returns true if the effective user is permitted to edit the given video, false otherwise.
static boolean getCanMoveVideo(User user, Video video, JiveContainer target)
          Returns true if the given user is permitted to move the given video from its current location to the target container, false otherwise.
static boolean getCanMoveVideo(Video video, JiveContainer target)
          Returns true if the effective user is permitted to move the given video from its current location to the target container, false otherwise.
static boolean getCanRateVideo(User user, Video video)
          Returns true if the given user is permitted to rate the given video, false otherwise.
static boolean getCanRateVideo(Video video)
          Returns true if the effective user is permitted to rate the given video, false otherwise.
static boolean getCanViewComments(Video video)
          Returns true if the effective user is permitted to view comments on the given video, false otherwise.
static boolean getCanViewVideo(User user, Video video)
          Returns true if the given user is permitted to view the given video, false otherwise.
static boolean getCanViewVideo(Video video)
          Returns true if the effective user is permitted to view the given video, false otherwise.
static boolean getCanWriteComments(Video video)
          Returns true if the effective user is permitted to comment on the given video, false otherwise.
static boolean isVideoEnabled()
          Returns true if the video feature is licensed and available for use
static boolean isVideoEnabled(JiveContainer container)
          Returns true if video is enabled in the given container
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isVideoEnabled

public static boolean isVideoEnabled()
Returns true if the video feature is licensed and available for use

Returns:
true if video is enabled

isVideoEnabled

public static boolean isVideoEnabled(JiveContainer container)
Returns true if video is enabled in the given container

Returns:
true if video is enabled int the given container

getCanCreateVideo

public static boolean getCanCreateVideo(JiveContainer jiveContainer)
Returns true if the effective user can create videos in the given container, false otherwise. The default implementation is that a user can create a video if they have an explicit create video permission or if they're a system admin,global moderator, global community admin or a global community admin. For a social group, a user can create a video if the group is open, or if they are a member of that group.

Parameters:
jiveContainer - the jiveContainer to check for create document permission
Returns:
true if the effective user can create videos in the given container, false otherwise.

getCanCreateVideo

public static boolean getCanCreateVideo(User user,
                                        JiveContainer container)
Returns true if the given user can create videos in the given container, false otherwise. The default implementation is that a user can create a video if they have an explicit create video permission or if they're a system admin, global moderator, global community admin or a global community admin. For a social group, a user can create a video if the group is open, or if they are a member of that group.

Parameters:
user - whose permissions to check
container - the jiveContainer to check for create document permission
Returns:
true if the user can create videos in the given container, false otherwise.

getCanEditVideo

public static boolean getCanEditVideo(Video video)
Returns true if the effective user is permitted to edit the given video, false otherwise. The default implementation is that a video author, container admins, or container moderator is allowed to edit a video

Parameters:
video - for which edit permissions of the current user will be checked
Returns:
true if the effective user can edit the video, false otherwise.

getCanEditVideo

public static boolean getCanEditVideo(User user,
                                      Video video)
Returns true if the given user is permitted to edit the given video, false otherwise. The default implementation is that a video author, container admins, or container moderators is allowed to edit a video

Parameters:
user - the user whose edit permissions are being examined
video - for which edit permissions of the given user will be checked
Returns:
true if the user can edit the video, false otherwise.

getCanDeleteVideo

public static boolean getCanDeleteVideo(Video video)
Returns true if the effective user is permitted to delete the given video, false otherwise. The default implementation is that a video author, container admins, or container moderator is allowed to delete a video

Parameters:
video - for which delete permissions of the current user will be checked
Returns:
true if the effective user can delete the video, false otherwise.

getCanDeleteVideo

public static boolean getCanDeleteVideo(User user,
                                        Video video)
Returns true if the given user is permitted to delete the given video, false otherwise. The default implementation is that a video author, container admins, or container moderator is allowed to delete a video

Parameters:
user - the user whose edit permissions are being examined
video - for which edit permissions of the given user will be checked
Returns:
true if the user can edit the video, false otherwise.

getCanViewVideo

public static boolean getCanViewVideo(Video video)
Returns true if the effective user is permitted to view the given video, false otherwise.

Parameters:
video - for which view permissions of the current user will be checked
Returns:
true if the effective user can view the video, false otherwise.

getCanViewVideo

public static boolean getCanViewVideo(User user,
                                      Video video)
Returns true if the given user is permitted to view the given video, false otherwise.

Parameters:
user - the user whose view permissions are being examined
video - for which view permissions of the given user will be checked
Returns:
true if the user can edit the video, false otherwise.

getCanRateVideo

public static boolean getCanRateVideo(Video video)
Returns true if the effective user is permitted to rate the given video, false otherwise.

Parameters:
video - for which rate permissions of the current user will be checked
Returns:
true if the effective user can rate the video, false otherwise.

getCanRateVideo

public static boolean getCanRateVideo(User user,
                                      Video video)
Returns true if the given user is permitted to rate the given video, false otherwise.

Parameters:
user - the user whose rate permissions are being examined
video - for which rate permissions of the given user will be checked
Returns:
true if the user can rate the video, false otherwise.

getCanMoveVideo

public static boolean getCanMoveVideo(Video video,
                                      JiveContainer target)
Returns true if the effective user is permitted to move the given video from its current location to the target container, false otherwise.

Parameters:
video - for which the ability of the effective to move it is being checked
target - destination container
Returns:
true if the effective user can move the video to the target container, false otherwise.

getCanMoveVideo

public static boolean getCanMoveVideo(User user,
                                      Video video,
                                      JiveContainer target)
Returns true if the given user is permitted to move the given video from its current location to the target container, false otherwise.

Parameters:
video - for which the ability of the given user to move it is being checked
target - destination container
Returns:
true if the given user can move the video to the target container, false otherwise.

canViewVideo

public static boolean canViewVideo(String token)
Returns true if the user represented in the given playback token is permitted to view the video also encapsulated in the token. Before a video is played the player will perform a callback that invokes this check to determine if the user attempting to play the video is allowed to view the video

Parameters:
token - being examined that contains information about the user viewing, item to view, and creation date of the token
Returns:
true if the user can view the given video, false otherwise.

getCanViewComments

public static boolean getCanViewComments(Video video)
Returns true if the effective user is permitted to view comments on the given video, false otherwise.

Parameters:
video - for which view comment permissions of the current user will be checked
Returns:
true if the effective user can view comments on the video, false otherwise.

getCanWriteComments

public static boolean getCanWriteComments(Video video)
Returns true if the effective user is permitted to comment on the given video, false otherwise.

Parameters:
video - for which rate permissions of the current user will be checked
Returns:
true if the effective user can comment on the given video, false otherwise.

Jive Product Page

Copyright © 1999-2007 Jive Software.