1 16 17 package org.apache.jetspeed.services; 18 19 import org.apache.jetspeed.om.registry.RegistryEntry; 20 import org.apache.jetspeed.om.registry.RegistryException; 21 import org.apache.jetspeed.services.registry.RegistryService; 22 import org.apache.turbine.services.TurbineServices; 23 import java.util.Enumeration ; 24 25 33 public class Registry 34 { 35 36 37 public static String PORTLET = "Portlet"; 38 39 40 public static String PORTLET_CONTROL = "PortletControl"; 41 42 43 public static String PORTLET_CONTROLLER = "PortletController"; 44 45 46 public static String MEDIA_TYPE = "MediaType"; 47 48 49 public static String CLIENT = "Client"; 50 51 52 public static String SECURITY = "Security"; 53 54 55 public static String SKIN = "Skin"; 56 57 61 private static RegistryService getService() 62 { 63 return (RegistryService)TurbineServices 64 .getInstance() 65 .getService(RegistryService.SERVICE_NAME); 66 } 67 68 71 public static Enumeration getNames() 72 { 73 return getService().getNames(); 74 } 75 76 79 public static org.apache.jetspeed.om.registry.Registry get( String regName ) 80 { 81 return getService().get( regName ); 82 } 83 84 87 public static RegistryEntry createEntry( String regName ) 88 { 89 return getService().createEntry( regName ); 90 } 91 92 95 public static RegistryEntry getEntry( String regName, String entryName ) 96 { 97 return getService().getEntry( regName, entryName ); 98 } 99 100 103 public static void addEntry( String regName, RegistryEntry value ) 104 throws RegistryException 105 { 106 getService().addEntry( regName, value ); 107 } 108 109 112 public static void removeEntry( String regName, String entryName ) 113 { 114 getService().removeEntry( regName, entryName ); 115 } 116 } 117 | Popular Tags |