Chapter 9. Organization API

9.1. Organization API

The exo.platform.services.organization package has five main components:
User
The User component contains basic information about a user; such as username, password, first name, last name, and email address.
User Profile
The User Profile component contains extra information about a user, such as user's personal information, and business information. You can also add additional information about a user if your application requires it.
Group
The Group component contains a group graph.
Membership Type
The Membership Type component contains a list of predefined membership types.
Membership
The Membership component connects a User, a Group and a Membership Type.
A user can have one or more memberships within a group. For example: User A can have the 'member' and 'admin' memberships in group /user. A user belongs to a group if he has at least one membership in that group.
The OrganizationService component is an additional component that serves as an entry point into the Organization API. It provides handling functionality for the five components.
Diagram describing the handler objects accessible by the OrganizationService component, which are described in the following paragraph.

Figure 9.1. Handler Objects Accessible by the OrganizationService Component

By exposing the Organization API, the OrganizationService component provides developers with access to handler objects for managing each of the five components:
  • UserHandler
  • UserProfileHandler
  • GroupHandler
  • MembershipTypeHandler
  • MembershipHandler
The five central API components are designed to be similar to persistent entities and handlers are specified similarly to data access objects (DAO).
Organization API simply describes a contract, meaning it is not a concrete implementation. The described components are interfaces, allowing for different concrete implementations. In practical terms the existing implementation can be replaced with a different one.