org.outerj.daisy.frontend.editor
Interface PartEditor

All Known Implementing Classes:
BookAclPartEditor, BookMetadataPartEditor, BookPartEditor, BookPublicationTypesPartEditor, HtmlPartEditor, NavigationPartEditor, PlainTextPartEditor, UploadPartEditor

public interface PartEditor

Interface to be implemented by part editors.

A PartEditor instance is instanciated through a PartEditorFactory.


Method Summary
 Form getForm(org.outerj.daisy.repository.schema.PartTypeUse partTypeUse, DocumentEditorForm documentEditorForm, org.outerj.daisy.repository.Repository repository)
          Returns a form for the specified PartTypeUse.
 java.lang.String getFormTemplate()
          Returns the URI to the form template.
 void load(Form form, org.outerj.daisy.repository.Document document, org.outerj.daisy.repository.Part part, org.outerj.daisy.repository.Repository repository)
          Loads existing data into the part form.
 void save(Form form, org.outerj.daisy.repository.Document document)
          Saves the part data (could be removing the part if the editor is empty).
 

Method Detail

getForm

Form getForm(org.outerj.daisy.repository.schema.PartTypeUse partTypeUse,
             DocumentEditorForm documentEditorForm,
             org.outerj.daisy.repository.Repository repository)
             throws java.lang.Exception
Returns a form for the specified PartTypeUse.

Throws:
java.lang.Exception

getFormTemplate

java.lang.String getFormTemplate()
Returns the URI to the form template.


load

void load(Form form,
          org.outerj.daisy.repository.Document document,
          org.outerj.daisy.repository.Part part,
          org.outerj.daisy.repository.Repository repository)
          throws java.lang.Exception
Loads existing data into the part form.

Throws:
java.lang.Exception

save

void save(Form form,
          org.outerj.daisy.repository.Document document)
          throws java.lang.Exception
Saves the part data (could be removing the part if the editor is empty).

Note: the form has an attribute called "partType" that contains the PartType for which this editor serves. That way, you know which part this form represents.

Throws:
java.lang.Exception


Copyright © -2006 . All Rights Reserved.