Jive API (3.0.13) Core Javadocs

com.jivesoftware.community.media.type
Interface MediaProxyInfoProvider<T extends Media>


public interface MediaProxyInfoProvider<T extends Media>

Encapsulates CRUD permissions for media, so that a proxied manager can perform security checks in an media type implementation agnostic way.


Method Summary
 T createProxy(T media, AuthToken authToken, Permissions proxyPermissions)
          Creates a proxied type of the given media implementation
 boolean getCanCreate(Media media)
          Returns true iff the currently effective user has rights to create the given media object.
 boolean getCanDelete(Media media)
          Returns true iff the currently effective user has rights to delete the given media object.
 boolean getCanEdit(Media media)
          Returns true iff the currently effective user has rights to edit the given media object.
 boolean getCanMove(Media media, JiveContainer target)
          Returns true iff the currently effective user has rights to move the given media object to the target container
 boolean getCanView(Media media)
          Returns true iff the currently effective user has rights to view the given media object.
 

Method Detail

getCanCreate

boolean getCanCreate(Media media)
Returns true iff the currently effective user has rights to create the given media object.

Parameters:
media - to create, pre-populated with the container where the media is being created
Returns:
true if the effective user can create that media object

getCanEdit

boolean getCanEdit(Media media)
Returns true iff the currently effective user has rights to edit the given media object.

Parameters:
media - to edit
Returns:
true if the effective user can edit that media object

getCanView

boolean getCanView(Media media)
Returns true iff the currently effective user has rights to view the given media object.

Parameters:
media - to view
Returns:
true if the effective user can view that media object

getCanDelete

boolean getCanDelete(Media media)
Returns true iff the currently effective user has rights to delete the given media object.

Parameters:
media - to delete
Returns:
true if the effective user can delete that media object

getCanMove

boolean getCanMove(Media media,
                   JiveContainer target)
Returns true iff the currently effective user has rights to move the given media object to the target container

Parameters:
media - to move
target - container to move media into
Returns:
true if the effective user can delete that media object

createProxy

T createProxy(T media,
              AuthToken authToken,
              Permissions proxyPermissions)
Creates a proxied type of the given media implementation

Parameters:
media - object to proxy
authToken - to be set in the proxied object
proxyPermissions - to be set in the proxied object
Returns:
a proxied instance wrapping the given media object

Jive Product Page

Copyright © 1999-2007 Jive Software.