PolicyEntry class

A specific Policy for one Entry in the directory or repository.

A policy consists of PolicyGroups and manages the access control to one specific Entry in the S3I-Directory or S3i-Repository. For more background information see: https://www.eclipse.org/ditto/basic-policy.html

In the S3I-Concept there are two special PolicyGroups which have a specific meaning:

  • owner: An owner has READ and WRITE permission to everything (thing:/, policy:/, message:/)
  • observer: An observer has only READ permission to the thing part (thing:/)

Constructors

PolicyEntry(String id, {Map<String, PolicyGroup>? entryGroups})
Creates a PolicyEntry with the given id and entryGroups.
PolicyEntry.fromJson(Map<String, dynamic> map)
Returns a PolicyEntry with groups (subjects and resources) specified in the map.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
id String
The unique identifier of this entry.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

deleteGroup(String name) PolicyGroup?
Removes name and its associated PolicyGroup from _groups.
getAllObservers() Map<String, PolicySubject>
Returns a map of PolicySubjects who are in the special group observer.
getAllOwners() Map<String, PolicySubject>
Returns a map of PolicySubjects who are in the special group owner.
getGroup(String name) PolicyGroup
Returns the PolicyGroup in _groups matching name.
getGroups() Map<String, PolicyGroup>
Returns the value of _groups.
insertGroup(PolicyGroup group) → void
Adds the given group to the _groups of this entry.
insertObserver(PolicySubject observer) → void
Adds the given observer to the special group observer.
insertOwner(PolicySubject owner) → void
Adds the given owner to the special group owner.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeObserver(String name) PolicySubject?
Removes name and its associated PolicySubject from the observer group.
removeOwner(String name) PolicySubject?
Removes name and its associated PolicySubject from the owner group.
toJson() Map<String, dynamic>
Returns the stored information about this PolicyEntry in a Map which could be directly used to creates a json entry.
toString() String
A string representation of this object.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

observerGroupKey → const String
The key of the special observer group.
ownerGroupKey → const String
The key of the special owner group.