001/** 002 * 003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved. 004 * 005 * This library is free software; you can redistribute it and/or 006 * modify it under the terms of the GNU Lesser General Public 007 * License as published by the Free Software Foundation; either 008 * version 2.1 of the License, or (at your option) any later version. 009 * 010 * This library is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 013 * Lesser General Public License for more details. 014 * 015 * You should have received a copy of the GNU Lesser General Public 016 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 017 * 018 **/ 019package coldfusion.server; 020 021import lucee.runtime.services.DataSourceServiceImpl; 022 023public class ServiceFactory { 024 public static final void clear() { 025 026 } 027 028 public static final SecurityService getSecurityService() throws ServiceException { 029 throw missingService("SecurityService"); 030 } 031 032 public static final LoggingService getLoggingService() throws ServiceException { 033 throw missingService("LoggingService"); 034 } 035 036 public static final SchedulerService getSchedulerService() throws ServiceException { 037 throw missingService("SchedulerService"); 038 } 039 040 public static final DataSourceService getDataSourceService() { 041 return new DataSourceServiceImpl(); 042 } 043 044 public static final MailSpoolService getMailSpoolService() throws ServiceException { 045 throw missingService("MailSpoolService"); 046 } 047 048 public static final VerityService getVerityService() throws ServiceException { 049 throw missingService("VerityService"); 050 } 051 052 public static final DebuggingService getDebuggingService() throws ServiceException { 053 throw missingService("DebuggingService"); 054 } 055 056 public static final RuntimeService getRuntimeService() throws ServiceException { 057 throw missingService("RuntimeService"); 058 } 059 060 public static final CronService getCronService() throws ServiceException { 061 throw missingService("CronService"); 062 } 063 064 public static final ClientScopeService getClientScopeService() throws ServiceException { 065 throw missingService("ClientScopeService"); 066 } 067 068 public static final MetricsService getMetricsService() throws ServiceException { 069 throw missingService("MetricsService"); 070 } 071 072 public static final XmlRpcService getXmlRpcService() throws ServiceException { 073 throw missingService("XmlRpcService"); 074 } 075 076 public static final GraphingService getGraphingService() throws ServiceException { 077 throw missingService("GraphingService"); 078 } 079 080 public static final ArchiveDeployService getArchiveDeployService() throws ServiceException { 081 throw missingService("ArchiveDeployService"); 082 } 083 084 public static final RegistryService getRegistryService() throws ServiceException { 085 throw missingService("RegistryService"); 086 } 087 088 public static final LicenseService getLicenseService() throws ServiceException { 089 throw missingService("LicenseService"); 090 } 091 092 public static final DocumentService getDocumentService() throws ServiceException { 093 throw missingService("DocumentService"); 094 } 095 096 public static final EventGatewayService getEventProcessorService() throws ServiceException { 097 throw missingService("DocumentService"); 098 } 099 100 public static final WatchService getWatchService() throws ServiceException { 101 throw missingService("WatchService"); 102 } 103 104 private static ServiceException missingService(String service) { 105 // TODO Auto-generated method stub 106 return new ServiceException("the service ["+service+"] is currently missing. At the moment you can use cfadmin tag instead"); 107 } 108 109 110 public static final void setSecurityService(SecurityService service) { 111 112 } 113 114 public static final void setSchedulerService(SchedulerService service) { 115 116 } 117 118 public static final void setLoggingService(LoggingService service) { 119 120 } 121 122 public static final void setDataSourceService(DataSourceService service) { 123 124 } 125 126 public static final void setMailSpoolService(MailSpoolService service) { 127 128 } 129 130 public static final void setVerityService(VerityService service) { 131 132 } 133 134 public static final void setDebuggingService(DebuggingService service) { 135 136 } 137 138 public static final void setRuntimeService(RuntimeService service) { 139 140 } 141 142 public static final void setCronService(CronService service) { 143 144 } 145 146 public static final void setClientScopeService(ClientScopeService service) { 147 148 } 149 150 public static final void setMetricsService(MetricsService service) { 151 152 } 153 154 public static final void setXmlRpcService(XmlRpcService service) { 155 156 } 157 158 public static final void setGraphingService(GraphingService service) { 159 160 } 161 162 public static final void setArchiveDeployService(ArchiveDeployService service) { 163 164 } 165 166 public static final void setRegistryService(RegistryService service) { 167 168 } 169 170 public static final void setLicenseService(LicenseService service) { 171 172 } 173 174 public static final void setDocumentService(DocumentService service) { 175 176 } 177 178 public static final void setEventProcessorService(EventGatewayService service) { 179 180 } 181 182 public static final void setWatchService(WatchService service) { 183 184 } 185 186 187 188 189 190}