public final class ReadOnlyDocument extends Object
| Modifier and Type | Method and Description |
|---|---|
static ReadOnlyDocument |
create(DocumentWorkerDocument document)
Constructs a ReadOnlyDocument object which provides read access to the specified document.
|
static ReadOnlyDocument |
create(Map<String,List<DocumentWorkerFieldValue>> fields)
Constructs a ReadOnlyDocument object which provides read access to the specified fields.
|
static ReadOnlyDocument |
create(MutableDocument document)
Constructs a ReadOnlyDocument object which provides read access to the specified document.
|
static ReadOnlyDocument |
create(String reference)
Constructs a ReadOnlyDocument object for document which just has a reference but does not have any fields or subdocuments.
|
List<ReadOnlyFailure> |
getFailures() |
Map<String,List<ReadOnlyFieldValue>> |
getFields() |
String |
getReference() |
List<ReadOnlyDocument> |
getSubdocuments() |
@Nonnull public static ReadOnlyDocument create(Map<String,List<DocumentWorkerFieldValue>> fields)
Note: The specified fields must not be changed after this object is constructed.
fields - the map of fields to wrap@Nonnull public static ReadOnlyDocument create(DocumentWorkerDocument document)
Note: The specified document must not be changed after this object is constructed. If this constraint is violated then there will be undefined results. What is presented may contain elements of both the original and current document.
document - the document to wrap@Nonnull public static ReadOnlyDocument create(MutableDocument document)
Note: The specified document must not be changed after this object is constructed. If this constraint is violated then there will be undefined results. What is presented may contain elements of both the original and current document.
document - the document to wrap@Nonnull public static ReadOnlyDocument create(String reference)
This could be useful to represent the initial state of a newly created document.
reference - the reference that the document should havepublic String getReference()
@Nonnull public Map<String,List<ReadOnlyFieldValue>> getFields()
@Nonnull public List<ReadOnlyFailure> getFailures()
@Nonnull public List<ReadOnlyDocument> getSubdocuments()
Copyright © 2016–2021 EntIT Software LLC, a Micro Focus company. All rights reserved.