Owns the organisation (org) domain: creating, updating, deleting, searching and merging orgs, and managing the custom organisation types attached to them. Reached from Java via C(OrganisationManager.class) or the static OrganisationManager.THIS() helper, and from GraalJS controllers and Velocity templates via the exported methods below. Orgs form a tree rooted at the current account's admin organisation, and most lookups here are scoped to that tree so a tenant cannot see or modify data outside its own account.
Group: Managers
Properties
| Property | Returns | Description |
|---|---|---|
| adminOrg | Organisation | The current account's admin organisation, the root of the org tree for the tenant handling this request. |
| allLocales | List<Locale> | All locales available on the server for date formatting. |
| allOrgTypes | List<OrgType> | All organisation types defined for the current account. |
| parentId | Long | The id of the parent organisation of the current account's admin organisation, or null if the admin organisation has no parent. |
| primaryDomain | String | The primary domain of the current tenant. |
| timezoneIdList | List<String> | The list of timezone ids that can be selected for calendar events. |
Methods
getSelectedOrgTypes(Organisation org) · getParentId() · doesAdminDomainExist(String adminDomain) · accountUsage() · updateAllAccountDeps() · updateAllAccountDeps(boolean missingOnly) · updateAllAccountDeps(boolean missingOnly, Consumer<String> progress) · numMembers(Organisation org) · isWithin(Organisation selectedOrg, Organisation possibleParentOrg) · findAllParentOrgs(Organisation childOrg) · currentAdminUrl(String path, Profile loginProfile) · fullAdminDomain(String adminDomain) · adminUrl(String adminDomain, String path, Profile loginProfile) · adminUrl(Organisation adminOrg, String path, Profile loginProfile) · getAdminOrg() · newAccountBuilder() · createAccount(NewAccountBuilder b) · createAccount(String company, Profile profile) · findAdminDomain(String adminDomain) · hasOrgType(String orgTypeName, Organisation org) · findOrg(String orgId) · childOrg(Organisation org, String orgId) · childOrg(Organisation org, Long orgId) · findOrg(Long id) · findOrg(Long id, boolean includeDeletedOrg) · createOrg(Organisation parent, String orgId, String orgTitle) · newOrganisationBuilder() · updateOrg(Organisation org) · deleteOrg(Organisation org) · findDuplicates(MergeDestMode mode) · getAllLocales() · getTimezoneIdList() · mergeOrgs(Object mergeDestId, List<Object> mergeOrgIds) · addOrgType(Organisation org, OrgType orgType) · addOrgType(Organisation org, OrgType orgType, Profile triggeredProfile) · addOrgTypes(Organisation org, List<OrgType> orgTypes, Profile triggeredProfile) · removeOrgType(Organisation org, OrgType orgType) · removeOrgTypes(Organisation org, List<OrgType> orgTypes) · getOrgType(String name) · getOrgTypeExtraFields(OrgType orgType) · findOrgTypeExtraFields(OrgType orgType) · findOrgTypeExtraFieldMeta(OrgType orgType) · updateOrgExtraFields(Organisation org, List<OrgType> orgTypes, FormContext fc) · findOrgTypeById(Long orgTypeId) · findOrgTypeByName(String sOrgType) · getAllOrgTypes() · save(Organisation orgToEdit) · findOrgsByType(OrgType ot) · search(String q, Organisation organisation, OrgType orgType) · searchES(String query, List<Organisation> parentOrgs, List<OrgType> orgTypes, Boolean noOrgType, SearchProperties searchProperties, String excludedOrgId) · searchES(String query, List<Organisation> parentOrgs, List<OrgType> orgTypes, Boolean noOrgType, SearchProperties searchProperties, Boolean paging, String excludedOrgId) · findChildAccounts() · newOrgMatchRequest() · findMatchingES(OrgMatchRequest orgMatchRequest) · findMatchingES(OrgMatchRequest request, SearchProperties searchProperties) · findMatching(OrgMatchRequest request) · findMatching(OrgMatchRequest request, SearchProperties searchProperties) · newAddressBean() · findAppControls(Organisation org) · findDirectSubordinateOrgs(Organisation superordinate) · findDirectSubordinateOrgs(Organisation superordinate, int maxResult) · countDirectSubordinateOrgs(Organisation superordinate) · toOrgDataList(List<Organisation> orgs) · toOrgData(Organisation org) · getPrimaryDomain() · updateHostMappings(Organisation org) · updateHostMappings(Organisation org, boolean processApps) · createOrgType(String name, String title) · deleteOrgType(OrgType type) · createNote(String newNote, Organisation org, Profile enteredBy) · findNotes(Organisation org) · timelineItems(Organisation thisOrg) · findAuditStats(Organisation org) · findAuditItems(Organisation org, Integer max) · hasGroupInWebsite(Website website, Group group) · updateOrgTypeFields(OrgType orgType, Map<String,String> fieldsMap) · updateOrgType(OrgType orgType, FormContext context) · findOrgsById(Collection<Long> ids, Boolean enabled) · hasParent(Organisation org, String adminDomainId) · findExtraFieldNames() · findParentOrganisation(String orgId) · orgDashboardStats()
getSelectedOrgTypes(Organisation org)
Returns: List<OrgTypeBean>
The custom organisation types currently selected on the given org, read from a short-lived cache so bulk operations such as reindexing do not repeatedly hit the database for the same org.
| Parameter | Description |
|---|---|
org | the organisation whose selected org types are read |
getParentId()
Returns: Long
The id of the parent organisation of the current account's admin organisation, or null if the admin organisation has no parent.
doesAdminDomainExist(String adminDomain)
Returns: boolean
Checks whether an admin organisation exists for the given admin domain, without returning the organisation itself so tenants cannot use this to probe for orgs outside their own account.
| Parameter | Description |
|---|---|
adminDomain | the admin domain to look up |
accountUsage()
Returns: AccountUsage
Creates an AccountUsage view for the current account's admin organisation, used to report on resource usage such as content storage size.
updateAllAccountDeps()
Returns: void
Updates all apps and libs installed in the account to their latest available versions, installing any missing dependencies along the way.
updateAllAccountDeps(boolean missingOnly)
Returns: void
Updates all apps and libs installed in the account, as updateAllAccountDeps(), optionally only installing dependencies that are missing rather than upgrading ones already installed.
| Parameter | Description |
|---|---|
missingOnly | if true, only install missing dependencies, do not upgrade anything already installed |
updateAllAccountDeps(boolean missingOnly, Consumer<String> progress)
Returns: void
As updateAllAccountDeps(boolean), but reports which app is being updated as it goes. Intended for callers running this as a background task, so they can show the user the app currently being updated instead of an unqualified spinner.
| Parameter | Description |
|---|---|
missingOnly | if true, only install missing dependencies, do not upgrade anything already installed |
progress | called with a status message as each app is updated, may be null |
numMembers(Organisation org)
Returns: long
Counts the profiles that are members of the given organisation.
| Parameter | Description |
|---|---|
org | the organisation to count members of |
isWithin(Organisation selectedOrg, Organisation possibleParentOrg)
Returns: boolean
Checks whether the given organisation is, or is a descendant of, a possible parent organisation.
| Parameter | Description |
|---|---|
selectedOrg | the organisation to check |
possibleParentOrg | the organisation that may be the same org or an ancestor of selectedOrg |
findAllParentOrgs(Organisation childOrg)
Returns: List<Long>
Finds the ids of every ancestor organisation of the given org, from its immediate parent up to the current account's admin organisation.
| Parameter | Description |
|---|---|
childOrg | the organisation whose ancestors are found |
currentAdminUrl(String path, Profile loginProfile)
Returns: String
Builds an admin URL under the current account's admin domain, for the given path.
| Parameter | Description |
|---|---|
path | the path to append to the admin domain |
loginProfile | the profile to build the URL for, may affect the domain used, may be null |
fullAdminDomain(String adminDomain)
Returns: String
Expands a short admin domain name to its full public hostname.
| Parameter | Description |
|---|---|
adminDomain | the short admin domain name |
adminUrl(String adminDomain, String path, Profile loginProfile)
Returns: String
Builds an admin URL under the given admin domain, for the given path.
| Parameter | Description |
|---|---|
adminDomain | the admin domain to build the URL under |
path | the path to append to the admin domain |
loginProfile | the profile to build the URL for, may affect the domain used, may be null |
adminUrl(Organisation adminOrg, String path, Profile loginProfile)
Returns: String
Builds an admin URL under the given admin organisation's domain, for the given path.
| Parameter | Description |
|---|---|
adminOrg | the admin organisation to build the URL under |
path | the path to append to the admin domain |
loginProfile | the profile to build the URL for, may affect the domain used, may be null |
getAdminOrg()
Returns: Organisation
The current account's admin organisation, the root of the org tree for the tenant handling this request.
newAccountBuilder()
Returns: NewAccountBuilder
Deprecated - use AccountManager instead. Creates a new NewAccountBuilder for building a new account.
createAccount(NewAccountBuilder b)
Returns: Organisation
Deprecated - use AccountManager instead. Creates the account described by the builder, and if the builder has no profile set, creates an admin profile for it and sets that profile on the builder.
| Parameter | Description |
|---|---|
b | the builder describing the account to create |
createAccount(String company, Profile profile)
Returns: Organisation
Deprecated - use AccountManager instead. Creates a new account organisation for the given company name.
| Parameter | Description |
|---|---|
company | the company/organisation title for the new account |
profile | the profile to associate with the new account |
findAdminDomain(String adminDomain)
Returns: String
Deprecated - use AccountManager instead. Looks up the canonical admin domain matching the given value.
| Parameter | Description |
|---|---|
adminDomain | the admin domain to look up |
hasOrgType(String orgTypeName, Organisation org)
Returns: boolean
Checks whether the given organisation has the named organisation type set on it.
| Parameter | Description |
|---|---|
orgTypeName | the name of the org type to check for |
org | the organisation to check |
findOrg(String orgId)
Returns: Organisation
Finds an organisation within the current account by its org id (the path-safe identifier, not its database id). Returns null if orgId is blank or no match is found.
| Parameter | Description |
|---|---|
orgId | the org id to look up |
childOrg(Organisation org, String orgId)
Returns: Organisation
Finds a child organisation of the given org by its org id.
| Parameter | Description |
|---|---|
org | the organisation to search within |
orgId | the org id of the child to find |
childOrg(Organisation org, Long orgId)
Returns: Organisation
Finds a child organisation of the given org by its database id.
| Parameter | Description |
|---|---|
org | the organisation to search within |
orgId | the database id of the child to find |
findOrg(Long id)
Returns: Organisation
Finds an organisation within the current account by its database id, including soft-deleted organisations.
| Parameter | Description |
|---|---|
id | the database id of the organisation to find |
findOrg(Long id, boolean includeDeletedOrg)
Returns: Organisation
Finds an organisation within the current account by its database id.
| Parameter | Description |
|---|---|
id | the database id of the organisation to find |
includeDeletedOrg | if true, a soft-deleted organisation is still returned; if false, null is returned for a soft-deleted match |
createOrg(Organisation parent, String orgId, String orgTitle)
Returns: Organisation
Creates the new org as a child of the given parent (if not null, otherwise creates directly under the current account org), and submits it for reindexing.
| Parameter | Description |
|---|---|
parent | the parent organisation, or null to create directly under the current account org |
orgId | the org id for the new organisation |
orgTitle | the display title for the new organisation |
newOrganisationBuilder()
Returns: OrganisationBuilder
Creates a new OrganisationBuilder, a convenient fluent way to build and create a new organisation. Set properties on the builder and then call its build() method to create the organisation.
updateOrg(Organisation org)
Returns: void
Saves changes to the given organisation, stamping its modified date and modifying profile, then submits it for reindexing.
| Parameter | Description |
|---|---|
org | the organisation to save |
deleteOrg(Organisation org)
Returns: void
Soft-deletes the given organisation and submits it for reindexing so it drops out of search results.
| Parameter | Description |
|---|---|
org | the organisation to delete |
findDuplicates(MergeDestMode mode)
Returns: List<DuplicateList>
Finds groups of organisations within the current account that share the same title, for review before merging with mergeOrgs(Object, List).
| Parameter | Description |
|---|---|
mode | how the preferred merge destination within each duplicate group is chosen |
getAllLocales()
Returns: List<Locale>
All locales available on the server for date formatting.
getTimezoneIdList()
Returns: List<String>
The list of timezone ids that can be selected for calendar events.
mergeOrgs(Object mergeDestId, List<Object> mergeOrgIds)
Returns: int
Merges each of the given organisations into a single destination organisation: moves supplied products, group memberships, org types, sales data records, points, points debits, leads and subscriptions from each source org to the destination, then soft-deletes the source org. An organisation that is itself an admin domain cannot be merged away.
| Parameter | Description |
|---|---|
mergeDestId | the id (as a Long or a value convertible to one) of the organisation to merge into |
mergeOrgIds | the ids of the organisations to merge into the destination and then delete |
addOrgType(Organisation org, OrgType orgType)
Returns: void
Adds an organisation type to the given organisation and fires an OrganisationTaggedEvent for the current profile.
| Parameter | Description |
|---|---|
org | the organisation to tag |
orgType | the org type to add |
addOrgType(Organisation org, OrgType orgType, Profile triggeredProfile)
Returns: void
Adds an organisation type to the given organisation and fires an OrganisationTaggedEvent for the given profile.
| Parameter | Description |
|---|---|
org | the organisation to tag |
orgType | the org type to add |
triggeredProfile | the profile the OrganisationTaggedEvent is attributed to |
addOrgTypes(Organisation org, List<OrgType> orgTypes, Profile triggeredProfile)
Returns: void
Adds each of the given organisation types to the given organisation, firing an OrganisationTaggedEvent for the given profile for every type added. A null org or an empty or null orgTypes list is ignored, with a warning logged.
| Parameter | Description |
|---|---|
org | the organisation to tag |
orgTypes | the org types to add |
triggeredProfile | the profile the OrganisationTaggedEvent is attributed to |
removeOrgType(Organisation org, OrgType orgType)
Returns: void
Removes an organisation type from the given organisation.
| Parameter | Description |
|---|---|
org | the organisation to untag |
orgType | the org type to remove |
removeOrgTypes(Organisation org, List<OrgType> orgTypes)
Returns: void
Removes each of the given organisation types from the given organisation. An empty or null orgTypes list is ignored, with a warning logged.
| Parameter | Description |
|---|---|
org | the organisation to untag |
orgTypes | the org types to remove |
getOrgType(String name)
Returns: OrgType
Looks up an organisation type of the current account by its name.
| Parameter | Description |
|---|---|
name | the name of the org type to look up |
getOrgTypeExtraFields(OrgType orgType)
Returns: Map<ExtraField,String>
Deprecated - use findOrgTypeExtraFields instead. Returns the extra field metadata defined for the given org type, keyed by the parsed ExtraField.
| Parameter | Description |
|---|---|
orgType | the org type whose extra field metadata is read |
findOrgTypeExtraFields(OrgType orgType)
Returns: List<ExtraField>
Finds the extra (custom) field definitions attached to the given org type's fieldset.
| Parameter | Description |
|---|---|
orgType | the org type whose extra fields are read |
findOrgTypeExtraFieldMeta(OrgType orgType)
Returns: Map<String,String>
Returns the raw extra field metadata for the given org type, as formatted text, keyed on the field name.
| Parameter | Description |
|---|---|
orgType | the org type whose extra field metadata is read |
updateOrgExtraFields(Organisation org, List<OrgType> orgTypes, FormContext fc)
Returns: void
Saves new custom field values for the given organisation, reading each field's value from the given form context where present and otherwise keeping its existing value.
| Parameter | Description |
|---|---|
org | the organisation to save custom field values to |
orgTypes | the org types whose extra fields are considered |
fc | a FormContext with user-entered parameters |
findOrgTypeById(Long orgTypeId)
Returns: OrgType
Looks up an organisation type of the current account by its database id.
| Parameter | Description |
|---|---|
orgTypeId | the database id of the org type to look up |
findOrgTypeByName(String sOrgType)
Returns: OrgType
Looks up an organisation type of the current account by its name.
| Parameter | Description |
|---|---|
sOrgType | the name of the org type to look up |
getAllOrgTypes()
Returns: List<OrgType>
All organisation types defined for the current account.
save(Organisation orgToEdit)
Returns: void
Saves changes to the given organisation and fires an indexed-item-updated event so the search index is refreshed.
| Parameter | Description |
|---|---|
orgToEdit | the organisation to save |
findOrgsByType(OrgType ot)
Returns: List<Organisation>
Finds non-soft-deleted organisations that have the given org type.
| Parameter | Description |
|---|---|
ot | the org type to match, if null an empty list is returned |
search(String q, Organisation organisation, OrgType orgType)
Returns: List<Organisation>
Finds organisations matching the given free-text query, optionally scoped to a parent organisation and org type.
| Parameter | Description |
|---|---|
q | the free-text search query |
organisation | the parent organisation to scope results to, may be null |
orgType | the org type to scope results to, may be null |
searchES(String query, List<Organisation> parentOrgs, List<OrgType> orgTypes, Boolean noOrgType, SearchProperties searchProperties, String excludedOrgId)
Returns: KSearchResponse
Standard search method for finding orgs in Elasticsearch, with paging enabled.
| Parameter | Description |
|---|---|
query | free text search string, supports field:value and -field:value syntax |
parentOrgs | if provided, only matches orgs with at least one of these as a parent |
orgTypes | if provided, only matches orgs with at least one of these types |
noOrgType | if true, only matches orgs which do not have any organisation type |
searchProperties | paging and sort order |
excludedOrgId | if provided, excludes the org with this org id from the results |
searchES(String query, List<Organisation> parentOrgs, List<OrgType> orgTypes, Boolean noOrgType, SearchProperties searchProperties, Boolean paging, String excludedOrgId)
Returns: KSearchResponse
Standard search method for finding orgs in Elasticsearch.
| Parameter | Description |
|---|---|
query | free text search string, supports field:value and -field:value syntax |
parentOrgs | if provided, only matches orgs with at least one of these as a parent |
orgTypes | if provided, only matches orgs with at least one of these types |
noOrgType | if true, only matches orgs which do not have any organisation type |
searchProperties | paging and sort order |
paging | whether to apply Elasticsearch paging to the request |
excludedOrgId | if provided, excludes the org with this org id from the results |
findChildAccounts()
Returns: Map<Long,String>
Finds all child accounts (organisations with their own admin domain) within the current tenant organisation.
newOrgMatchRequest()
Returns: OrgMatchRequest
Creates a new, empty OrgMatchRequest for building up search criteria to pass to findMatching or findMatchingES.
findMatchingES(OrgMatchRequest orgMatchRequest)
Returns: List<Organisation>
Uses Elasticsearch to find organisations matching the criteria in the given OrgMatchRequest.
| Parameter | Description |
|---|---|
orgMatchRequest | the search criteria |
findMatchingES(OrgMatchRequest request, SearchProperties searchProperties)
Returns: List<Organisation>
Uses Elasticsearch to find organisations matching the criteria in the given OrgMatchRequest.
| Parameter | Description |
|---|---|
request | the search criteria |
searchProperties | pagination and sort order, may be null |
findMatching(OrgMatchRequest request)
Returns: List<Organisation>
Uses the database (Hibernate criteria) to find organisations matching the given criteria.
| Parameter | Description |
|---|---|
request | the search criteria |
findMatching(OrgMatchRequest request, SearchProperties searchProperties)
Returns: List<Organisation>
Uses the database (Hibernate criteria) to find organisations matching the given criteria, with optional paging and sort order.
| Parameter | Description |
|---|---|
request | the search criteria |
searchProperties | paging and sort order, may be null |
newAddressBean()
Returns: AddressBean
Creates a new, empty AddressBean.
findAppControls(Organisation org)
Returns: List<AppControl>
Finds the app control records for the given organisation, provided it is within the current tenant.
| Parameter | Description |
|---|---|
org | the organisation whose app controls are found |
findDirectSubordinateOrgs(Organisation superordinate)
Returns: List<Organisation>
Finds organisations that are logically subordinate to the given superordinate org, up to a default limit of 40 results. An org is a direct subordinate if its parent org is the superordinate org, or if it has a custom field of type orgselector referring to the superordinate org.
| Parameter | Description |
|---|---|
superordinate | the organisation to find subordinates of |
findDirectSubordinateOrgs(Organisation superordinate, int maxResult)
Returns: List<Organisation>
Finds organisations that are logically subordinate to the given superordinate org, up to the given limit. An org is a direct subordinate if its parent org is the superordinate org, or if it has a custom field of type orgselector referring to the superordinate org.
| Parameter | Description |
|---|---|
superordinate | the organisation to find subordinates of |
maxResult | the maximum number of results to return |
countDirectSubordinateOrgs(Organisation superordinate)
Returns: long
Counts the organisations that are logically subordinate to the given superordinate org. An org is a direct subordinate if its parent org is the superordinate org, or if it has a custom field of type orgselector referring to the superordinate org.
| Parameter | Description |
|---|---|
superordinate | the organisation to count subordinates of |
toOrgDataList(List<Organisation> orgs)
Returns: List<OrgData>
Converts a list of organisations to a list of OrgData beans.
| Parameter | Description |
|---|---|
orgs | the organisations to convert, may be null |
toOrgData(Organisation org)
Returns: OrgData
Converts a single organisation to an OrgData bean.
| Parameter | Description |
|---|---|
org | the organisation to convert |
getPrimaryDomain()
Returns: String
The primary domain of the current tenant.
updateHostMappings(Organisation org)
Returns: void
Rebuilds the host mappings (hostnames routed to this org's cluster) for the given admin organisation, including hostnames contributed by other apps.
| Parameter | Description |
|---|---|
org | the admin organisation to rebuild host mappings for |
updateHostMappings(Organisation org, boolean processApps)
Returns: void
Rebuilds the host mappings (hostnames routed to this org's cluster) for the given admin organisation: collects the admin domain, website and branch domains, and optionally domains contributed by other apps such as CloudFront, then creates, updates or removes HostMapping records to match. Throws if org is not an admin organisation.
| Parameter | Description |
|---|---|
org | the admin organisation to rebuild host mappings for |
processApps | if true, also collect hostnames from apps implementing HostnameProviderApplication and remove stale host mappings that no longer match any known hostname |
createOrgType(String name, String title)
Returns: OrgType
Creates a new organisation type on the current account, with the given name and display title.
| Parameter | Description |
|---|---|
name | the machine-safe name of the new org type |
title | the display title of the new org type |
deleteOrgType(OrgType type)
Returns: boolean
Safely deletes an organisation type: refuses if any active organisation still has the type, unlinks it from any soft-deleted organisations and groups that reference it, then removes it from the account.
| Parameter | Description |
|---|---|
type | the org type to delete |
createNote(String newNote, Organisation org, Profile enteredBy)
Returns: LeadNote
Creates a note attached to the specified org.
| Parameter | Description |
|---|---|
newNote | the text to save in the note |
org | the organisation to attach the note to |
enteredBy | the current user entering the note, required |
findNotes(Organisation org)
Returns: List<LeadNote>
Finds all notes created for the specified org.
| Parameter | Description |
|---|---|
org | the organisation whose notes are found |
timelineItems(Organisation thisOrg)
Returns: List<StreamEventBean>
Builds a combined activity timeline for the given org by asking every active ManageProfileApplication to contribute its own org actions, then sorting the combined list newest first and capping it at 300 items.
| Parameter | Description |
|---|---|
thisOrg | the organisation to build the timeline for |
findAuditStats(Organisation org)
Returns: Map<Date,Integer>
Counts audit changes recorded for the given org, grouped by the start of the day each change occurred on, over the most recent 1000 audit items.
| Parameter | Description |
|---|---|
org | the organisation whose audit history is examined |
findAuditItems(Organisation org, Integer max)
Returns: List<AuditItem>
Finds the most recent audit items recorded for the given org, in the current tenant.
| Parameter | Description |
|---|---|
org | the organisation whose audit items are found |
max | the maximum number of items to return, capped at 1000, defaults to 1000 if null |
hasGroupInWebsite(Website website, Group group)
Returns: boolean
Checks whether the given group has access to the given website.
| Parameter | Description |
|---|---|
website | the website to check |
group | the group to check |
updateOrgTypeFields(OrgType orgType, Map<String,String> fieldsMap)
Returns: void
Replaces the extra field values stored on the given org type's fieldset with the given values, creating a new fieldset only if the values actually changed.
| Parameter | Description |
|---|---|
orgType | the org type whose fieldset is updated |
fieldsMap | the new field name to value pairs |
updateOrgType(OrgType orgType, FormContext context)
Returns: OrgType
Updates an org type's fields from a form context, using reflection-based bean population.
| Parameter | Description |
|---|---|
orgType | the org type to update |
context | the form context supplying new field values |
findOrgsById(Collection<Long> ids, Boolean enabled)
Returns: List<Organisation>
Finds organisations with the given ids, using multiple queries in batches of 200 where necessary. Only matches organisations that are within the current tenant org.
| Parameter | Description |
|---|---|
ids | the database ids to look up |
enabled | if true, only enabled (not soft-deleted) orgs are returned; if false, only deleted orgs are returned; if null, both are returned |
hasParent(Organisation org, String adminDomainId)
Returns: boolean
Checks whether the given org has an ancestor whose admin domain matches the given value.
| Parameter | Description |
|---|---|
org | the organisation to check, may be null |
adminDomainId | the admin domain to match against an ancestor |
findExtraFieldNames()
Returns: List<String>
Finds the distinct extra (custom) field names defined across all of the current account's organisation types, sorted alphabetically.
findParentOrganisation(String orgId)
Returns: Organisation
Finds the parent organisation of the organisation identified by the given org id.
| Parameter | Description |
|---|---|
orgId | the org id of the organisation whose parent is found |
orgDashboardStats()
Returns: OrgDashboardStats
Aggregate usage counts for the current account's dashboard: total organisations, profiles and groups. Results are cached briefly per admin organisation.