portals-jetspeed-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Sean Taylor <da...@bluesunrise.com>
Subject Re: portlet entity Editor
Date Mon, 05 Nov 2007 19:17:35 GMT

On Nov 4, 2007, at 11:40 PM, Mansour wrote:

> Oops, the mail went to the public list. Not any private info yet.  
> We can discuss this publicly and get more inputs from other users.

> Mansour wrote:
>> David, thank you for your help in this. I decided to exclude the  
>> public mailing list form my reply in order to feel free in giving  
>> info about what I am trying to do. Your last reply resolved big  
>> part of the problem, and I just need to make sure that I  
>> understand everything. Taking a real life example will help a lot.
>> Let's say I need to write a portlet "application" that contains  
>> few reports for a hotel system:
>> 1- moth to date (MTD) revenue.
>> 2-YTD revenue.
>> 3- sales.
>> 4- expenses.
>> 5- report of empty rooms.
>> 6-report of rooms to be cleaned.
>> 7-rooms need maintenance.
>> ...
>> This portlet application is to be hosted for few hotels on one  
>> "single" portal server.
>> For each hotel, I need to create an instance. And I need to set  
>> the DB connection and credentials and it should not be changed by  
>> any one else.

When you say instance, I think that term is confusing.
Basically you need a 1-1 relationship between a hotel and connection.

>> When the user logs in , she has the choice to add this instance to  
>> here page. She can add more than one instance and customize them.  
>> For example, a revenue manager may add an instance and using the  
>> edit mode she can configure this instance to show the YTD revenue  
>> report. She may add another instance and configure it to show the  
>> sales as well. The revenue manager has access to any type of  
>> report she wants. The cleaning person in the hotel should not view  
>> the expenses. She should only see the rooms to be cleaned and may  
>> be maintenances. The maintenance guy should not have access to the  
>> reports of empty rooms.

>> In this case I will create the number of reports I need (using  
>> BIRT and eclipse) and wrap them in a portlet application. and  
>> deploy it. Then I will customize the DB connection for each hotel  
>> in the global preference ??  so no one can change it. Am I right ?

Yes, that is correct.

>> then I may give the users edit permissions so that they can choose  
>> what report to show. Correct ?

You can protect your portlets in the deployment descriptor with a  
security constraint (jetspeed-portlet.xml) such as


The hotel constraint would grant view, edit to managers, and perhaps  
view to sales people, and deny all others

>> Now, how can I tell jetspeed, don't let the cleaner see the expenses.

By not providing a role to cleaners to view the the report:

   <security-constraints-def name="hotel-constraint">
       <permissions>view, edit, edit_defaults</permissions>

>> One way I though about is through the roles but don't I need the  
>> name of the reference of the entity "instance" ? if yes how can I  
>> get it? Further more, this has to be done by the administrator on  
>> the site (in the hotel). I can not give access to the j2-admin,  
>> and the admin can not use PSML. And this is where the confusion  
>> starts.
>> On the other had, the entity is not deleted when yo remove it from  
>> the page, it's just hidden. If you go to the entity editor, you  
>> can see it there?

Its orphaned I guess, although I thought we fixed that. Its no longer  
really useful and entities are very small database records.
I seem to remember some way to clean up orphaned entities from the  
database, but actually I thought it was no longer necessary

>> I hope things make sense now and you can understand what I am  
>> trying to do. You can adopt this example for any other application  
>> (ie. car rental, car dealership,...etc). I am still in the very  
>> early stages of this project and I am not in a rush to get know  
>> how to get this done know (it would be nice thou). The most  
>> important part to me is to know if it's possible and easy with  
>> JS2, and if not, do you see this will change in about 3 months  
>> from now?

I think it is possible today with 2.1.2. Lets give it a try...

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message