You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by Danny <da...@mms-dresden.de> on 2003/01/17 14:15:46 UTC
Manualy copy PSML information
Hi folks,
We store our PSML information in a database, and created a portlet which can
copy parts of PSML Profiles into other profiles.
For example, a user can create a pane, add some portlets, and add the pane
to other users.
So far so good.
BUT I'm not able to really copy the information, but I create some kind of
references. If one user changes anything within the pane all users with that
pane see the changes.
First I thought that should be so, because I just put the reference of the
pane into the other profile. But then I made a {Profile}.clone(), and
thought the problem should be fixed, but it isn't.
Here some parts of my code:
Portlets[] srcarray =
srcprof.getDocument().getPortlets().getPortletsArray(); // if I insert a
.clone(), nothing changes
for(int i=0; i<srcarray.length; i++){
if(srcarray[i].getTitle().equals(adminpanename) ) {
srcarray[i].setId(JetspeedIdGenerator.getNextPeid());
targetprof.getDocument().getPortlets().addPortlets(srcarray[i]);
}
}
// Store the target profile
try{
targetprof.store();
Log.debug("Successfully added pane.");
}
catch(Exception e){
Log.error("Could not store profile",data);
}
Can anyone help me with this?
Thanks Danny
==========================================
T-Systems Multimedia Solutions GmbH
Danny Gehl
Authorized Java Center (AJC)
Hausanschrift: Riesaer Straße 5, 01029 Dresden
Tel.: (0351) 8505 845
Fax.: (in Arbeit)
E-Mail: mailto:Danny.Gehl@MMS-Dresden.de
http://www.T-Systems-MMS.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>