portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Danny" <danny.g...@mms-dresden.de>
Subject Manualy copy PSML information
Date Fri, 17 Jan 2003 13:15:46 GMT
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:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message