From do-not-reply at jboss.org Thu Jan 10 20:32:30 2013 Content-Type: multipart/mixed; boundary="===============1298611899163242867==" MIME-Version: 1.0 From: do-not-reply at jboss.org To: gatein-commits at lists.jboss.org Subject: [gatein-commits] gatein SVN: r9042 - in epp/docs/branches/6.0/Reference_Guide/en-US: modules/AuthenticationAndIdentity and 1 other directory. Date: Thu, 10 Jan 2013 20:32:21 -0500 Message-ID: <201301110132.r0B1WL99006902@svn01.web.mwc.hst.phx2.redhat.com> --===============1298611899163242867== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: rdickens Date: 2013-01-10 20:32:21 -0500 (Thu, 10 Jan 2013) New Revision: 9042 Modified: epp/docs/branches/6.0/Reference_Guide/en-US/extras/Authentication_Identi= ty_AccessingUserProfile/default91.java epp/docs/branches/6.0/Reference_Guide/en-US/modules/AuthenticationAndIde= ntity/AccessingUserProfile.xml Log: Brought content up to match wiki version 3 Modified: epp/docs/branches/6.0/Reference_Guide/en-US/extras/Authentication= _Identity_AccessingUserProfile/default91.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- epp/docs/branches/6.0/Reference_Guide/en-US/extras/Authentication_Ident= ity_AccessingUserProfile/default91.java 2013-01-10 06:09:07 UTC (rev 9041) +++ epp/docs/branches/6.0/Reference_Guide/en-US/extras/Authentication_Ident= ity_AccessingUserProfile/default91.java 2013-01-11 01:32:21 UTC (rev 9042) @@ -2,8 +2,11 @@ PortalRequestContext context =3D PortalRequestContext.getCurrentInstance()= ; // Get the id of the user logged String userId =3D context.getRemoteUser(); + +// Retrieve OrganizationService but it works only from WebUI code. See var= iants below in documentation = +OrganizationService orgService =3D getApplicationComponent(OrganizationSer= vice.class) ; + // Request the information from OrganizationService: -OrganizationService orgService =3D getApplicationComponent(OrganizationSer= vice.class) ; if (userId !=3D null) { User user =3D orgService.getUserHandler().findUserByName(userId) ; Modified: epp/docs/branches/6.0/Reference_Guide/en-US/modules/Authenticatio= nAndIdentity/AccessingUserProfile.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- epp/docs/branches/6.0/Reference_Guide/en-US/modules/AuthenticationAndId= entity/AccessingUserProfile.xml 2013-01-10 06:09:07 UTC (rev 9041) +++ epp/docs/branches/6.0/Reference_Guide/en-US/modules/AuthenticationAndId= entity/AccessingUserProfile.xml 2013-01-11 01:32:21 UTC (rev 9042) @@ -5,6 +5,7 @@ ]> Accessing User Profile + NOTE: Content updated to wiki version 4 (10 Jan 2013) The following code retrieves the details for a logged-in user: @@ -20,4 +21,7 @@ + + Both alternatives are probably better then {{OrganizationService orgS= ervice =3D getApplicationComponent(OrganizationService.class)}} because you= can use them from your own portlets or servlet/portlet filters. Variant wi= th {{getApplicationComponent}} works only from WebUI. + --===============1298611899163242867==--