Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
Description
Not yet sure how much extra context we need. Currently we have something like:
HippoFolderRepresentation folderRep = new HippoFolderRepresentation().represent(folderBean);
Now, the difficulty with this pattern is, that we cannot easily in the representation also show all the documents and create a link for the documents. Therefore, we at least need something like:
represent(folderBean, requestContext);
However, do we need more context? Like the request and response?
Also, imo, I would like to be able in the representation to have the Link facilities, for example:
protected Link getNodeLink(
protected Link getRestLink(
but now they can be only called from a Resource, not from a representation. I want to be able to easily create links in representation code as well.