Hi Lenya devs,

some comments on the new DocumentManager.add() method:


> @param parentDocument The parent document.

This must be optional to allow creation of top-level documents.
Should we allow to pass null objects? Then it should be noted in
the javadoc comment.

> @param newDocumentNodeName the name of the node representing the new
> document

> @param newDocumentId the id of the new document

Why do we need both nodeName and documentId?
Actually the document ID should be sufficient, that would even
mean that the parent is unambigously defined.

> @param documentTypeName the document type (aka resource type) of the
> new document

Why don't we pass a DocumentType object? IMO OO code
should use objects whenever possible and appropriate.

> @param language language of the new document

> @param navigationTitle navigation title

> @param initialContentsURI an URI from which initial contents for the
>        new document can be read. Optional parameter; may be set to
>        <code>null</code>,
>        in which case the default initial sample as configured in
>        <code>doctypes.xconf</code> will be used.

> @param nodeType the node type, as defined by the constants in [EMAIL 
PROTECTED]
>        org.apache.lenya.cms.authoring.NodeCreatorInterface
>        NodeCreatorInterface}

Do we really need the NodeType concept? What is it used for?
Is it even possible to obtain the node type of a document through
the API?

> @param parameters any parameters the caller needs to pass to the creator

Can't we get rid of that? IMO it's a bad practise to allow polymorphism
on the basis of arbitrary parameter sets.

> @param useSiteManager set to true if the site manager is used in the
>        publication; if set the site manager will be notified about the new
>        document

IMO the site manager must be mandatory.

-- Andreas


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to