com.levigo.jadice.document
Class Permissions<D>

java.lang.Object
  extended by com.levigo.jadice.document.Permissions<D>
Type Parameters:
D - the subject class of the permissions set. This class will usually implement PermissionsProvider, in order to be able to provide access to its permissions set, but other mechanisms to associate the permissions with their target are also possible.

public class Permissions<D>
extends Object

This class represents a set of permissions attached to a domain object.


Constructor Summary
Permissions()
           
 
Method Summary
 boolean areAllPermissionsGranted(D domain, Intent... intents)
           
 List<Permission<? super D>> getPermissions()
           
 boolean isAnyPermissionGranted(D domain, Intent... intents)
           
 boolean isGrantAll()
          Return whether this Permissions Object always grants every permission, because there are no Permissions installed and the default is to grant permission.
 boolean isPermissionGranted(D domain, Intent action)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Permissions

public Permissions()
Method Detail

getPermissions

public List<Permission<? super D>> getPermissions()
Returns:
the permissions

isPermissionGranted

public boolean isPermissionGranted(D domain,
                                   Intent action)

areAllPermissionsGranted

public boolean areAllPermissionsGranted(D domain,
                                        Intent... intents)

isAnyPermissionGranted

public boolean isAnyPermissionGranted(D domain,
                                      Intent... intents)

isGrantAll

public boolean isGrantAll()
Return whether this Permissions Object always grants every permission, because there are no Permissions installed and the default is to grant permission. If this method returns true, permission checking code improve efficiency by skipping the creation of Intents.

Returns:
true if any conceivable permission is always granted.


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.