jsdav-ext
Version:
jsDAV allows you to easily add WebDAV support to a NodeJS application. jsDAV is meant to cover the entire standard, and attempts to allow integration using an easy to understand API.
34 lines (31 loc) • 1.13 kB
JavaScript
/*
* @package jsDAV
* @subpackage DAV
* @copyright Copyright(c) 2013 Mike de Boer. <info AT mikedeboer DOT nl>
* @author Mike de Boer <info AT mikedeboer DOT nl>
* @license http://github.com/mikedeboer/jsDAV/blob/master/LICENSE MIT License
*/
;
var jsDAVACL_AbstractPrincipalCollection = require("./abstractPrincipalCollection");
var jsDAVACL_Principal = require("./principal");
/**
* Principals Collection
*
* This collection represents a list of users.
* The users are instances of jsDAVACL_Principal
*/
var jsDAVACL_PrincipalCollection = module.exports = jsDAVACL_AbstractPrincipalCollection.extend({
/**
* This method returns a node for a principal.
*
* The passed array contains principal information, and is guaranteed to
* at least contain a uri item. Other properties may or may not be
* supplied by the authentication backend.
*
* @param {Array} principal
* @return jsDAV_iNode
*/
getChildForPrincipal: function(principal) {
return jsDAVACL_Principal.new(this.principalBackend, principal);
}
});