Examples of ApplicationUser


Examples of com.projity.company.ApplicationUser

      tasks=null;
    }

    public boolean canBeUsed(){
      if (lockedById<=0) return true;
      ApplicationUser user=SessionFactory.getInstance().getSession(false).getUser();
      if (user==null/*for offline gantt*/||lockedById==user.getUniqueId()) return true;
      return (idleTime>allowedIdleTime);
    }
View Full Code Here

Examples of com.tmm.enterprise.microblog.security.ApplicationUser

    if (account == null) {
      account = createNewAdminUser("admin", "", "admin");
    }
    GrantedAuthority[] auths = new GrantedAuthority[1];
    auths[0] = new GrantedAuthorityImpl("ROLE_ADMIN");
    ApplicationUser user = new ApplicationUser(new Long(account.getId()),
        account.getUserName(), account.getPassword(), true, true, true,
        true, auths);
    Authentication auth = new TestingAuthenticationToken(user, "ignored",
        auths);
    auth.setAuthenticated(true);
View Full Code Here

Examples of com.tmm.enterprise.microblog.security.ApplicationUser

  public ApplicationContext getApplicationContext() {
    return applicationContext;
  }

  public Account getModifyingAccount() {
    ApplicationUser user = getApplicationUser();
    Account account = getAccountService().loadAccount(user.getAccountId());
    return account;
  }
View Full Code Here

Examples of com.tmm.enterprise.microblog.security.ApplicationUser

    Authentication auth = SecurityContextHolder.getContext()
        .getAuthentication();
    if (auth == null) {
      return null;
    }
    ApplicationUser user = (ApplicationUser) auth.getPrincipal();
    return user;
  }
View Full Code Here

Examples of com.tmm.enterprise.microblog.security.ApplicationUser

    Account account = getAccountService().loadAccountByUserName(BATCH_USER_NAME);

    GrantedAuthority[] auths = new GrantedAuthority[1];
    auths[0] = new GrantedAuthorityImpl("ROLE_USER");

    ApplicationUser user = new ApplicationUser(new Long(account.getId()), account.getUserName(), account.getPassword(), true, true, true, true,
        auths);

    Authentication auth = new TestingAuthenticationToken(user, "ignored", auths);

    auth.setAuthenticated(true);
View Full Code Here

Examples of com.tmm.enterprise.microblog.security.ApplicationUser

  @Before
  public void createAccount() {
    Account account = accountService.createNewBatchUser("test", "", "");
    GrantedAuthority[] auths = new GrantedAuthority[1];
    auths[0] = new GrantedAuthorityImpl("ROLE_USER");
    ApplicationUser user = new ApplicationUser(new Long(account.getId()),
        account.getUserName(), account.getPassword(), true, true, true,
        true, auths);
    Authentication auth = new TestingAuthenticationToken(user, "ignored",
        auths);
    auth.setAuthenticated(true);
View Full Code Here

Examples of no.ugland.utransprod.model.ApplicationUser

    // robot = BasicRobot.robotWithNewAwtHierarchy();
    JobFunctionManager jobFunctionManager = (JobFunctionManager) ModelUtil
        .getBean(JobFunctionManager.MANAGER_NAME);
    when(managerRepository.getJobFunctionManager()).thenReturn(
        jobFunctionManager);
    ApplicationUser applicationUser = new ApplicationUser();
    ProductArea productArea = new ProductArea();
    ProductAreaGroup productAreaGroup = new ProductAreaGroup();
    productArea.setProductAreaGroup(productAreaGroup);
    applicationUser.setProductArea(productArea);
    applicationUser.setGroupUser("Nei");
    when(login.getApplicationUser()).thenReturn(applicationUser);
    ProductAreaManager productAreaManager = (ProductAreaManager) ModelUtil
        .getBean(ProductAreaManager.MANAGER_NAME);
    when(managerRepository.getProductAreaManager()).thenReturn(
        productAreaManager);
View Full Code Here

Examples of no.ugland.utransprod.model.ApplicationUser

    statusChekers.put(veggArticleName, new LagerProductionStatusChecker(
        veggArticleName, attributeName, attributeValue));
    statusChekers.put(frontArticleName, new LagerProductionStatusChecker(
        frontArticleName, attributeName, attributeValue));
    final ApplicationUser applicationUser = new ApplicationUser();
    ProductArea productArea = new ProductArea();
    ProductAreaGroupManager productAreaGroupManager = (ProductAreaGroupManager) ModelUtil
        .getBean(ProductAreaGroupManager.MANAGER_NAME);
    ProductAreaGroup productAreaGroup = productAreaGroupManager
        .findByName("Garasje");
    productArea.setProductAreaGroup(productAreaGroup);
    applicationUser.setProductArea(productArea);
    applicationUser.setUserName("username");
    applicationUser.setGroupUser("Nei");
    when(login.getApplicationUser()).thenReturn(applicationUser);

    MainPackageViewHandler mainPackageViewHandler = new MainPackageViewHandler(
        vismaFileCreator, orderViewHandlerFactory, login,
        managerRepository, deviationViewHandlerFactory, colliSetup,
View Full Code Here

Examples of no.ugland.utransprod.model.ApplicationUser

  @SuppressWarnings("unchecked")
  @Override
  public ApplicationUserModel getBufferedObjectModel(
      PresentationModel presentationModel) {
    ApplicationUserModel model = new ApplicationUserModel(
        new ApplicationUser());
    model.setFirstName((String) presentationModel
        .getBufferedValue(PROPERTY_FIRST_NAME));
    model.setGroupUser((String) presentationModel
        .getBufferedValue(PROPERTY_GROUP_USER));
    model.setLastName((String) presentationModel
View Full Code Here

Examples of no.ugland.utransprod.model.ApplicationUser

  @Mock
  private Login login;

  @After
  public void tearDown() throws Exception {
    ApplicationUser bruker = new ApplicationUser();
    bruker.setUserName("test");
    List<ApplicationUser> brukere = applicationUserManager
        .findByObject(bruker);
    for (ApplicationUser user : brukere) {
      applicationUserManager.removeObject(user);
    }
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.