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

java.lang.Object
  extended by cn.com.believer.songyuanframework.openapi.storage.box.impl.simple.methods.BaseBoxMethod
Direct Known Subclasses:
AddToMyBoxMethod, AddToTagMethod, CreateFolderMethod, DeleteMethod, DownloadMethod, ExportTagsMethod, GetAccountTreeMethod, GetAuthTokenMethod, GetFileInfoMethod, GetFriendsMethod, GetTicketMethod, LogoutMethod, MoveMethod, PrivateShareMethod, PublicShareMethod, PublicUnshareMethod, RegisterNewUserMethod, RenameMethod, RequestFriendsMethod, SetDescriptionMethod, UploadMethod, VerifyRegistrationEmailMethod

public class BaseBoxMethod
extends java.lang.Object

Author:
Jimmy

Field Summary
protected  java.lang.String apiRequestFormat
          API request format.
protected  java.lang.String apiUploadUrlPrefix
          API upload URL prefix.
protected  java.lang.String apiUrlPrefix
          API URL prefix.
protected  java.lang.String apiVersion
          API version.
protected  java.util.Properties config
          the configuration.
protected  BoxHTTPManager httpManager
          core http manager.
protected  java.lang.String soapApiUrl
          API SOAP URL, it's static, so no need to read each time.
protected  java.lang.String xmlApiUrl
          API XML URL, it's static, so no need to read each time.
 
Constructor Summary
BaseBoxMethod()
           
 
Method Summary
protected  Document getBaseSoapDocument()
          get prepared document.
protected  Element getElementByActionName(java.lang.String actionName)
           
 java.lang.StringBuffer getRestUrl(java.lang.String actionName)
          according to action name, return a string buffer.
protected  Element getSoapElement(java.lang.String elmName, java.lang.String elmType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

httpManager

protected BoxHTTPManager httpManager
core http manager.


config

protected java.util.Properties config
the configuration.


apiUrlPrefix

protected java.lang.String apiUrlPrefix
API URL prefix.


apiUploadUrlPrefix

protected java.lang.String apiUploadUrlPrefix
API upload URL prefix.


apiVersion

protected java.lang.String apiVersion
API version.


apiRequestFormat

protected java.lang.String apiRequestFormat
API request format.


xmlApiUrl

protected java.lang.String xmlApiUrl
API XML URL, it's static, so no need to read each time.


soapApiUrl

protected java.lang.String soapApiUrl
API SOAP URL, it's static, so no need to read each time.

Constructor Detail

BaseBoxMethod

public BaseBoxMethod()
Method Detail

getRestUrl

public java.lang.StringBuffer getRestUrl(java.lang.String actionName)
according to action name, return a string buffer. i.e. "get_ticket" can result a "http://www.box.net/api/1.0/rest?action=get_ticket"

Parameters:
actionName - action name
Returns:
the URL in string buffer

getBaseSoapDocument

protected Document getBaseSoapDocument()
get prepared document.

Returns:
dom4j document

getElementByActionName

protected Element getElementByActionName(java.lang.String actionName)
Parameters:
actionName - action name
Returns:
element

getSoapElement

protected Element getSoapElement(java.lang.String elmName,
                                 java.lang.String elmType)
Parameters:
elmName - element name
elmType - element type
Returns:
element