hello folks,
i have a interface-design-question ...
i have a document-service-interface:
public interface DocumentProvider {
FileContent getDocumentContent(Document aDocument);
...
void setDocumentHandlerRegistry(DocumentHandlerRegistry aRegistry);
}
Q: is it correct to insert the setter for the injected "service-bean" into the document-service-interface?
the document-service should use the document-handler-registry to "find" a document-handler
for the requested "document-type" (getDocumentContent) ... there are many different document-types and so
many differtn document-handlers.
Q: is registry a good name? document-handler-service could be a better name?!
Q: how should i initialize such a registry with spring ... i guess the xml should look a little bit complex at the end?!
any help will be welcome
regards
andreas



Reply With Quote
