<?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
		<literal>exo.platform.services.organization</literal>
		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 -
		<literal>OrganizationService</literal>
		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
		<literal>User</literal>
		component contains basic information about the user, such as
		username, password, first name, last name, and email. The
		<literal>User Profile</literal>
		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
		<literal>Group</literal>
		component contains a group graph. The
		<literal>Membership Type</literal>
		component
		contains a list of predefined membership types.
		Finally, the
		<literal>Membership</literal>
		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 UserHandler, UserProfileHandler, GroupHandler, MembershipTypeHandler, and MembershipHandler.
      </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>

