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