1 7 package org.exoplatform.services.wsrp.producer.impl.helpers; 8 9 import java.util.ArrayList ; 10 import java.util.Collection ; 11 import java.io.Serializable ; 12 import org.exoplatform.services.wsrp.type.RegistrationData; 13 14 15 19 public class ConsumerContext implements Serializable { 20 21 private String registrationHandle; 22 private RegistrationData datas; 23 private Collection clonedPortletHandles; 24 25 public ConsumerContext(String registrationHandle, RegistrationData datas){ 26 this.registrationHandle = registrationHandle; 27 this.datas = datas; 28 clonedPortletHandles = new ArrayList (); 29 } 30 31 public void addPortletHandle(String portletHandle){ 32 clonedPortletHandles.add(portletHandle); 33 } 34 35 public void removePortletHandle(String portletHandle){ 36 clonedPortletHandles.remove(portletHandle); 37 } 38 39 public String getRegistrationHandle() { 40 return registrationHandle; 41 } 42 43 public RegistrationData getRegistationData() { 44 return datas; 45 } 46 47 public boolean isPortletHandleRegistered(String portletHandle){ 48 return clonedPortletHandles.contains(portletHandle); 49 } 50 51 } 52 | Popular Tags |