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


Java BoxApiFolder类代码示例

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


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

示例1: BoxShareController

import com.box.androidsdk.content.BoxApiFolder; //导入依赖的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.BoxApiFolder; //导入依赖的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: testFolderUpdateRequest

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

    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");

    BoxApiFolder folderApi = new BoxApiFolder(null);
    BoxRequestsFolder.UpdateSharedFolder updateReq = folderApi.getUpdateRequest("1")
            .setName("NewName")
            .setDescription("NewDescription")
            .setParentId("0")
            .setFolderUploadEmailAccess(BoxUploadEmail.Access.OPEN)
            .setOwnedById("1234")
            .setSyncState(BoxFolder.SyncState.PARTIALLY_SYNCED)
            .setTags(tags)
            .updateSharedLink()
            .setAccess(BoxSharedLink.Access.COLLABORATORS)
            .setUnsharedAt(unshared)
            .setCanDownload(true);

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

示例4: BoxBrowseController

import com.box.androidsdk.content.BoxApiFolder; //导入依赖的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

示例5: onCreateFolder

import com.box.androidsdk.content.BoxApiFolder; //导入依赖的package包/类
@Override
public void onCreateFolder(String name) {
    BoxApiFolder folderApi = new BoxApiFolder(mSession);
    BoxRequestsFolder.CreateFolder req = folderApi.getCreateRequest(getCurrentFolder().getId(), name);
    getApiExecutor(getApplication()).execute(req.toTask());
}
 
开发者ID:box,项目名称:box-android-browse-sdk,代码行数:7,代码来源:BoxBrowseFolderActivity.java


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