Class DocumentPermission

java.lang.Object
com.levigo.jadice.document.auth.web.DocumentPermission
All Implemented Interfaces:
Permission<Document>, Serializable

public final class DocumentPermission extends Object implements Permission<Document>, Serializable
Attention: this class is a web technology adaption of the jadice document platform version. The original can be found in DocumentPermission While using jadice web toolkit, it is expected to use this version on the client at all times.

The default behavior is the following: on the server side, document platform permissions are automatically transformed into a json object when sending data to the client. On the opposite way, i.e. sending a message from client side to be later prcessed by a MessageListener, the json-serialized permissions are transformed again into corresponding document platform versions.

Whenever it is necessary to set permissions on the server side (e.g. inside a DocumentDataProvider implementation or in the server side code of an update, triggered by the client), the original document platform permission implementation DocumentPermission must be used.

Permissions for a Drag and Drop feature are not supported in the jadice web toolkit version yet as of Version 5.3.4.0.

See Also:
  • Field Details

  • Method Details

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • pertainsTo

      public boolean pertainsTo(Class<? extends Intent> intentClass)
      Description copied from interface: Permission
      Return whether this permission pertains to the given action. If this method returns true, this permission will be asked to make decisions about actions if the given class. Note to implementors: the Permission.vote(Object, Intent) method is guaranteed to never be called for actions of classes for which this method has returned false. You may therefore skip instanceof checks in the Permission.vote(Object, Intent) method, if you do them here.
      Specified by:
      pertainsTo in interface Permission<Document>
      Parameters:
      intentClass -
      Returns:
      true if this method pertains to actions of the given class, false otherwise
    • vote

      public Permission.Vote vote(Document domain, Intent intent)
      Description copied from interface: Permission
      Make a permission decision about the given intended action on the given domain object.
      Specified by:
      vote in interface Permission<Document>
      Parameters:
      intent -
      Returns:
      the decision
    • toString

      public String toString()
      Overrides:
      toString in class Object