Ticket #305 (closed Enhancement: fixed)
Minor API changes
Reported by: | jri | Owned by: | jri |
---|---|---|---|
Priority: | Major | Milestone: | Release 4.1 |
Component: | DeepaMehta Standard Distribution | Version: | 4.0.12-SNAPSHOT |
Keywords: | Cc: | dgf, Malte | |
Complexity: | 5 | Area: | Application Framework / API |
Module: |
Description
While developing the "Poemspace" application dgf met some minor shortcomings of the DM API:
1) Webclient's RendererHelper?: topic_menu() method should support "Topic ID" menu item values as well (currently only "Topic URI")
2) Files plugin:
- class StoredFile? should provide public getters.
- class DirectoryListing? should provide public getters.
3 Webclient's RendererHelper?: a new method that renders a topic link along with its icon. Like a 1-element topic_list() but not rendered as a table (which is a bad idea anyway.)
Change History
comment:2 Changed 12 years ago by Jörg Richter
Webclient: topic_menu() supports topic IDs (#305).
Extend RendererHelper?'s topic_menu() method:
The menu item values can be either the respective topic IDs or the topic URIs.
The "selected_uri" argument is changed to "selected_id_or_uri":
The ID or the URI of the initially selected item.
If an ID (number) is specified the menu item values are the respective topic IDs.
If an URI (string) is specified the menu item values are the respective topic URIs.
See ticket 305.
comment:3 Changed 12 years ago by Jörg Richter
Files plugin: public getters (#305).
StoredFile? has public getters:
- getFileName()
- getFileTopicId()
DirectoryListing? has public getters:
- List<FileItem?> getFileItems()
FileItem? has public getters:
- ItemKind? getItemKind()
- String getName()
- String getPath()
- long getSize()
- String getMediaType()
ItemKind? is new enum:
- FILE
- DIRECTORY
import de.deepamehta.plugins.files.DirectoryListing?.FileItem?;
import de.deepamehta.plugins.files.DirectoryListing?.ItemKind?;
See ticket 305.
comment:4 Changed 12 years ago by Jörg Richter
Webclient: topic_menu() supports topic IDs (#305).
Extend RendererHelper?'s topic_menu() method:
The menu item values can be either the respective topic IDs or the topic URIs.
The "selected_uri" argument is changed to "selected_id_or_uri":
The ID or the URI of the initially selected item.
If an ID (number) is specified the menu item values are the respective topic IDs.
If an URI (string) is specified the menu item values are the respective topic URIs.
See ticket 305.
comment:5 Changed 12 years ago by Jörg Richter
Files plugin: public getters (#305).
StoredFile? has public getters:
- getFileName()
- getFileTopicId()
DirectoryListing? has public getters:
- List<FileItem?> getFileItems()
FileItem? has public getters:
- ItemKind? getItemKind()
- String getName()
- String getPath()
- long getSize()
- String getMediaType()
ItemKind? is new enum:
- FILE
- DIRECTORY
import de.deepamehta.plugins.files.DirectoryListing?.FileItem?;
import de.deepamehta.plugins.files.DirectoryListing?.ItemKind?;
See ticket 305.
comment:6 Changed 12 years ago by Jörg Richter
Merge "dgf/deepamehta accesscontrol" (#305).
ItemKind? is a top-level class and is reused in ResourceInfo?.
According to the original pull request 2 changes were made:
1) FileItem? is still an inner class of DirectoryListing?.
It is only needed there.
2) ItemKind? is serialized via stringify().
We never want the program logic to rely on the toString() value.
toString() is exclusively used for user-friendly logging messages.
Thanks, dgf for the patch!
See ticket 305.
comment:7 Changed 12 years ago by Jörg Richter
Merge "dgf/deepamehta accesscontrol" (#305).
ItemKind? is a top-level class and is reused in ResourceInfo?.
According to the original pull request 2 changes were made:
1) FileItem? is still an inner class of DirectoryListing?.
It is only needed there.
2) ItemKind? is serialized via stringify().
We never want the program logic to rely on the toString() value.
toString() is exclusively used for user-friendly logging messages.
Thanks, dgf for the patch!
See ticket 305.
comment:8 Changed 12 years ago by Jörg Richter
Webclient: topic_menu() supports topic IDs (#305).
Extend RendererHelper?'s topic_menu() method:
The menu item values can be either the respective topic IDs or the topic URIs.
The "selected_uri" argument is changed to "selected_id_or_uri":
The ID or the URI of the initially selected item.
If an ID (number) is specified the menu item values are the respective topic IDs.
If an URI (string) is specified the menu item values are the respective topic URIs.
See ticket 305.
comment:9 Changed 12 years ago by Jörg Richter
Files plugin: public getters (#305).
StoredFile? has public getters:
- getFileName()
- getFileTopicId()
DirectoryListing? has public getters:
- List<FileItem?> getFileItems()
FileItem? has public getters:
- ItemKind? getItemKind()
- String getName()
- String getPath()
- long getSize()
- String getMediaType()
ItemKind? is new enum:
- FILE
- DIRECTORY
import de.deepamehta.plugins.files.DirectoryListing?.FileItem?;
import de.deepamehta.plugins.files.DirectoryListing?.ItemKind?;
See ticket 305.
comment:10 Changed 12 years ago by Jörg Richter
Merge "dgf/deepamehta accesscontrol" (#305).
ItemKind? is a top-level class and is reused in ResourceInfo?.
According to the original pull request 2 changes were made:
1) FileItem? is still an inner class of DirectoryListing?.
It is only needed there.
2) ItemKind? is serialized via stringify().
We never want the program logic to rely on the toString() value.
toString() is exclusively used for user-friendly logging messages.
Thanks, dgf for the patch!
See ticket 305.
comment:11 Changed 12 years ago by jri
- Status changed from accepted to closed
- Resolution set to fixed
Issues 1) and 2) of the original description are solved. Issue 3) is transfered to #310.