Package org.apache.lucene.gdata.server.registry

Examples of org.apache.lucene.gdata.server.registry.ProvidedService


            if (LOG.isInfoEnabled())
                LOG.info("Can not delete feed -- " + e.getMessage(), e);
            throw new ServiceException("Can not delete feed", e,
                    GDataResponse.BAD_REQUEST);
        }
        ProvidedService service = this.registry.getProvidedService(serviceid);
        feed.setServiceConfig(service);
        this.entryEventMediator.allEntriesDeleted(feed);

    }
View Full Code Here


     */
    public static BaseFeed buildFeed(final GDataRequest request)
            throws IOException, ParseException {
        if (request == null)
            throw new IllegalArgumentException("request must not be null");
        ProvidedService config = request.getConfigurator();
        return buildFeed(request.getReader(), config);
    }
View Full Code Here

     */
    public static BaseEntry buildEntry(final GDataRequest request)
            throws IOException, ParseException {
        if (request == null)
            throw new IllegalArgumentException("request must not be null");
        ProvidedService config = request.getConfigurator();
        return buildEntry(request.getReader(), config);
    }
View Full Code Here

        String providedService = request.getParameter(PARAMETER_SERVICE);
        if(!registry.isServiceRegistered(providedService)){
            setError(GDataResponse.NOT_FOUND,"no such service");
            throw new FeedHandlerException("ProvicdedService is not registered -- Name: "+providedService);
         }
        ProvidedService provServiceInstance = registry.getProvidedService(providedService)
        if(providedService == null){
            setError(GDataResponse.BAD_REQUEST,"no such service");
            throw new FeedHandlerException("no such service registered -- "+providedService);
        }
        try{
View Full Code Here

        try{
            GDataServerRegistry.getRegistry().registerComponent(StorageStub.class,null);
        }catch (Exception e) {

        }
        ProvidedService configurator = new ProvidedServiceStub();
        GDataServerRegistry.getRegistry().registerService(configurator);
        IndexSchema schema = new IndexSchema();
        //must be set
        schema.setDefaultSearchField("field");
        schema.setIndexLocation("/tmp/");
View Full Code Here

        ServerBaseEntry entry = new ServerBaseEntry(new Entry());
        entry.setId(ENTRYID);
       
        entry.setUpdated(new DateTime(TIMESTAMP,0));
        entry.setTitle(new PlainTextConstruct(TITLE));
        ProvidedService config = new ProvidedServiceStub();
        entry.setFeedId(FEEDID);
        entry.setServiceConfig(config);
        this.wrapper = new StorageEntryWrapper(entry,StorageOperation.INSERT);
        this.deleteWrapper = new StorageEntryWrapper(entry,StorageOperation.DELETE);
       
View Full Code Here

     */
    @SuppressWarnings("unchecked")
    @Override
    public BaseFeed getFeed(GDataRequest request, GDataResponse response) throws ServiceException {
        String translatedQuery = request.getTranslatedQuery();
        ProvidedService service = request.getConfigurator();
       
        QueryParser parser = new GDataQueryParser(service.getIndexSchema());
        Query query;
        try {
            query = parser.parse(translatedQuery);
          
        } catch (ParseException e1) {
View Full Code Here

        Object monitor = new Object();
        AtomicBoolean reached = new AtomicBoolean(false);

        MultiThreadEntryStub concuEntry = new MultiThreadEntryStub();
        concuEntry.setId(System.currentTimeMillis() + "");
        ProvidedService conf = new ProvidedServiceStub();
       
        concuEntry.setServiceConfig(conf);
        concuEntry.setUpdated(DateTime.now());
        concuEntry.setFeedId("feed");
        this.storage.storeEntry(concuEntry);
View Full Code Here

        Object monitor = new Object();
        AtomicBoolean reached = new AtomicBoolean(false);

        MultiThreadEntryStub concuEntry = new MultiThreadEntryStub();
        concuEntry.setId(System.currentTimeMillis() + "");
        ProvidedService conf = new ProvidedServiceStub();
       
        concuEntry.setServiceConfig(conf);
        concuEntry.setUpdated(DateTime.now());
        concuEntry.setFeedId("feed");
        this.storage.storeEntry(concuEntry);
View Full Code Here

        writer.write(entryId);
        writer.write(META_DATA_SEPARATOR);
    }
   
    private void writeService(StorageEntryWrapper wrapper, Writer writer) throws IOException{
        ProvidedService config = wrapper.getConfigurator();
        writer.write(config.getName());
        writer.write(META_DATA_SEPARATOR);
    }
View Full Code Here

TOP

Related Classes of org.apache.lucene.gdata.server.registry.ProvidedService

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.