Examples of School


Examples of com.apress.progwt.client.domain.School

    private static final String TEXT_XSS = "dsfsdf<em>sdft</em>est<SCRIPT SRC=http://ha.ckers.org/xss.js></SCRIPT> text";
    private static final String TEXT_XSS_C = "dsfsdf<em>sdft</em>est text";

    public void testExecute() throws SiteException {

        School sc = new School();
        sc.setId(66);
        sc.setName("Dart");

        User au = new User();
        au.setId(77);
        au.setUsername("Author");
View Full Code Here

Examples of com.apress.progwt.client.domain.School

    }

    public void testExecuteNoXSS() throws SiteException {

        School sc = new School();
        sc.setId(66);
        sc.setName("Dart");

        User au = new User();
        au.setId(77);
        au.setUsername("Author");
View Full Code Here

Examples of com.eatle.persistent.pojo.foundation.place.School

  private Map<Long, List<School>> pushShoolListIntoMap(List<School> shoolList)
  {
    Map<Long, List<School>> shoolMap = new HashMap<Long, List<School>>();
    for (int i = 0; i < shoolList.size(); i++)
    {
      School shool = shoolList.get(i);
      Long distinctId = shool.getDistrictId();
      Long key = distinctId;
      if (distinctId == null || distinctId == 0)
      {
        key = 0L;
      }
View Full Code Here

Examples of com.eatle.persistent.pojo.foundation.place.School

      json.put(DwzAjaxJsonUtil.KEY_STATUSCODE, 300);
      json.put(DwzAjaxJsonUtil.KEY_MESSAGE, "操作失败!");
    }
    else
    {
      School sl = schoolService.findById(school.getId());
      ReflectionUtils.copyPorperties(sl, school, new String[] { "name",
          "englishName", "districtId" });
      schoolService.update(sl);
    }
    super.writeMap(json);
View Full Code Here

Examples of com.m4f.business.domain.School

    public void loadSchoolFeed(@RequestParam Long schoolId)
                    throws ParserConfigurationException, SAXException, IOException, Exception {
    LOGGER.info("Updating school with id: " + schoolId);
   
    Provider provider = null;
      School school = null;
    Dump dump = null;
    CronTaskReport report = null;
   
    try {
      school = schoolService.getSchool(schoolId, null);
      LOGGER.info("School name: " + school.getName());
      provider = providerService.getProviderById(school.getProvider(), null);
      //school = schoolService.getSchool(schoolId, null);
      dump = dumpService.getLastDumpByOwner(school.getProvider());
     
      report = cronTaskReportService.create();
            report.setObject_id(school.getProvider());
            report.setDate(new Date());
            report.setType(CronTaskReport.TYPE.PROVIDER_SCHOOLS);
      report.setDescription(new StringBuffer("School: ").append(provider.getName()).toString());
      int retries = 1;
      boolean errors = false;
      StringBuffer errorsSb = new StringBuffer();
      while(retries > 0) {
          try {
           providerImporter.importCourses(provider, school, dump);
           retries = -1; // Break the loop
           } catch(Exception e) {
             LOGGER.severe(StackTraceUtil.getStackTrace(e));
             LOGGER.info("" + retries + " Fail importing courses: "+school.getName() );
             retries--;
             if(!(retries > 0)) {
               errors = true;
               errorsSb.append(school.getName()).append(" -> ").append(e.getCause()).append("\n");
               LOGGER.severe(StackTraceUtil.getStackTrace(e));
             }
           }
      }     
     
View Full Code Here

Examples of com.m4f.business.domain.School

    @ResponseStatus(HttpStatus.OK)
    public void importSchool(@RequestParam(required=true) Long providerId, @RequestParam(required=true) Long schoolId,
        @RequestParam(required=true) Long dumpId)
                    throws ParserConfigurationException, SAXException, IOException, Exception {
      Provider provider = null;
      School school = null;
    Dump dump = null;
    CronTaskReport report = null;
   

    try {
      provider = providerService.getProviderById(providerId, null);
      school = schoolService.getSchool(schoolId, null);
      dump = dumpService.getDump(dumpId);
     
      report = cronTaskReportService.create();
            report.setObject_id(providerId);
            report.setDate(new Date());
            report.setType(CronTaskReport.TYPE.PROVIDER_SCHOOLS);
      report.setDescription(new StringBuffer("School: ").append(provider.getName()).toString());
      int retries = 5;
      while(retries > 0) {
          try {
           providerImporter.importCourses(provider, school, dump);
           } catch(Exception e) {
             LOGGER.info("" + retries + " Fail importing courses: "+school.getName() );
             retries--;
             if(!(retries > 0)) {
               throw e;
             }
           }
View Full Code Here

Examples of com.m4f.business.domain.School

                  }
                }
        }
        LOGGER.finest("-------------------------------------------------------------------");*/
      PageManager<Course> paginator = new PageManager<Course>();
      School school = this.schoolService.getSchool(new Long(954), null);
        long total = this.courseService.countCoursesBySchool(school);
        paginator.setOffset(RANGE);
        paginator.setStart(0);
        paginator.setSize(total);
        LOGGER.finest("-------------------------------------------------------------------");
        for (Integer page : paginator.getTotalPagesIterator()) {
                int start = (page - 1) * RANGE;
                int end = (page) * RANGE;
         Collection<Course> courses = this.courseService.getCoursesBySchool(school.getId(), null, null, start, end);
         for(Course course : courses) {
             CourseCatalog c_es = this.catalogService.getCourseCatalogByCourseId(course.getId(), new Locale("es"));
             CourseCatalog c_eu = this.catalogService.getCourseCatalogByCourseId(course.getId(), new Locale("eu"));
             if(c_es == null) {
               LOGGER.finest("Id: " + course.getId());
View Full Code Here

Examples of com.m4f.business.domain.School

 
  @Override
  public void buildSeoEntity(Course course, Locale locale)
    throws Exception {
   
    School school = schoolService.getSchool(course.getSchool(), locale);
    Provider provider = providerService.getProviderById(course.getProvider(), locale);
   
    // Territorial data
    String townName = school.getContactInfo() != null &&
      school.getContactInfo().getCity() != null ?
      school.getContactInfo().getCity() : "";
   
    List<Town> towns = territorialService.findTownsByName(townName, locale);
   
    Town town = new Town();
    Province province = new Province();
View Full Code Here

Examples of com.m4f.business.domain.School

 
  @Override
  @Cacheflush(cacheName="schools")
  public void updateSchools(List<School> newSchools, Locale localethrows Exception {
    Map<Long, School> indexedSchools = this.getSchools(locale);
    School school;
    for(School newSchool : newSchools) {
      if(indexedSchools.containsKey(newSchool.getId())) {
        school = indexedSchools.get(newSchool.getId());
        indexedSchools.remove(newSchool.getId());
        // TODO Copy newSchool into school
View Full Code Here

Examples of com.m4f.business.domain.School

  @Override
  @Cacheable(cacheName="schools")
  public School getSchoolByExternalId(String externalId, Locale locale) {
    String filter = "externalId == externalIdParam";
    String params = "java.lang.String externalIdParam";
    School school = this.DAO.findEntity(School.class, locale, filter,
        params, new Object[] {externalId});
    return school;
  }
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.