Examples of UserService


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

            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

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

        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

Examples of net.sf.pmr.core.service.UserService

  public ActionForward add(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response)
      throws Exception {
     
    // get the user service
    UserService userService = CoreObjectFactory.getUserService();
    // get the form
    UserProjectForm userProjectForm = (UserProjectForm) form;

    // call the service
    userService.addUserToProject(userProjectForm.getUserPersistanceId(), userProjectForm.getBasicProjectPersistanceId());

    // return to the detail
      return mapping.findForward("userList");
     
  }
View Full Code Here

Examples of net.sourceforge.guacamole.net.auth.mysql.service.UserService

    @Override
    public UserContext getUserContext(Credentials credentials) throws GuacamoleException {

        // Get user service
        UserService userService = injector.getInstance(UserService.class);

        // Get user
        MySQLUser authenticatedUser = userService.retrieveUser(credentials);
        if (authenticatedUser != null) {
            MySQLUserContext context = injector.getInstance(MySQLUserContext.class);
            context.init(authenticatedUser.getUserID());
            return context;
        }
View Full Code Here

Examples of org.apache.archiva.redback.rest.api.services.UserService

        return service;
    }

    protected UserService getUserService( String authzHeader )
    {
        UserService service =
            JAXRSClientFactory.create( "http://localhost:" + port + "/" + getRestServicesPath() + "/redbackServices/",
                                       UserService.class, Collections.singletonList( new JacksonJaxbJsonProvider() ) );

        // for debuging purpose
        WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 3000000L );
View Full Code Here

Examples of org.apache.marmotta.platform.core.api.user.UserService

    @BeforeClass
    public static void setUp() throws MarmottaImportException, URISyntaxException {
        marmotta = new JettyMarmotta("/marmotta", SparqlWebService.class);
       
        ImportService importService = marmotta.getService(ImportService.class);
        UserService userService = marmotta.getService(UserService.class);
        ContextService contextService = marmotta.getService(ContextService.class);
        InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("foaf.rdf");
        int n = importService.importData(is, "application/rdf+xml", userService.getAnonymousUser(), contextService.getDefaultContext());
        log.info("Imported RDF test suite with {} triples", n);
       
        RestAssured.baseURI = "http://localhost";
        RestAssured.port = marmotta.getPort();
        RestAssured.basePath = marmotta.getContext();
View Full Code Here

Examples of org.apache.rave.portal.service.UserService

    }


    @Before
    public void setUp() throws Exception {
        UserService mockUserService = createMock(UserService.class);
        validator = new UserProfileValidator(mockUserService);
    }
View Full Code Here

Examples of org.apache.rave.portal.service.UserService

    private ChangePasswordValidator passwordValidator;
    private ChangePasswordController controller;

    @Before
    public void setUp() throws Exception {
        UserService userService = createNiceMock(UserService.class);

        expect(userService.isValidReminderRequest(null, 0)).andReturn(true).anyTimes();
        replay(userService);
        passwordValidator = new ChangePasswordValidator(userService);
        controller = new ChangePasswordController(userService, passwordValidator);
    }
View Full Code Here

Examples of org.apache.rave.portal.service.UserService

    private ReminderController controller;

    @Before
    public void setUp() throws Exception {

        UserService userService = createNiceMock(UserService.class);
        replay(userService);
        request = new MockHttpServletRequest();
        NewPasswordValidator passwordValidator = new NewPasswordValidator(userService);
        captchaService = new ReCaptchaService(false, null, null, false, "error message");
        controller = new ReminderController(userService, passwordValidator, captchaService);
View Full Code Here

Examples of org.apache.syncope.common.services.UserService

        // 6. switch back to admin
        super.resetRestTemplate();

        // 7. user password has not changed yet
        UserService userService1 = super.setupCredentials(userService, UserService.class, userTO.getUsername(),
                userMod.getPassword());
        try {
            userService1.readSelf();
            fail("Credentials are not updated yet, thus request should raise AccessControlException");
        } catch (AccessControlException e) {
            assertNotNull(e);
        }
        resetRestTemplate();

        // 8. actually update user
        userTO = userService.update(userMod.getId(), userMod);
        assertNotNull(userTO);

        // 9. user password has now changed
        UserService userService2 = super.setupCredentials(userService, UserService.class, userTO.getUsername(),
                userMod.getPassword());
        try {
            UserTO user = userService2.readSelf();
            assertNotNull(user);
        } catch (AccessControlException e) {
            fail("Credentials should be valid and not cause AccessControlException");
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.