Пример #1
0
 /**
  * @param permissionSetId One of the constants in {@link DocumentPermissionSet}.
  * @since 2.0
  * @deprecated Use {@link #setPermissionSetTypeForRole(Role, DocumentPermissionSetType)}
  */
 public void setPermissionSetIdForRole(Role role, int permissionSetId) {
   if (null != role) {
     internalDocument.setDocumentPermissionSetTypeForRoleId(
         role.getInternal().getId(),
         DocumentPermissionSetTypeDomainObject.fromInt(permissionSetId));
   }
 }
Пример #2
0
 /** @since 3.0 */
 public DocumentPermissionSetType getPermissionSetTypeForRole(Role role) {
   return new DocumentPermissionSetType(
       internalDocument.getDocumentPermissionSetTypeForRoleId(role.getInternal().getId()));
 }
Пример #3
0
 /**
  * @since 2.0
  * @deprecated Use {@link #getPermissionSetTypeForRole(Role)}
  */
 public int getPermissionSetIdForRole(Role role) {
   return internalDocument
       .getDocumentPermissionSetTypeForRoleId(role.getInternal().getId())
       .getId();
 }
Пример #4
0
 /** @since 3.0 */
 public void setPermissionSetTypeForRole(
     Role role, DocumentPermissionSetType documentPermissionSetType) {
   internalDocument.setDocumentPermissionSetTypeForRoleId(
       role.getInternal().getId(), documentPermissionSetType.getInternal());
 }