1 16 17 package org.apache.jetspeed.services.urlmanager; 18 19 import org.apache.turbine.services.TurbineServices; 20 import java.util.List ; 21 22 29 public class URLManager { 30 31 34 public static int STATUS_ANY = URLManagerService.STATUS_ANY; 35 36 39 public static int STATUS_UNKNOWN = URLManagerService.STATUS_UNKNOWN; 40 41 44 public static int STATUS_OK = URLManagerService.STATUS_OK; 45 46 49 public static int STATUS_UNREACHABLE = URLManagerService.STATUS_UNREACHABLE; 50 51 54 public static int STATUS_TEMPORARY_UNAVAILABLE = URLManagerService.STATUS_TEMPORARY_UNAVAILABLE; 55 56 59 public static int STATUS_CONTENT_ERROR = URLManagerService.STATUS_CONTENT_ERROR; 60 61 64 public static int STATUS_BAD = URLManagerService.STATUS_BAD; 65 66 69 public static void register( String url ) { 70 URLManagerService ums = (URLManagerService)TurbineServices 71 .getInstance() 72 .getService( URLManagerService.SERVICE_NAME ); 73 74 ums.register( url ); 75 } 76 77 80 public static void register( String url, int status ) { 81 URLManagerService ums = (URLManagerService)TurbineServices 82 .getInstance() 83 .getService( URLManagerService.SERVICE_NAME ); 84 85 ums.register( url, status ); 86 } 87 88 91 public static void register( String url, int status, String message ) { 92 URLManagerService ums = (URLManagerService)TurbineServices 93 .getInstance() 94 .getService( URLManagerService.SERVICE_NAME ); 95 96 ums.register( url, status, message ); 97 } 98 99 102 public static void register( URLInfo info ) { 103 URLManagerService ums = (URLManagerService)TurbineServices 104 .getInstance() 105 .getService( URLManagerService.SERVICE_NAME ); 106 107 ums.register( info ); 108 } 109 110 113 public static void unregister( String url ) { 114 URLManagerService ums = (URLManagerService)TurbineServices 115 .getInstance() 116 .getService( URLManagerService.SERVICE_NAME ); 117 118 ums.unregister( url ); 119 } 120 121 124 public static URLInfo getInfo( String url ) { 125 URLManagerService ums = (URLManagerService)TurbineServices 126 .getInstance() 127 .getService( URLManagerService.SERVICE_NAME ); 128 129 return ums.getInfo( url ); 130 } 131 132 135 public static boolean isOK( String url ) { 136 URLManagerService ums = (URLManagerService)TurbineServices 137 .getInstance() 138 .getService( URLManagerService.SERVICE_NAME ); 139 140 return ums.isOK( url ); 141 } 142 143 146 public static List list() { 147 URLManagerService ums = (URLManagerService)TurbineServices 148 .getInstance() 149 .getService( URLManagerService.SERVICE_NAME ); 150 151 return ums.list(); 152 } 153 154 157 public static List list( int status ) { 158 URLManagerService ums = (URLManagerService)TurbineServices 159 .getInstance() 160 .getService( URLManagerService.SERVICE_NAME ); 161 162 return ums.list( status ); 163 } 164 165 168 public static int getProxyPort( String protocol ) { 169 URLManagerService ums = (URLManagerService)TurbineServices 170 .getInstance() 171 .getService( URLManagerService.SERVICE_NAME ); 172 173 return ums.getProxyPort( protocol ); 174 } 175 176 179 public static String getProxyHost( String protocol ) { 180 URLManagerService ums = (URLManagerService)TurbineServices 181 .getInstance() 182 .getService( URLManagerService.SERVICE_NAME ); 183 184 return ums.getProxyHost( protocol ); 185 } 186 } 187 | Popular Tags |