Package org.openoffice.gdocs.util

Examples of org.openoffice.gdocs.util.Wrapper


            syncTimer = new Timer();
            TimerTask task = new TimerTask() {
                @Override
                public void run() {
                    Set<FileInfo> setToWork = Collections.synchronizedSet(setOfFiles);
                    Wrapper wrapper = WrapperFactory.getWrapperForCredentials(WrapperFactory.GOOGLE_DOCS);
                    boolean needToUpdateList = false;
                    for (FileInfo fi:setToWork) {
                        File file = new File(fi.getfName());
                        boolean update = false;
                        if (fi.getLastModified()!=file.lastModified()) update = true;
                        if (fi.getLength()!=file.length()) update = true;
                        if (update) {
                            log.add("need to update file "+fi.getfName()+" with docID="+fi.getDocumentLink()+" with mimeType="+fi.getFormat().getMimeType());
                            needToUpdateList=true;
                            try {
                                wrapper.update(fi.getfName(),fi.getDocumentLink(),fi.getFormat().getMimeType());
                                fi.setLastModified(file.lastModified());
                                fi.setLength(file.length());
                                log.add("updated!");
                            } catch (Exception e) {
                                log(e);
                            }

                        }
                    }
                    if (needToUpdateList) {
                        try {
                            wrapper.getListOfDocs(false);
                        } catch (Exception ex) {
                            log(ex);
                        }
                    }
                }
View Full Code Here


                } catch (Exception ex) {
                    Configuration.log(ex);
                }
        }
        Creditionals creditionals = loginPanel1.getCreditionals();
        Wrapper wrapper = WrapperFactory.getWrapperForCredentials(system);
        if (wrapper.hasList()) {
            try {
                fillListOfDocuments(wrapper,wrapper.getListOfDocs(true));
            } catch (Exception e) {
                // OK, this means that we were not able to obtain current docs list
            }
        }
//        jSplitPane2.setDividerLocation(0.7);
View Full Code Here

        setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
        setButtonsEnable(false, false, false);
        Util.startNewThread(Configuration.getClassLoader(), new Runnable() {
            public void run() {
                try {
                    final Wrapper wrapper = WrapperFactory.getWrapperForCredentials(system);
                    wrapper.login(loginPanel1.getCreditionals());
                    List<Document> documents = wrapper.getListOfDocs(false);
                    fillListOfDocuments(wrapper,documents);
                    filterText.requestFocusInWindow();
                } catch (Exception e) {
                    ImportDialog.this.setCursor(currentCursor);
                    e.printStackTrace();           
View Full Code Here

TOP

Related Classes of org.openoffice.gdocs.util.Wrapper

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.