Class COSUpdateState
- java.lang.Object
-
- org.apache.pdfbox.cos.COSUpdateState
-
public class COSUpdateState extends java.lang.ObjectACOSUpdateStateinstance manages update states for aCOSUpdateInfo. Such states are used to create aCOSIncrementfor the incremental saving of aCOSDocument.- Author:
- Christian Appl
- See Also:
COSDocumentState,COSUpdateInfo,COSIncrement
-
-
Constructor Summary
Constructors Constructor Description COSUpdateState(COSUpdateInfo updateInfo)Creates a newCOSUpdateStatefor the givenCOSUpdateInfo.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description COSDocumentStategetOriginDocumentState()Returns theoriginDocumentState, that is linked to the managedupdateInfo.booleanisUpdated()Returns the actualupdatedstate of the managedupdateInfo.voidsetOriginDocumentState(COSDocumentState originDocumentState)
-
-
-
Constructor Detail
-
COSUpdateState
public COSUpdateState(COSUpdateInfo updateInfo)
Creates a newCOSUpdateStatefor the givenCOSUpdateInfo.- Parameters:
updateInfo- TheCOSUpdateInfo, that shall be managed by thisCOSUpdateState.
-
-
Method Detail
-
setOriginDocumentState
public void setOriginDocumentState(COSDocumentState originDocumentState)
Links the given
COSDocumentStateto theupdatedstate of the managedupdateInfo.
This shall also initialize
updatedaccordingly and will also set the sameCOSDocumentStatefor all possibly contained substructures.Should
originDocumentStatealready have been set, by a prior call to this method, this shall deny to overwrite it.COSDocumentState.isAcceptingUpdates()shall determine, whether updates toupdateInfoare allowed.As long as no
COSDocumentStateis linked to thisCOSUpdateState, it shall not accept updates.- Parameters:
originDocumentState- TheCOSDocumentStatethat shall be linked to thisCOSUpdateState.- See Also:
originDocumentState,updated
-
getOriginDocumentState
public COSDocumentState getOriginDocumentState()
Returns the
originDocumentState, that is linked to the managedupdateInfo.COSDocumentState.isAcceptingUpdates()shall determine, whether updates toupdateInfoare allowed.As long as no
COSDocumentStateis linked to thisCOSUpdateState, it shall not accept updates.- Returns:
- The
COSDocumentStatelinked to thisCOSUpdateState. - See Also:
setOriginDocumentState(COSDocumentState)
-
isUpdated
public boolean isUpdated()
Returns the actualupdatedstate of the managedupdateInfo.- Returns:
- The actual
updatedstate of the managedupdateInfo - See Also:
updated
-
-