portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Santiago Gala <sg...@hisitech.com>
Subject Re: Jetspeed Proposal: iframe portlet control
Date Wed, 06 Mar 2002 18:42:58 GMT
Paul Spencer wrote:

> We all agree the portlet id should be unique within the PSML 
> Document/file :)
> By making the id unique within the entire system, which is easier, a 
> portlet set can be included in many PSML files, i.e. the common 
> "company info" portlet (Future enhancement).  This is easier because 
> all we need is a

Included PSML files will need to be deep-copied (or we will have funny 
concurrency bugs if the objects are modified) . If they are to retain 
the id in the psml, the management of ids should be a task of the portal 
administrator. But guaranteeing uniqueness is still the portlet 
container task.

> PortletElementIDService with the static method PortletID.getNextID(). 
> getNextID() is a simple counter that returns the current value, 
> increments, and updates the persistent copy (file of DB).  Otherwise 
> we would have to pass the PSML Document to the method, which would 
> have to scan for the max ID, and then increment. Yuck !
> As to the format of the ID, it is a string. Is size a the issue, then 
> convert the integer to HEX, i.e. f09a2.  I do not see a need to build 
> the ID using information about, or from,  the PSML document, i.e. 
> Default.01.02.

No need except for conversion of PSML to the new format.

Guaranteeing uniqueness will require significant effort. Each 
PSMLDocument should have a data structure (a hash?) where entries will 
be looked up by id before insertion. If they are already present, throw 
new DuplicateIDException("Portlet name ...").

On the other hand, there will be no need to do search for portlets, just 
get( id ) for retrieval.

> Paul Spencer
> -- 
> To unsubscribe, e-mail:   
> <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:jetspeed-dev-help@jakarta.apache.org>

To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>

View raw message