Examples of Spot


Examples of com.skyline.spot.model.Spot

    ModelAndView mav = new ModelAndView();
    if (user == null) {
      mav.setViewName(ViewPaths.USER_LOGIN);
      return mav;
    }
    Spot spotInfo = spotService.getSpot(spotId);
    mav.addObject("spotInfo", spotInfo);
    Page page = new Page();
    page.setSize(listRefrencePageSize);
    if (refType.equals("ALBUM")) {
      List<Album> albumList = albumService
View Full Code Here

Examples of com.skyline.spot.model.Spot

      return mav;
    }
    Integer authority = Authority.PUBLIC;
    Page page = new Page();
    page.setSize(6);
    Spot spot = spotService.view(spotId);
    if (user.getId().equals(spot.getAdministratorId())) {
      authority = Authority.ADMIN;
    }
    List<SpotCharacteristic> scList = spotCharaService.queryCharacteristicBySpotId(spotId,
        page, Activity.NORMAL);
    mav.addObject("spotInfo", spot);
View Full Code Here

Examples of com.skyline.spot.model.Spot

  public @ResponseBody
  Map<String, Object> batchUploadSpotOk(@PathVariable("ownerId") Long ownerId,
      @PathVariable("albumId") Long albumId, @RequestParam("files") String files) {
    Map<String, Object> result = new HashMap<String, Object>();
    User user = (User) WebHelper.getSessionAttribute(null, Constant.SESSION_USER);
    Spot spot = spotService.getSpot(ownerId);
    if (spot == null) {
      result.put("success", Boolean.FALSE);
      result.put("errmsg", "不存在制定spot");
      return result;
    }
    if (user == null) {
      result.put("success", Boolean.FALSE);
      result.put("errmsg", "压缩图片必须");
      result.put("logined", Boolean.FALSE);
      return result;
    } else {
      result.put("logined", Boolean.TRUE);
    }
    String[] filesPath = files.split("\\|");
    List<File> localFiles = new ArrayList<File>();
    for (String filePath : filesPath) {
      if (!StringUtils.hasLength(filePath)) {
        continue;
      }
      File localFile = new File(filePath);
      localFiles.add(localFile);
    }
    if (localFiles.isEmpty()) {
      result.put("success", Boolean.FALSE);
      result.put("errmsg", "没有找到需要压缩的文件!");
      return result;
    }
    StringBuilder message = new StringBuilder();
    List<SkylineImageResizeTask> tasks = prepareResizeTask(localFiles, ownerId, albumId,
        message);
    if (tasks == null || tasks.isEmpty()) {
      result.put("success", Boolean.FALSE);
      result.put("errmsg", "没有找到需要压缩的文件!");
      return result;
    }

    List<ImageResizeResult> results = imagine.processImage(localStorePath, tasks);
    List<ImageResizeResult> filesInfo = processResizeResult(results, message);

    Album album = null;
    try {
      album = albumService.getAlbumForChange(albumId, ownerId);
    } catch (Exception e) {
      LOGGER.warn("获取相册失败", e);
      result.put("success", Boolean.FALSE);
      result.put("errmsg", "没有找到对应相册,压缩图片失败!");
      return result;

    }
    List<Photo> photos = null;

    if (!filesInfo.isEmpty()) {
      /**
       * 构造一个spot User
       */
      User tempUser = new User();
      tempUser.setId(ownerId);
      tempUser.setNickname(spot.getName());
      tempUser.setPortrait(spot.getPortrait());
      photos = albumService.createPhotos(tempUser, album, filesInfo);
    }

    Map<Long, List<Photo>> filesMap = (Map<Long, List<Photo>>) WebHelper.getSessionAttribute(
        null, Constant.SESSION_UPLOAD_OK_FILES);
View Full Code Here

Examples of de.ailis.jollada.model.Spot

    public Spot buildSpot()
    {
        if (this.color == null)
            throw new IllegalStateException("color must be set");
        final Spot spot = new Spot(this.color);
        spot.setConstantAttenuation(this.constantAttenuation);
        spot.setLinearAttenuation(this.linearAttenuation);
        spot.setQuadraticAttenuation(this.quadraticAttenuation);
        spot.setFalloffAngle(this.falloffAngle);
        spot.setFalloffExponent(this.falloffExponent);
        return spot;
    }
View Full Code Here

Examples of games.stendhal.server.core.engine.Spot

    init(player);

  }

  private void init(final Player player) {
    Portal portal = new Teleporter(new Spot(player.getZone(), player.getX(), player.getY()));
    portal.setPosition(6, 3);
    add(portal);
    numCreatures = 0;
    int count = 0;
    // max ALLOWED_FAILS fails to place all creatures before we give up
View Full Code Here

Examples of games.stendhal.server.core.engine.Spot

    } catch (IOException e) {
      logger.error(e);
    }

    // Create the return portal
    portal = new ReturnTeleporter(new Spot(SingletonRepository.getRPWorld().getZone(returnZoneName), returnX, returnY));
    Point pos = getPortalPosition();
    portal.setPosition(pos.x, pos.y);
    zone.add(portal);

    // disable double click move and teleport in
View Full Code Here

Examples of games.stendhal.server.core.engine.Spot

    if (location == null) {
      player.sendPrivateText("You can not concentrate well enough to use this orb.");
      return false;
    }
   
    Spot spot = getRandomLocation(player).getSpot();
   
    if (spot == null) {
      logger.error("Failed to determine destination spot.");
      return false;
    }

    if (player.teleport(spot.getZone(), spot.getX(), spot.getY(), null, null)) {
      player.stop();
    }

    return true;
  }
View Full Code Here

Examples of games.stendhal.server.core.engine.Spot

      if (spot == null) {
        IRPZone zone = SingletonRepository.getRPWorld().getRPZone(zoneName);
        // All locations should be valid, but do not crash in case not all maps
        // are not loaded.
        if (zone != null) {
          spot = new Spot((StendhalRPZone) zone, x, y);
        } else {
          logger.error("Can not find zone: " + zoneName);
        }
      }
     
View Full Code Here

Examples of games.stendhal.server.core.engine.Spot

  }

  private void teleportToCowardPlace(final Player player) {
   
    if (cowardSpot == null) {
      cowardSpot = new Spot(SingletonRepository.getRPWorld().getZone(
      "0_semos_mountain_n2_w"), 104, 123);
    }
    player.teleport(cowardSpot.getZone(), cowardSpot.getX(), cowardSpot.getY(), Direction.DOWN, player);
    player.sendPrivateText("You wake up far away from the city in the mountains. But you don't know what happened.");
  }
View Full Code Here

Examples of games.stendhal.server.core.engine.Spot

  public AdosDeathmatch(final StendhalRPZone zone, final Area area) {
    this.zone = zone;
    arena = area;
    logger.debug("big constructor for zone", new Throwable());
    final Spot entrance = new Spot(zone, 96, 75);
    deathmatchInfo = new DeathmatchInfo(arena, zone, entrance);
    // do not let players scroll out of deathmatch
    Rectangle r = area.getShape().getBounds();
    zone.disallowOut(r.x, r.y, r.width, r.height);
  }
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.