Examples of Service


Examples of aQute.jpm.lib.Service

    }

    List<String> cmdline = opts._();
    String name = cmdline.remove(0);

    Service s = jpm.getService(name);

    if (opts.remove()) {
      if (!jpm.hasAccess()) {
        error("No write access to remove service %s", name);
        return;
      }
      if (s == null) {
        error("No such service %s to remove", name);
        return;
      }
      s.stop();
      s.remove();
      return;
    }

    if (opts.create() != null) {
      if (s != null) {
        error("Service already exists, cannot be created: %s. Update or remove it first", name);
        return;
      }

      ArtifactData target = jpm.getCandidate(opts.create());
      if (target == null)
        return;

      ServiceData data = null; // TODO target.service;
      updateServiceData(data, opts);

      String result = jpm.createService(data);
      if (result != null)
        error("Create service failed: %s", result);
      return;
    }

    if (s == null) {
      error("No such service: %s", name);
      return;
    }

    ServiceData data = s.getServiceData();
    if (updateServiceData(data, opts) || opts.coordinates() != null || opts.update()) {
      if (!jpm.hasAccess()) {
        error("No write access to update service %s", name);
        return;
      }

      //
      // Check if we have to update the underlying artifact
      // This is triggered by --coordinate, which provides
      // the new coordinate or just --update which reuses the
      // old coordinate without version
      //

      if (opts.coordinates() != null || opts.update()) {
        String coordinates = opts.coordinates();
        if (coordinates == null) {
          error("No coordinate found in old service record");
          return;
        }

        int n = coordinates.indexOf('@');
        if (n > 0)
          coordinates = coordinates.substring(0, n);

        trace("Updating from coordinate: %s", coordinates);
        ArtifactData target = jpm.getCandidate(coordinates);
        if (target == null) {
          error("No candidates found for %s (%s)", coordinates, opts.staged() ? "staged" : "only masters");
          return;
        }

        // data.dependencies.clear();
        // data.dependencies.add(target.file);
        // data.dependencies.addAll(target.dependencies);
        // data.coordinates = coordinates;
      }
      String result = jpm.createService(data);
      if (result != null)
        error("Update service failed: %s", result);
      else if (s.isRunning())
        warning("Changes will not affect the currently running process");
    }
    Data.details(data, out);
  }
View Full Code Here

