Examples of ServiceConfig


Examples of jeeves.server.ServiceConfig

        final SyncReport syncReport = synchronizeDataDirectory(
                new File(webappDir, "WEB-INF/data"));

        final ArrayList<Element> params = getServiceConfigParameterElements();

        final ServiceConfig serviceConfig = new ServiceConfig(params);

        try {
            _applicationContext.getBean(initializedString);
        } catch (NoSuchBeanDefinitionException e) {
            SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();
View Full Code Here

Examples of jeeves.server.ServiceConfig

                .addContent(new Element("from").setText("1"))
                .addContent(new Element("to").setText("50"))
                .addContent(new Element("abstract").setText(""+ _abstractSearchTerm))
                .addContent(new Element("sortOrder").setText("reverse"))
                .addContent(new Element("sortBy").setText("_title"));
        final ServiceConfig config = new ServiceConfig();
        _luceneSearcher.search(_serviceContext, request, config);
        final Element result = _luceneSearcher.present(_serviceContext, request, config);
        final List<Element> nodes = (List<Element>) Xml.selectNodes(result, "metadata/title");
        String[] titles = new String[nodes.size()];
        for (int i = 0; i < titles.length; i++) {
View Full Code Here

Examples of jeeves.server.ServiceConfig

                .addContent(new Element("from").setText("1"))
                .addContent(new Element("to").setText("50"))
                .addContent(new Element("abstract").setText(""+ _abstractSearchTerm))
                .addContent(new Element("sortOrder").setText("reverse"))
                .addContent(new Element("sortBy").setText("_title"));
        final ServiceConfig config = new ServiceConfig();
        _luceneSearcher.search(_serviceContext, request, config);
        final Element result = _luceneSearcher.present(_serviceContext, request, config);
        final List<Element> nodes = (List<Element>) Xml.selectNodes(result, "metadata/geonet:info/id", Arrays.asList(Edit.NAMESPACE));
        String[] titles = new String[nodes.size()];
        for (int i = 0; i < titles.length; i++) {
View Full Code Here

Examples of jeeves.server.ServiceConfig

        //--- create instance

        Service service = (Service) Class.forName(name).newInstance();

        service.init(appPath, new ServiceConfig(clas.getChildren(ConfigFile.Class.Child.PARAM)));

        return service;
    }
View Full Code Here

Examples of jeeves.server.ServiceConfig

        }
    // record globals for reuse
    _query = query;
    _sort = sort;
   
      ServiceConfig config = new ServiceConfig();
      String geomWkt = null;
      LuceneSearcher.logSearch(context, config, _query, numHits, _sort, geomWkt, sm);

    Pair<TopDocs,Element> searchResults = LuceneSearcher.doSearchAndMakeSummary(numHits, startPosition - 1,
                maxRecords, _lang.presentationLanguage,
View Full Code Here

Examples of jeeves.server.ServiceConfig

        _analyzer = new PerFieldAnalyzerWrapper(new GeoNetworkAnalyzer(), analyzers);

        final String configFile = "/WEB-INF/config-lucene.xml";
        final String appDir = new File(LuceneQueryTest.class.getResource(configFile).getFile()).getParentFile().getParent()+"/";
        final GeonetworkDataDirectory dataDirectory = new GeonetworkDataDirectory();
        dataDirectory.init("test", appDir, new ServiceConfig(), null);
        LuceneConfig lc = new LuceneConfig();
        lc._geonetworkDataDirectory = dataDirectory;
        final ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext();
        lc._appContext = context;
        context.refresh();
View Full Code Here

Examples of jeeves.server.ServiceConfig

        guiService.setAttribute(Jeeves.Attr.NAME, Jeeves.Text.GUI_SERVICE);
        guiService.setAttribute(Jeeves.Attr.VALUE, "yes");
        config.addContent(guiService);

        serviceObj = (Service) Class.forName(clas).newInstance();
        serviceObj.init(appPath, new ServiceConfig(config.getChildren()));
    }
View Full Code Here

Examples of org.apache.cxf.fediz.service.idp.model.ServiceConfig

        Bus cxfBus = getBus();

        IdpSTSClient sts = new IdpSTSClient(cxfBus);
        sts.setAddressingNamespace(HTTP_WWW_W3_ORG_2005_08_ADDRESSING);
       
        ServiceConfig serviceConfig = idpConfig.getServices().get(wtrealm);
        if (serviceConfig == null) {
            LOG.warn("No service config found for " + wtrealm);
            throw new ProcessingException(TYPE.BAD_REQUEST);
        }
       
        // Parse wreq parameter - we only support parsing TokenType and KeyType for now
        String wreq = (String)WebUtils.getAttributeFromFlowScope(context, FederationConstants.PARAM_REQUEST);
        String stsTokenType = null;
        String stsKeyType = keyType;
        if (wreq != null) {
            Element wreqElement = getRSTFromWReq(wreq);
            if (wreqElement != null) {
                Element tokenTypeElement =
                    DOMUtils.getFirstChildWithName(wreqElement, wreqElement.getNamespaceURI(), "TokenType");
                if (tokenTypeElement != null) {
                    stsTokenType = tokenTypeElement.getTextContent();
                }
                Element keyTypeElement =
                    DOMUtils.getFirstChildWithName(wreqElement, wreqElement.getNamespaceURI(), "KeyType");
                if (keyTypeElement != null) {
                    stsKeyType = keyTypeElement.getTextContent();
                }
            }
        }
       
        if (stsTokenType != null) {
            sts.setTokenType(stsTokenType);
        } else if (serviceConfig.getTokenType() != null && serviceConfig.getTokenType().length() > 0) {
            sts.setTokenType(serviceConfig.getTokenType());
        } else {
            sts.setTokenType(getTokenType());
        }
       
        if (serviceConfig.getPolicyNamespace() != null && serviceConfig.getPolicyNamespace().length() > 0) {
            sts.setWspNamespace(serviceConfig.getPolicyNamespace());
        }
       
        if (LOG.isDebugEnabled()) {
            LOG.debug("TokenType " + sts.getTokenType() + " set for " + wtrealm);
        }
       
        sts.setKeyType(stsKeyType);
        if (HTTP_DOCS_OASIS_OPEN_ORG_WS_SX_WS_TRUST_200512_PUBLICKEY.equals(stsKeyType)) {
            HttpServletRequest servletRequest = WebUtils.getHttpServletRequest(context);
            if (servletRequest != null) {
                X509Certificate certs[] =
                    (X509Certificate[])servletRequest.getAttribute("javax.servlet.request.X509Certificate");
                if (certs != null && certs.length > 0) {
                    sts.setUseCertificateForConfirmationKeyInfo(true);
                    sts.setUseKeyCertificate(certs[0]);
                } else {
                    LOG.info("Can't send a PublicKey KeyType as no client certs are available");
                    sts.setKeyType(HTTP_DOCS_OASIS_OPEN_ORG_WS_SX_WS_TRUST_200512_BEARER);
                }
            }
        }

        processWsdlLocation(context);
        sts.setWsdlLocation(wsdlLocation);
        sts.setServiceQName(new QName(
                HTTP_DOCS_OASIS_OPEN_ORG_WS_SX_WS_TRUST_200512,
                SECURITY_TOKEN_SERVICE));
        sts.setEndpointQName(new QName(
                HTTP_DOCS_OASIS_OPEN_ORG_WS_SX_WS_TRUST_200512, wsdlEndpoint));

        if (serviceConfig.getRequestedClaims() != null && serviceConfig.getRequestedClaims().size() > 0) {
            addClaims(sts, serviceConfig.getRequestedClaims());
            if (LOG.isDebugEnabled()) {
                LOG.debug("Requested claims set for " + wtrealm);
            }
        }
       
        sts.setEnableLifetime(true);
        if (serviceConfig.getLifeTime() != null && serviceConfig.getLifeTime().length() > 0) {
            try {
                int lifetime = Integer.parseInt(serviceConfig.getLifeTime());
                sts.setTtl(lifetime);
                sts.setEnableLifetime(lifetime > 0);
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Lifetime set to " + serviceConfig.getLifeTime() + " seconds for " + wtrealm);
                }
            } catch (NumberFormatException ex) {
                LOG.warn("Invalid lifetime configured for service provider " + wtrealm);
                sts.setTtl(this.ttl);
                sts.setEnableLifetime(this.ttl > 0);
            }
        } else {
            sts.setTtl(this.ttl);
            sts.setEnableLifetime(this.ttl > 0);
            if (LOG.isDebugEnabled()) {
                LOG.debug("Lifetime set to " + this.ttl + " seconds for " + wtrealm);
            }
        }
       
       
        sts.setOnBehalfOf(idpToken.getToken());
        if (!(serviceConfig.getProtocol() == null
            || FederationConstants.WS_FEDERATION_NS.equals(serviceConfig.getProtocol()))) {
            LOG.error("Protocol " + serviceConfig.getProtocol() + " not supported for " + wtrealm);
            throw new ProcessingException(TYPE.BAD_REQUEST);
        }
       
        String rpToken = sts.requestSecurityTokenResponse(wtrealm);
       
