public final class PresentationLockingBehavior
extends com.aspose.ms.System.Enum
Represents the behavior regarding treating the IPresentation
source (file or
InputStream
) while loading and working with an instance of IPresentation
.
BlobManagementOptions blobOptions = new BlobManagementOptions(); blobOptions.setPresentationLockingBehavior(PresentationLockingBehavior.KeepLocked); LoadOptions loadOptions = new LoadOptions(); loadOptions.setBlobManagementOptions(blobOptions); IPresentation pres = new Presentation("pres.pptx", loadOptions);
IPresentation
constructor. In the
example below, the source is the "pres.pptx" file:
For this example, the source ("pres.pptx" file) will be locked for a IPresentation
instance lifetime, i.e. can't be changed or deleted by the other process.
Modifier and Type | Field and Description |
---|---|
static int |
KeepLocked
The source will be locked for a whole lifetime of
IPresentation instance, until it will
be disposed. |
static int |
LoadAndRelease
The source will be locked only for a time of
IPresentation constructor execution. |
Clone, CloneTo, format, format, get_Caption, get_Value, getName, getName, getNames, getNames, getUnderlyingType, getUnderlyingType, getValue, getValues, isDefined, isDefined, isDefined, isDefined, parse, parse, parse, parse, register, toObject, toString
public static final int LoadAndRelease
The source will be locked only for a time of IPresentation
constructor execution.
IBlobManagementOptions.isTemporaryFilesAllowed()
/IBlobManagementOptions.setTemporaryFilesAllowed(boolean)
) is set to false, all BLOBs
will be loaded into memory. Otherwise, other means such a temporary files might be used.KeepLocked
, and if it is possible to pass the
ownership of the source to IPresentation
, it is recommended to use KeepLocked
.
public static final int KeepLocked
The source will be locked for a whole lifetime of IPresentation
instance, until it will
be disposed.
IBlobManagementOptions.IsTemporaryFilesAllowed
(IBlobManagementOptions.isTemporaryFilesAllowed()
/IBlobManagementOptions.setTemporaryFilesAllowed(boolean)
) is must be set to true for using
this behavior, otherwise exception will be thrown.LoadAndRelease
.