Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.webapp.security
Interface SecurityActions

All Known Implementing Classes:
SecurityActionsBean

public interface SecurityActions

Provides security related operations on the current document.

Author:
Razvan Caraghin

Method Summary
 String addPermission()
          Adds a permission to the list of permissions for the current document.
 String addPermission(String principalName, String permissionName, boolean grant)
           
 String addPermissionAndUpdate()
          Adds a permission to the list of permissions for the current document and automatically update the backend with updateSecurityOnDocument()>.
 String addPermissions()
          Adds a list of permission to the list of permissions for the current document.
 String addPermissionsAndUpdate()
          Adds a list of permissions to the list of permissions for the current document and automatically update the backend with updateSecurityOnDocument()>.
 Boolean displayInheritedPermissions()
          Deprecated. use getDisplayInheritedPermissions()
 Boolean getBlockRightInheritance()
           
 boolean getCanAddSecurityRules()
          Returns true if the implementator if the principal has the permission to add new security rules on currentItem.
 boolean getCanRemoveSecurityRules()
          Returns true if the implementator can provide a list of permissions delete now and the principal has WriteSecurity permission on the currentItem.
 List<String> getCurrentDocumentUsers()
           
 UserPermissionsTableModel getDataTableModel()
           
 boolean getDisplayInheritedPermissions()
          Returns true if inherited permissions have to be displayed (depending on rights blocking)
 Map<String,String> getIconAltMap()
          Maps the principal type to the icon alt text.
 Map<String,String> getIconPathMap()
          Maps the principal type to the icon path.
 List<String> getParentDocumentsUsers()
           
 SecurityData getSecurityData()
           
 List<String> getSelectedEntries()
          Returns selected entries used in add/remove methods
 String getSelectedEntry()
          Returns selected entry used in add/remove methods
 List<SelectItem> getSettablePermissions()
           
 void rebuildSecurityData()
          Rebuilds the security displayable data from the current selected document.
 String removePermission()
          Removes a permission from the list of permissions for the current document.
 String removePermissionAndUpdate()
          Removes a permission from the list of permissions for the current document and automatically update the backend with updateSecurityOnDocument()>.
 String removePermissions()
           
 String removePermissionsAndUpdate()
           
 void resetSecurityData()
          Marks the current security data info as obsolete so that it gets lazily recomputed from the backend the next time it is accessed.
 String saveSecurityUpdates()
           
 void setBlockRightInheritance(Boolean blockRightInheritance)
           
 void setSelectedEntries(List<String> selectedEntries)
          Sets selected entries used in add/remove methods
 void setSelectedEntry(String selectedEntry)
          Sets selected entry used in add/remove methods
 String updateSecurityOnDocument()
          Submits the security changes to the backend.
 

Method Detail

updateSecurityOnDocument

String updateSecurityOnDocument()
                                throws ClientException
Submits the security changes to the backend.

Returns:
the page that will be displayed next
Throws:
ClientException

addPermission

String addPermission()
                     throws ClientException
Adds a permission to the list of permissions for the current document. After all client side changes are made, then the list of permissions need to be submitted on backend using updateSecurityOnDocument()>.

Returns:
the page that needs to be displayed next
Throws:
ClientException

addPermissions

String addPermissions()
                      throws ClientException
Adds a list of permission to the list of permissions for the current document. After all client side changes are made, then the list of permissions need to be submitted on backend using updateSecurityOnDocument()>.

Returns:
the page that needs to be displayed next
Throws:
ClientException

addPermission

String addPermission(String principalName,
                     String permissionName,
                     boolean grant)
                     throws ClientException
Throws:
ClientException

removePermission

String removePermission()
Removes a permission from the list of permissions for the current document. After all client side changes are made, then the list of permissions need to be submitted on backend using updateSecurityOnDocument()>.

Returns:
the page that needs to be displayed next

addPermissionAndUpdate

