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

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.PublicShareMethod

public class PublicShareMethod
extends BaseBoxMethod

Author:
Jimmy

Field Summary
 
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
PublicShareMethod()
           
 
Method Summary
 PublicShareResponse publicShare(PublicShareRequest publicShareRequest)
          This method publicly shares a file or folder.
 
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
 

Constructor Detail

PublicShareMethod

public PublicShareMethod()
Method Detail

publicShare

public PublicShareResponse publicShare(PublicShareRequest publicShareRequest)
                                throws java.io.IOException,
                                       BoxException
This method publicly shares a file or folder. 'target' param should be either 'file' or 'folder', 'target_id' is id of the file or folder to be shared. 'password' param is to protect sharing with a password, 'emails' params is array of emails to notify about a new share, 'message' param is some message to be included in a notification email. On a successful result, the status will be 'share_ok' and 'public_name' param will be a unique identifier of a publicly shared file or folder. If the result wasn't successful, the status field can be: 'share_error', 'wrong_node', 'not_logged_in', 'application_restricted'.

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