portals-jetspeed-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mansour <mansou...@yahoo.com>
Subject Re: portlet entity Editor
Date Wed, 07 Nov 2007 16:30:42 GMT
David Sean Taylor wrote:
>
> 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.
>>
> OK
>
>>
>>
>> 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.
The term instance is used in other portlet containers.
>
>>> 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.
Great so, how can I do this for multiple hotel. I mean in the global 
preferences there's only one DB connection string. As I mentioned 
earlier I will create only one package and then instantiate instances or 
entities. You said I need a 1-1 relationship hotel-connection ! What do 
you mean? And how?
>
>>>
>>> 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
>
>     <portlet>
>         <portlet-name>ExpensesReport</portlet-name>
>         
> <js:security-constraint-ref>hotel-constraint</js:security-constraint-ref>
> ...
>
> The hotel constraint would grant view, edit to managers, and perhaps 
> view to sales people, and deny all others
>
I am trying to avoid (as much as I can) to set permission through PSML 
as this permissions need to be changed by the admin (The admin should 
NOT know any PSML).
>
>>> 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">
>     <security-constraint>
>       <roles>sales</roles>
>       <permissions>view</permissions>
>     </security-constraint>
>     <security-constraint>
>       <roles>hotel-manager</roles>
>       <permissions>view, edit, edit_defaults</permissions>
>     </security-constraint>
>   </security-constraints-def>
>

Same thing applies here !
>
>>> 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...
>
I am trying anyway. :)
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Mime
View raw message