|
ModeShape Distribution 3.2.0.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PageWriter
A type of document writer that can add paging information to documents. Typically, the operations exposed by this will be used
by Pageable
connectors.
Field Summary | |
---|---|
static long |
UNKNOWN_TOTAL_SIZE
A constant that should be used by addPage(String, int, long, long) and
addPage(String, String, long, long) to signal that the number of children is either unknown or too large to
compute. |
Method Summary | |
---|---|
PageWriter |
addChild(String id,
Name name)
Add a child with the given id and name to the underlying document. |
PageWriter |
addChild(String id,
String name)
Add a child with the given id and name to the underlying document. |
PageWriter |
addPage(String parentId,
int nextPageOffset,
long blockSize,
long totalChildCount)
Create a reference to a separate page of children in its underlying document. |
PageWriter |
addPage(String parentId,
String nextPageOffset,
long blockSize,
long totalChildCount)
Create a reference to a separate page of children in its underlying document. |
EditableDocument |
document()
Returns the underlying document. |
PageWriter |
setChildren(LinkedHashMap<String,Name> children)
Set an ordered of (childId, childName) for the underlying document. |
PageWriter |
setChildren(List<? extends Document> children)
Set the list of children for the underlying document. |
Field Detail |
---|
static final long UNKNOWN_TOTAL_SIZE
addPage(String, int, long, long)
and
addPage(String, String, long, long)
to signal that the number of children is either unknown or too large to
compute.
Method Detail |
---|
PageWriter addChild(String id, String name)
id
- the new child's id; may not be nullname
- the new child's name; may not be null
PageWriter addChild(String id, Name name)
id
- the new child's id; may not be nullname
- the new child's name; may not be null
PageWriter setChildren(List<? extends Document> children)
children
- a list of EditableDocument
instances each describing a single child; may not be null
PageWriter setChildren(LinkedHashMap<String,Name> children)
The passed map does not contain any explicit information about same name siblings, so a connector would need to handle that logic.
children
- a map of (childId, childName) pairs; may not be null
PageWriter addPage(String parentId, String nextPageOffset, long blockSize, long totalChildCount)
parentId
- a non-null
String representing the identifier of the parent (owning) documentnextPageOffset
- a non-null
String representing the offset of the next page. The meaning of the offset isn't
defined and it's up to each connector to define it.blockSize
- an integer which indicates the size of the next block of childrentotalChildCount
- an integer which indicates the total number of children; should be UNKNOWN_TOTAL_SIZE
if
the number of children is unknown, too large to compute efficiently, or to signal that the repository should use the
Connector.getChildReference(String, String)
method to find the child reference for a parent and a (supposed)
child node.
Connector.getChildReference(String, String)
PageWriter addPage(String parentId, int nextPageOffset, long blockSize, long totalChildCount)
parentId
- a non-null
String representing the identifier of the parent (owning) documentnextPageOffset
- a non-null
int representing a numeric offset of the next page.blockSize
- an integer which indicates the size of the next block of childrentotalChildCount
- an integer which indicates the total number of children; should be UNKNOWN_TOTAL_SIZE
if
the number of children is unknown, too large to compute efficiently, or to signal that the repository should use the
Connector.getChildReference(String, String)
method to find the child reference for a parent and a (supposed)
child node.
Connector.getChildReference(String, String)
EditableDocument document()
EditableDocument
instance; never null
|
ModeShape Distribution 3.2.0.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |