Common contract for the top-level resource that anchors an organisation or website branch to a domain, implemented by OrganisationRootFolder and WebsiteRootFolder. The current instance for a request is located via CurrentRootFolderService and cached for the lifetime of that request. It provides organisation and website lookups, org type management, and translation/language selection for whatever is rooted at this folder.
Group: Resources
Extends: CommonCollectionResource
Properties
| Property | Returns | Description |
|---|---|---|
| attributes | Map<String,Object> | A scratch map for stashing arbitrary values against this root folder, for the lifetime of the request or session that holds it. |
| domainName | String | The domain name that can be used to locate this root folder via the resource factory. |
| emailAddress | String | The email address to use as the sender when sending emails on behalf of this root folder. |
| id | String | Identifier for this root folder, used as a cache key and for building urls that identify it in other contexts such as administration. |
| languages | List<Language> | The languages configured for translation in this root folder, as reported by TranslationService. |
| orgData | OrgData | The organisation-level data record associated with this root folder. |
| requiresHttps | boolean | Whether requests to this root folder must be served over HTTPS. |
| selectedLangCode | String | The language code currently selected for the request, as determined by TranslationService. |
| selectedLanguage | Language | The Language matching the currently selected language code, looked up from getLanguages. |
| usersFolder | UsersFolder | The folder that manages the users belonging to this root folder's organisation. |
Methods
findEntity(Profile user) · getAttributes() · getId() · getEmailAddress() · isRequiresHttps() · getDomainName() · getOrgData() · getSelectedLangCode() · getSelectedLanguage() · getLanguages() · childOrg(long id) · childOrg(String orgId) · findOrgType(String name) · addOrgType(String orgId, String orgType) · createOrgType(String name, String title) · removeOrgType(String orgId, String orgType) · findWebsite(long id) · findWebsite(String name) · getUsersFolder()
findEntity(Profile user)
Returns: PrincipalResource
Locates the resource representing the given profile - a user, group or organisation - within this folder.
| Parameter | Description |
|---|---|
user | the profile to find a resource for |
getAttributes()
Returns: Map<String,Object>
A scratch map for stashing arbitrary values against this root folder, for the lifetime of the request or session that holds it.
getId()
Returns: String
Identifier for this root folder, used as a cache key and for building urls that identify it in other contexts such as administration.
getEmailAddress()
Returns: String
The email address to use as the sender when sending emails on behalf of this root folder.
isRequiresHttps()
Returns: boolean
Whether requests to this root folder must be served over HTTPS.
getDomainName()
Returns: String
The domain name that can be used to locate this root folder via the resource factory.
getOrgData()
Returns: OrgData
The organisation-level data record associated with this root folder.
getSelectedLangCode()
Returns: String
The language code currently selected for the request, as determined by TranslationService.
getSelectedLanguage()
Returns: Language
The Language matching the currently selected language code, looked up from getLanguages.
getLanguages()
Returns: List<Language>
The languages configured for translation in this root folder, as reported by TranslationService.
childOrg(long id)
Returns: Organisation
Locates a descendant organisation of this root folder's organisation by its internal Kademi id.
| Parameter | Description |
|---|---|
id | the internal id of the organisation to find |
childOrg(String orgId)
Returns: Organisation
Locates a descendant organisation of this root folder's organisation by its external org id.
| Parameter | Description |
|---|---|
orgId | the external org id of the organisation to find |
findOrgType(String name)
Returns: OrgType
Finds an org type with the given name, searching this root folder's organisation and then its ancestors.
| Parameter | Description |
|---|---|
name | the name of the org type to find |
addOrgType(String orgId, String orgType)
Returns: void
Adds an existing org type to the organisation identified by orgId, a child of this root folder's organisation, and fires an indexed-item-updated event for it.
| Parameter | Description |
|---|---|
orgId | the external org id of the organisation to update |
orgType | the name of the org type to add |
createOrgType(String name, String title)
Returns: OrgType
Creates and persists a new org type on this root folder's organisation, and fires an indexed-item-updated event for it.
| Parameter | Description |
|---|---|
name | the name of the org type to create |
title | the display name for the new org type |
removeOrgType(String orgId, String orgType)
Returns: void
Removes an org type from the organisation identified by orgId, a child of this root folder's organisation, and fires an indexed-item-updated event for it.
| Parameter | Description |
|---|---|
orgId | the external org id of the organisation to update |
orgType | the name of the org type to remove |
findWebsite(long id)
Returns: Website
Finds a website of this root folder's organisation by its internal id.
| Parameter | Description |
|---|---|
id | the internal id of the website to find |
findWebsite(String name)
Returns: Website
Finds a website of this root folder's organisation by its name.
| Parameter | Description |
|---|---|
name | the name of the website to find |
getUsersFolder()
Returns: UsersFolder
The folder that manages the users belonging to this root folder's organisation.