View Full Code Here

Examples of org.apache.helix.provisioning.ServiceConfig

    ClusterId clusterId = getClusterId();
    ClusterAccessor clusterAccessor = getConnection().createClusterAccessor(clusterId);
    ResourceId resourceId = ResourceId.from(_serviceName);
    Resource resource = clusterAccessor.readResource(resourceId);
    UserConfig userConfig = resource.getUserConfig();
    ServiceConfig serviceConfig = new ServiceConfig(Scope.resource(resourceId));
    serviceConfig.setSimpleFields(userConfig.getSimpleFields());
    serviceConfig.setListFields(userConfig.getListFields());
    serviceConfig.setMapFields(userConfig.getMapFields());
    LOG.info("Starting service:" + _serviceName + " with configuration:" + serviceConfig);
    StatelessServiceStateModelFactory stateModelFactory =
        new StatelessServiceStateModelFactory(this);
    getParticipant().getStateMachineEngine().registerStateModelFactory(
        StateModelDefId.from("StatelessService"), stateModelFactory);
View Full Code Here

Examples of org.apache.helix.provisioning.ServiceConfig

  public void setServiceConfigMap(Map<String, Map<String, Object>> map) {
    _serviceConfigMap = Maps.newHashMap();

    for(String service:map.keySet()){
      ServiceConfig serviceConfig = new ServiceConfig(Scope.resource(ResourceId.from(service)));
      Map<String, Object> simpleFields = map.get(service);
      for(String key:simpleFields.keySet()){
        serviceConfig.setSimpleField(key, simpleFields.get(key).toString());
      }
      _serviceConfigMap.put(service, serviceConfig);
    }
  }
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.