idx int64 0 41.2k | question stringlengths 83 4.15k | target stringlengths 5 715 |
|---|---|---|
28,800 | public BoxRequestsFolder . RestoreTrashedFolder getRestoreTrashedFolderRequest ( String id ) { BoxRequestsFolder . RestoreTrashedFolder request = new BoxRequestsFolder . RestoreTrashedFolder ( id , getFolderInfoUrl ( id ) , mSession ) ; return request ; } | Gets a request that restores a trashed folder |
28,801 | public BoxRequestsShare . GetCollaborationInfo getInfoRequest ( String collaborationId ) { BoxRequestsShare . GetCollaborationInfo collab = new BoxRequestsShare . GetCollaborationInfo ( collaborationId , getCollaborationInfoUrl ( collaborationId ) , mSession ) ; return collab ; } | A request to retrieve a collaboration of a given id . |
28,802 | public BoxRequestsShare . AddCollaboration getAddRequest ( BoxCollaborationItem collaborationItem , BoxCollaboration . Role role , String login ) { BoxRequestsShare . AddCollaboration collab = new BoxRequestsShare . AddCollaboration ( getCollaborationsUrl ( ) , createStubItem ( collaborationItem ) , role , login , mSes... | A request that adds a user as a collaborator to an item by using their login . |
28,803 | public BoxRequestsShare . GetPendingCollaborations getPendingCollaborationsRequest ( ) { BoxRequestsShare . GetPendingCollaborations request = new BoxRequestsShare . GetPendingCollaborations ( getCollaborationsUrl ( ) , mSession ) ; return request ; } | A request to retrieve a list of pending collaborations for the user . |
28,804 | public BoxRequestsShare . DeleteCollaboration getDeleteRequest ( String collaborationId ) { BoxRequestsShare . DeleteCollaboration collab = new BoxRequestsShare . DeleteCollaboration ( collaborationId , getCollaborationInfoUrl ( collaborationId ) , mSession ) ; return collab ; } | A request to delete a collaboration with given collaboration id . |
28,805 | public BoxRequestsShare . UpdateOwner getUpdateOwnerRequest ( String collaborationId ) { BoxRequestsShare . UpdateOwner collab = new BoxRequestsShare . UpdateOwner ( collaborationId , getCollaborationInfoUrl ( collaborationId ) , mSession ) ; return collab ; } | A request to change role to owner given a collaboration id . |
28,806 | public static String format ( Date date ) { String format = LOCAL_DATE_FORMAT . format ( date ) ; return format . substring ( 0 , 22 ) + ":" + format . substring ( 22 ) ; } | Formats a date as a string that can be sent to the Box API . |
28,807 | public static String getTimeRangeString ( Date fromDate , Date toDate ) { if ( fromDate == null && toDate == null ) { return null ; } StringBuilder sbr = new StringBuilder ( ) ; if ( fromDate != null ) { sbr . append ( format ( fromDate ) ) ; } sbr . append ( "," ) ; if ( toDate != null ) { sbr . append ( format ( toDa... | Get a String to represent a time range . |
28,808 | public BoxError getAsBoxError ( ) { try { BoxError error = new BoxError ( ) ; error . createFromJson ( getResponse ( ) ) ; return error ; } catch ( Exception e ) { return null ; } } | Gets the server response as a BoxError . |
28,809 | public String getDescription ( ) { return mBodyMap . containsKey ( BoxItem . FIELD_DESCRIPTION ) ? ( String ) mBodyMap . get ( BoxItem . FIELD_DESCRIPTION ) : null ; } | Returns the new description currently set for the item . |
28,810 | public R setDescription ( String description ) { mBodyMap . put ( BoxItem . FIELD_DESCRIPTION , description ) ; return ( R ) this ; } | Sets the new description for the item . |
28,811 | public BoxSharedLink getSharedLink ( ) { return mBodyMap . containsKey ( BoxItem . FIELD_SHARED_LINK ) ? ( ( BoxSharedLink ) mBodyMap . get ( BoxItem . FIELD_SHARED_LINK ) ) : null ; } | Returns the shared link currently set for the item . |
28,812 | public R setSharedLink ( BoxSharedLink sharedLink ) { mBodyMap . put ( BoxItem . FIELD_SHARED_LINK , sharedLink ) ; return ( R ) this ; } | Sets the new shared link for the item . |
28,813 | public List < String > getTags ( ) { return mBodyMap . containsKey ( BoxItem . FIELD_TAGS ) ? ( List < String > ) mBodyMap . get ( BoxItem . FIELD_TAGS ) : null ; } | Returns the tags currently set for the item . |
28,814 | public R setTags ( List < String > tags ) { JsonArray jsonArray = new JsonArray ( ) ; for ( String s : tags ) { jsonArray . add ( s ) ; } mBodyMap . put ( BoxItem . FIELD_TAGS , jsonArray ) ; return ( R ) this ; } | Sets the new tags for the item . |
28,815 | public BoxRequestsComment . GetCommentInfo getInfoRequest ( String id ) { BoxRequestsComment . GetCommentInfo request = new BoxRequestsComment . GetCommentInfo ( id , getCommentInfoUrl ( id ) , mSession ) ; return request ; } | Gets a request that retrieves information on a comment |
28,816 | public BoxRequestsComment . AddReplyComment getAddCommentReplyRequest ( String commentId , String message ) { BoxRequestsComment . AddReplyComment request = new BoxRequestsComment . AddReplyComment ( commentId , message , getCommentsUrl ( ) , mSession ) ; return request ; } | Gets a request that adds a reply comment to a comment |
28,817 | public BoxRequestsComment . UpdateComment getUpdateRequest ( String id , String newMessage ) { BoxRequestsComment . UpdateComment request = new BoxRequestsComment . UpdateComment ( id , newMessage , getCommentInfoUrl ( id ) , mSession ) ; return request ; } | Gets a request that updates a comment s information |
28,818 | public BoxRequestsComment . DeleteComment getDeleteRequest ( String id ) { BoxRequestsComment . DeleteComment request = new BoxRequestsComment . DeleteComment ( id , getCommentInfoUrl ( id ) , mSession ) ; return request ; } | Gets a request that deletes a comment |
28,819 | public String getType ( ) { String type = getPropertyAsString ( FIELD_TYPE ) ; if ( type == null ) { return getPropertyAsString ( FIELD_ITEM_TYPE ) ; } return type ; } | Gets the type of the entity . |
28,820 | public static ChooseAuthenticationFragment createChooseAuthenticationFragment ( final Context context , final ArrayList < BoxAuthentication . BoxAuthenticationInfo > listOfAuthInfo ) { ChooseAuthenticationFragment fragment = createAuthenticationActivity ( context ) ; Bundle b = fragment . getArguments ( ) ; if ( b == n... | Create an instance of this fragment to display the given list of BoxAuthenticationInfos . |
28,821 | BoxRefreshAuthRequest refreshOAuth ( String refreshToken , String clientId , String clientSecret ) { BoxRefreshAuthRequest request = new BoxRefreshAuthRequest ( mSession , getTokenUrl ( ) , refreshToken , clientId , clientSecret ) ; return request ; } | Refresh OAuth to be called when OAuth expires . |
28,822 | BoxCreateAuthRequest createOAuth ( String code , String clientId , String clientSecret ) { BoxCreateAuthRequest request = new BoxCreateAuthRequest ( mSession , getTokenUrl ( ) , code , clientId , clientSecret ) ; return request ; } | Create OAuth to be called the first time session tries to authenticate . |
28,823 | public BoxRequestsShare . GetSharedLink getSharedLinkRequest ( String sharedLink , String password ) { BoxSharedLinkSession session = null ; if ( mSession instanceof BoxSharedLinkSession ) { session = ( BoxSharedLinkSession ) mSession ; } else { session = new BoxSharedLinkSession ( mSession ) ; } session . setSharedLin... | Returns a request to get a BoxItem from a shared link . |
28,824 | protected void cleanOutOldAvatars ( File directory , int maxLifeInDays ) { if ( directory != null ) { if ( mCleanedDirectories . contains ( directory . getAbsolutePath ( ) ) ) { return ; } long oldestTimeAllowed = System . currentTimeMillis ( ) - maxLifeInDays * TimeUnit . DAYS . toMillis ( maxLifeInDays ) ; File [ ] f... | Delete all files for user that is older than maxLifeInDays |
28,825 | public BoxSharedLink . Access getAccess ( ) { return mBodyMap . containsKey ( BoxItem . FIELD_SHARED_LINK ) ? ( ( BoxSharedLink ) mBodyMap . get ( BoxItem . FIELD_SHARED_LINK ) ) . getAccess ( ) : null ; } | Gets the shared link access currently set for the item in the request . |
28,826 | public R setAccess ( BoxSharedLink . Access access ) { JsonObject jsonObject = getSharedLinkJsonObject ( ) ; jsonObject . add ( BoxSharedLink . FIELD_ACCESS , SdkUtils . getAsStringSafely ( access ) ) ; BoxSharedLink sharedLink = new BoxSharedLink ( jsonObject ) ; mBodyMap . put ( BoxItem . FIELD_SHARED_LINK , sharedLi... | Sets the shared link access for the item in the request . |
28,827 | public Date getUnsharedAt ( ) { if ( mBodyMap . containsKey ( BoxItem . FIELD_SHARED_LINK ) ) { return ( ( BoxSharedLink ) mBodyMap . get ( BoxItem . FIELD_SHARED_LINK ) ) . getUnsharedDate ( ) ; } return null ; } | Returns the date the link will be disabled at currently set in the request . |
28,828 | public String getPassword ( ) { return mBodyMap . containsKey ( BoxItem . FIELD_SHARED_LINK ) ? ( ( BoxSharedLink ) mBodyMap . get ( BoxItem . FIELD_SHARED_LINK ) ) . getPassword ( ) : null ; } | Returns the shared link password currently set in the request . |
28,829 | public R setPassword ( final String password ) { JsonObject jsonObject = getSharedLinkJsonObject ( ) ; jsonObject . add ( BoxSharedLink . FIELD_PASSWORD , password ) ; BoxSharedLink sharedLink = new BoxSharedLink ( jsonObject ) ; mBodyMap . put ( BoxItem . FIELD_SHARED_LINK , sharedLink ) ; return ( R ) this ; } | Sets the shared link password in the request . |
28,830 | protected Boolean getCanDownload ( ) { return mBodyMap . containsKey ( BoxItem . FIELD_SHARED_LINK ) ? ( ( BoxSharedLink ) mBodyMap . get ( BoxItem . FIELD_SHARED_LINK ) ) . getPermissions ( ) . getCanDownload ( ) : null ; } | Returns the value for whether the shared link allows downloads currently set in the request . |
28,831 | protected R setCanDownload ( boolean canDownload ) { JsonObject jsonPermissionsObject = getPermissionsJsonObject ( ) ; jsonPermissionsObject . add ( BoxSharedLink . Permissions . FIELD_CAN_DOWNLOAD , canDownload ) ; BoxSharedLink . Permissions permissions = new BoxSharedLink . Permissions ( jsonPermissionsObject ) ; Js... | Sets whether the shared link allows downloads in the request . |
28,832 | public R setFields ( String ... fields ) { if ( fields . length == 1 && fields [ 0 ] == null ) { mQueryMap . remove ( QUERY_FIELDS ) ; return ( R ) this ; } if ( fields . length > 0 ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( fields [ 0 ] ) ; for ( int i = 1 ; i < fields . length ; ++ i ) { sb . append... | Sets the fields to return in the response . |
28,833 | public R addRepresentationHintGroup ( String ... hints ) { if ( hints != null ) { mHintHeader . append ( "[" ) ; mHintHeader . append ( TextUtils . join ( "," , hints ) ) ; mHintHeader . append ( "]" ) ; } return ( R ) this ; } | Include a representation hint group into this request . Please refer to representation documentation for more details |
28,834 | public void onReceivedAuthCode ( String code , String baseDomain ) { if ( authType == AUTH_TYPE_WEBVIEW ) { oauthView . setVisibility ( View . INVISIBLE ) ; } startMakingOAuthAPICall ( code , baseDomain ) ; } | Callback method to be called when authentication code is received along with a base domain . The code will then be used to make an API call to create OAuth tokens . |
28,835 | public boolean onAuthFailure ( AuthFailure failure ) { if ( failure . type == OAuthWebView . AuthFailure . TYPE_WEB_ERROR ) { if ( failure . mWebException . getErrorCode ( ) == WebViewClient . ERROR_CONNECT || failure . mWebException . getErrorCode ( ) == WebViewClient . ERROR_HOST_LOOKUP || failure . mWebException . g... | Callback method to be called when authentication failed . |
28,836 | protected void startMakingOAuthAPICall ( final String code , final String baseDomain ) { if ( apiCallStarted . getAndSet ( true ) ) { return ; } showSpinner ( ) ; if ( baseDomain != null ) { mSession . getAuthInfo ( ) . setBaseDomain ( baseDomain ) ; BoxLogUtils . nonFatalE ( "setting Base Domain" , baseDomain , new Ru... | Start to create OAuth after getting the code . |
28,837 | protected Dialog showDialogWhileWaitingForAuthenticationAPICall ( ) { return ProgressDialog . show ( this , getText ( R . string . boxsdk_Authenticating ) , getText ( R . string . boxsdk_Please_wait ) ) ; } | If you don t need the dialog just return null . |
28,838 | public static Intent createOAuthActivityIntent ( final Context context , BoxSession session , boolean loginViaBoxApp ) { Intent intent = createOAuthActivityIntent ( context , session . getClientId ( ) , session . getClientSecret ( ) , session . getRedirectUrl ( ) , loginViaBoxApp ) ; intent . putExtra ( EXTRA_SESSION ,... | Create intent to launch OAuthActivity using information from the given session . |
28,839 | private OAuthWebView . AuthFailure getAuthFailure ( Exception e ) { String error = getString ( R . string . boxsdk_Authentication_fail ) ; if ( e != null ) { Throwable ex = e instanceof ExecutionException ? ( ( ExecutionException ) e ) . getCause ( ) : e ; if ( ex instanceof BoxException ) { BoxError boxError = ( ( Box... | Takes an auth exception and converts it to an AuthFailure so it can be properly handled |
28,840 | public BoxRequestsSearch . Search getSearchRequest ( String query ) { BoxRequestsSearch . Search request = new BoxRequestsSearch . Search ( query , getSearchUrl ( ) , mSession ) ; return request ; } | Gets a request to search |
28,841 | protected void importRequestContentMapsFrom ( BoxRequest source ) { this . mQueryMap = new HashMap < String , String > ( source . mQueryMap ) ; this . mBodyMap = new LinkedHashMap < String , Object > ( source . mBodyMap ) ; } | Copies data from query and body maps into the current request . |
28,842 | public final T send ( ) throws BoxException { Exception ex = null ; T result = null ; try { result = onSend ( ) ; } catch ( Exception e ) { ex = e ; } onSendCompleted ( new BoxResponse ( result , ex , this ) ) ; if ( ex != null ) { if ( ex instanceof BoxException ) { throw ( BoxException ) ex ; } else { throw new BoxEx... | Synchronously make the request to Box and handle the response appropriately . |
28,843 | public String getStringBody ( ) throws UnsupportedEncodingException { if ( mStringBody != null ) return mStringBody ; if ( mContentType != null ) { switch ( mContentType ) { case JSON : JsonObject jsonBody = new JsonObject ( ) ; for ( Map . Entry < String , Object > entry : mBodyMap . entrySet ( ) ) { parseHashMapEntry... | Gets the string body for the request . |
28,844 | protected < R extends BoxRequest & BoxCacheableRequest > BoxFutureTask < T > handleToTaskForCachedResult ( ) throws BoxException { BoxCache cache = BoxConfig . getCache ( ) ; if ( cache == null ) { throw new BoxException . CacheImplementationNotFound ( ) ; } return new BoxCacheFutureTask < T , R > ( mClazz , ( R ) getC... | Default implementation for getting a task to execute the request . |
28,845 | protected void handleUpdateCache ( BoxResponse < T > response ) throws BoxException { BoxCache cache = BoxConfig . getCache ( ) ; if ( cache != null ) { cache . put ( response ) ; } } | If available makes a call to update the cache with the provided result |
28,846 | protected Socket getSocket ( ) { if ( mSocketFactoryRef != null && mSocketFactoryRef . get ( ) != null ) { return ( ( SSLSocketFactoryWrapper ) mSocketFactoryRef . get ( ) ) . getSocket ( ) ; } return null ; } | This method requires mRequiresSocket to be set to true before connecting . |
28,847 | public BoxAuthenticationInfo getAuthInfo ( String userId , Context context ) { return userId == null ? null : getAuthInfoMap ( context ) . get ( userId ) ; } | Get the BoxAuthenticationInfo for a given user . |
28,848 | public void onAuthenticated ( BoxAuthenticationInfo infoOriginal , Context context ) { BoxAuthenticationInfo info = BoxAuthenticationInfo . unmodifiableObject ( infoOriginal ) ; if ( ! SdkUtils . isBlank ( info . accessToken ( ) ) && ( info . getUser ( ) == null || SdkUtils . isBlank ( info . getUser ( ) . getId ( ) ) ... | Callback method to be called when authentication process finishes . |
28,849 | public void onAuthenticationFailure ( BoxAuthenticationInfo infoOriginal , Exception ex ) { String msg = "failure:" ; if ( getAuthStorage ( ) != null ) { msg += "auth storage :" + getAuthStorage ( ) . toString ( ) ; } BoxAuthenticationInfo info = BoxAuthenticationInfo . unmodifiableObject ( infoOriginal ) ; if ( info !... | Callback method to be called if authentication process fails . |
28,850 | public void onLoggedOut ( BoxAuthenticationInfo infoOriginal , Exception ex ) { BoxAuthenticationInfo info = BoxAuthenticationInfo . unmodifiableObject ( infoOriginal ) ; Set < AuthListener > listeners = getListeners ( ) ; for ( AuthListener listener : listeners ) { listener . onLoggedOut ( info , ex ) ; } } | Callback method to be called on logout . |
28,851 | public synchronized void logout ( final BoxSession session ) { BoxUser user = session . getUser ( ) ; if ( user == null ) { return ; } session . clearCache ( ) ; Context context = session . getApplicationContext ( ) ; String userId = user . getId ( ) ; getAuthInfoMap ( session . getApplicationContext ( ) ) ; BoxAuthent... | Log out current BoxSession . After logging out the authentication information related to the Box user in this session will be gone . |
28,852 | public synchronized void logoutAllUsers ( Context context ) { getAuthInfoMap ( context ) ; for ( String userId : mCurrentAccessInfo . keySet ( ) ) { BoxSession session = new BoxSession ( context , userId ) ; logout ( session ) ; } authStorage . clearAuthInfoMap ( context ) ; } | Log out all users . After logging out all authentication information will be gone . |
28,853 | public synchronized FutureTask < BoxAuthenticationInfo > create ( BoxSession session , final String code ) { FutureTask < BoxAuthenticationInfo > task = doCreate ( session , code ) ; BoxAuthentication . AUTH_EXECUTOR . submit ( task ) ; return task ; } | Create Oauth for the first time . This method should be called by ui to authenticate the user for the first time . |
28,854 | public synchronized FutureTask < BoxAuthenticationInfo > refresh ( BoxSession session ) { BoxUser user = session . getUser ( ) ; if ( user == null ) { return doRefresh ( session , session . getAuthInfo ( ) ) ; } getAuthInfoMap ( session . getApplicationContext ( ) ) ; BoxAuthenticationInfo info = mCurrentAccessInfo . g... | Refresh the OAuth in the given BoxSession . This method is called when OAuth token expires . |
28,855 | public synchronized void addListener ( AuthListener listener ) { if ( getListeners ( ) . contains ( listener ) ) { return ; } mListeners . add ( new WeakReference < > ( listener ) ) ; } | Add listener to listen to the authentication process for this BoxSession . |
28,856 | private synchronized void startAuthenticateUI ( BoxSession session ) { Context context = session . getApplicationContext ( ) ; Intent intent = OAuthActivity . createOAuthActivityIntent ( context , session , BoxAuthentication . isBoxAuthAppAvailable ( context ) && session . isEnabledBoxAppAuthentication ( ) ) ; intent .... | Start authentication UI . |
28,857 | public static boolean isBoxAuthAppAvailable ( final Context context ) { Intent intent = new Intent ( BoxConstants . REQUEST_BOX_APP_FOR_AUTH_INTENT_ACTION ) ; List < ResolveInfo > infos = context . getPackageManager ( ) . queryIntentActivities ( intent , PackageManager . MATCH_DEFAULT_ONLY | PackageManager . GET_RESOLV... | A check to see if an official box application supporting third party authentication is available . This lets users authenticate without re - entering credentials . |
28,858 | public boolean removeHeaderView ( View v ) { if ( mHeaderViewInfos . size ( ) > 0 ) { boolean result = false ; ListAdapter adapter = getAdapter ( ) ; if ( adapter != null && ( ( HeaderViewGridAdapter ) adapter ) . removeHeader ( v ) ) { result = true ; } removeFixedViewInfo ( v , mHeaderViewInfos ) ; return result ; } ... | Removes a previously - added header view . |
28,859 | public ListJobsResponse listJobs ( String marker , int maxKeys ) { return listJobs ( new ListJobsRequest ( ) . withMaxKeys ( maxKeys ) . withMarker ( marker ) ) ; } | List Batch - Compute jobs owned by the authenticated user . |
28,860 | public CreateJobResponse createJob ( CreateJobRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getName ( ) , "The name should not be null or empty string." ) ; checkStringNotEmpty ( request . getVmType ( ) , "The vmType should not be null or empty string." )... | Create a Batch - Compute job with the specified options . |
28,861 | public void cancelJob ( CancelJobRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getJobId ( ) , "The parameter jobId should not be null or empty string." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . PUT , JOB , req... | Cancel a Batch - Compute job . |
28,862 | private InternalRequest createRequest ( AbstractBceRequest bceRequest , HttpMethodName httpMethod , String ... pathVariables ) { List < String > path = new ArrayList < String > ( ) ; path . add ( VERSION ) ; if ( pathVariables != null ) { for ( String pathVariable : pathVariables ) { path . add ( pathVariable ) ; } } U... | Creates and initializes a new request object for the specified resource . |
28,863 | public ListRuleResponse listRules ( ListRuleRequest request ) { InternalRequest internalRequest = createRequest ( request , HttpMethodName . GET , RULES ) ; if ( request . getPageNo ( ) > 0 ) { internalRequest . addParameter ( "pageNo" , String . valueOf ( request . getPageNo ( ) ) ) ; } if ( request . getPageSize ( ) ... | list all the rules under this account |
28,864 | private InternalRequest createRequest ( AbstractBceRequest bceRequest , HttpMethodName httpMethod , String ... pathVariables ) { List < String > path = new ArrayList < String > ( ) ; path . add ( VERSION ) ; if ( pathVariables != null ) { for ( String pathVariable : pathVariables ) { path . add ( pathVariable ) ; } } U... | Creates and initializes a new request object for the specified bcc resource . This method is responsible for determining the right way to address resources . |
28,865 | private void fillPayload ( InternalRequest internalRequest , AbstractBceRequest bceRequest ) { if ( internalRequest . getHttpMethod ( ) == HttpMethodName . POST || internalRequest . getHttpMethod ( ) == HttpMethodName . PUT ) { String strJson = JsonUtils . toJsonString ( bceRequest ) ; byte [ ] requestJson = null ; try... | The method to fill the internalRequest s content field with bceRequest . Only support HttpMethodName . POST or HttpMethodName . PUT |
28,866 | private String aes128WithFirst16Char ( String content , String privateKey ) throws GeneralSecurityException { byte [ ] crypted = null ; SecretKeySpec skey = new SecretKeySpec ( privateKey . substring ( 0 , 16 ) . getBytes ( ) , "AES" ) ; Cipher cipher = Cipher . getInstance ( "AES/ECB/PKCS5Padding" ) ; cipher . init ( ... | The encryption implement for AES - 128 algorithm for BCE password encryption . Only the first 16 bytes of privateKey will be used to encrypt the content . |
28,867 | public ListInstancesResponse listInstances ( ListInstancesRequest request ) { checkNotNull ( request , "request should not be null." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , INSTANCE_PREFIX ) ; if ( request . getMarker ( ) != null ) { internalRequest . addParameter (... | Return a list of instances owned by the authenticated user . |
28,868 | public GetInstanceResponse getInstance ( GetInstanceRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkNotNull ( request . getInstanceId ( ) , "request instanceId should not be null." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , INSTANCE_... | Get the detail information of specified instance . |
28,869 | public void startInstance ( StartInstanceRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getInstanceId ( ) , "request instanceId should not be empty." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . PUT , INSTANCE_PRE... | Starting the instance owned by the user . |
28,870 | public void modifyInstanceAttributes ( ModifyInstanceAttributesRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getInstanceId ( ) , "request instanceId should not be empty." ) ; checkStringNotEmpty ( request . getName ( ) , "request name should not be empty.... | Modifying the special attribute to new value of the instance . |
28,871 | public void rebuildInstance ( String instanceId , String imageId , String adminPass ) throws BceClientException { this . rebuildInstance ( new RebuildInstanceRequest ( ) . withInstanceId ( instanceId ) . withImageId ( imageId ) . withAdminPass ( adminPass ) ) ; } | Rebuilding the instance owned by the user . |
28,872 | public void releaseInstance ( ReleaseInstanceRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getInstanceId ( ) , "request instanceId should not be empty." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . DELETE , INSTA... | Releasing the instance owned by the user . |
28,873 | public void resizeInstance ( ResizeInstanceRequest request ) { checkNotNull ( request , "request should not be null." ) ; if ( Strings . isNullOrEmpty ( request . getClientToken ( ) ) ) { request . setClientToken ( this . generateClientToken ( ) ) ; } checkStringNotEmpty ( request . getInstanceId ( ) , "request instanc... | Resizing the instance owned by the user . |
28,874 | public GetInstanceVncResponse getInstanceVnc ( GetInstanceVncRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getInstanceId ( ) , "request instanceId should not be empty." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName ... | Getting the vnc url to access the instance . |
28,875 | public void purchaseReservedInstance ( PurchaseReservedInstanceRequeset request ) { checkNotNull ( request , "request should not be null." ) ; if ( Strings . isNullOrEmpty ( request . getClientToken ( ) ) ) { request . setClientToken ( this . generateClientToken ( ) ) ; } if ( null == request . getBilling ( ) ) { reque... | Renewing the instance with fixed duration . |
28,876 | public CreateVolumeResponse createVolume ( CreateVolumeRequest request ) { checkNotNull ( request , "request should not be null." ) ; if ( Strings . isNullOrEmpty ( request . getClientToken ( ) ) ) { request . setClientToken ( this . generateClientToken ( ) ) ; } if ( null == request . getBilling ( ) ) { request . setB... | Create a volume with the specified options . |
28,877 | public ListVolumesResponse listVolumes ( ListVolumesRequest request ) { InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , VOLUME_PREFIX ) ; if ( request . getMarker ( ) != null ) { internalRequest . addParameter ( "marker" , request . getMarker ( ) ) ; } if ( request . getMaxKeys... | Listing volumes owned by the authenticated user . |
28,878 | public GetVolumeResponse getVolume ( GetVolumeRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getVolumeId ( ) , "request volumeId should not be empty." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , VOLUME_PREF... | Get the detail information of specified volume . |
28,879 | public void releaseVolume ( ReleaseVolumeRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getVolumeId ( ) , "request volumeId should not be empty." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . DELETE , VOLUME_PREFIX... | Releasing the specified volume owned by the user . |
28,880 | public CreateImageResponse createImageFromInstance ( String imageName , String instanceId ) { return createImage ( new CreateImageRequest ( ) . withImageName ( imageName ) . withInstanceId ( instanceId ) ) ; } | Creating a customized image from the instance .. |
28,881 | public CreateImageResponse createImageFromSnapshot ( String imageName , String snapshotId ) { return createImage ( new CreateImageRequest ( ) . withImageName ( imageName ) . withSnapshotId ( snapshotId ) ) ; } | Creating a customized image from specified snapshot . |
28,882 | public CreateImageResponse createImage ( CreateImageRequest request ) { checkNotNull ( request , "request should not be null." ) ; if ( Strings . isNullOrEmpty ( request . getClientToken ( ) ) ) { request . setClientToken ( this . generateClientToken ( ) ) ; } checkStringNotEmpty ( request . getImageName ( ) , "request... | Creating a customized image which can be used for creating instance in the future . |
28,883 | public ListImagesResponse listImages ( ListImagesRequest request ) { checkNotNull ( request , "request should not be null." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , IMAGE_PREFIX ) ; if ( ! Strings . isNullOrEmpty ( request . getMarker ( ) ) ) { internalRequest . addP... | Listing images owned by the authenticated user . |
28,884 | public GetImageResponse getImage ( GetImageRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getImageId ( ) , "request imageId should not be empty." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , IMAGE_PREFIX , r... | Get the detail information of specified image . |
28,885 | public void deleteImage ( DeleteImageRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getImageId ( ) , "request imageId should not be empty." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . DELETE , IMAGE_PREFIX , requ... | Deleting the specified image . |
28,886 | public ListSnapshotsResponse listSnapshots ( ListSnapshotsRequest request ) { checkNotNull ( request , "request should not be null." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , SNAPSHOT_PREFIX ) ; if ( ! Strings . isNullOrEmpty ( request . getMarker ( ) ) ) { internalRe... | Listing snapshots owned by the authenticated user . |
28,887 | public GetSnapshotResponse getSnapshot ( GetSnapshotRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getSnapshotId ( ) , "request snapshotId should no be empty." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , SN... | Getting the detail information of specified snapshot . |
28,888 | public void deleteSnapshot ( DeleteSnapshotRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getSnapshotId ( ) , "request snapshotId should no be empty." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . DELETE , SNAPSHOT... | Deleting the specified snapshot . |
28,889 | public ListSecurityGroupsResponse listSecurityGroups ( ListSecurityGroupsRequest request ) { checkNotNull ( request , "request should not be null." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , SECURITYGROUP_PREFIX ) ; if ( ! Strings . isNullOrEmpty ( request . getMarker ... | Listing SecurityGroup owned by the authenticated user . |
28,890 | public CreateSecurityGroupResponse createSecurityGroup ( CreateSecurityGroupRequest request ) { checkNotNull ( request , "request should not be null." ) ; if ( Strings . isNullOrEmpty ( request . getClientToken ( ) ) ) { request . setClientToken ( this . generateClientToken ( ) ) ; } checkStringNotEmpty ( request . get... | Creating a newly SecurityGroup with specified rules . |
28,891 | public void authorizeSecurityGroupRule ( SecurityGroupRuleOperateRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getSecurityGroupId ( ) , "securityGroupId should not be empty." ) ; if ( Strings . isNullOrEmpty ( request . getClientToken ( ) ) ) { request . ... | authorizing a security group rule to a specified security group |
28,892 | public void deleteSecurityGroup ( DeleteSecurityGroupRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getSecurityGroupId ( ) , "request securityGroupId should not be empty." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodNam... | Deleting the specified SecurityGroup . |
28,893 | public String getUserMetaDataOf ( String key ) { return this . userMetadata == null ? null : this . userMetadata . get ( key ) ; } | For internal use only . Returns the value of the userMetadata for the specified key . |
28,894 | public ListMediaResourceResponse listMediaResources ( int pageNo , int pageSize , String status , Date begin , Date end , String title ) { ListMediaResourceRequest request = new ListMediaResourceRequest ( ) . withPageNo ( pageNo ) . withPageSize ( pageSize ) . withStatus ( status ) . withBegin ( begin ) . withEnd ( end... | List the properties of all media resource managed by VOD service . recommend use marker mode to get high performance |
28,895 | public ListMediaResourceByMarkerResponse listMediaResourcesByMarker ( String marker , int maxSize , String status , Date begin , Date end , String title ) { ListMediaResourceByMarkerRequest request = new ListMediaResourceByMarkerRequest ( ) . withMarker ( marker ) . withMaxSize ( maxSize ) . withStatus ( status ) . wit... | Use marker mode to List the properties of all media resource managed by VOD service . If media size beyond 1000 strongly recommend to use marker mode |
28,896 | public GetMediaSourceDownloadResponse getMediaSourceDownload ( String mediaId , long expiredInSeconds ) { GetMediaSourceDownloadRequest request = new GetMediaSourceDownloadRequest ( ) . withMediaId ( mediaId ) . withExpiredInSeconds ( expiredInSeconds ) ; return getMediaSourceDownload ( request ) ; } | get media source download url . |
28,897 | public Datapoint addLongValue ( long time , long value ) { initialValues ( ) ; checkType ( TsdbConstants . TYPE_LONG ) ; values . add ( Lists . < JsonNode > newArrayList ( new LongNode ( time ) , new LongNode ( value ) ) ) ; return this ; } | Add datapoint of long type value . |
28,898 | public Datapoint addDoubleValue ( long time , double value ) { initialValues ( ) ; checkType ( TsdbConstants . TYPE_DOUBLE ) ; values . add ( Lists . < JsonNode > newArrayList ( new LongNode ( time ) , new DoubleNode ( value ) ) ) ; return this ; } | Add datapoint of double type value . |
28,899 | public Datapoint addStringValue ( long time , String value ) { initialValues ( ) ; checkType ( TsdbConstants . TYPE_STRING ) ; values . add ( Lists . < JsonNode > newArrayList ( new LongNode ( time ) , new TextNode ( value ) ) ) ; return this ; } | Add datapoint of String type value . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.