Class: SCIMMY.Resources.Group

SCIM Group Resource

Summary:
  • Handles read/write/patch/dispose operations for SCIM Group resources with specified ingress/egress/degress methods.
  • Formats SCIM Group resources for transmission/consumption using the SCIMMY.Schemas.Group schema class.

Usage

Instantiate a new SCIM Group resource and parse any supplied parameters

                    
                        new SCIMMY.Resources.Group(idopt, configopt)
                    
                
Parameters:
Name Type Default Description
idopt String

the ID of the requested resource

configopt Object {}

the parameters of the resource instance request

Properties
Name Type Description
filteropt String

the filter to be applied on ingress/egress by implementing resource

excludedAttributesopt String

the comma-separated string list of attributes or filters to exclude on egress

attributesopt String

the comma-separated string list of attributes or filters to include on egress

sortByopt String

the attribute retrieved resources should be sorted by

sortOrderopt String

the direction retrieved resources should be sorted in

startIndexopt Number

offset index that retrieved resources should start from

countopt Number

maximum number of retrieved resources that should be returned in one operation

Properties:
Name Type Description
idopt String

ID of the resource instance being targeted

filteropt SCIMMY.Types.Filter

filter parsed from the supplied config

attributesopt SCIMMY.Types.Filter

attributes or excluded attributes parsed from the supplied config

constraintsopt Object

sort and pagination properties parsed from the supplied config

Properties
Name Type Description
sortByopt String

the attribute retrieved resources should be sorted by

sortOrderopt String

the direction retrieved resources should be sorted in

startIndexopt Number

offset index that retrieved resources should start from

countopt Number

maximum number of retrieved resources that should be returned in one operation

Members

Methods

(async) read(ctxopt) → {SCIMMY.Messages.ListResponse, SCIMMY.Schemas.Group}

Calls resource's egress method for data retrieval. Wraps the results in valid SCIM list response or single resource syntax.

Parameters:
Name Type Description
ctxopt *

any additional context information to pass to the egress handler

Returns:
Examples:
// Retrieve group with ID "1234"
await (new SCIMMY.Resources.Group("1234")).read();
// Retrieve groups with a group name starting with "A"
await (new SCIMMY.Resources.Group({filter: 'displayName -sw "A"'})).read();

(async) write(instance, ctxopt) → {SCIMMY.Schemas.Group}

Calls resource's ingress method for consumption after unwrapping the SCIM resource

Parameters:
Name Type Description
instance Object

the raw resource type instance for consumption by ingress method

ctxopt *

any additional context information to pass to the ingress handler

Returns:
Examples:
// Create a new group with displayName "A Group"
await (new SCIMMY.Resources.Group()).write({displayName: "A Group"});
// Set members attribute for group with ID "1234"
await (new SCIMMY.Resources.Group("1234")).write({members: [{value: "5678"}]});

(async) patch(message, ctxopt) → {SCIMMY.Schemas.Group}

Retrieves resources via egress method, and applies specified patch operations. Emits patched resources for consumption with resource's ingress method.

Parameters:
Name Type Description
message Object

the PatchOp message to apply to the received resource

ctxopt *

any additional context information to pass to the ingress/egress handlers

Returns:
Examples:
// Add member to group with ID "1234" with a patch operation (see SCIMMY.Messages.PatchOp)
await (new SCIMMY.Resources.Group("1234")).patch({Operations: [{op: "add", path: "members", value: {value: "5678"}}]});

(async) dispose(ctxopt)

Calls resource's degress method for disposal of the SCIM resource

Parameters:
Name Type Description
ctxopt *

any additional context information to pass to the degress handler

Examples:
// Delete group with ID "1234"
await (new SCIMMY.Resources.Group("1234")).dispose();