当前位置: 首页>>代码示例>>Java>>正文


Java BoxApiFile类代码示例

本文整理汇总了Java中com.box.androidsdk.content.BoxApiFile的典型用法代码示例。如果您正苦于以下问题:Java BoxApiFile类的具体用法?Java BoxApiFile怎么用?Java BoxApiFile使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BoxApiFile类属于com.box.androidsdk.content包,在下文中一共展示了BoxApiFile类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: BoxShareController

import com.box.androidsdk.content.BoxApiFile; //导入依赖的package包/类
public BoxShareController(BoxSession session) {
    mSession = session;
    mFileApi = new BoxApiFile(session);
    mFolderApi = new BoxApiFolder(session);
    mBookmarkApi = new BoxApiBookmark(session);
    mCollabApi = new BoxApiCollaboration(session);
    mInviteeApi = new BoxApiInvitee(session);
    mFeaturesApi = new BoxApiFeatures(session);

    mFolderShareFields = initializeShareFieldsArray(BoxFolder.ALL_FIELDS);
    mFileShareFields = initializeShareFieldsArray(BoxFile.ALL_FIELDS);
    mBookmarkShareFields = initializeShareFieldsArray(BoxBookmark.ALL_FIELDS);
    mAvatarController = new DefaultAvatarController(session);
}
 
开发者ID:box,项目名称:box-android-share-sdk,代码行数:15,代码来源:BoxShareController.java

示例2: onAuthCreated

import com.box.androidsdk.content.BoxApiFile; //导入依赖的package包/类
@Override
public void onAuthCreated(BoxAuthentication.BoxAuthenticationInfo info) {
    //Init file, and folder apis; and use them to fetch the root folder
    mFolderApi = new BoxApiFolder(mSession);
    mFileApi = new BoxApiFile(mSession);
    loadRootFolder();
}
 
开发者ID:box,项目名称:box-android-sdk,代码行数:8,代码来源:MainActivity.java

示例3: testFileUpdateRequest

import com.box.androidsdk.content.BoxApiFile; //导入依赖的package包/类
@Test
public void testFileUpdateRequest() throws NoSuchMethodException, BoxException, InvocationTargetException, IllegalAccessException, UnsupportedEncodingException, ParseException {
    String expected = "{\"name\":\"NewName\",\"description\":\"NewDescription\",\"parent\":{\"id\":\"0\",\"type\":\"folder\"},\"shared_link\":{\"access\":\"collaborators\",\"unshared_at\":\"2015-01-01T00:00:00-08:00\",\"permissions\":{\"can_download\":true}},\"tags\":[\"tag1\",\"tag2\"]}";
    TextUtils.isEmpty(null);




    TimeZone.setDefault(TimeZone.getTimeZone("GMT-8"));
    Date unshared = BoxDateFormat.parse("2015-01-01T00:00:00-08:00");
    List<String> tags = new ArrayList<String>();
    tags.add("tag1");
    tags.add("tag2");

    BoxApiFile fileApi = new BoxApiFile(null);
    BoxRequestsFile.UpdatedSharedFile updateReq = fileApi.getUpdateRequest("1")
            .setName("NewName")
            .setDescription("NewDescription")
            .setParentId("0")
            .updateSharedLink()
            .setAccess(BoxSharedLink
                    .Access.COLLABORATORS)
            .setUnsharedAt(unshared)
            .setCanDownload(true)
            .setTags(tags);

    String actual = updateReq.getStringBody();
    Assert.assertEquals(expected, actual);
}
 
开发者ID:box,项目名称:box-android-sdk,代码行数:30,代码来源:BoxFileRequestTest.java

示例4: BoxBrowseController

import com.box.androidsdk.content.BoxApiFile; //导入依赖的package包/类
/**
 * Instantiates a new Box browse controller.
 *
 * @param session   the session
 * @param apiFile   the api file
 * @param apiFolder the api folder
 * @param apiSearch the api search
 */
public BoxBrowseController(BoxSession session, BoxApiFile apiFile, BoxApiFolder apiFolder, BoxApiSearch apiSearch) {
    mSession = session;
    mFileApi = apiFile;
    mFolderApi = apiFolder;
    mSearchApi = apiSearch;
    mThumbnailManager = createThumbnailManager(mSession);
    final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);

    // Use 1/8th of the available memory for this memory cache.
    final int cacheSize = maxMemory / 8;
    if (cacheSize < BITMAP_CACHE_DEFAULT_SIZE){
        mThumbnailCache = new BitmapLruCache(cacheSize);
    }
}
 
开发者ID:box,项目名称:box-android-browse-sdk,代码行数:23,代码来源:BoxBrowseController.java


注:本文中的com.box.androidsdk.content.BoxApiFile类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。