Interface DocumentSource.Creator
- All Superinterfaces:
DocumentSource.Saver
- Enclosing interface:
- DocumentSource
-
Method Summary
Modifier and TypeMethodDescriptiondefault Document
create()
Creates a new default document by callingcreate(String)
with the first element returned fromgetKinds()
or null if the result fromgetKinds()
is null or empty.Creates a new document by callingDocument.createUnsaved(DocumentSource, Collection)
with all the necessary meta data.default List<DocumentSource.DocumentKind>
getKinds()
Returns a list of document kinds that will be used to create the different kinds of documents.Methods inherited from interface se.conciliate.extensions.documents.DocumentSource.Saver
save
-
Method Details
-
create
Creates a new document by callingDocument.createUnsaved(DocumentSource, Collection)
with all the necessary meta data. The returned document may be displayed for editing after which this creator'sDocumentSource.Saver.save(Collection)
method is called.- Parameters:
kindId
- An id stating which kind of document to create, or null ifgetKinds()
returns null or an empty list.- Returns:
- A new document containing all metadata necessary to create a document in the source.
-
create
Creates a new default document by callingcreate(String)
with the first element returned fromgetKinds()
or null if the result fromgetKinds()
is null or empty.- Returns:
- a new default document by calling
create(String)
with the first element returned fromgetKinds()
or null if the result fromgetKinds()
is null or empty.
-
getKinds
Returns a list of document kinds that will be used to create the different kinds of documents. Different document kinds can be useful to model documents that need different sets of meta data, for example a template might require different meta data types than the documents created from the template.- Returns:
- a list of document kinds that will be used to create the different kinds of documents.
-