本文整理汇总了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);
}
示例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();
}
示例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);
}
示例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);
}
}
示例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());
}