1 16 17 package org.apache.jetspeed.om.profile; 18 19 import org.apache.jetspeed.services.psmlmanager.PsmlManagerService; 20 21 29 30 public class ImportProfile extends BaseProfile implements Profile 31 { 32 private final PsmlManagerService provider; 33 private final PsmlManagerService consumer; 34 35 public ImportProfile(PsmlManagerService provider, PsmlManagerService consumer) 36 { 37 super(); 38 this.provider = provider; 39 this.consumer = consumer; 40 } 41 42 public ImportProfile(PsmlManagerService provider, PsmlManagerService consumer, ProfileLocator locator) 43 { 44 super(locator); 45 this.provider = provider; 46 this.consumer = consumer; 47 } 48 49 53 public Object clone() throws java.lang.CloneNotSupportedException 54 { 55 return super.clone(); 56 } 57 58 63 public PSMLDocument getDocument() 64 { 65 synchronized (this) 66 { 67 if ((this.document == null) || (this.document.getPortlets() == null)) 68 { 69 this.document = provider.getDocument(this); 70 } 71 } 72 return this.document; 73 } 74 75 80 public void store() throws ProfileException 81 { 82 if (document != null) 83 { 84 consumer.store(this); 85 } 86 } 87 88 } | Popular Tags |