DNA 0.6 Eclipse Publishing Plugin Design Document

The DNA Eclipse publishing plugin will be written as an Eclipse feature which can be downloaded and installed in any Eclipse application to provide DNA publishing capability. The development effort can be grouped into the following areas: business objects, an Eclipse View for displaying servers and there repositories, an Eclipse plugin to handle workspace resource publishing and unpublishing, and an Eclipse feature and update site. Each of these development areas are discussed in more detail below. Also see the feature Jira for more information.

 

Business Objects

 

The domain-knowledgeable objects. Written to be unit-testable.

 

  • ServerRegistry - a registry of servers.
  • Server - a host computer having these properties: URL, user name, password, and a collection of repositories. The repository collection will be refreshed each time the collection is requested.
  • Repository - a repository with the following properties: name, root publishing path (optional), and a collection of workspaces. The workspace collection will be refreshed each time the collection is requested.
  • Workspace - a repository workspace with the following properties: name.

 

Server View Design Document (see Jira DNA-308 subtask 2)

 

The Server View is how the user manages their servers. Servers can be created and deleted, and their properties can be edited. Each server's repositories are available as a target for publishing/unpublishing of resources in the Eclipse workspace.

 

  • UI Design

 

    • Tree - only widget needed in the view. The tree will contain root nodes for each registered server. A server node will have zero or more repository child nodes; and a repository node will have zero or more workspace child nodes. Different icons will decorate each root node. Repositories and workspaces will be obtained lazily when requested.
    • Toolbar - one button for each action (see Actions below).
    • Context Menu - a right-click menu available containing entries for each action (see Actions below).

 

  • Actions

 

    • New Server - to create a new server. Always enabled (no selection needed). Action will display the "New DNA Server" dialog.
    • Delete Server - to delete one or more servers. Enabled when one or more servers and zero non-server nodes are selected. Action will display a confirmation dialog containing a list of the server URLs being deleted.
    • Edit Server - to edit server properties. Enabled only when exactly one server and zero non-server nodes are selected. Action will display the "Edit DNA Server" dialog.
    • Collapse All - to collapse all tree nodes.

 

  • Dialogs

 

    • New DNA Server - will contain widgets to edit server properties, a test connection button to verify that a connection can be made, a save password option, and an optional respository publish/unpublish URL template which will be used to prefill the URL when publishing/unpublishing.
    • Edit DNA Server - same as "New DNA Server" dialog but prefilled with existing property values.

   
Eclipse Plugin (see Jira DNA-308 subtasks 1, 3, and 4)

 

The plugin will contribute 2 object contribution extensions. The Eclipse action framework will create proxy actions and context menu items for each of these extensions. These proxy actions will be enabled only when one or more resources in the workspace and zero non-resources are selected. When plugin starts up, the "ServerRegistry" will be loaded with the last persisted state of that registry. At plugin shutdown, the current state of the repository registry will be persisted.

 

  • Dependencies (No dependencies on any other DNA project)

 

    • RESTeasy client
    • JSON

 

  • Commands/Actions (references to these are required by the object contribution extensions)

 

    • Publish - to publish one or more selected resources to exactly one repository. Action will display the "Publish Resources To DNA Repository" dialog. If a folder is among the resources selected, all its contained resources (recursively) will be published. A "recursive" setting on this command will be settable to allow/disallow recursion. This command will use the RESTeasy PUT/POST API and will be unit testable.
    • Unpublish - to unpublish one or more selected resources from exactly one repository. Action will display the "Unpublish Resources From DNA Repository" dialog. If a folder is selected among the resources, all its contained resources (recursively) will be unpublished. A "recursive" setting on this command will be settable to allow/disallow recursion. This command will use the RESTeasy DELETE API.
    • Check Status - to check the state of the specified resource at a specific DNA repository. For instance, this command can be used to verify the resource has already been published to a repository. This command will use the RESTeasy GET API.

 

  • Dialogs

 

    • Publish Resources To DNA Repository - shows a list of the selected resources and allow the user to select which registered repository to publish them to. Also allows users to add a new repository before publishing.
    • Unpublish Resources From DNA Repository - shows a list of the selected resources and allow the user to select which registered repository to unpublish them from.

 

Feature (see DNA-308 subtasks 8 and 9)

 

An Eclipse feature plugin project is required in order to create an update site (see next section).

 

  • Create feature plugin project and feature.xml.
  • Create branding configuration files that are used in the Eclipse "About" dialog.
  • Create feature images

 

Update Site (see DNA-308 subtask 10)

 

The Eclipse software update framework uses update sites to install and update features.

 

  • Create update site plugin project

 

 

Future (post 0.6)

 

  • DNA repository browsing of content as tree nodes are expanded (see Jira DNA-308 subtask 5).
  • Preference Page (see Jira DNA-308 subtask 7)
  • Tree node decorators for resources that are currently published (see Jira DNA-308 subtask 6). Would probably need a "synchronize with repository" action.
  • Option to publish to more than one repository at a time.
  • Ability to deselect a resource from either being published or unpublished at the time the appropriate dialog is being displayed. Then the user wouldn't have to cancel out of the dialog, modify the workspace selection, and re-display the dialog.

 

Issues

 

  • Could add a Refresh action to check to see if each of the repositories (or maybe just the selected ones) are currently available. Then we could decorate availability status accordingly. Or we could have the view ping each at a preference settable time.
  • How do I persist the password in an encrypted way?
  • How will the responses from the repositories will work? For instance, will I know that a publish of a resource failed?
  • Can JSON be used to issue multiple PUT/POSTs for when multiple resources are published?
  • Thes Jira DNA-308 subtask 11 has not been addressed.