Constructor
new (require("store/Group"))(entryURI, resourceURI, entryStore)
Parameters:
Name | Type | Description |
---|---|---|
entryURI |
string | URI to an entry where this resource is contained. |
resourceURI |
string | URI to the resource. |
entryStore |
EntryStore | the API's repository instance. |
Methods
getHomeContext() → {string}
Get the home context for this user.
Returns:
- a context id (not the full resource URI).
- Type
- string
getName() → {string}
Get the name of the group, this is a a unique name (username) in the current repository's _principals context.
Returns:
- Type
- string
setHomeContext(contextId, doNotPushToRepository) → {Promise.<EntryInfo>|undefined}
Set a new home context for this group. Note that the home context is stored in the entryinformation, hence, all other changes made to the entryinformation will be saved unless the doNotPushToRepository flag is set to true.
Parameters:
Name | Type | Description |
---|---|---|
contextId |
string | a context id (not the full resource URI). |
doNotPushToRepository |
boolean | if true the changes will be made in the entryinformation but it will not be pushed to the respository. To do this you need to get a hold of the entryinformation and call commit. |
Returns:
- Type
- Promise.<EntryInfo> | undefined
setName(name) → {Promise}
Set a new name of the group, it will not succeed if it is already in use, for instance by another user or group.
Parameters:
Name | Type | Description |
---|---|---|
name |
string |
Returns:
- Type
- Promise