Get the URL for uploading file a new version of a file in chunks
@param id    id of file to retrieve info on
@return the upload sessions URL
165531
protected String getUploadSessionForNewFileVersionUrl(final String id) {
        return String.format(Locale.ENGLISH, "%s/files/%s/upload_sessions", getBaseUploadUri(), id);
    }
1145756
public BoxRequestsFile.GetTrashedFile getTrashedFileRequest(String id) {
        BoxRequestsFile.GetTrashedFile request = new BoxRequestsFile.GetTrashedFile(id, getTrashedFileUrl(id), mSession);
        return request;
    }
945940
@Override
    public Session newSession(String id) {
        long created = System.currentTimeMillis();
        Session session = sessionCache.newSession(id, created, (defaultMaxIdleSecs > 0 ? defaultMaxIdleSecs * 1000L : -1));
        try {
            sessionCache.put(id, session);
            sessionsCreatedStats.increment();

            for (SessionListener listener : sessionListeners) {
                listener.sessionCreated(session);
            }

            return session;
        } catch (Exception e) {
            log.warn("Failed to create a new session", e);
            return null;
        }
    }
94529
public Collection getUploadFileID(HttpServletRequest request) {
    Collection set = null;
    Debug.logVerbose("[JdonFramework]--> enter session filter ", module);
    try {
       //保证一个id只有一个

      //从下一个Filter取出ID集合，没有重复
      Collection list = imageFilter.getUploadFileID(request);
      if (list == null)
        set = new LinkedHashSet();
      else
        set = new LinkedHashSet(list);

      HttpSession session = request.getSession();
      Collection sessionList = (Collection) session.getAttribute(PIC_NAME_PACKAGE);
      if (sessionList == null) return set;

      //确保Session中的ID覆盖下一个Filter中ID
      Iterator  iter = sessionList.iterator();
      while (iter.hasNext()) {
        UploadFile uploadFile = (UploadFile) iter.next();
        if ( (uploadFile.getId() != null) && (!uploadFile.getId().equals(""))) {
          set.add(uploadFile.getId());
        } else { //如果Session有多于下一个Filter的ID，以排列TempId加入
          set.add(uploadFile.getTempId());
        }
      }
    } catch (Exception ex) {
      Debug.logError("[JdonFramework] getUploadFileID error" + ex, module);
    }
    return set;

  }
1353088
public GetSessionResponse getSession(String sessionId) {
        GetSessionRequest request = new GetSessionRequest();
        request.setSessionId(sessionId);
        return getSession(request);
    }
1203185
public BoxRequestsFile.UpdateFile getDisableSharedLinkRequest(String id) {
        BoxRequestsFile.UpdateFile request = new BoxRequestsFile.UpdateFile(id, getFileInfoUrl(id), mSession)
                .setSharedLink(null);
        return request;
    }
120475
public PMSession getSession(String sessionId) {
        final PMSession s = sessions.get(sessionId);
        if (s != null) {
            s.setLastAccess(new Date());
        }
        return s;
    }
1316950
private String buildFileUrl(String fileId) {

    if (RequestContextHolder.getRequestAttributes() != null) {
      ServletUriComponentsBuilder currentRequest = ServletUriComponentsBuilder.fromCurrentRequest();
      UriComponents downloadUri =
          currentRequest
              .replacePath(FileDownloadController.URI + '/' + fileId)
              .replaceQuery(null)
              .build();
      return downloadUri.toUriString();
    } else {
      // TODO this is a workaround for the situation where the File url needs to be created without
      // a request
      // context, in order to fix the properly we would need to add a deploy time property
      // defining the file download server location
      return FileDownloadController.URI + '/' + fileId;
    }
  }
800243
public String getAssetURL(String id) {
        String url = getRepositoryUrl() + "/assets/" + id + "?";
        if (getUserId() != null) {
            url += "userId=" + getUserId();
        }
        if (getUserId() != null && getPassword() != null) {
            url += "&password=" + getPassword();
        }
        if (getApiKey() != null) {
            url += "&apiKey=" + getApiKey();
        }
        return url;
    }
955618
public BoxRequestsFile.UpdateFile getMoveRequest(String id, String parentId) {
        BoxRequestsFile.UpdateFile request = new BoxRequestsFile.UpdateFile(id, getFileInfoUrl(id), mSession);
        request.setParentId(parentId);
        return request;
    }
545811
public StoredObject getObject(String id) {
        if (id.contains("..") || id.contains("/") || id.contains("\\")) {
            throw Exceptions.createHandled()
                            .withSystemErrorMessage(
                                    "Invalid object name: %s. A object name must not contain '..' '/' or '\\'",
                                    id)
                            .handle();
        }
        return new StoredObject(new File(file, id));
    }
1272531
public BoxRequestsFile.DeleteFile getDeleteRequest(String id) {
        BoxRequestsFile.DeleteFile request = new BoxRequestsFile.DeleteFile(id, getFileInfoUrl(id), mSession);
        return request;
    }
901677
public String addId(final URI id) {
        if (id == null) {
            return null;
        }
        final URI localId = id.normalize();
        index ++;
        final String newId = PREFIX + Integer.toString(index);
        idMap.put(localId, newId);
        return newId;
    }
100709
public BoxRequestsFolder.GetTrashedFolder getTrashedFolderRequest(String id) {
        BoxRequestsFolder.GetTrashedFolder request = new BoxRequestsFolder.GetTrashedFolder(id, getTrashedFolderUrl(id), mSession);
        return request;
    }
825354
public static MediaFile get(final BandwidthClient client, final String id) throws Exception {
    	
        final String mediaUri = client.getUserResourceInstanceUri(BandwidthConstants.MEDIA_URI_PATH, id);

        final JSONObject jsonObject = toJSONObject(client.get(mediaUri, null));
        return new MediaFile(client, jsonObject);
    }
506927
public static Recording get(final BandwidthClient client, final String id) throws Exception {
    	
        final String recordingsUri = client.getUserResourceUri(BandwidthConstants.RECORDINGS_URI_PATH);
        final String uri = StringUtils.join(new String[]{
                recordingsUri,
                id
        }, '/');
        final JSONObject jsonObject = toJSONObject(client.get(uri, null));
        return new Recording(client, recordingsUri, jsonObject);
    }
379238
public BoxRequestsFile.GetFileInfo getInfoRequest(final String id) {
        BoxRequestsFile.GetFileInfo request = new BoxRequestsFile.GetFileInfo(id, getFileInfoUrl(id), mSession);
        return request;
    }