Class: DirectoryEntry

DirectoryEntry(entry, opts)

The DirectoryEntry class wraps a directory entry.

Cannot directly be instantiated

Constructor

new DirectoryEntry(entry, opts)

Creates a DirectoryEntry.

Parameters:
Name Type Description
entry object

The initial entry object.
This DirectoryEntry object will be extended with entry properties.

opts object

The configuration options.

Properties
Name Type Description
directory string

The Directory object linked to this entry.

Source:

Methods

get(propertyName) → {DirectoryEntry}

Gets an entry property.

Parameters:
Name Type Description
propertyName string

The property name, such as 'label', 'ordering', ...

Source:
Returns:
Type
DirectoryEntry

save(optsopt) → {Promise}

Saves the entry. It updates only the 'dirty properties' set through the DirectoryEntry#set method.

Parameters:
Name Type Attributes Description
opts object <optional>

Options overriding the ones from this object.

Source:
Returns:

A promise object resolved with the updated entry.

Type
Promise

set(properties) → {DirectoryEntry}

Sets entry properties.

Parameters:
Name Type Description
properties object

The properties to set.

Source:
Returns:
Type
DirectoryEntry
Example
entry.set({
  'label': 'new label',
  'ordering': 50,
});