2020import com .marklogic .client .ResourceNotFoundException ;
2121import com .marklogic .client .Transaction ;
2222import com .marklogic .client .document .DocumentDescriptor ;
23+ import com .marklogic .client .document .DocumentManager ;
2324import com .marklogic .client .document .DocumentUriTemplate ;
2425import com .marklogic .client .document .ServerTransform ;
2526import com .marklogic .client .io .marker .AbstractReadHandle ;
2829import com .marklogic .client .util .RequestParameters ;
2930
3031public interface TemporalDocumentManager <R extends AbstractReadHandle , W extends AbstractWriteHandle > {
31- public DocumentDescriptor create (DocumentUriTemplate template ,
32+ /**
33+ * Just like {@link DocumentManager#create(DocumentUriTemplate, DocumentMetadataWriteHandle,
34+ * AbstractWriteHandle, ServerTransform, Transaction) create} but create document
35+ * in a temporalCollection, which will enforce all the rules of
36+ * <a href="http://docs.marklogic.com/8.0/guide/concepts/data-management#id_98803">
37+ * bitemporal data management</a>.
38+ * @param template the template for constructing the document uri
39+ * @param metadataHandle a handle for writing the metadata of the document
40+ * @param content an IO representation of the document content
41+ * @param transform a server transform to modify the document content
42+ * @param transaction an open transaction under which the document may have been created or deleted
43+ * @param temporalCollection the name of the temporal collection existing in the database into
44+ * which this document should be written
45+ * @return the database uri that identifies the created document
46+ */
47+ public DocumentDescriptor create (DocumentUriTemplate template ,
3248 DocumentMetadataWriteHandle metadataHandle ,
3349 W contentHandle ,
3450 ServerTransform transform ,
3551 Transaction transaction ,
3652 String temporalCollection )
3753 throws ForbiddenUserException , FailedRequestException ;
3854
55+ /**
56+ * Just like {@link DocumentManager#write(DocumentDescriptor, DocumentMetadataWriteHandle,
57+ * AbstractWriteHandle, ServerTransform, Transaction) write} but write document
58+ * in a temporalCollection, which will enforce all the rules of
59+ * <a href="http://docs.marklogic.com/8.0/guide/concepts/data-management#id_98803">
60+ * bitemporal data management</a>.
61+ * @param desc a descriptor for the URI identifier, format, and mimetype of the document
62+ * @param metadataHandle a handle for writing the metadata of the document
63+ * @param content an IO representation of the document content
64+ * @param transform a server transform to modify the document content
65+ * @param transaction an open transaction under which the document may have been created or deleted
66+ * @param temporalCollection the name of the temporal collection existing in the database into
67+ * which this document should be written
68+ */
3969 public void write (DocumentDescriptor desc ,
4070 DocumentMetadataWriteHandle metadataHandle ,
4171 W contentHandle ,
@@ -44,25 +74,75 @@ public void write(DocumentDescriptor desc,
4474 String temporalCollection )
4575 throws ResourceNotFoundException , ForbiddenUserException , FailedRequestException ;
4676
77+ /**
78+ * Just like {@link DocumentManager#write(String, DocumentMetadataWriteHandle,
79+ * AbstractWriteHandle, ServerTransform, Transaction) write} but write document
80+ * in a temporalCollection, which will enforce all the rules of
81+ * <a href="http://docs.marklogic.com/8.0/guide/concepts/data-management#id_98803">
82+ * bitemporal data management</a>.
83+ * @param docId the URI identifier for the document
84+ * @param metadataHandle a handle for writing the metadata of the document
85+ * @param content an IO representation of the document content
86+ * @param transform a server transform to modify the document content
87+ * @param transaction an open transaction under which the document may have been created or deleted
88+ * @param temporalCollection the name of the temporal collection existing in the database into
89+ * which this document should be written
90+ */
4791 public void write (String docId ,
4892 DocumentMetadataWriteHandle metadataHandle ,
4993 W contentHandle ,
5094 ServerTransform transform ,
5195 Transaction transaction ,
5296 String temporalCollection )
5397 throws ResourceNotFoundException , ForbiddenUserException , FailedRequestException ;
54-
98+
99+ /**
100+ * Just like {@link DocumentManager#delete(DocumentDescriptor, Transaction) delete} but delete
101+ * document in a temporalCollection, which will enforce all the rules of
102+ * <a href="http://docs.marklogic.com/8.0/guide/concepts/data-management#id_98803">
103+ * bitemporal data management</a>.
104+ * @param desc a descriptor for the URI identifier, format, and mimetype of the document
105+ * @param transaction an open transaction under which the document may have been created or deleted
106+ * @param temporalCollection the name of the temporal collection existing in the database in
107+ * which this document should be marked as deleted
108+ */
55109 public void delete (DocumentDescriptor desc ,
56110 Transaction transaction ,
57111 String temporalCollection )
58112 throws ResourceNotFoundException , ForbiddenUserException , FailedRequestException ;
59113
114+ /**
115+ * Just like {@link DocumentManager#delete(String, Transaction) delete} but delete
116+ * document in a temporalCollection, which will enforce all the rules of
117+ * <a href="http://docs.marklogic.com/8.0/guide/concepts/data-management#id_98803">
118+ * bitemporal data management</a>.
119+ * @param docId the URI identifier for the document
120+ * @param transaction an open transaction under which the document may have been created or deleted
121+ * @param temporalCollection the name of the temporal collection existing in the database in
122+ * which this document should be marked as deleted
123+ */
60124 public void delete (String docId ,
61125 Transaction transaction ,
62126 String temporalCollection )
63127 throws ResourceNotFoundException , ForbiddenUserException , FailedRequestException ;
64-
65- // The following methods take a system time which is an advanced concept in bitemporal feature.
128+
129+ // The following methods take a system time which is an advanced concept in bitemporal feature.
130+ //TODO: remove all extraParams
131+ /**
132+ * Just like {@link #create(DocumentUriTemplate, DocumentMetadataWriteHandle,
133+ * AbstractWriteHandle, ServerTransform, Transaction, String) create} but create document
134+ * at a specific system time
135+ * @param template the template for constructing the document uri
136+ * @param metadataHandle a handle for writing the metadata of the document
137+ * @param content an IO representation of the document content
138+ * @param transform a server transform to modify the document content
139+ * @param transaction an open transaction under which the document may have been created or deleted
140+ * @param temporalCollection the name of the temporal collection existing in the database into
141+ * which this document should be written
142+ * @param systemTime the application-specified system time with which this document will be marked
143+ * @param extraParams this param is going away in 8.0-1
144+ * @return the database uri that identifies the created document
145+ */
66146 public DocumentDescriptor create (DocumentUriTemplate template ,
67147 DocumentMetadataWriteHandle metadataHandle ,
68148 W contentHandle ,
@@ -72,7 +152,21 @@ public DocumentDescriptor create(DocumentUriTemplate template,
72152 java .util .Calendar systemTime ,
73153 RequestParameters extraParams )
74154 throws ForbiddenUserException , FailedRequestException ;
75-
155+
156+ /**
157+ * Just like {@link #write(DocumentDescriptor, DocumentMetadataWriteHandle,
158+ * AbstractWriteHandle, ServerTransform, Transaction, String) write} but write document
159+ * at a specific system time
160+ * @param desc a descriptor for the URI identifier, format, and mimetype of the document
161+ * @param metadataHandle a handle for writing the metadata of the document
162+ * @param content an IO representation of the document content
163+ * @param transform a server transform to modify the document content
164+ * @param transaction an open transaction under which the document may have been created or deleted
165+ * @param temporalCollection the name of the temporal collection existing in the database into
166+ * which this document should be written
167+ * @param systemTime the application-specified system time with which this document will be marked
168+ * @param extraParams this param is going away in 8.0-1
169+ */
76170 public void write (DocumentDescriptor desc ,
77171 DocumentMetadataWriteHandle metadataHandle ,
78172 W contentHandle ,
@@ -82,7 +176,21 @@ public void write(DocumentDescriptor desc,
82176 java .util .Calendar systemTime ,
83177 RequestParameters extraParams )
84178 throws ResourceNotFoundException , ForbiddenUserException , FailedRequestException ;
85-
179+
180+ /**
181+ * Just like {@link #write(String, DocumentMetadataWriteHandle,
182+ * AbstractWriteHandle, ServerTransform, Transaction, String) write} but write document
183+ * at a specific system time
184+ * @param docId the URI identifier for the document
185+ * @param metadataHandle a handle for writing the metadata of the document
186+ * @param content an IO representation of the document content
187+ * @param transform a server transform to modify the document content
188+ * @param transaction an open transaction under which the document may have been created or deleted
189+ * @param temporalCollection the name of the temporal collection existing in the database into
190+ * which this document should be written
191+ * @param systemTime the application-specified system time with which this document will be marked
192+ * @param extraParams this param is going away in 8.0-1
193+ */
86194 public void write (String docId ,
87195 DocumentMetadataWriteHandle metadataHandle ,
88196 W contentHandle ,
@@ -92,41 +200,34 @@ public void write(String docId,
92200 java .util .Calendar systemTime ,
93201 RequestParameters extraParams )
94202 throws ResourceNotFoundException , ForbiddenUserException , FailedRequestException ;
95-
203+
204+ /**
205+ * Just like {@link #delete(DocumentDescriptor, Transaction, String) delete} but delete
206+ * document at a specified system time
207+ * @param desc a descriptor for the URI identifier, format, and mimetype of the document
208+ * @param transaction an open transaction under which the document may have been created or deleted
209+ * @param temporalCollection the name of the temporal collection existing in the database in
210+ * which this document should be marked as deleted
211+ * @param systemTime the application-specified system time with which this document will be marked
212+ */
96213 public void delete (DocumentDescriptor desc ,
97214 Transaction transaction ,
98215 String temporalCollection ,
99216 java .util .Calendar systemTime )
100217 throws ResourceNotFoundException , ForbiddenUserException , FailedRequestException ;
101-
218+
219+ /**
220+ * Just like {@link #delete(String, Transaction, String) delete} but delete
221+ * document at a specified system time
222+ * @param docId the URI identifier for the document
223+ * @param transaction an open transaction under which the document may have been created or deleted
224+ * @param temporalCollection the name of the temporal collection existing in the database in
225+ * which this document should be marked as deleted
226+ * @param systemTime the application-specified system time with which this document will be marked
227+ */
102228 public void delete (String docId ,
103229 Transaction transaction ,
104230 String temporalCollection ,
105231 java .util .Calendar systemTime )
106232 throws ResourceNotFoundException , ForbiddenUserException , FailedRequestException ;
107-
108- /*
109- public <T extends R> T read(DocumentDescriptor desc,
110- DocumentMetadataReadHandle metadataHandle,
111- T contentHandle,
112- ServerTransform transform,
113- Transaction transaction,
114- String temporalCollection)
115- throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException;
116-
117- public <T extends R> T read(String docId,
118- DocumentMetadataReadHandle metadataHandle,
119- T contentHandle,
120- ServerTransform transform,
121- Transaction transaction,
122- String temporalCollection)
123- throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException;
124-
125- public DocumentPage read(ServerTransform transform,
126- Transaction transaction,
127- String temporalCollection,
128- String[] uris)
129- throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException;
130- */
131-
132233}
0 commit comments