Package no.ugland.utransprod.service

Examples of no.ugland.utransprod.service.ApplicationUserManager.login()


        .getBean("productionUnitManager");

    ApplicationUserManager applicationUserManager = (ApplicationUserManager) ModelUtil
        .getBean("applicationUserManager");
    ApplicationUser user;
    user = applicationUserManager.login("admin", "admin");
    applicationUserManager.lazyLoad(user, new LazyLoadEnum[][] { {
        LazyLoadEnum.USER_ROLES, LazyLoadEnum.NONE } });
    UserType userType = user.getUserRoles().iterator().next().getUserType();

    Login login = new LoginImpl(user, userType);
View Full Code Here


        .getBean("supplierManager");

    ApplicationUserManager applicationUserManager = (ApplicationUserManager) ModelUtil
        .getBean("applicationUserManager");
    ApplicationUser user;
    user = applicationUserManager.login("admin", "admin");
    applicationUserManager.lazyLoad(user, new LazyLoadEnum[][] { {
        LazyLoadEnum.USER_ROLES, LazyLoadEnum.NONE } });
    UserType userType = user.getUserRoles().iterator().next().getUserType();

    Login login = new LoginImpl(user, userType);
View Full Code Here

    managerRepository = injector.getInstance(ManagerRepository.class);

    ApplicationUserManager applicationUserManager = (ApplicationUserManager) ModelUtil
        .getBean("applicationUserManager");
    ApplicationUser user;
    user = applicationUserManager.login("admin", "admin");
    applicationUserManager.lazyLoad(user, new LazyLoadEnum[][] { {
        LazyLoadEnum.USER_ROLES, LazyLoadEnum.NONE } });
    UserType userType = user.getUserRoles().iterator().next().getUserType();

    Login login = new LoginImpl(user, userType);
View Full Code Here

    applicationParamManager = (ApplicationParamManager) ModelUtil
        .getBean("applicationParamManager");
    ApplicationUserManager applicationUserManager = (ApplicationUserManager) ModelUtil
        .getBean("applicationUserManager");
    ApplicationUser user;
    user = applicationUserManager.login("admin", "admin");
    applicationUserManager.lazyLoad(user, new LazyLoadEnum[][] { {
        LazyLoadEnum.USER_ROLES, LazyLoadEnum.NONE } });
    UserType userType = user.getUserRoles().iterator().next().getUserType();

    ApplicationParamViewHandler applicationParamViewHandler = new ApplicationParamViewHandler(
View Full Code Here

    when(managerRepository.getConstructionTypeManager()).thenReturn(
        constructionTypeManager);

    ApplicationUser user;

    user = applicationUserManager.login("admin", "admin");
    applicationUserManager.lazyLoad(user, new LazyLoadEnum[][] { {
        LazyLoadEnum.USER_ROLES, LazyLoadEnum.NONE } });
    UserType userType = user.getUserRoles().iterator().next().getUserType();

    Login login = new LoginImpl(user, userType);
View Full Code Here

     * @return true dersom bruker ble autorisert
     */
    private ApplicationUser checkLogin(String userName, String password) {
        ApplicationUserManager applicationUserManager = (ApplicationUserManager) ModelUtil
                .getBean("applicationUserManager");
        return applicationUserManager.login(userName, password);
    }

  

    /**
 
View Full Code Here

    deviationManager = (DeviationManager) ModelUtil
        .getBean("deviationManager");
    final ApplicationUserManager applicationUserManager = (ApplicationUserManager) ModelUtil
        .getBean("applicationUserManager");
    ApplicationUser user;
    user = applicationUserManager.login("avviktransport", "avviktransport");
    applicationUserManager.lazyLoad(user, new LazyLoadEnum[][] { {
        LazyLoadEnum.USER_ROLES, LazyLoadEnum.NONE } });
    JobFunctionManager jobFunctionManager = (JobFunctionManager) ModelUtil
        .getBean("jobFunctionManager");
    if (user == null) {
View Full Code Here

    public static UserType getUserType(){
        return userType!=null?userType:initUserType();
    }
    private static ApplicationUser initUser(String userName,String password){
        ApplicationUserManager applicationUserManager=(ApplicationUserManager)ModelUtil.getBean(ApplicationUserManager.MANAGER_NAME);
        return applicationUserManager.login(userName, password);
    }
    private static UserType initUserType(){
        ApplicationUserManager applicationUserManager=(ApplicationUserManager)ModelUtil.getBean(ApplicationUserManager.MANAGER_NAME);
        ApplicationUser user=getUser();
        applicationUserManager.lazyLoad(user, new LazyLoadEnum[][]{{LazyLoadEnum.USER_ROLES,LazyLoadEnum.NONE}});
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.