<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-APIs-Organization_API">
	<title>Organization API</title>
	<para>
		The
		<emphasis>exo.platform.services.organization</emphasis>
		package has five main components: user, user profile, group,
		membership type and membership.
		There is an additional component that serves as an entry point into
		Organization API -
		<emphasis>OrganizationService</emphasis>
		component
		that provides the handling functionality for the five components.
	</para>
	<para>
		<mediaobject>
			<imageobject role="html">
				<imagedata fileref="images/AuthenticationAndIdentity/OrganizationServiceClassDiagram.png" format="PNG" align="center"/>
			</imageobject>
			<imageobject role="fo">
				<imagedata fileref="images/AuthenticationAndIdentity/OrganizationServiceClassDiagram.png" scalefit="1" format="PNG" align="center"/>
			</imageobject>
		</mediaobject>
	</para>
	<para>
		The
		<emphasis>User</emphasis>
		component contains basic information about the user, such as
		username, password, first name, last name, and email. The
		<emphasis>User Profile</emphasis>
		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.
		The
		<emphasis>Group</emphasis>
		component contains a group graph. The
		<emphasis>Membership Type</emphasis>
		component
		contains a list of predefined membership types.
		Finally, the
		<emphasis>Membership</emphasis>
		component connects a User, a Group and a Membership Type.
	</para>
	<para>
		A user can have one or more memberships within a group, for example:
		the user A can have two memberships: 'member' and 'admin' in the group /user.
		A user belongs to a group if he has at least one membership in that
		group.
      </para>
	<para>
		Exposing the Organization API to developers who have access to the handler objects provided by the OrganizationService component. These handler objects are used to manage each of the five components, including <emphasis>UserHandler</emphasis>, <emphasis>UserProfileHandler</emphasis>, <emphasis>GroupHandler</emphasis>, <emphasis>MembershipTypeHandler</emphasis>, and<emphasis> MembershipHandler</emphasis>.
      </para>
	<para>
		The five central API components are really designed like persistent
		entities, and handlers are really specified like data access objects
		(DAO).
      </para>
	<para>
		Organization API simply describes a contract, meaning it is not a concrete
		implementation. The described components are interfaces,
		allowing different concrete implementations. Practically, it means that
		you can replace the existing implementation with a different one.
	</para>
</section>

