Examples of SessionProfile


Examples of com.asakusafw.windgate.core.session.SessionProfile

        assertThat(out.exists(), is(false));
    }

    private GateProfile profile() throws IOException {
        CoreProfile core = new CoreProfile(2);
        SessionProfile session = new SessionProfile(
                FileSessionProvider.class,
                ProfileContext.system(FileSessionProvider.class.getClassLoader()),
                Collections.singletonMap(
                        FileSessionProvider.KEY_DIRECTORY,
                        folder.newFolder("session").getAbsolutePath()));
View Full Code Here

Examples of com.asakusafw.windgate.core.session.SessionProfile

     * @throws Throwable if failed
     */
    @Before
    public void setUp() throws Throwable {
        provider = new FileSessionProvider();
        provider.configure(new SessionProfile(
                FileSessionProvider.class,
                ProfileContext.system(FileSessionProvider.class.getClassLoader()),
                Collections.singletonMap(
                        FileSessionProvider.KEY_DIRECTORY,
                        folder.getRoot().getAbsolutePath())));
View Full Code Here

Examples of com.asakusafw.windgate.core.session.SessionProfile

     * @throws Exception if failed
     */
    @Test(expected = IOException.class)
    public void config_empty() throws Exception {
        provider = new FileSessionProvider();
        provider.configure(new SessionProfile(
                FileSessionProvider.class,
                ProfileContext.system(FileSessionProvider.class.getClassLoader()),
                Collections.<String, String>emptyMap()));
    }
View Full Code Here

Examples of com.asakusafw.windgate.core.session.SessionProfile

     */
    @Test(expected = IOException.class)
    public void config_unknown_variable() throws Exception {
        Assume.assumeThat(System.getenv("__UNKNOWN_VARIABLE"), is(nullValue()));
        provider = new FileSessionProvider();
        provider.configure(new SessionProfile(
                FileSessionProvider.class,
                ProfileContext.system(FileSessionProvider.class.getClassLoader()),
                Collections.singletonMap(
                        FileSessionProvider.KEY_DIRECTORY,
                        "${__UNKNOWN_VARIABLE}/hoge")));
View Full Code Here

Examples of com.asakusafw.windgate.core.session.SessionProfile

     */
    @Test(expected = IOException.class)
    public void config_conflict_directory() throws Exception {
        File file = folder.newFile("conflict");
        provider = new FileSessionProvider();
        provider.configure(new SessionProfile(
                FileSessionProvider.class,
                ProfileContext.system(FileSessionProvider.class.getClassLoader()),
                Collections.singletonMap(
                        FileSessionProvider.KEY_DIRECTORY,
                        file.getAbsolutePath())));
View Full Code Here

Examples of com.asakusafw.windgate.core.session.SessionProfile

        }
        LOG.debug("Restoring WindGate profile");
        Properties copy = (Properties) properties.clone();
        CoreProfile core = CoreProfile.loadFrom(copy, context);
        CoreProfile.removeCorrespondingKeys(copy);
        SessionProfile session = SessionProfile.loadFrom(copy, context);
        SessionProfile.removeCorrespondingKeys(copy);
        Collection<? extends ProcessProfile> processes = ProcessProfile.loadFrom(copy, context);
        ProcessProfile.removeCorrespondingKeys(copy);
        Collection<? extends ResourceProfile> resources = ResourceProfile.loadFrom(copy, context);
        ResourceProfile.removeCorrespondingKeys(copy);
View Full Code Here

Examples of org.beangle.security.monitor.auth.session.SessionProfile

    if (null == profileProvider) {
      loaded = true;
      logger.warn("Cannot load profile for  profileProvider not found!");
      return;
    }
    SessionProfile sessionProfile = profileProvider.getProfile();
    if (null != sessionProfile) {
      for (CategoryProfile cp : sessionProfile.getCategoryProfiles().values()) {
        int initOnline=0;
        OnlineProfile existed=profileMap.get(cp.getCategory());
        if(null!=existed){
          initOnline=existed.getOnline();
        }
View Full Code Here

Examples of org.beangle.security.monitor.auth.session.SessionProfile

        return null;
      } else {
        sessionProfileId = profileIds.get(0);
      }
    }
    SessionProfile profile = (SessionProfile) entityDao.get(SessionProfile.class,
        sessionProfileId);
    // workground for lazy loading
    OqlBuilder<CategoryProfile> builder=OqlBuilder.from(CategoryProfile.class,"cp");
    builder.where("cp.sessionProfile=:profile",profile);
    Map<Long,CategoryProfile> categoryMap=MapUtil.newHashMap();
    for (CategoryProfile categoryProfile: entityDao.search(builder)) {
      UserCategory uc=entityDao.get(UserCategory.class, categoryProfile.getCategory().getId());
      categoryProfile.setCategory(uc);
      categoryMap.put(uc.getId(),categoryProfile);
    }
    profile.setCategoryProfiles(categoryMap);
    return profile;
  }
View Full Code Here

Examples of org.beangle.security.monitor.auth.session.SessionProfile

        return null;
      } else {
        sessionProfileId = profileIds.get(0);
      }
    }
    SessionProfile profile = (SessionProfile) entityDao.get(SessionProfile.class,
        sessionProfileId);
    // initialize profile.categoryprofiles
    for (Long categoryId : profile.getCategoryProfiles().keySet()) {
      CategoryProfile categoryProfile = profile.getCategoryProfiles().get(categoryId);
      entityDao.initialize(categoryProfile);
    }
    return profile;
  }
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.