THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Similar to the way themes work now, widgets will be defined using a new Widget pojo which will describe all elements of a widget as defined by the widget XML descriptor as well as provide access to all resources defined in the widget. The Widget pojos would look something like ...
No Format |
---|
// Every widget configured in the system gets one instance of the Widget class to represent it public class Widget { String id String name String description List templates List resources WidgetTemplate getTemplate("path/inside/widget"); WidgetResource getResource("path/inside/widget"); } // templates that are part of a Widget public class WidgetTemplate { String id String name String description InputStream getInputStream(); } // resource files that are part of a Widget public class WidgetResource { String path InputStream getInputStream(); } |
...
The code would look something like ...
No Format |
---|
// Java objects A panel which is attached to a specific weblog WeblogPanel { String id WebsiteData weblog String name String description String layout (some way to describe a layout) List widgets (reference to widgets configured in this panel) } // A WeblogWidget only represents the association between a real Widget // and a WeblogPanel, it does not contain any actual Widget information WeblogWidget { String id WeblogPanel panel (panel this is attached to) String widgetId (id of the actual widget this represents) int ordering (some way to order the widgets within the panel) } -- sql tables roller_weblogpanels( varchar(48) panelid not null primary key, varchar(48) weblogid not null, varchar(64) name not null, varchar(255) description, varchar(64) layout not null ); roller_panelwidgets( varchar(48) id not null primary key, varchar(48) panelid not null, varchar(64) widgetid not null, integer position not null ); |
...