本文整理匯總了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);
}
}