PortletKeyImpl.java |
1 /* 2 * Copyright 2000-2001,2004 The Apache Software Foundation. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 /* 18 19 */ 20 21 package org.apache.wsrp4j.consumer.driver; 22 23 import org.apache.wsrp4j.consumer.PortletKey; 24 25 public class PortletKeyImpl implements PortletKey { 26 27 private String portletHandle = null; 28 29 private String producerId = null; 30 31 // constructor for castor persistence 32 public PortletKeyImpl() { 33 } 34 35 public PortletKeyImpl(String portletHandle, String producerId) { 36 this.portletHandle = portletHandle; 37 this.producerId = producerId; 38 } 39 40 /** 41 * Get the ID of the producer providing the portlet 42 * 43 * @return The ID of the producer 44 **/ 45 public String getProducerId() { 46 return producerId; 47 } 48 49 /** 50 * Set the ID of the producer providing the portlet 51 * 52 * @param id The ID of the producer 53 **/ 54 public void setProducerId(String id) { 55 producerId = id; 56 } 57 58 /** 59 * Get the portlet handle which identifies an portlet in the scope of one producer 60 * 61 * @return The portlet handle 62 **/ 63 public String getPortletHandle() { 64 return this.portletHandle; 65 } 66 67 /** 68 * Set the portlet handle which identifies an portlet in the scope of one producer 69 * 70 * @param portletHandle The portlet handle 71 **/ 72 public void setPortletHandle(String portletHandle) { 73 if (portletHandle != null) { 74 this.portletHandle = portletHandle; 75 } 76 } 77 78 /** 79 * 80 * 81 */ 82 public String toString() { 83 84 String retVal = producerId + "_" + portletHandle; 85 return retVal; 86 } 87 }