Examples of SystemUser


Examples of br.com.caelum.vraptor.mauth.SystemUser

  }

  @Post("/auth/facebook")
  public void login(final String profile) {
    LOGGER.debug("logging in user " + profile);
    final SystemUser user = facebook.connectedOrFindUserFor(profile);
    SystemUser toLogin = facebook.createOrConnectUser(profile, user);
    if (toLogin == null) {
      validator.add(new I18nMessage("vraptor.inexisting_facebook_user",
          "vraptor.inexisting_facebook_user"));
      validator.onErrorUse(page()).redirectTo("/");
    } else {
View Full Code Here

Examples of com.freewebsys.jdo.SystemUser

  /**
   * 从request得到POJO类.
   */
  private SystemUser getSystemUser(HttpServletRequest request) {
    SystemUser systemUser = new SystemUser();
    String id = (null == request.getParameter("id") ? "" : request
        .getParameter("id"));
    if (!"".equals(id))
      systemUser.setId(Long.parseLong(id));
    systemUser.setLoginName((null == request.getParameter("loginName") ? ""
        : request.getParameter("loginName")));
    systemUser.setPasswd((null == request.getParameter("passwd") ? ""
        : request.getParameter("passwd")));
    systemUser.setName((null == request.getParameter("name") ? "" : request
        .getParameter("name")));
    systemUser.setPhone((null == request.getParameter("phone") ? ""
        : request.getParameter("phone")));
    systemUser.setEmail((null == request.getParameter("email") ? ""
        : request.getParameter("email")));
    /*
     * systemUser.setCreateDate((null == request.getParameter("createDate")
     * ? "" : request .getParameter("createDate")));
     */
    systemUser.setIslock((null == request.getParameter("islock") ? ""
        : request.getParameter("islock")));
    systemUser
        .setLoginTimes((null == request.getParameter("loginTimes") ? ""
            : request.getParameter("loginTimes")));
    systemUser.setLastLogin((null == request.getParameter("lastLogin") ? ""
        : request.getParameter("lastLogin")));
    return systemUser;
  }
View Full Code Here

Examples of com.freewebsys.jdo.SystemUser

    try {
      if (systemUser.getId() == null) {
        systemUser.setCreateDate(new Date());
        pm.makePersistent(systemUser);
      } else {
        SystemUser tempSystemUser = pm.getObjectById(SystemUser.class,
            systemUser.getId());
        tempSystemUser.setLoginName(systemUser.getLoginName());
        tempSystemUser.setPasswd(systemUser.getPasswd());
        tempSystemUser.setName(systemUser.getName());
        tempSystemUser.setPhone(systemUser.getPhone());
        tempSystemUser.setEmail(systemUser.getEmail());
        tempSystemUser.setIslock(systemUser.getIslock());
        tempSystemUser.setLoginTimes(systemUser.getLoginTimes());
        tempSystemUser.setLastLogin(systemUser.getLastLogin());
        pm.makePersistent(tempSystemUser);
      }
    } catch (Exception e) {
      isSuccess = "false";
      e.printStackTrace();
View Full Code Here

Examples of com.freewebsys.jdo.SystemUser

    PersistenceManager pm = PMF.get().getPersistenceManager();
    try {
      String[] tempIds = ids.split(",");
      if (tempIds != null) {
        for (int i = 0; i < tempIds.length; i++) {
          SystemUser systemUser = pm.getObjectById(SystemUser.class,
              new Long(tempIds[i]));
          pm.deletePersistent(systemUser);
        }
      }
    } catch (Exception e) {
View Full Code Here

Examples of com.freewebsys.jdo.SystemUser

   * 按照ID查询数据.
   */
  public String getSystemUser(String id) {
    String isSuccess = "true";
    PersistenceManager pm = PMF.get().getPersistenceManager();
    SystemUser systemUser = new SystemUser();
    try {
      systemUser = pm.getObjectById(SystemUser.class, new Long(id));
    } catch (Exception e) {
      isSuccess = "false";
      e.printStackTrace();
View Full Code Here

Examples of io.lumify.core.user.SystemUser

        Map configurationMap = SecureGraphMRUtils.toMap(context.getConfiguration());
        this.parser = new GDELTParser();
        this.graph = (AccumuloGraph) new GraphFactory().createGraph(MapUtils.getAllWithPrefix(configurationMap, "graph"));
        this.visibility = new Visibility("");
        this.authorizations = new AccumuloAuthorizations();
        this.user = new SystemUser(null);
        VersionService versionService = new VersionService();
        Configuration configuration = new HashMapConfigurationLoader(configurationMap).createConfiguration();
        this.auditRepository = new SecureGraphAuditRepository(null, versionService, configuration, null, userRepository);
    }
View Full Code Here

Examples of io.lumify.core.user.SystemUser

        super.setup(context);
        Map configurationMap = SecureGraphMRUtils.toMap(context.getConfiguration());
        this.visibility = new Visibility("");
        this.visibilityJson = new VisibilityJson();
        this.authorizations = new AccumuloAuthorizations();
        this.user = new SystemUser(null);
        VersionService versionService = new VersionService();
        Configuration configuration = new HashMapConfigurationLoader(configurationMap).createConfiguration();
        this.auditRepository = new SecureGraphAuditRepository(null, versionService, configuration, null, userRepository);
        this.visibilityTranslator = new DirectVisibilityTranslator();
        this.sourceFileName = context.getConfiguration().get(CONFIG_SOURCE_FILE_NAME);
View Full Code Here

Examples of io.lumify.core.user.SystemUser

        super.setup(context);
        Map configurationMap = SecureGraphMRUtils.toMap(context.getConfiguration());
        this.graph = (AccumuloGraph) new GraphFactory().createGraph(MapUtils.getAllWithPrefix(configurationMap, "graph"));
        this.visibility = new Visibility("");
        this.authorizations = new AccumuloAuthorizations();
        this.user = new SystemUser(null);
        VersionService versionService = new VersionService();
        io.lumify.core.config.Configuration configuration = new HashMapConfigurationLoader(configurationMap).createConfiguration();
        this.auditRepository = new SecureGraphAuditRepository(null, versionService, configuration, null, userRepository);
        this.sourceFileName = context.getConfiguration().get(CONFIG_SOURCE_FILE_NAME);
    }
View Full Code Here

Examples of io.lumify.core.user.SystemUser

                ZooKeeperInstance zooKeeperInstance = new ZooKeeperInstance(config.getProperty("bigtable.accumulo.instanceName"), config.getProperty("bigtable.accumulo.zookeeperServerNames"));
                Connector connector = zooKeeperInstance.getConnector(config.getProperty("bigtable.accumulo.username"), new PasswordToken(config.getProperty("bigtable.accumulo.password")));
                ModelSession modelSession = new AccumuloSession(connector, true);
                ModelUserContext modelUserContext = modelSession.createModelUserContext(LumifyVisibility.SUPER_USER_VISIBILITY_STRING);
                SystemUser user = new SystemUser(modelUserContext);
                ModelUtil.deleteTables(modelSession, user);
                ModelUtil.initializeTables(modelSession, user);
            } else {
                setupHdfsFiles();
                startAccumulo();
View Full Code Here

Examples of io.lumify.core.user.SystemUser

        // TODO: figure out a better way to create this without requiring accumulo
        return new AccumuloUserContext(new Authorizations(authorizations));
    }

    public User getSystemUser() {
        return new SystemUser(getModelUserContext(LumifyVisibility.SUPER_USER_VISIBILITY_STRING));
    }
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.