Examples of IUserContext


Examples of com.google.enterprise.connector.filenet4.filewrap.IUserContext

  }

  @Override
  public IUser getUser(AuthenticationIdentity id) {
    // Lookup FileNet user and user's groups
    IUserContext uc = conn.getUserContext();
    String username = FileUtil.getUserName(id);
    try {
      return uc.lookupUser(username);
    } catch (RepositoryException e) {
      logger.log(Level.WARNING, "Failed to lookup user [" + username
          + "] in FileNet", e);
      return null;
    }
View Full Code Here

Examples of com.google.enterprise.connector.filenet4.filewrap.IUserContext

   * @param authenticationIdentity: contains user credentials
   * */
  @Override
  public AuthenticationResponse authenticate(AuthenticationIdentity id)
      throws RepositoryException {
    IUserContext uc = conn.getUserContext();
    String username = FileUtil.getUserName(id);
    try {
      IUser user = uc.authenticate(username, id.getPassword());
      List<Principal> principalGroups = FileUtil.getPrincipals(
          PrincipalType.UNKNOWN, globalNamespace, user.getGroupNames(),
          CaseSensitivityType.EVERYTHING_CASE_INSENSITIVE);
      return new AuthenticationResponse(true, "", principalGroups);
    } catch (Throwable e) {
View Full Code Here

Examples of com.google.enterprise.connector.filenet4.filewrap.IUserContext

  /*
   * Test method for
   * 'com.google.enterprise.connector.file.filejavawrap.FnConnection.getUserContext()'
   */
  public void testGetUserContext() throws RepositoryException {
    IUserContext test = conn.getUserContext();
    assertNotNull(test);
    assertEquals(TestConnection.currentUserContext, test.getName());
  }
View Full Code Here

Examples of org.jresearch.flexess.client.context.IUserContext

  private IUserManager userManager;
  private IAppService applicationService;
  private ISecurityContainerFactory securityContainerFactory;

  protected IUserContext getUserContext() {
    IUserContext context = UserContextManager.getContext();
    if (!context.isValid()) {
      context = updateUserContext(context);
    }
    return context;
  }
View Full Code Here

Examples of org.jresearch.flexess.client.context.IUserContext

    }
    return context;
  }

  protected SecurityModel getSecurityModel(final String modelId) throws UamClientException {
    final IUserContext ctx = getUserContext();
    return (SecurityModel) ctx.getSecurityModel(modelId);
  }
View Full Code Here

Examples of org.jresearch.flexess.client.context.IUserContext

    this.checker = checker;
  }

  private List<EObject> getRoles(final String modelId) {
    assert modelId != null;
    final IUserContext ctx = getUserContext();
    return ctx.getRoles(modelId);
  }
View Full Code Here

Examples of org.jresearch.flexess.client.context.IUserContext

    checkClassRequest(modelId, request.getAttributeMap(), objectClass, operation);
  }

  @Override
  public Collection<String> getModelIdList() {
    final IUserContext ctx = getUserContext();
    return ctx.getModelIds();
  }
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.