Class PageFileStorage
-
- All Implemented Interfaces:
@Deprecated(message = "Use new Document API instead.") public class PageFileStorage
Interaction class which could operate with Page files
-
-
Constructor Summary
Constructors Constructor Description PageFileStorage(PageStorageProcessor pageStorageProcessor, LegacyPageStorage pageStorage, FileIOProcessor fileIOProcessor)
-
Method Summary
Modifier and Type Method Description final Uri
getImageURI(String pageId, PageFileType type)
Provides imageUri Uri for provided type final Uri
getPreviewImageURI(String pageId, PageFileType type)
Provides preview imageUri Uri for provided type final Uri
getFilteredPreviewImageURI(String pageId, ParametricFilter parametricFilter)
Provides filtered preview imageUri Uri for provided filter final Bitmap
getImage(String pageId, PageFileType type, BitmapFactory.Options options)
Provides image Bitmap for provided type final Bitmap
getImage(File imageFile, BitmapFactory.Options options)
Provides image Bitmap from provided File final Bitmap
getPreviewImage(String pageId, PageFileType type, BitmapFactory.Options options)
Provides preview image Bitmap for provided type final Bitmap
getFilteredPreviewImage(String pageId, ParametricFilter parametricFilter, BitmapFactory.Options options)
Provides filtered preview image Bitmap for provided filter final String
add(ByteArray image)
Adds original image in the storage, and returns pageId. final String
add(Bitmap image)
Adds original image in the storage, and returns pageId. final String
add(ByteArray image, PageImageSource pageImageSource)
Adds original image in the storage, and returns pageId. final String
add(Bitmap image, PageImageSource pageImageSource)
Adds original image in the storage, and returns pageId. final Page
add(ByteArray image, PageStorageProcessor.Configuration configuration)
Adds image in the storage, does not create document, and returns Page. final Page
add(Bitmap image, PageStorageProcessor.Configuration configuration)
Adds image in the storage, does not create document and returns Page. final Unit
setImageForId(ByteArray image, String existingPageId, PageFileType type)
Replace images for type, for existingPageId final Unit
setImageForId(Bitmap image, String existingPageId, PageFileType type)
Replace images for type, for existingPageId final Unit
setFilteredPreviewForId(ByteArray filteredPreview, String existingPageId, ParametricFilter parametricFilter)
Replace or creates filtered preview images for existingPageId, for filter final Unit
setFilteredPreviewForId(Bitmap filteredPreview, String existingPageId, ParametricFilter parametricFilter)
Replace or creates filtered preview images for existingPageId, for filter final Bitmap
generateAndSetFilteredPreviewForId(ByteArray filteredImage, String existingPageId, ParametricFilter parametricFilter)
Generates a preview image of given filteredImage and saves (replaces or creates) it as file for existingPageId, for parametricFilter. final Bitmap
generateAndSetFilteredPreviewForId(Bitmap filteredImage, String existingPageId, ParametricFilter parametricFilter)
Generates a preview image of given filteredImage and saves (replaces or creates) it as file for existingPageId, for parametricFilter. final Unit
removeFilteredPreviewImages(String pageId)
Removes/deletes all filtered preview images of the page. final Boolean
remove(String pageId)
Removes all files for pageId final Boolean
removeAll()
Removes all files final Unit
removeAll(List<String> pageIds)
Removes files for pages with given pageIds final List<String>
getStoredPages()
Provides List with all pageIds final Unit
removeAllExcept(List<String> pageIds)
Removes all files, except list of provided pages -
-
Constructor Detail
-
PageFileStorage
PageFileStorage(PageStorageProcessor pageStorageProcessor, LegacyPageStorage pageStorage, FileIOProcessor fileIOProcessor)
-
-
Method Detail
-
getImageURI
final Uri getImageURI(String pageId, PageFileType type)
-
getPreviewImageURI
final Uri getPreviewImageURI(String pageId, PageFileType type)
-
getFilteredPreviewImageURI
final Uri getFilteredPreviewImageURI(String pageId, ParametricFilter parametricFilter)
-
getImage
final Bitmap getImage(String pageId, PageFileType type, BitmapFactory.Options options)
-
getImage
final Bitmap getImage(File imageFile, BitmapFactory.Options options)
-
getPreviewImage
final Bitmap getPreviewImage(String pageId, PageFileType type, BitmapFactory.Options options)
-
getFilteredPreviewImage
final Bitmap getFilteredPreviewImage(String pageId, ParametricFilter parametricFilter, BitmapFactory.Options options)
-
add
final String add(ByteArray image)
Adds original image in the storage, and returns pageId. Creates previews, and doesn't detect contours.
-
add
final String add(Bitmap image)
Adds original image in the storage, and returns pageId. Creates previews, and doesn't detect contours.
-
add
final String add(ByteArray image, PageImageSource pageImageSource)
Adds original image in the storage, and returns pageId. Creates previews, and doesn't detect contours.
- Parameters:
image
- image to importpageImageSource
- the source of the image
-
add
final String add(Bitmap image, PageImageSource pageImageSource)
Adds original image in the storage, and returns pageId. Creates previews, and doesn't detect contours.
- Parameters:
image
- image to importpageImageSource
- the source of the image
-
add
final Page add(ByteArray image, PageStorageProcessor.Configuration configuration)
Adds image in the storage, does not create document, and returns Page. Creates previews.
-
add
final Page add(Bitmap image, PageStorageProcessor.Configuration configuration)
Adds image in the storage, does not create document and returns Page. Creates previews.
-
setImageForId
final Unit setImageForId(ByteArray image, String existingPageId, PageFileType type)
Replace images for type, for existingPageId
-
setImageForId
final Unit setImageForId(Bitmap image, String existingPageId, PageFileType type)
Replace images for type, for existingPageId
-
setFilteredPreviewForId
final Unit setFilteredPreviewForId(ByteArray filteredPreview, String existingPageId, ParametricFilter parametricFilter)
Replace or creates filtered preview images for existingPageId, for filter
-
setFilteredPreviewForId
final Unit setFilteredPreviewForId(Bitmap filteredPreview, String existingPageId, ParametricFilter parametricFilter)
Replace or creates filtered preview images for existingPageId, for filter
-
generateAndSetFilteredPreviewForId
final Bitmap generateAndSetFilteredPreviewForId(ByteArray filteredImage, String existingPageId, ParametricFilter parametricFilter)
Generates a preview image of given filteredImage and saves (replaces or creates) it as file for existingPageId, for parametricFilter.
-
generateAndSetFilteredPreviewForId
final Bitmap generateAndSetFilteredPreviewForId(Bitmap filteredImage, String existingPageId, ParametricFilter parametricFilter)
Generates a preview image of given filteredImage and saves (replaces or creates) it as file for existingPageId, for parametricFilter.
-
removeFilteredPreviewImages
final Unit removeFilteredPreviewImages(String pageId)
Removes/deletes all filtered preview images of the page.
-
getStoredPages
final List<String> getStoredPages()
Provides List with all pageIds
-
removeAllExcept
final Unit removeAllExcept(List<String> pageIds)
Removes all files, except list of provided pages
-
-
-
-