Hi Julien,
I have a PoC (details follow) which makes use of the MOP attributes.
This PoC got green on our side as meeting the customer's requirements.
We have decided not to follow your proposal to use
org.gatein.mop.api.workspace.link.URLLink because
(1) there is no support for it available in the portal itself
(2) we see no elegant and backwards-compatible way how gatein-api could
be extended to use it. The present API seems to be too closely tied to
internal pages.
(3) The URLLink proposal does not cover the "open in new window"
requirement of the customer
== The PoC details
Code:
== The main features if the PoC
* There is a new getAttributes() in org.gatein.api.navigation.Node
* The PoC uses org.gatein.mop.api.Attributes for storing/retieving, so
there is no backwards-incompatible change in and below the MOP layer
* It is now also possible to import a navigation node having something like
<properties>
<entry key="externalURI">http://google.com</entry>
<entry key="openInNewWindow">true</entry>
</properties>
in navigation.xml
== TODOs
* filtering/api-namespace for the attributes set through the public API.
This is necessary to avoid potential name clash with present or future
attributes set internally by the portal. The attributes set through the
API should (transparently) get some prefix before they are handed over
to the MOP layer.
* Marshall/unmarshall
* finish JavaDoc
* Using *Properties name in the API is probably better, because that is
how it is called in navigation.xml
Best,
Peter
On 2014-01-21 00:00, Julien Viet wrote:
and this is used when rendering the link
Julien Viet
julienviet.com
On Monday 20 January 2014 at 20:40, Peter Palaga wrote:
> On 2014-01-20 20:13, Julien Viet wrote:
>> can you tell me what are the properties you want store in addition of
>> the URLLink ?
>
> The customer mentions an "open in new window" true/false attribute.
> -- PP
>
>> Julien Viet
>>
julienviet.com <
http://julienviet.com>
>>
>> On Monday 20 January 2014 at 14:21, Peter Palaga wrote:
>>
>>> Thanks for the info, Julien. Yes, that is a way how to solve the URL
>>> part of the problem.
>>>
>>> For the "open in new window", part I'd anyway expose the MOP
attributes
>>> in some form trough the GateIn API.
>>>
>>> Thanks again,
>>>
>>> Peter
>>>
>>> On 2014-01-20 13:47, Julien Viet wrote:
>>>> I asked this question to be sure about your answer.
>>>>
>>>> For having navigation node pointing to external URL, you should use
>>>> instead the MOP that provides a way for achieving this result.
>>>>
>>>> The org.gatein.mop.api.workspace.Navigation object owns
>>>> org.gatein.mop.api.workspace.link.Link object that is implemented for
>>>> pages by the org.gatein.mop.api.workspace.link.PageLink subtype that
>>>> means that the navigations points to a page.
>>>>
>>>> There is also the org.gatein.mop.api.workspace.link.URLLink that seems
>>>> to be the feature you want to implement.
>>>>
>>>> This URLLink was never really exploited in the portal MOP however it is
>>>> a feature that was anticipated when the MOP was designed.
>>>>
>>>> Julien Viet
>>>>
julienviet.com <
http://julienviet.com>
>>>>
>>>> On Monday 20 January 2014 at 13:22, Peter Palaga wrote:
>>>>
>>>>> Hi Julien,
>>>>>
>>>>> for whatever reason, the customer wants to have navigation items
>>>>> pointing to URLs external to the current portal installation.
>>>>>
>>>>> For example, if the current portal is hosted on
my-company.com
>>>>> <
http://my-company.com>
>>>>> <
http://my-company.com>
>>>>> <
http://my-company.com> they want
>>>>> to be able to have navigation items pointing at e.g.
>>>>>
another-company.com/somepage.html
>>>>> <
http://another-company.com/somepage.html>
>>>>> <
http://another-company.com/somepage.html>
>>>>> <
http://another-company.com/somepage.html>. This is not
possible with
>>>>> the present
>>>>> API, which allows only for pointing at pages existing in the current
>>>>> portal.
>>>>>
>>>>> Note that they also mention the need to store the info hwether the
>>>>> link
>>>>> should be opened in a new window.
>>>>>
>>>>> The proposed node properties can solve both.
>>>>>
>>>>> Best,
>>>>>
>>>>> Peter
>>>>>
>>>>> On 2014-01-20 12:56, Julien Viet wrote:
>>>>>> I do not understand clearly what means "navigation nodes
pointing to
>>>>>> external URLs” .
>>>>>>
>>>>>> what is the purpose of these external URLs ?
>>>>>>
>>>>>> Julien Viet
>>>>>>
julienviet.com <
http://julienviet.com>
>>>>>>
>>>>>> On Monday 20 January 2014 at 10:46, Peter Palaga wrote:
>>>>>>
>>>>>>> Hi Julien, inline...
>>>>>>>
>>>>>>> On 2014-01-20 10:33, Julien Viet wrote:
>>>>>>>> Hi Peter,
>>>>>>>>
>>>>>>>> can you describe the attributes you would like to store
in this
>>>>>>>> map ?
>>>>>>>
>>>>>>> Sure. Cite from
>>>>>>>
https://community.jboss.org/wiki/CustomNavigatonNodeProperties
>>>>>>>
>>>>>>> * Both keys and values of the new node Properties would
allow
>>>>>>> strings only
>>>>>>> * The API would guarantee the uniqueness of the keys per
node
>>>>>>> * The API would not guarantee anything about store/iteration
>>>>>>> order of
>>>>>>> the properties
>>>>>>> * GUI for editing the properties not a priority
>>>>>>> * Authorization: same as for other Navigation Node attributes
-
>>>>>>> who can
>>>>>>> edit those, can edit also the new properties.
>>>>>>>
>>>>>>> -- Peter
>>>>>>>
>>>>>>>>
>>>>>>>> Julien Viet
>>>>>>>>
julienviet.com <
http://julienviet.com>
>>>>>>>>
>>>>>>>> On Friday 17 January 2014 at 13:58, Peter Palaga wrote:
>>>>>>>>
>>>>>>>>> Hi Julien,
>>>>>>>>>
>>>>>>>>> I have just found that there is
>>>>>>>>>
org.gatein.mop.api.workspace.Navigation.getAttributes() on the MOP
>>>>>>>>> layer
>>>>>>>>> which could be used to store the requested navigation
node
>>>>>>>>> properties.
>>>>>>>>> Can somebody see a reason, why this is not a good
idea?
>>>>>>>>>
>>>>>>>>> Naturally, I'd have to find a way how to prevent
a clash with
>>>>>>>>> keys we
>>>>>>>>> use internaly (e.g. MappedAttributes). Some simple
prefix for
>>>>>>>>> the keys
>>>>>>>>> passed from the gatein api could solve that, I
guess.
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>>
>>>>>>>>> Peter
>>>>>>>>>
>>>>>>>>> On 2014-01-16 18:13, Peter Palaga wrote:
>>>>>>>>>> Hi *,
>>>>>>>>>>
>>>>>>>>>> I am starting to look at the customer request to
provide a way to
>>>>>>>>>> define
>>>>>>>>>> navigation nodes pointing to external URLs. They
can accomplish
>>>>>>>>>> this in
>>>>>>>>>> Portal 4.3 using page properties, storing there
not only the
>>>>>>>>>> URL but
>>>>>>>>>> also if the link should open in a new window,
etc. This data is
>>>>>>>>>> then
>>>>>>>>>> used in a custom navigation portlet.
>>>>>>>>>>
>>>>>>>>>> There is no way known to me how this could be
achieved using the
>>>>>>>>>> present
>>>>>>>>>> navigation API. The following wiki page offers a
space to
>>>>>>>>>> discuss the
>>>>>>>>>> solution. Please comment!
>>>>>>>>>>
>>>>>>>>>>
https://community.jboss.org/wiki/CustomNavigatonNodeProperties
>>>>>>>>>>
>>>>>>>>>> Best,
>>>>>>>>>>
>>>>>>>>>> Peter
>>>>>>>>>> _______________________________________________
>>>>>>>>>> gatein-dev mailing list
>>>>>>>>>> gatein-dev(a)lists.jboss.org
<mailto:gatein-dev@lists.jboss.org>
>>>>>>>>>>
https://lists.jboss.org/mailman/listinfo/gatein-dev