String addPermissionAndUpdate()
                              throws ClientException
Adds a permission to the list of permissions for the current document and automatically update the backend with updateSecurityOnDocument()>.

Returns:
the page that needs to be displayed next
Throws:
ClientException

addPermissionsAndUpdate

String addPermissionsAndUpdate()
                               throws ClientException
Adds a list of permissions to the list of permissions for the current document and automatically update the backend with updateSecurityOnDocument()>.

Returns:
the page that needs to be displayed next
Throws:
ClientException

removePermissionAndUpdate

String removePermissionAndUpdate()
                                 throws ClientException
Removes a permission from the list of permissions for the current document and automatically update the backend with updateSecurityOnDocument()>.

Returns:
the page that needs to be displayed next
Throws:
ClientException

removePermissionsAndUpdate

String removePermissionsAndUpdate()
                                  throws ClientException
Throws:
ClientException

resetSecurityData

void resetSecurityData()
Marks the current security data info as obsolete so that it gets lazily recomputed from the backend the next time it is accessed.


rebuildSecurityData

void rebuildSecurityData()
                         throws ClientException
Rebuilds the security displayable data from the current selected document.

Throws:
ClientException

getDataTableModel

UserPermissionsTableModel getDataTableModel()
                                            throws ClientException
Returns:
a UserPermissionsTableModel used to build a checkboxable listing of managed permissions
Throws:
ClientException

getSecurityData

SecurityData getSecurityData()
                             throws ClientException
Returns:
the SecurityData object that manages a stateful representation of the permissions mapping that apply to the current document (inherited or not)
Throws:
ClientException

getCanAddSecurityRules

boolean getCanAddSecurityRules()
                               throws ClientException
Returns true if the implementator if the principal has the permission to add new security rules on currentItem.

Throws:
ClientException

getCanRemoveSecurityRules

boolean getCanRemoveSecurityRules()
                                  throws ClientException
Returns true if the implementator can provide a list of permissions delete now and the principal has WriteSecurity permission on the currentItem.

Throws:
ClientException

getSettablePermissions

List<SelectItem> getSettablePermissions()
                                        throws ClientException
Returns:
the list of permissions the users can set through the rights management tab
Throws:
ClientException

getIconPathMap

Map<String,String> getIconPathMap()
Maps the principal type to the icon path.


getIconAltMap

Map<String,String> getIconAltMap()
Maps the principal type to the icon alt text.


getBlockRightInheritance

Boolean getBlockRightInheritance()

setBlockRightInheritance

void setBlockRightInheritance(Boolean blockRightInheritance)
                              throws ClientException
Throws:
ClientException

displayInheritedPermissions

@Deprecated
Boolean displayInheritedPermissions()
                                    throws ClientException
Deprecated. use getDisplayInheritedPermissions()

Throws:
ClientException

getDisplayInheritedPermissions

boolean getDisplayInheritedPermissions()
                                       throws ClientException
Returns true if inherited permissions have to be displayed (depending on rights blocking)

Throws:
ClientException

getCurrentDocumentUsers

List<String> getCurrentDocumentUsers()
                                     throws ClientException
Throws:
ClientException

getParentDocumentsUsers

List<String> getParentDocumentsUsers()
                                     throws ClientException
Throws:
ClientException

removePermissions

String removePermissions()
                         throws ClientException
Throws:
ClientException

saveSecurityUpdates

String saveSecurityUpdates()
                           throws ClientException
Throws:
ClientException

getSelectedEntry

String getSelectedEntry()
Returns selected entry used in add/remove methods


setSelectedEntry

void setSelectedEntry(String selectedEntry)
Sets selected entry used in add/remove methods


getSelectedEntries

List<String> getSelectedEntries()
Returns selected entries used in add/remove methods


setSelectedEntries

void setSelectedEntries(List<String> selectedEntries)
Sets selected entries used in add/remove methods


Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.