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 38 public class BaseSkinRegistry extends BaseRegistry 39 { 40 41 44 private static final JetspeedLogger logger = JetspeedLogFactoryService.getLogger(BaseSkinRegistry.class.getName()); 45 46 49 public void setEntry( RegistryEntry entry ) throws InvalidEntryException 50 { 51 54 try 55 { 56 Registry.addEntry(Registry.SKIN, entry); 57 } 58 catch (RegistryException e) 59 { 60 logger.error("Exception", e); 61 } 62 } 63 64 67 public void addEntry( RegistryEntry entry ) throws InvalidEntryException 68 { 69 72 try 73 { 74 Registry.addEntry(Registry.SKIN, entry); 75 } 76 catch (RegistryException e) 77 { 78 logger.error("Exception", e); 79 } 80 } 81 82 85 public void removeEntry( String name ) 86 { 87 90 Registry.removeEntry(Registry.SKIN, name); 91 } 92 93 96 public void removeEntry( RegistryEntry entry ) 97 { 98 101 if (entry != null) 102 { 103 Registry.removeEntry(Registry.SKIN, entry.getName()); 104 } 105 } 106 107 113 public RegistryEntry createEntry() 114 { 115 return new BaseSkinEntry(); 116 } 117 } 118 | Popular Tags |