cn.com.believer.songyuanframework.openapi.storage.box.impl.simple.methods
Class GetAccountTreeMethod

java.lang.Object
  extended by cn.com.believer.songyuanframework.openapi.storage.box.impl.simple.methods.BaseBoxMethod
      extended by cn.com.believer.songyuanframework.openapi.storage.box.impl.simple.methods.GetAccountTreeMethod

public class GetAccountTreeMethod
extends BaseBoxMethod

Author:
Jimmy

Field Summary
static java.lang.String PARAMS_KEY_NOZIP
          this parameter decides whether show files or not.
static java.lang.String PARAMS_KEY_ONELEVEL
          this parameter indicates if we only show one level of our file structure.
 
Fields inherited from class cn.com.believer.songyuanframework.openapi.storage.box.impl.simple.methods.BaseBoxMethod
apiRequestFormat, apiUploadUrlPrefix, apiUrlPrefix, apiVersion, config, httpManager, soapApiUrl, xmlApiUrl
 
Constructor Summary
GetAccountTreeMethod()
           
 
Method Summary
 GetAccountTreeResponse getAccountTree(GetAccountTreeRequest getAccountTreeRequest)
          This method is used to get a user's files and folders tree.
 
Methods inherited from class cn.com.believer.songyuanframework.openapi.storage.box.impl.simple.methods.BaseBoxMethod
getBaseSoapDocument, getElementByActionName, getRestUrl, getSoapElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAMS_KEY_ONELEVEL

public static final java.lang.String PARAMS_KEY_ONELEVEL
this parameter indicates if we only show one level of our file structure.

See Also:
Constant Field Values

PARAMS_KEY_NOZIP

public static final java.lang.String PARAMS_KEY_NOZIP
this parameter decides whether show files or not. public static final String PARAMS_KEY_NOFILES = "nofiles"; /** this parameter decides whether zip the content with base64 encoding.

See Also:
Constant Field Values
Constructor Detail

GetAccountTreeMethod

public GetAccountTreeMethod()
Method Detail

getAccountTree

public GetAccountTreeResponse getAccountTree(GetAccountTreeRequest getAccountTreeRequest)
                                      throws java.io.IOException,
                                             BoxException
This method is used to get a user's files and folders tree. 'folder_id' param defines root folder from which the tree begins. 'params' is array of string where you can set additional parameters, which are: onelevel - make a tree of one level depth, so you will get only files and folders stored in folder which folder_id you have provided. nofiles - include folders only in result tree, no files. nozip - do not zip tree xml. On successful result you will receive 'listing_ok' as status and base64 encoded zipped tree xml. So you have to decode the received tree, then unzip it (if you haven't set 'nozip' param) and you will get xml like this: (note that updatedand createdare UNIX timestamps in PST).

Parameters:
getAccountTreeRequest - request
Returns:
response
Throws:
java.io.IOException - IO exception
BoxException - box exception