Package org.apache.lucene.gdata.utils

Examples of org.apache.lucene.gdata.utils.ProvidedServiceStub


        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

    private String insert = "I;"+feedId+";"+entryId+";"+timestamp+";" +ProvidedServiceStub.SERVICE_NAME+";"+RecoverWriter.META_DATA_ENTRY_SEPARATOR+
    "<atom:entry xmlns:atom='http://www.w3.org/2005/Atom'><atom:id>"+entryId+"</atom:id><atom:updated>"+dateTime.toString()+"</atom:updated><atom:title type='text'>" + this.title+
    "</atom:title></atom:entry>"+RecoverWriter.META_DATA_ENTRY_SEPARATOR+RecoverWriter.STORAGE_OPERATION_SEPARATOR+RecoverWriter.META_DATA_ENTRY_SEPARATOR;
    protected void setUp() throws Exception {
        this.recReader = new RecoverReader();
        GDataServerRegistry.getRegistry().registerService(new ProvidedServiceStub());
       
    }
View Full Code Here

    protected void setUp() throws Exception {
        this.recDir = new File("unittest"+System.currentTimeMillis());
        if(!this.recDir.exists())
            this.recDir.mkdir();
        this.recDir.deleteOnExit();
        GDataServerRegistry.getRegistry().registerService(new ProvidedServiceStub());
        this.writeController = new RecoverController(this.recDir,false,true);
        this.readController = new RecoverController(this.recDir,true,true);
       
       
View Full Code Here

        this.writeController.initialize();
        ServerBaseEntry entry = new ServerBaseEntry();
        entry.setFeedId(this.feedId);
        entry.setId(entryId);
        entry.setUpdated(DateTime.now());
        entry.setServiceConfig(new ProvidedServiceStub());
        StorageEntryWrapper wrapper = new StorageEntryWrapper(entry,StorageOperation.INSERT);
        this.writeController.storageModified(wrapper);
        assertEquals(1,this.recDir.listFiles().length);
        this.writeController.destroy();
    }
View Full Code Here

    private  Directory dir;
    private static String feedId = "myFeed";
    private static String accountName = "simon";
    private static String service = ProvidedServiceStub.SERVICE_NAME;
    protected void setUp() throws Exception {
        this.configurator = new ProvidedServiceStub();
        this.controller = new StorageCoreController();
        this.dir = new RAMDirectory();
        this.controller.setStorageDir(this.dir);
        this.controller.setKeepRecoveredFiles(false);
        this.controller.setOptimizeInterval(10);
        this.controller.setRecover(false);
        this.controller.setBufferSize(10);
        this.controller.setPersistFactor(10);
        this.controller.initialize();
        this.configurator = new ProvidedServiceStub();
        this.modifier = this.controller.getStorageModifier();
        this.dir = this.controller.getDirectory();       
        ServerBaseFeed feed = new ServerBaseFeed();
        feed.setId(feedId);
        feed.setServiceType(service);
View Full Code Here

        }
    }
    protected void setUp() throws Exception {
        super.setUp();
       
        GDataServerRegistry.getRegistry().registerService(new ProvidedServiceStub());
       this.requestMockControl = MockControl.createControl(HttpServletRequest.class);
       this.adminServiceMockControl = MockControl.createControl(AdminService.class);
       this.adminService = (AdminService)this.adminServiceMockControl.getMock();
       this.mockRequest = (HttpServletRequest)this.requestMockControl.getMock();
       this.stub = (ServiceFactoryStub)GDataServerRegistry.getRegistry().lookup(ServiceFactory.class,ComponentType.SERVICEFACTORY);
View Full Code Here

            fail("entry is null");
        } catch (StorageException e) {
            //
        }
        ServerBaseEntry entry = new ServerBaseEntry();
        entry.setServiceConfig(new ProvidedServiceStub());

        try {
            this.storage.storeEntry(entry);
            fail("feed is null");
        } catch (StorageException e) {
View Full Code Here

            fail("entry is null");
        } catch (StorageException e) {
            //
        }
        ServerBaseEntry entry = new ServerBaseEntry();
        entry.setServiceConfig(new ProvidedServiceStub());
        entry.setId("someID");
        entry.setFeedId("someID");
        try {
            this.storage.storeEntry(entry);

        } catch (StorageException e) {
            fail("unexpected exception");
            //
        }
        entry.setFeedId(null);
        try {
            this.storage.deleteEntry(entry);
            fail("feed is null");
        } catch (StorageException e) {
            //
        }

        entry.setFeedId("someID");
        try {
            this.storage.deleteEntry(entry);

        } catch (StorageException e1) {
            e1.printStackTrace();
            fail("unexpected exception");

        }
        entry.setFeedId("someID");
       
        try {
            this.storage.deleteEntry(entry);

        } catch (StorageException e1) {
            e1.printStackTrace();
            fail("unexpected exception");

        }
       
       
       
        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

TOP

Related Classes of org.apache.lucene.gdata.utils.ProvidedServiceStub

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.