1 16 17 package org.apache.jetspeed.om.registry.base; 18 19 import org.apache.jetspeed.om.registry.RegistryEntry; 20 import org.apache.jetspeed.om.registry.InvalidEntryException; 21 import org.apache.jetspeed.om.registry.RegistryException; 22 import org.apache.jetspeed.services.Registry; 23 import org.apache.jetspeed.services.logging.JetspeedLogFactoryService; 24 import org.apache.jetspeed.services.logging.JetspeedLogger; 25 26 27 39 public class BasePortletControlRegistry extends BaseRegistry 40 { 41 42 45 private static final JetspeedLogger logger = JetspeedLogFactoryService.getLogger(BasePortletControlRegistry.class.getName()); 46 47 50 public void setEntry( RegistryEntry entry ) throws InvalidEntryException 51 { 52 55 try 56 { 57 Registry.addEntry(Registry.PORTLET_CONTROL, entry); 58 } 59 catch (RegistryException e) 60 { 61 logger.error("Exception", e); 62 } 63 } 64 65 68 public void addEntry( RegistryEntry entry ) throws InvalidEntryException 69 { 70 73 try 74 { 75 Registry.addEntry(Registry.PORTLET_CONTROL, entry); 76 } 77 catch (RegistryException e) 78 { 79 logger.error("Exception", e); 80 } 81 } 82 83 86 public void removeEntry( String name ) 87 { 88 91 Registry.removeEntry(Registry.PORTLET_CONTROL, name); 92 } 93 94 97 public void removeEntry( RegistryEntry entry ) 98 { 99 102 if (entry != null) 103 { 104 Registry.removeEntry(Registry.PORTLET_CONTROL, entry.getName()); 105 } 106 } 107 108 114 public RegistryEntry createEntry() 115 { 116 return new BasePortletControlEntry(); 117 } 118 } 119 | Popular Tags |