de.kleopatra.view.presentation
Interface BundleHandler

All Known Implementing Classes:
DefaultBundleHandler

public interface BundleHandler

Handler for localization support and synchronization of a .properties-file and presentation.

Entries in files with format:

 ..=
 
is mapped to a Presentation with formID:
 	PresentationDescription desc = findDescription(constraintID);
 	desc.setAttribute(attributeKey, attributeValue)
 

Version:
$Revision: 1.1.1.1 $ - $Date: 2004/08/19 11:18:33 $
Author:
(C) 2004 Jeanette Winzenburg, Berlin

Method Summary
 void localize(Presentation presentation, java.lang.Class targetClass)
          Find a resourceBundle in the default locale and apply to all presentation attributes of the given presentation.
 void updateBundle(Presentation presentation, java.net.URL bundle)
          Merge the presentation attributes of the presentation into the properties found at the file location bundle.
 void updatePresentation(java.util.ResourceBundle bundle, Presentation presentation)
          Apply the resourceBundle to all presentation attributes of the presentation.
 

Method Detail

localize

public void localize(Presentation presentation,
                     java.lang.Class targetClass)
Find a resourceBundle in the default locale and apply to all presentation attributes of the given presentation.

Parameters:
presentation -
targetClass -

updatePresentation

public void updatePresentation(java.util.ResourceBundle bundle,
                               Presentation presentation)
Apply the resourceBundle to all presentation attributes of the presentation.

Parameters:
bundle -
presentation -

updateBundle

public void updateBundle(Presentation presentation,
                         java.net.URL bundle)
Merge the presentation attributes of the presentation into the properties found at the file location bundle.

If there the file does not yet exist, it will be created. If the file already exists it should be encoded like Properties (that is ISO 8859-1 with escaped unicode chars). A block representing the attributes should be written (replacing a possible existing block for this presentation), unrelated content is preserved as is.

Parameters:
presentation -
bundle -


Copyright © 2003, 2004 SwingEmpire Jeanette Winzenburg. All Rights Reserved.