Package net.sf.jportlet.service.user

Examples of net.sf.jportlet.service.user.UserService


            if ( password != null )
            {
                password = password.trim(  );
            }

            UserService usrv = ( UserService ) _serviceContext.getPortletService( UserService.NAME );
            try
            {
                User usr = usrv.getUser( userId );
                if ( usr.matchPassword( password ) )
                {
                    /* Start the session */
                    ( ( PortletRequestImpl ) request ).startSession( usr );

View Full Code Here


        if ( userId != null )
        {
            try
            {
                UserService srv = ( UserService ) _serviceFactory.getPortletService( UserService.NAME );
                usr = srv.getUser( userId );

                /* Cache the user into the HttpServletRequest */
                if ( usr != null )
                {
                    _httpRequest.setAttribute( USER_KEY, usr );
View Full Code Here

        if ( userId != null )
        {
            try
            {
                UserService srv = ( UserService ) _serviceFactory.getPortletService( UserService.NAME );
                roles = srv.getRoles( userId );
            }
            catch ( Exception e )
            {
                __log.error( "Error while retrieving roles. userId=" + userId, e );
            }
View Full Code Here

            return;
        }

        /* Send */
        PortletContext ctx = event.getPortlet(  ).getPortletConfig(  ).getPortletContext(  );
        UserService    usr = ( UserService ) ctx.getService( UserService.NAME );
        try
        {
            /* Get the user */
            UserImpl u = ( UserImpl ) usr.getUserByEmail( email );

            /* Generate the email message */
            String subject = "Password Requested";
            StringBuffer body = new StringBuffer();
            body.append( u.getFirstname(  ) + " " + u.getLastname(  ) + "\n" );
View Full Code Here

        try
        {
            if ( validate( userId, password, email, firstname, lastname, locale, event ) )
            {
                PortletContext ctx = event.getPortlet(  ).getPortletConfig(  ).getPortletContext(  );
                UserService    srv = ( UserService ) ctx.getService( UserService.NAME );
                if ( register )
                {
                    srv.addUser( request );
                    event.setReturnCode( "register" );
                }
                else
                {
                    srv.updateUser( request );
                    event.setReturnCode( "update" );
                }

                notifyDataChanged( event );
                return;
View Full Code Here

TOP

Related Classes of net.sf.jportlet.service.user.UserService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.