Examples of ar.com.AmberSoft.iEvenTask.services.Service

  protected void elaborarReporte(HttpServletRequest req, HttpServletResponse response)
      throws ServletException, IOException, InstantiationException, IllegalAccessException {
   
    Map params = (Map) req.getSession().getAttribute(ParamsConst.PARAMS);
   
    Service service = (Service) getType(params).newInstance();
   
    Collection columnsModels = (Collection) params.get(ParamsConst.COLUMN_MODEL);
    Report report = new Report((String)params.get(ParamsConst.TITLE), response, Report.CONTENT_TYPE);
   
    TablaPDF tabla = new TablaPDF(report.getDocument());
    List<Float> tamanios = new ArrayList();
    Integer columnas = 0;
    if (columnsModels!=null){
      Iterator itDefiniciones = columnsModels.iterator();
      while (itDefiniciones.hasNext()) {
        Object define = (Object) itDefiniciones.next();
        Boolean hidden = (Boolean) getValue(define, "hidden");
        if (!hidden){
          CeldaPDF celda = new CeldaPDF();
          celda.addTexto((String) getValue(define, "name"));
          celda.applyHeaderColor();
          celda.setAlineacionHorizontal(Element.ALIGN_CENTER);
          celda.setAlineacionVertical(Element.ALIGN_MIDDLE);
          tabla.addCelda(celda);
          tamanios.add(new Float((Integer)getValue(define, "size") * 30) );
          columnas++;
        }
      }
    }
   
    tabla.setTamanioColumnas(tamanios);
    tabla.setColumnas(columnas);
   
   
    try {
      params.put(ParamsConst.REQUEST, req);
      params.put(ListService.LIMIT, null);
      params.put(ListService.OFFSET, null);
      Map result = service.execute(params);
      Collection datas = (Collection) result.get(ParamsConst.DATA);
     
      if (datas!=null){
        Iterator itDatas = datas.iterator();
        int i=0;
View Full Code Here

Examples of beans.directory.service.entity.Service

     * Возвращает список расходных материалов
     * @return список расходных материалов
     */
    @Override
    public List<ExpenditureDetails> getExpenditureList(int serviceID) throws ClipsServerException {
        Service service = findEntity(Service.class, serviceID);
        Collection<ExpenditureDefault> list = findEntityList(ExpenditureDefault.class, "service", service);
        List<ExpenditureDetails> res = new ArrayList<ExpenditureDetails>();
        Iterator<ExpenditureDefault> i = list.iterator();
        while(i.hasNext()) {
            ExpenditureDefault j = (ExpenditureDefault) i.next();
View Full Code Here

Examples of br.com.mystudies.ds.service.Service

      //--------------------------------------------

      User user = new User();
      user.setGroup(Group.ADMINISTRATORS);

      Service service = sf.getService(user);

      System.out.println(service.execute());


      //----------------------------------------

      user.setGroup(Group.PROGRAMMERS);

      service = sf.getService(user);

      System.out.println(service.execute());


      // --------------------------------------------

    }
View Full Code Here

Examples of buri.ddmsence.ddms.resource.Service

          emails.add(readString("entity email #" + (i + 1) + " [testEmail" + (i + 1) + "]"));
        }

        // Skip optional extensible attributes.

        return (new Service(names, phones, emails));
      }
    });
    CONSTRUCTOR_BUILDERS.put(Unknown.class, new IConstructorBuilder() {
      public IDDMSComponent build() throws IOException, InvalidDDMSException {
        int numNames = readInt("the number of names this unknown entity has [1]");
View Full Code Here

Examples of chunmap.service.Service

    cap.setLink("http://localhost:8080/chunmapService/test");
    cap.setUrl("http://localhost:8080/chunmapService/test");
    cap.setServiceTile("hello");
    cap.setSrs("4326");

    Service wms = new WebMapService(cap);
    ServiceFactory.putService(wms, "WMS");

    Log.log(Logger.Info, "chunmap's wms服务已启动");
  }
View Full Code Here

Examples of com.adm.biz.Service

    request.setCharacterEncoding("utf8");
    response.setContentType("text/html;charset=UTF-8");
    //解析url参数
    Map<String,String> params = ServletUtil.getParamters(request);
    //获取到service
    Service s = (Service)this.ctx.getBean(params.get("s"));
    params.remove("s");
    try {
      s.execute(params,request,response);
    } catch (Throwable e) {
      e.printStackTrace();
      throw new ServletException(e.getMessage());
    }
  }
View Full Code Here

Examples of com.alibaba.dubbo.config.annotation.Service

    public Object postProcessAfterInitialization(Object bean, String beanName)
            throws BeansException {
        if (annotationPackage == null || annotationPackage.length() == 0) {
            return bean;
        }
        Service service = bean.getClass().getAnnotation(Service.class);
        if (service != null) {
            ServiceBean<Object> serviceConfig = new ServiceBean<Object>(service);
            if (void.class.equals(service.interfaceClass())
                    && "".equals(service.interfaceName())) {
                if (bean.getClass().getInterfaces().length > 0) {
                    serviceConfig.setInterface(bean.getClass().getInterfaces()[0]);
                } else {
                    throw new IllegalStateException("Failed to export remote service class " + bean.getClass().getName() + ", cause: The @Service undefined interfaceClass or interfaceName, and the service class unimplemented any interfaces.");
                }
            }
            serviceConfig.setProvider(this);
            if (applicationContext != null) {
                serviceConfig.setApplicationContext(applicationContext);
                if (service.registry() != null && service.registry().length > 0) {
                    List<RegistryConfig> registryConfigs = new ArrayList<RegistryConfig>();
                    for (String registryId : service.registry()) {
                        if (registryId != null && registryId.length() > 0) {
                            registryConfigs.add((RegistryConfig)applicationContext.getBean(registryId, RegistryConfig.class));
                        }
                    }
                    serviceConfig.setRegistries(registryConfigs);
                }
                if (service.monitor() != null && service.monitor().length() > 0) {
                    serviceConfig.setMonitor((MonitorConfig)applicationContext.getBean(service.monitor(), MonitorConfig.class));
                }
                if (service.application() != null && service.application().length() > 0) {
                    serviceConfig.setApplication((ApplicationConfig)applicationContext.getBean(service.application(), ApplicationConfig.class));
                }
                if (service.module() != null && service.module().length() > 0) {
                    serviceConfig.setModule((ModuleConfig)applicationContext.getBean(service.module(), ModuleConfig.class));
                }
                if (service.provider() != null && service.provider().length() > 0) {
                    serviceConfig.setProvider((ProviderConfig)applicationContext.getBean(service.provider(), ProviderConfig.class));
                } else {
                   
                }
                if (service.protocol() != null && service.protocol().length > 0) {
                    List<ProtocolConfig> protocolConfigs = new ArrayList<ProtocolConfig>();
                    for (String protocolId : service.registry()) {
                        if (protocolId != null && protocolId.length() > 0) {
                            protocolConfigs.add((ProtocolConfig)applicationContext.getBean(protocolId, ProtocolConfig.class));
                        }
                    }
                    serviceConfig.setProtocols(protocolConfigs);
View Full Code Here

Examples of com.anzsoft.client.XMPP.mandioca.ServiceDiscovery.Service

    serviceField.addSelectionChangedListener(new SelectionChangedListener<Service>()
    {

      public void selectionChanged(SelectionChangedEvent<Service> se)
      {
        Service gateWay = se.getSelectedItem();
        String domain = gateWay.getJid();
        if(domain == null)
          domain = "";
        String value = jidField.getValue();
        if(value != null)
        {
View Full Code Here

Examples of com.betfair.cougar.codegen.Service

      extDoc = XmlUtil.parse(ext, resolver);
    }
   
    reader.init(iddDoc, extDoc, "BaselineService",
            "com.betfair.baseline", ".", "/target/generated-sources", log,
            new Service().getOutputDir(), true, true);
   
        // First let's mangle the document if need be.
        if (transform.getManglers() != null) {
          log.debug("mangling IDL using "+transform.getManglers().size()+" pre validations");
          for(DocumentMangler m : transform.getManglers()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.