-
- All Implemented Interfaces:
-
org.readium.r2.shared.publication.services.ContentProtectionService.UserRights
public class ContentProtectionService.UserRights.Unrestricted implements ContentProtectionService.UserRights
A UserRights without any restriction.
-
-
Method Summary
Modifier and Type Method Description BooleancanCopy(String text)Returns whether the user is allowed to copy the given text to the pasteboard. Booleancopy(String text)Consumes the given text with the copy right. BooleancanPrint(Integer pageCount)Returns whether the user is allowed to print the given amount of pages. Booleanprint(Integer pageCount)Consumes the given amount of pages with the print right. BooleangetCanCopy()Returns whether the user is currently allowed to copy content to the pasteboard. BooleangetCanPrint()Returns whether the user is currently allowed to print the content. -
-
Method Detail
-
canCopy
Boolean canCopy(String text)
Returns whether the user is allowed to copy the given text to the pasteboard.
This is more specific than the canCopy property, and can return false if the given text exceeds the allowed amount of characters to copy.
To be used before presenting, for example, a pop-up to share a selected portion of content.
-
copy
Boolean copy(String text)
Consumes the given text with the copy right.
Returns whether the user is allowed to copy the given text.
-
print
Boolean print(Integer pageCount)
Consumes the given amount of pages with the print right.
Returns whether the user is allowed to print the given amount of pages.
-
getCanCopy
Boolean getCanCopy()
Returns whether the user is currently allowed to copy content to the pasteboard.
Navigators and reading apps can use this to know if the "Copy" action should be greyed out or not. This should be called every time the "Copy" action will be displayed, because the value might change during runtime.
-
getCanPrint
Boolean getCanPrint()
Returns whether the user is currently allowed to print the content.
Navigators and reading apps can use this to know if the "Print" action should be greyed out or not.
-
-
-
-