Class PageSegmentHandle
java.lang.Object
com.levigo.jadice.web.shared.model.PageSegmentHandle
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AnnotationPermissionHandle,ClassPathWithRenderControlsHandle,CompositeHandle,GenericPageSegmentHandle,PasswordContainingPageSegmentHandle
A handle to identify and recover a
PageSegment on the server.
The PageSegmentHandle instances are created by a
DocumentDataProvider on the server side.
They are passed from server to client and from client to server whenever document related
operations are involved.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract PageSegmentHandlecopy()protected voidcopyTo(PageSegmentHandle handle) final booleanGets theDocumentLayerof thisPageSegment.abstract StringCreates a "DocumentID" to be able to cache the Jadice document on recovering.intGets the index of the page containing thePageSegment.Gets the UUID for caching thePageSegment.final inthashCode()voidProvide the PageSegmentHandle with its payload data to uniquely identify it.voidsetDocumentLayer(String documentLayer) Associates the handle with aDocumentLayer, represented by its name.voidsetPageIndex(int pageIndex) Sets the index of the page containing thePageSegment.voidsetPageSegmentUUID(String pageSegmentUUID) Sets the UUID for caching thePageSegment.toString()
-
Constructor Details
-
PageSegmentHandle
public PageSegmentHandle()
-
-
Method Details
-
init
Provide the PageSegmentHandle with its payload data to uniquely identify it.- Parameters:
documentLayer- The layer this PageSegment is associated withpageIndex- The index of the page. Regardless of whether this is a "standard" or a composite document this is always the absolute page index relative to page 0 of the very first document.pageSegmentUUID- The unique key of this PageSegment
-
getDocumentLayer
Gets theDocumentLayerof thisPageSegment.- Returns:
- The name of the document layer, as in
DocumentLayer.getName().
-
setDocumentLayer
Associates the handle with aDocumentLayer, represented by its name. SeeDocumentLayer.DEFAULT,DocumentLayer.ANNOTATIONS,DocumentLayer.EMBEDDED_ANNOTATIONS.- Parameters:
documentLayer- The name of the document layer, as inDocumentLayer.getName().
-
getPageIndex
public int getPageIndex()Gets the index of the page containing thePageSegment.- Returns:
- The 0-based page index of this
PageSegment.
-
setPageIndex
public void setPageIndex(int pageIndex) Sets the index of the page containing thePageSegment.- Parameters:
pageIndex- The 0-based page index of thisPageSegment.
-
getPageSegmentUUID
Gets the UUID for caching thePageSegment.- Returns:
- pageSegmentUUID The page segment's unique identifier.
-
setPageSegmentUUID
Sets the UUID for caching thePageSegment.- Parameters:
pageSegmentUUID- The page segment's unique identifier.
-
getIdentifier
Creates a "DocumentID" to be able to cache the Jadice document on recovering. NOTE: The Identifier represents the ID of the Document, not thePageSegment!- Returns:
- The unique DocumentID of the document associated with this
PageSegment.
-
copy
-
hashCode
public final int hashCode() -
equals
-
toString
-