All,

I know there might have been some discussion on this before, but I don't think 
we ever came to a final resolution, and would like to open the discussion again.

I am currently working on the PagesForRenderResource 
(DefaultPagesForRenderResource) which is the special API endpoint which will 
return all the data you need to render a page.

Currently the getPagesForRender function takes a context and an identifier. 
There is an if/else if/else block which checks the context and gets the correct 
pages to return the result.

There was talk before, and I would agree, that we change the context (or 
pageType) from an enum to just a string in order to allow people to easily 
create their own contexts. There is already a ticket open for this [1].

Assuming we do this, we need the Page Service to have context matching, so we 
can get pages by a certain context. There is also a ticket already opened for 
this [2].

The problem then becomes how we handle the identifier in the 
PagesForRenderResource. Since you will be able to create your own context, the 
identifier could be different depending on the context.

For example:

In the case of context: Profile
The identifier is the username of the profile you are looking for.

If we were to create a new context: Group
The identifier might be the id of the group you are looking for.



Looking for suggestions about how to handle this.

Thanks,
Dan



[1] https://issues.apache.org/jira/browse/RAVE-977
[2] https://issues.apache.org/jira/browse/RAVE-976

Reply via email to