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

PropertyReturnsDescription
attributesMap<String,Object>A scratch map for stashing arbitrary values against this root folder, for the lifetime of the request or session that holds it.
domainNameStringThe domain name that can be used to locate this root folder via the resource factory.
emailAddressStringThe email address to use as the sender when sending emails on behalf of this root folder.
idStringIdentifier for this root folder, used as a cache key and for building urls that identify it in other contexts such as administration.
languagesList<Language>The languages configured for translation in this root folder, as reported by TranslationService.
orgDataOrgDataThe organisation-level data record associated with this root folder.
requiresHttpsbooleanWhether requests to this root folder must be served over HTTPS.
selectedLangCodeStringThe language code currently selected for the request, as determined by TranslationService.
selectedLanguageLanguageThe Language matching the currently selected language code, looked up from getLanguages.
usersFolderUsersFolderThe 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.

ParameterDescription
userthe 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.

ParameterDescription
idthe 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.

ParameterDescription
orgIdthe 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.

ParameterDescription
namethe 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.

ParameterDescription
orgIdthe external org id of the organisation to update
orgTypethe 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.

ParameterDescription
namethe name of the org type to create
titlethe 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.

ParameterDescription
orgIdthe external org id of the organisation to update
orgTypethe 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.

ParameterDescription
idthe internal id of the website to find

findWebsite(String name)

Returns: Website

Finds a website of this root folder's organisation by its name.

ParameterDescription
namethe name of the website to find

getUsersFolder()

Returns: UsersFolder

The folder that manages the users belonging to this root folder's organisation.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.