Package org.nuxeo.ecm.platform.picture
Class PictureViewsHelper
- java.lang.Object
- 
- org.nuxeo.ecm.platform.picture.PictureViewsHelper
 
- 
 public class PictureViewsHelper extends Object Helper to compute the picture views of a document.- Since:
- 11.5
 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringDEFAULT_PICTURE_VIEW_PATHstatic intDEFAULT_TX_TIMEOUT_SECONDSstatic StringEMPTY_PICTURE_VIEW_PATHstatic StringNOTHING_TO_PROCESS_MESSAGEstatic StringPICTURE_VIEWS_TX_TIMEOUT_PROPERTYprotected IntegertransactionTimeout
 - 
Constructor SummaryConstructors Constructor Description PictureViewsHelper()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomputePictureViews(CoreSession session, String id, String xpath, Consumer<String> statusSetter)Computes the picture views of the document with the givenidand property with the givenxpath.PathgetEmptyPicturePath()intgetTransactionTimeout()booleanhasPrefillPictureViews(DocumentModel doc)voidnewTransaction()Commits and starts a new transaction with a custom timeout.
 
- 
- 
- 
Field Detail- 
PICTURE_VIEWS_TX_TIMEOUT_PROPERTYpublic static final String PICTURE_VIEWS_TX_TIMEOUT_PROPERTY - See Also:
- Constant Field Values
 
 - 
DEFAULT_TX_TIMEOUT_SECONDSpublic static final int DEFAULT_TX_TIMEOUT_SECONDS - See Also:
- Constant Field Values
 
 - 
DEFAULT_PICTURE_VIEW_PATHpublic static final String DEFAULT_PICTURE_VIEW_PATH - See Also:
- Constant Field Values
 
 - 
EMPTY_PICTURE_VIEW_PATHpublic static final String EMPTY_PICTURE_VIEW_PATH - See Also:
- Constant Field Values
 
 - 
NOTHING_TO_PROCESS_MESSAGEpublic static final String NOTHING_TO_PROCESS_MESSAGE - See Also:
- Constant Field Values
 
 - 
transactionTimeoutprotected Integer transactionTimeout 
 
- 
 - 
Method Detail- 
computePictureViewspublic void computePictureViews(CoreSession session, String id, String xpath, Consumer<String> statusSetter) Computes the picture views of the document with the givenidand property with the givenxpath.Uses the given statusSetterto eventually set a status at the different stages of the computation.
 - 
newTransactionpublic void newTransaction() Commits and starts a new transaction with a custom timeout.
 - 
getTransactionTimeoutpublic int getTransactionTimeout() 
 - 
getEmptyPicturePathpublic Path getEmptyPicturePath() - Since:
- 2021.27
 
 - 
hasPrefillPictureViewspublic boolean hasPrefillPictureViews(DocumentModel doc) - Since:
- 2021.27
 
 
- 
 
-