Fluent builder for creating a new Organisation, produced by newOrganisationBuilder(). Set the properties needed for the new organisation (org id, title, contact and address details, org types and their extra field values) then call build() to create it as a child of the current account or of an explicit parent org.

Group: Builders


Methods

orgId(String orgId) · title(String title) · email(String email) · phone(String phone) · parentOrg(Organisation parentOrg) · orgTypes(List<OrgType> orgTypes) · address(String address) · addressLine2(String addressLine2) · city(String city) · addressState(String addressState) · postcode(String postcode) · country(String country) · extraFields(Map<String,String> extraFields) · build()

orgId(String orgId)

Returns: OrganisationBuilder

Sets the org id (path-safe identifier) for the new organisation. If not set, one is generated from the title.

ParameterDescription
orgIdthe org id to use

title(String title)

Returns: OrganisationBuilder

Sets the display title for the new organisation. Either title or orgId must be set before calling build().

ParameterDescription
titlethe display title to use

email(String email)

Returns: OrganisationBuilder

Sets the contact email address for the new organisation.

ParameterDescription
emailthe email address to use

phone(String phone)

Returns: OrganisationBuilder

Sets the contact phone number for the new organisation.

ParameterDescription
phonethe phone number to use

parentOrg(Organisation parentOrg)

Returns: OrganisationBuilder

Sets the parent organisation to create the new organisation under. If not set, the current account's admin organisation is used.

ParameterDescription
parentOrgthe parent organisation to use

orgTypes(List<OrgType> orgTypes)

Returns: OrganisationBuilder

Sets the organisation types to apply to the new organisation.

ParameterDescription
orgTypesthe org types to apply

address(String address)

Returns: OrganisationBuilder

Sets the first address line for the new organisation.

ParameterDescription
addressthe address line to use

addressLine2(String addressLine2)

Returns: OrganisationBuilder

Sets the second address line for the new organisation.

ParameterDescription
addressLine2the address line to use

city(String city)

Returns: OrganisationBuilder

Sets the city for the new organisation's address.

ParameterDescription
citythe city to use

addressState(String addressState)

Returns: OrganisationBuilder

Sets the state or region for the new organisation's address.

ParameterDescription
addressStatethe state or region to use

postcode(String postcode)

Returns: OrganisationBuilder

Sets the postcode for the new organisation's address.

ParameterDescription
postcodethe postcode to use

country(String country)

Returns: OrganisationBuilder

Sets the country for the new organisation's address.

ParameterDescription
countrythe country to use

extraFields(Map<String,String> extraFields)

Returns: OrganisationBuilder

Sets custom field values to apply to the new organisation, keyed by field name, matched against the extra fields defined on the org types being applied.

ParameterDescription
extraFieldsthe custom field values to apply

build()

Returns: Organisation

Creates the organisation described by this builder: generates an org id from the title if none was set, creates it as a child of the configured parent (or the current account), applies contact and address details, applies the configured org types and their extra field values, and saves it.

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