On 03/30/2012 04:38 PM, Julien Viet wrote:
<snip>
3/ for site based API : why do we have the scheme
/something/site-type/site-name/foobar and not
/sites/site-type/site-name/concern/foobar ?
I think the reason is to be able to list all pages independent of site,
however I'm not sure how strong the use case is for this. So since
applications can be global and possibly unique to a site I think there
are two (possibly three ways) of supporting this.
** 1 **
The application resource becomes the following:
/applications/global/{app-type}/{app-id} - for global applications
/applications/{portal|group|user}/{site-name}/{app-type}/{app-id} -
for site specific applications.
Navigation and pages resource stay the same.
Solution 2: (which is basically how the mop is layed out and how the MOP
extension lays out the resources for gatein-management over REST)
Page resource becomes:
/sites/{site-type}/{site-name}/pages/{page-name}
Navigation resource becomes:
/sites/{site-type}/{site-name}/navigation/{node-id}
Application resource becomes:
/applications/{app-type}/{app-id} - for global applications
/sites/{site-type}/{site-name}/applications/{app-type}/{app-id} -
for site specific applications
** 3 **
Same layout as number 2 but we support /pages and /navigation as well
and the results link to the /sites resource. For example:
/pages = [
{
"name": "homepage",
"link": {
"href": "/sites/portal/classic/pages/homepage"
"rel": "gtn:page"
}
},
...
]