1919import com .marklogic .client .ForbiddenUserException ;
2020import com .marklogic .client .ResourceNotFoundException ;
2121import com .marklogic .client .Transaction ;
22+ import com .marklogic .client .bitemporal .TemporalDescriptor ;
2223import com .marklogic .client .document .DocumentDescriptor ;
2324import com .marklogic .client .document .DocumentManager ;
2425import com .marklogic .client .document .DocumentUriTemplate ;
@@ -42,9 +43,10 @@ public interface TemporalDocumentManager<R extends AbstractReadHandle, W extends
4243 * @param transaction an open transaction under which the document may have been created or deleted
4344 * @param temporalCollection the name of the temporal collection existing in the database into
4445 * which this document should be written
45- * @return the database uri that identifies the created document
46+ * @return the TemporalDescriptor including the database uri that identifies the created document,
47+ * as well as the temporal system time when the document was created
4648 */
47- public DocumentDescriptor create (DocumentUriTemplate template ,
49+ public TemporalDescriptor create (DocumentUriTemplate template ,
4850 DocumentMetadataWriteHandle metadataHandle ,
4951 W contentHandle ,
5052 ServerTransform transform ,
@@ -65,8 +67,9 @@ public DocumentDescriptor create(DocumentUriTemplate template,
6567 * @param transaction an open transaction under which the document may have been created or deleted
6668 * @param temporalCollection the name of the temporal collection existing in the database into
6769 * which this document should be written
70+ * @return the TemporalDescriptor with the temporal system time when the document was written
6871 */
69- public void write (DocumentDescriptor desc ,
72+ public TemporalDescriptor write (DocumentDescriptor desc ,
7073 DocumentMetadataWriteHandle metadataHandle ,
7174 W contentHandle ,
7275 ServerTransform transform ,
@@ -87,8 +90,9 @@ public void write(DocumentDescriptor desc,
8790 * @param transaction an open transaction under which the document may have been created or deleted
8891 * @param temporalCollection the name of the temporal collection existing in the database into
8992 * which this document should be written
93+ * @return the TemporalDescriptor with the temporal system time when the document was written
9094 */
91- public void write (String docId ,
95+ public TemporalDescriptor write (String docId ,
9296 DocumentMetadataWriteHandle metadataHandle ,
9397 W contentHandle ,
9498 ServerTransform transform ,
@@ -105,8 +109,9 @@ public void write(String docId,
105109 * @param transaction an open transaction under which the document may have been created or deleted
106110 * @param temporalCollection the name of the temporal collection existing in the database in
107111 * which this document should be marked as deleted
112+ * @return the TemporalDescriptor with the temporal system time when the document was deleted
108113 */
109- public void delete (DocumentDescriptor desc ,
114+ public TemporalDescriptor delete (DocumentDescriptor desc ,
110115 Transaction transaction ,
111116 String temporalCollection )
112117 throws ResourceNotFoundException , ForbiddenUserException , FailedRequestException ;
@@ -120,8 +125,9 @@ public void delete(DocumentDescriptor desc,
120125 * @param transaction an open transaction under which the document may have been created or deleted
121126 * @param temporalCollection the name of the temporal collection existing in the database in
122127 * which this document should be marked as deleted
128+ * @return the TemporalDescriptor with the temporal system time when the document was deleted
123129 */
124- public void delete (String docId ,
130+ public TemporalDescriptor delete (String docId ,
125131 Transaction transaction ,
126132 String temporalCollection )
127133 throws ResourceNotFoundException , ForbiddenUserException , FailedRequestException ;
@@ -139,9 +145,10 @@ public void delete(String docId,
139145 * @param temporalCollection the name of the temporal collection existing in the database into
140146 * which this document should be written
141147 * @param systemTime the application-specified system time with which this document will be marked
142- * @return the database uri that identifies the created document
148+ * @return the database uri that identifies the created document,
149+ * as well as the temporal system time when the document was created
143150 */
144- public DocumentDescriptor create (DocumentUriTemplate template ,
151+ public TemporalDescriptor create (DocumentUriTemplate template ,
145152 DocumentMetadataWriteHandle metadataHandle ,
146153 W contentHandle ,
147154 ServerTransform transform ,
@@ -162,8 +169,9 @@ public DocumentDescriptor create(DocumentUriTemplate template,
162169 * @param temporalCollection the name of the temporal collection existing in the database into
163170 * which this document should be written
164171 * @param systemTime the application-specified system time with which this document will be marked
172+ * @return the TemporalDescriptor with the temporal system time when the document was written
165173 */
166- public void write (DocumentDescriptor desc ,
174+ public TemporalDescriptor write (DocumentDescriptor desc ,
167175 DocumentMetadataWriteHandle metadataHandle ,
168176 W contentHandle ,
169177 ServerTransform transform ,
@@ -184,8 +192,9 @@ public void write(DocumentDescriptor desc,
184192 * @param temporalCollection the name of the temporal collection existing in the database into
185193 * which this document should be written
186194 * @param systemTime the application-specified system time with which this document will be marked
195+ * @return the TemporalDescriptor with the temporal system time when the document was written
187196 */
188- public void write (String docId ,
197+ public TemporalDescriptor write (String docId ,
189198 DocumentMetadataWriteHandle metadataHandle ,
190199 W contentHandle ,
191200 ServerTransform transform ,
@@ -202,8 +211,9 @@ public void write(String docId,
202211 * @param temporalCollection the name of the temporal collection existing in the database in
203212 * which this document should be marked as deleted
204213 * @param systemTime the application-specified system time with which this document will be marked
214+ * @return the TemporalDescriptor with the temporal system time when the document was deleted
205215 */
206- public void delete (DocumentDescriptor desc ,
216+ public TemporalDescriptor delete (DocumentDescriptor desc ,
207217 Transaction transaction ,
208218 String temporalCollection ,
209219 java .util .Calendar systemTime )
@@ -217,8 +227,9 @@ public void delete(DocumentDescriptor desc,
217227 * @param temporalCollection the name of the temporal collection existing in the database in
218228 * which this document should be marked as deleted
219229 * @param systemTime the application-specified system time with which this document will be marked
230+ * @return the TemporalDescriptor with the temporal system time when the document was deleted
220231 */
221- public void delete (String docId ,
232+ public TemporalDescriptor delete (String docId ,
222233 Transaction transaction ,
223234 String temporalCollection ,
224235 java .util .Calendar systemTime )
0 commit comments