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 Summary
Fields Modifier and Type Field Description static String
DEFAULT_PICTURE_VIEW_PATH
static int
DEFAULT_TX_TIMEOUT_SECONDS
static String
EMPTY_PICTURE_VIEW_PATH
static String
NOTHING_TO_PROCESS_MESSAGE
static String
PICTURE_VIEWS_TX_TIMEOUT_PROPERTY
protected Integer
transactionTimeout
-
Constructor Summary
Constructors Constructor Description PictureViewsHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
computePictureViews(CoreSession session, String id, String xpath, Consumer<String> statusSetter)
Computes the picture views of the document with the givenid
and property with the givenxpath
.Path
getEmptyPicturePath()
int
getTransactionTimeout()
boolean
hasPrefillPictureViews(DocumentModel doc)
void
newTransaction()
Commits and starts a new transaction with a custom timeout.
-
-
-
Field Detail
-
PICTURE_VIEWS_TX_TIMEOUT_PROPERTY
public static final String PICTURE_VIEWS_TX_TIMEOUT_PROPERTY
- See Also:
- Constant Field Values
-
DEFAULT_TX_TIMEOUT_SECONDS
public static final int DEFAULT_TX_TIMEOUT_SECONDS
- See Also:
- Constant Field Values
-
DEFAULT_PICTURE_VIEW_PATH
public static final String DEFAULT_PICTURE_VIEW_PATH
- See Also:
- Constant Field Values
-
EMPTY_PICTURE_VIEW_PATH
public static final String EMPTY_PICTURE_VIEW_PATH
- See Also:
- Constant Field Values
-
NOTHING_TO_PROCESS_MESSAGE
public static final String NOTHING_TO_PROCESS_MESSAGE
- See Also:
- Constant Field Values
-
transactionTimeout
protected Integer transactionTimeout
-
-
Method Detail
-
computePictureViews
public void computePictureViews(CoreSession session, String id, String xpath, Consumer<String> statusSetter)
Computes the picture views of the document with the givenid
and property with the givenxpath
.Uses the given
statusSetter
to eventually set a status at the different stages of the computation.
-
newTransaction
public void newTransaction()
Commits and starts a new transaction with a custom timeout.
-
getTransactionTimeout
public int getTransactionTimeout()
-
getEmptyPicturePath
public Path getEmptyPicturePath()
- Since:
- 2021.27
-
hasPrefillPictureViews
public boolean hasPrefillPictureViews(DocumentModel doc)
- Since:
- 2021.27
-
-