To get full access to the Kademi Hub existing customers can login here, or new customers can register here.
Represents an organisation, and allows access to information about members of that organisation You can get the OrgData for the organisation which owns the current website in templating with the orgData property of the WebsiteRootFolder eg $page.find("/").orgData You can also get the OrgData object for a user's membership And once you have an OrgData, if it contains child organisations then you can use the childOrgs and allSubOrgs methods on the OrgData object to get them
Extends: EntityBean
Properties
| Name | Returns | Notes |
|---|---|---|
| address | String | |
| addressLine2 | String | |
| addressState | String | |
| adminDomain | boolean | |
| city | String | |
| country | String | |
String | ||
| entityName | String | |
| fields | Map<String,String> | Get a map of fields, keyed on the field name and with the field value |
| formattedName | String | |
| hasPrimaryMembers | boolean | If this organisation has at least one primary memberships |
| hasPrimaryMembers | boolean | If this organisation has at least one primary memberships |
| id | long | |
| lat | Double | |
| lng | Double | |
| orgId | String | |
| orgTypeDisplayName | String | |
| orgTypeName | String | |
| parent | OrgData | Returns the parent organisation of this organisation, unless this organisation is the owner of the current website, in which case it returns null |
| phone | String | |
| photoHash | String | |
| postcode | String | |
| selectedOrgTypes | List<OrgTypeBean> | |
| state | String | |
| timezone | String | |
| title | String |
Methods
| Signature | Returns | Notes |
|---|---|---|
members(String groupName) | MembershipList | Get a list of MembershipBean of the given group |
primaryMembers() | MembershipList | Get all primary MembershipBean's of this organisation |
childOrgs() | OrgDataList | Returns only direct child organisations, ie organisations where the parent is this organisation |
findChildOrgByField(String fieldName, String value) | OrgData | Find a child org with a matching custom field |
childOrg(String orgId) | OrgData | |
childOrg(long orgId) | OrgData | |
allSubOrgs(String orgType) | OrgDataList | Returns all subordinate organisations, ie child organisations and their child orgs, and so |
findProfile(String emailOrName) | ExtProfileBean | |
findMembershipByField(String groupName, String fieldName, String value, boolean contains) | MembershipBean | This will only locate members directly connected to this organisation |
findChildMembershipByField(String groupName, String fieldName, Object ovalue, boolean contains) | MembershipBean | Locate any membership inside this root organisation with the given field name and value for the given group |
hasMembership(String userId, String groupName) | boolean | Checks if a user has a membership to a group |
createMembership(String userId, String email, String orgId, String groupName) | MembershipBean | Creates a new membership, or returns an existing one, for a profile. Will create the profile if it does not exist. |
updateMembership(ProfileBean profile, String groupName, OrgData withinOrg, Map<Object,Object> fieldValues) | void | |
createMembership(String userId, String email, OrgData orgDataToJoin, String groupName) | MembershipBean | |
getOrCreateChildOrg(String newOrgId, String orgTitle, String orgType) | OrgData | Create a new child organisation or return one if it already exists, by looking up the orgID |
updateOrg(Map<String,String> parameters) | JsonResult | Update organisation info e.g. lat/lng, address, etc |
createGroup(String name, String title, String groupType, String regoMode) | Group | |
createGroup(String name) | Group | Deprecated, use GroupManager instead |
withinOrg() | Organisation |