Package com.logicaldoc.core.security

# Interface Secure<T extends AccessControlEntry>

Type Parameters:
  `T` - The exact type or `AccessControlEntry`

All Superinterfaces:
  `Serializable`

All Known Implementing Classes:
  `Document`, `DocumentNote`, `Folder`, `Hit`, `Menu`, `Template`

public interface Secure<T extends AccessControlEntry> extends Serializable
An object that implements this interface, supports an Access Control List to define security policies. Each element of the ACL is an AccessControlEntry.

Since:
  8.9.1
Author:
  Marco Meschieri - LogicalDOC

## Method Summary

Modifier and Type
Method
Description
`void`
`addAccessControlEntry(T ace)`
Adds a new entry, replacing a previous one with the same groupId.
`Set<T>`
`getAccessControlEntries(Set<Long> groupIds)`
Retrieves the set of entries related to whatever group within the specified set.
`AccessControlEntry`
`getAccessControlEntry(long groupId)`
`Set<T>`
`getAccessControlList()`
`void`
`removeAccessControlEntries(long groupId)`
Removes all the ACEs related to the given group.
`void`
`setAccessControlList(Set<T> acl)`

## Method Details

### setAccessControlList

void setAccessControlList(Set<T> acl)

### getAccessControlList

Set<T> getAccessControlList()

### getAccessControlEntry

AccessControlEntry getAccessControlEntry(long groupId)

### getAccessControlEntries

Set<T> getAccessControlEntries(Set<Long> groupIds)
Retrieves the set of entries related to whatever group within the specified set.

Parameters:
  `groupIds` - identifiers of groups
Returns:
  The set of matching entries

### addAccessControlEntry

void addAccessControlEntry(T ace)
Adds a new entry, replacing a previous one with the same groupId.

Parameters:
  `ace` - the access control entry to add

### removeAccessControlEntries

void removeAccessControlEntries(long groupId)
Removes all the ACEs related to the given group.

Parameters:
  `groupId` - Identifier of the group