Package org.serviceconnector.registry

Examples of org.serviceconnector.registry.ServiceRegistry


        writer.writeEndElement();
      }
    }
    String serviceParameter = request.getParameter("service");
    if (serviceParameter != null) {
      ServiceRegistry serviceRegistry = AppContext.getServiceRegistry();
      Service service = serviceRegistry.getService(serviceParameter);
      if (service != null) {
        writer.writeStartElement("service");
        if (service instanceof IPublishService) {
          IPublishService publishService = (IPublishService) service;
          PublishMessageQueue<SCMPMessage> publishMessageQueue = publishService.getMessageQueue();
View Full Code Here


   *            the request
   * @throws Exception
   *             the exception
   */
  private void loadFileServices(XMLStreamWriter writer, IWebRequest request) throws Exception {
    ServiceRegistry serviceRegistry = AppContext.getServiceRegistry();
    writer.writeStartElement("services");
    Service[] services = serviceRegistry.getServices();
    WebConfiguration webConfiguration = WebContext.getWebConfiguration();
    String scDownloadService = webConfiguration.getScDownloadService();
    String scUploadService = webConfiguration.getScUploadService();
    for (Service service : services) {
      if (service instanceof FileService || service instanceof CascadedFileService) {
View Full Code Here

        writer.writeEndElement();
      }
    }
    String serviceParameter = request.getParameter("service");
    if (serviceParameter != null) {
      ServiceRegistry serviceRegistry = AppContext.getServiceRegistry();
      Service service = serviceRegistry.getService(serviceParameter);
      if (service != null) {
        writer.writeStartElement("service");
        this.writeBean(writer, service);
        writer.writeEndElement();
      }
View Full Code Here

public class ServicesXMLLoader extends AbstractXMLLoader {

  /** {@inheritDoc} */
  @Override
  public final void loadBody(XMLStreamWriter writer, IWebRequest request) throws Exception {
    ServiceRegistry serviceRegistry = AppContext.getServiceRegistry();
    writer.writeStartElement("services");
    Service[] services = serviceRegistry.getServices();
    String serviceParameter = request.getParameter("service");
    int simulation = this.getParameterInt(request, "sim", 0);
    if (simulation > 0) {
      Service[] sim = new Service[simulation + services.length];
      System.arraycopy(services, 0, sim, 0, services.length);
View Full Code Here

   */
  public static void setSCEnvironment(boolean scEnvironment) {
    AppContext.scEnvironment = scEnvironment;
    if (AppContext.scEnvironment) {
      AppContext.serverRegistry = new ServerRegistry();
      AppContext.serviceRegistry = new ServiceRegistry();
      AppContext.sessionRegistry = new SessionRegistry();
      AppContext.subscriptionRegistry = new SubscriptionRegistry();
      AppContext.cacheRegistry = new CacheRegistry();
    }
  }
View Full Code Here

  private void downloadAndReplace(XMLStreamWriter writer, IWebRequest request) throws Exception {
    String serviceName = request.getParameter("service");
    if (serviceName == null) {
      throw new WebCommandException("service is missing");
    }
    ServiceRegistry serviceRegistry = AppContext.getServiceRegistry();
    Service service = serviceRegistry.getService(serviceName);
    if (service == null) {
      throw new WebCommandException("service " + serviceName + " not found");
    }
    if (service instanceof FileService == false && service instanceof CascadedFileService == false) {
      throw new WebCommandException("service " + serviceName + " is not a file or cascaded file service");
View Full Code Here

    String sdate = request.getParameter("date");
    Date date = DateTimeUtility.getCurrentDate();
    if (sdate != null && sdate.isEmpty() == false) {
      date = WebUtil.getXMLDateFromString(sdate);
    }
    ServiceRegistry serviceRegistry = AppContext.getServiceRegistry();
    Service service = serviceRegistry.getService(serviceName);
    if (service == null) {
      throw new WebCommandException("service " + serviceName + " not found");
    }
    if (service instanceof FileService == false && service instanceof CascadedFileService == false) {
      throw new WebCommandException("service " + serviceName + " is not a file or cascaded file service");
View Full Code Here

    String serviceName = request.getParameter("service");
    if (serviceName == null) {
      this.writeFailure(writer, "Missing service name!");
      return;
    }
    ServiceRegistry serviceRegistry = AppContext.getServiceRegistry();
    Service service = serviceRegistry.getService(serviceName);
    if (service == null) {
      this.writeFailure(writer, "Can not enable service " + serviceName + ", not found!");
      return;
    }
    service.setEnabled(true);
View Full Code Here

    String serviceName = request.getParameter("service");
    if (serviceName == null) {
      this.writeFailure(writer, "Missing service name!");
      return;
    }
    ServiceRegistry serviceRegistry = AppContext.getServiceRegistry();
    Service service = serviceRegistry.getService(serviceName);
    if (service == null) {
      this.writeFailure(writer, "Can not disable service " + serviceName + ", not found!");
      return;
    }
    service.setEnabled(false);
View Full Code Here

    String serviceName = request.getParameter("service");
    if (serviceName == null) {
      throw new InvalidParameterException("service parameter missing");
    }
    // load file services and the file list
    ServiceRegistry serviceRegistry = AppContext.getServiceRegistry();
    writer.writeStartElement("service");
    Service service = serviceRegistry.getService(serviceName);
    this.writeBean(writer, service);
    if (service instanceof FileService || service instanceof CascadedFileService) {
      SCClient client = null;
      // try to connect client
      client = connectClientToService(service);
View Full Code Here

TOP

Related Classes of org.serviceconnector.registry.ServiceRegistry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.