Package org.atomojo.app.db

Examples of org.atomojo.app.db.Entry


         mediaTypeTerm = atomDB.createTerm(Categorization.QUERY_MEDIA_TYPE_TERM);
      }
      loadedAt = System.currentTimeMillis();
      Iterator<TermInstance<Entry>> entries = atomDB.getEntriesByTerm(queryTerm);
      while (entries.hasNext()) {
         Entry entry = entries.next().getTarget();
         getContext().getLogger().info("Query entry: "+entry.getUUID());
         Feed feed = entry.getFeed();
         Iterator<EntryMedia> media = entry.getResources();
         if (media.hasNext()) {
            Storage.Query query = storage.getQuery(feed.getPath(),feed.getUUID(),media.next().getName());
            if (query!=null) {
               getContext().getLogger().info("Query found...");
               TermInstance<Entry> nameT = entry.getTerm(nameTerm);
               TermInstance<Entry> useCollectionT = entry.getTerm(collectionTerm);
               TermInstance<Entry> mediaTypeT = entry.getTerm(mediaTypeTerm);
               QuerySpec spec = new QuerySpec(query,useCollectionT!=null,mediaTypeT==null ? MediaType.APPLICATION_ATOM_XML : MediaType.valueOf(mediaTypeT.getValue().toString()));
               if (nameT!=null) {
                  String name = nameT.getValue()!=null ? nameT.getValue().toString() : null;
                  if (name!=null) {
                     getContext().getLogger().info("Query found, provided by name at "+name);
                     queries.put(name,spec);
                  }
               }
               queries.put(entry.getUUID().toString(),spec);
            }
         }
      }
   }
View Full Code Here


                  break;
               case ElementEndItem:
                  level--;
                  if (level==0) {
                     while (entries.hasNext()) {
                        Entry entry = entries.next();
                        File file = new File(dir,"."+entry.getUUID()+".atom");
                        try {
                           dest.send(constructor.createCharacters("\n"));
                           loader.generate(file.toURI(),
                              new RemoveDocumentFilter(
                                 new ItemFilter() {
View Full Code Here

                  if (!name.equals(".feed.atom") && name.endsWith(".atom")) {
                     name = name.substring(1);
                     name = name.substring(0,name.length()-5);
                     try {
                        UUID id = UUID.fromString(name);
                        Entry entry = feed.findEntry(id);
                        if (entry==null) {
                           importEntry(feed,file);
                        }
                     } catch (IllegalArgumentException ex) {
                        getLogger().warning("Ignoring entry-like file: "+file.getName());
                        ok.set(false);
                     } catch (Exception ex) {
                        getLogger().log(Level.SEVERE,"Error while import entry "+file.getName(),ex);
                        ok.set(false);
                     }
                  }
               }
            }
            return false;
         }
      });
      dir.listFiles(new FileFilter() {
         public boolean accept(File file) {
            String name = file.getName();
            if (!file.isDirectory() && name.charAt(0)!='.') {
               try {
                  EntryMedia media = feed.findEntryResource(name);
                  if (media==null) {
                     importMedia(feed,file);
                  }
               } catch (Exception ex) {
                  getLogger().log(Level.SEVERE,"Error while importing media "+file.getAbsolutePath(),ex);
                  ok.set(false);
               }
            }
            return false;
         }
      });
      Iterator<org.atomojo.app.db.Feed> children = feed.getChildren();
      while (children.hasNext()) {
         org.atomojo.app.db.Feed child = children.next();
         File childDir = new File(dir,child.getName());
         if (!childDir.exists()) {
            child.delete();
         }
      }
      Iterator<Entry> entries = feed.getEntries();
      while (entries.hasNext()) {
         Entry entry = entries.next();
         File entryFile = new File(dir,"."+entry.getUUID()+".atom");
         boolean delete = false;
         if (entryFile.exists()) {
            Iterator<EntryMedia> resources = entry.getResources();
            while (!delete && resources.hasNext()) {
               File media = new File(dir,resources.next().getName());
               if (!media.exists()) {
                  delete = true;
               }
            }
         } else {
            delete = true;
         }
         if (delete) {
            entry.delete(new MediaEntryListener() {
               public void onDelete(EntryMedia resource) {
                  File media = new File(dir,resource.getName());
                  if (media.exists()) {
                     media.delete();
                  }
View Full Code Here

         context.endFeedOutput();
         feedRep.release();
        
         Iterator<Entry> entries = feed.getEntries();
         while (entries.hasNext()) {
            Entry entry = entries.next();
            Iterator<EntryMedia> resources = entry.getResources();
            while (resources.hasNext()) {
               EntryMedia media = resources.next();
               Representation mediaRep = storage.getMedia(fpath,feed.getUUID(),media.getName());
               if (mediaRep==null) {
                  throw new IOException("Cannot get media "+media.getName()+" for feed at path "+fpath);
View Full Code Here

               throw new IOException("Cannot find related media "+src+" to entry "+file.getAbsolutePath());
            }
         }
        
         // create entry
         Entry entry = parent.createEntry(id);
        
         if (media!=null) {
            // create entry media
            MediaType type = MediaType.APPLICATION_OCTET_STREAM;
            int dot = media.getName().lastIndexOf('.');
            if (dot>0) {
               String ext = media.getName().substring(dot+1);
               type = MediaType.valueOf(metaService.getMetadata(ext).getName());
            }
            entry.createResource(media.getName(), type);
         }

         // edit entry date
         entryObj.setEdited(entry.getEdited());
         Writer out = new OutputStreamWriter(new FileOutputStream(file),"UTF-8");
         XMLWriter.writeDocument(doc, out);
         out.close();

         // feed was edited
         parent.edited();
         feedUpdated(parent.getPath(),parent.getUUID(),entry.getEdited());
      } catch (IllegalArgumentException ex) {
         throw new IOException(ex.getMessage());
      }
   }
View Full Code Here

         String ext = name.substring(dot+1);
         type = MediaType.valueOf(metaService.getMetadata(ext).getName());
      }
     
      // create entry for media
      Entry entry = parent.createEntry();
     
      // create entry media
      entry.createResource(name, type);
     
      // creae entry document
      Document doc = AtomResource.createMediaEntryDocument(name,entry.getUUID(),entry.getCreated(),null,name,type);
      Writer out = new OutputStreamWriter(new FileOutputStream(new File(file.getParentFile(),"."+entry.getUUID()+".atom")),"UTF-8");
      XMLWriter.writeDocument(doc, out);
      out.close();
     
      // feed was edited
      parent.edited();
      feedUpdated(parent.getPath(),parent.getUUID(),entry.getEdited());
   }
View Full Code Here

            }
            DocumentLoader loader = new SAXDocumentLoader();
            Iterator<TermInstance<Entry>> entries = app.getDB().getEntriesByTerm(dbTerm,value);
            while (entries.hasNext()) {
               TermInstance<Entry> termValue = entries.next();
               Entry entry = termValue.getTarget();
               Feed feed = entry.getFeed();
               String feedPath = feed.getPath();
               String feedBaseURI = resourceBase.toString()+feedPath;
               dest.send(constructor.createCharacters("\n"));

               // get the entry representation
               Representation rep = app.getStorage().getEntry(feedBaseURI,feedPath,feed.getUUID(),entry.getUUID());
              
               // avoid thread creation because reading an output representation requires a thread
               StringWriter sw = new StringWriter();
               rep.write(sw);
               rep.release();
View Full Code Here

                           baseURI = content.getBaseURI();
                        }
                        if (entries!=null) {
                           entries.add(entryId);
                        }
                        Entry entry = null;
                        try {
                           entry = feed.findEntry(entryId);
                        } catch (SQLException ex) {
                           log.log(Level.SEVERE,"Cannot find entry "+entryId+" due to exception.",ex);
                           errorCount++;
                        }
                        EntryMedia resource = null;
                        boolean hasMedia = false;
                        if (entry!=null) {
                           try {
                              Iterator<EntryMedia> resources = entry.getResources();
                              if (resources.hasNext()) {
                                 hasMedia = true;
                                 while (resources.hasNext()) {
                                    resource = resources.next();
                                    if (!resource.getName().equals(src)) {
                                       resource = null;
                                    }
                                 }
                              }
                           } catch (SQLException ex) {
                              log.log(Level.SEVERE,"Cannot enumerate entry "+index.getId()+" media due to exception.",ex);
                              errorCount++;
                           }
                        }
                        if (entry==null || (src!=null && !hasMedia) || (hasMedia && src==null)) {
                           if (entry!=null) {
                              // delete the entry because it changed to have a media or non-media content (rare)
                              try {
                                 app.deleteEntry(feed,entry);
                              } catch (AppException ex) {
                                 if (ex.getStatus()==Status.SERVER_ERROR_INTERNAL) {
                                    log.log(Level.SEVERE,ex.getMessage(),ex);
                                 } else {
                                    log.severe("Status="+ex.getStatus().getCode()+", "+ex.getMessage());
                                 }
                                 errorCount++;
                                 return;
                              }
                           }
                           if (src==null) {
                              // we have a regular entry
                              try {
                                 app.createEntry(user,feed,entryDoc);
                              } catch (AppException ex) {
                                 log.severe("Failed to create entry "+index.getId());
                                 if (ex.getStatus()==Status.SERVER_ERROR_INTERNAL) {
                                    log.log(Level.SEVERE,ex.getMessage(),ex);
                                 } else {
                                    log.severe("Status="+ex.getStatus().getCode()+", "+ex.getMessage());
                                 }
                                 errorCount++;
                              }
                           } else {
                              try {
                                 EntryMedia media = feed.findEntryResource(src);
                                 if (media!=null) {
                                    // We have a conflicting media entry.  We'll delete
                                    // the local one to use the pulled one
                                    Entry otherEntry = media.getEntry();
                                    final String fpath = feed.getPath();
                                    otherEntry.delete(new MediaEntryListener() {
                                       public void onDelete(EntryMedia resource) {
                                          try {
                                             storage.deleteMedia(fpath,feed.getUUID(),resource.getName());
                                          } catch (IOException ex) {
                                             log.log(Level.SEVERE,"Cannot delete media "+resource.getName(),ex);
                                          }
                                       }
                                    });
                                    storage.deleteEntry(fpath,feed.getUUID(),otherEntry.getUUID());
                                 }
                              } catch (SQLException ex) {
                                 log.log(Level.SEVERE,"Database error while processing local media reference "+src,ex);
                              } catch (IOException ex) {
                                 log.log(Level.SEVERE,"I/O error while deleting entry for media "+src,ex);
                              }
                              // we have a media entry
                              URI srcRef = baseURI.resolve(src);

                              Client client = new Client(new Context(log),Protocol.valueOf(srcRef.getScheme()));
                              client.getContext().getAttributes().put("hostnameVerifier", org.apache.commons.ssl.HostnameVerifier.DEFAULT);
                              Request request = new Request(Method.GET,new Reference(srcRef.toString()));
                              if (auth!=null) {
                                 if (auth.getScheme().equals("cookie")) {
                                    Cookie cookie = new Cookie(auth.getName(),auth.getPassword());
                                    cookie.setPath("/");
                                    request.getCookies().add(cookie);
                                 } else {
                                    request.setChallengeResponse(new ChallengeResponse(ChallengeScheme.HTTP_BASIC,auth.getName(),auth.getPassword()));
                                 }
                              }
                              Response response = client.handle(request);
                              if (!response.getStatus().isSuccess()) {
                                 log.log(Level.SEVERE,"Failed to retrieve media, status="+response.getStatus().getCode()+", src="+srcRef);
                                 errorCount++;
                                 return;
                              }
                              if (contentType!=null) {
                                 // The entry's media type wins.  Sometimes file resources do not
                                 // report the media type correctly
                                 response.getEntity().setMediaType(contentType);
                              }
                              try {
                                 entry = app.createMediaEntry(user,feed,response.getEntity(),src,entryId);
                                 app.updateEntry(user,feed,entry,entryDoc);
                              } catch (AppException ex) {
                                 log.severe("Failed to create media entry "+index.getId()+", src="+srcRef);
                                 if (ex.getStatus()==Status.SERVER_ERROR_INTERNAL) {
                                    log.log(Level.SEVERE,ex.getMessage(),ex);
                                 } else {
                                    log.severe("Status="+ex.getStatus().getCode()+", "+ex.getMessage());
                                 }
                                 errorCount++;
                              }
                           }
                        } else {
                           try {
                              app.updateEntry(user,feed,entryId,entryDoc);
                           } catch (AppException ex) {
                              if (ex.getStatus()==Status.SERVER_ERROR_INTERNAL) {
                                 log.log(Level.SEVERE,ex.getMessage(),ex);
                              } else {
                                 log.severe("Status="+ex.getStatus().getCode()+", "+ex.getMessage());
                              }
                              errorCount++;
                              return;
                           }
                           if (src!=null) {
                              URI srcRef = baseURI.resolve(src);

                              Client client = new Client(new Context(log),Protocol.valueOf(srcRef.getScheme()));
                              client.getContext().getAttributes().put("hostnameVerifier", org.apache.commons.ssl.HostnameVerifier.DEFAULT);
                              /*
                             
                              Request headRequest = new Request(Method.HEAD,new Reference(srcRef.toString()));
                              if (auth!=null) {
                                 headRequest.setChallengeResponse(new ChallengeResponse(ChallengeScheme.HTTP_BASIC,auth.getName(),auth.getPassword()));
                              }
                              Response headResponse = client.handle(headRequest);
                              if (!headResponse.getStatus().isSuccess()) {
                                 log.log(Level.SEVERE,"Failed to retrieve media head, status="+headResponse.getStatus().getCode()+", src="+srcRef);
                                 errorCount++;
                                 return;
                              }
                              boolean outOfDate = true;
                              if (headResponse.isEntityAvailable()) {
                                 outOfDate = headResponse.getEntity().getModificationDate().after(resource.getEdited());
                                 if (outOfDate) {
                                    log.info("Out of date: "+headResponse.getEntity().getModificationDate()+" > "+resource.getEdited());
                                 }
                              }
                               */
                             
                              Request request = new Request(Method.GET,new Reference(srcRef.toString()));
                              if (auth!=null) {
                                 if (auth.getScheme().equals("cookie")) {
                                    Cookie cookie = new Cookie(auth.getName(),auth.getPassword());
                                    cookie.setPath("/");
                                    request.getCookies().add(cookie);
                                 } else {
                                    request.setChallengeResponse(new ChallengeResponse(ChallengeScheme.HTTP_BASIC,auth.getName(),auth.getPassword()));
                                 }
                              }
                              Date edited = new Date(resource.getEdited().getTime());
                              request.getConditions().setUnmodifiedSince(edited);
                              log.info("Attempting update media from "+srcRef.toString()+", edited="+edited);
                              Response response = client.handle(request);
                              if (response.getStatus().getCode()==304) {
                                 log.info("No change (304)");
                                 return;
                              } else if (!response.getStatus().isSuccess()) {
                                 log.log(Level.SEVERE,"Failed to retrieve media, status="+response.getStatus().getCode()+", src="+srcRef);
                                 errorCount++;
                                 return;
                              }
                              if (contentType!=null) {
                                 // The entry's media type wins.  Sometimes file resources do not
                                 // report the media type correctly
                                 response.getEntity().setMediaType(contentType);
                              }
                              try {
                                 app.updateMedia(feed,src,response.getEntity());
                              } catch (AppException ex) {
                                 if (ex.getStatus()==Status.SERVER_ERROR_INTERNAL) {
                                    log.log(Level.SEVERE,ex.getMessage(),ex);
                                 } else {
                                    log.severe("Failed to update media entry "+index.getId()+", src="+srcRef);
                                    log.severe("Status="+ex.getStatus().getCode()+", "+ex.getMessage());
                                 }
                                 errorCount++;
                              }
                           }
                        }
                     }
                     public void onEnd() {
                        if (additive) {
                           return;
                        }
                        if (feed!=null) {
                           log.info("Removing extra entries...");
                           try {
                              Iterator<Entry> feedEntries = feed.getEntries();
                              while (feedEntries.hasNext()) {
                                 Entry entry = feedEntries.next();
                                 //log.info(entry.getUUID()+"?");
                                 if (!entries.contains(entry.getUUID())) {
                                    log.info("Delete ");
                                    app.deleteEntry(feed, entry);
                                 }
                              }
                           } catch (Exception ex) {
View Full Code Here

            while (entries.hasNext()) {

               Journal.UpdatedEntry updateEntry = (Journal.UpdatedEntry)entries.next();

               Feed feed = updateEntry.getFeed();
               Entry entry = updateEntry.getEntry();
               String path = feed.getPath();
               if (path.length()>0 && !path.endsWith("/")) {
                  path += "/";
               }
               URI feedURI = proc.getRemoteApp().getRoot().resolve(path);
               FeedClient appClient = new FeedClient(feedURI);
               if (auth!=null) {
                  appClient.setIdentity(auth.getName(),auth.getPassword());
               }


               if (updateEntry.getOperation()==Journal.CREATE_OPERATION) {
                  // Create feed or entry
                  if (entry==null) {
                     // Create feed
                     log.info("Creating feed "+feedURI);
                     try {
                        Representation feedRep = storage.getFeed(path,feed.getUUID(),feed.getEntries());
                        // Now, create the feed with the XML
                        try {
                           String xml = feedRep.getText();
                           if (!appClient.create(xml).isSuccess()) {
                              errorCount++;
                              log.severe("Cannot create feed on target for path "+path);
                              throw new SyncException("Synchronization was incomplete.  Stopped due to failure to create feed: "+path);
                           }
                        } catch (IOException ex) {
                           errorCount++;
                           log.log(Level.SEVERE,"Cannot get xml serialization of feed document for path "+path,ex);
                           throw new SyncException("Synchronization was incomplete.  Stopped due to failure of serialization at path "+path);
                        }
                     } catch (IOException ex) {
                        errorCount++;
                        log.log(Level.SEVERE,"Cannot get feed document for path "+path,ex);
                        throw new SyncException("Synchronization was incomplete.  Stopped due failure to get feed at "+path);
                     }
                  } else {
                     // Create entry

                     log.info("Creating entry "+entry.getUUID()+" for feed "+feedURI);

                     // Check for media entries
                     Iterator<EntryMedia> media = entry.getResources();
                     if (media.hasNext()) {

                        // We have a media entry and so we post the media first
                        EntryMedia resource = media.next();
                        if (media.hasNext()) {
                           while (media.hasNext()) {
                              media.next();
                           }
                           errorCount++;
                           log.severe("Media entries with more than one resource is not supported.");
                           throw new SyncException("Synchronization was incomplete.  Media entry for entry "+entry.getUUID()+" has more than one resource.");
                        }

                        // Get the media from the XML DB
                        try {
                           Representation rep = storage.getMedia(path,feed.getUUID(),resource.getName());
                           // Send the media to the server
                           rep.setMediaType(resource.getMediaType());
                           appClient.createMedia(entry.getUUID(),resource.getName(),rep);
                        } catch (StatusException ex) {
                           errorCount++;
                           log.severe("Cannot update media "+resource.getName()+" on target for path "+path+", status="+ex.getStatus().getCode());
                           throw new SyncException("Synchronization was incomplete.  Failure to update media "+resource.getName()+" for entry "+entry.getUUID()+", status="+ex.getStatus().getCode());
                        } catch (Exception ex) {
                           errorCount++;
                           log.log(Level.SEVERE,"Cannot get media "+resource.getName()+" for path "+path+" and id "+entry.getUUID().toString(),ex);
                           throw new SyncException("Synchronization was incomplete.  Failure to get media "+resource.getName()+" for entry "+entry.getUUID());
                        }
                     } else {

                        String xml = null;
                        // Get the entry document from the XML DB
                        try {
                           Representation entryRep = storage.getEntry(".",path,feed.getUUID(),entry.getUUID());

                           // Now, create the feed with the XML
                           try {
                              xml = entryRep.getText();
                           } catch (IOException ex) {
                              errorCount++;
                              log.log(Level.SEVERE,"Cannot get xml serialization of entry document for path "+path,ex);
                              throw new SyncException("Synchronization was incomplete.  Failure to get serialization of entry "+entry.getUUID());
                           }
                        } catch (IOException ex) {
                           errorCount++;
                           log.log(Level.SEVERE,"Cannot get entry document for path "+path+" and id "+entry.getUUID().toString(),ex);
                           throw new SyncException("Synchronization was incomplete.  Failure to get entry "+entry.getUUID());
                        }

                        // This is a regular entry
                        try {
                           appClient.createEntry(xml);
                        } catch (Exception ex) {
                           errorCount++;
                           log.severe("Cannot create entry on target for path "+path);
                           throw new SyncException("Synchronization was incomplete.  Failure to create entry "+entry.getUUID()+" for path "+path);
                        }
                     }
                  }
               } else {
                  EntryMedia resource = updateEntry.getResource();
                  if (entry==null) {
                     // Modify feed
                     log.info("Updating feed "+feedURI);
                     // Get the feed document from the XML DB
                     try {
                        Representation feedRep = storage.getFeed(path,feed.getUUID(),feed.getEntries());

                        // Now, create the feed with the XML
                        try {
                           String xml = feedRep.getText();
                           if (!appClient.update(xml).isSuccess()) {
                              errorCount++;
                              log.severe("Cannot update feed on target for path "+path);
                              throw new SyncException("Synchronization was incomplete.  Cannot update feed for path "+path);
                           }
                        } catch (IOException ex) {
                           errorCount++;
                           log.log(Level.SEVERE,"Cannot get xml serialization of feed document for path "+path,ex);
                           throw new SyncException("Synchronization was incomplete.  Cannot get serialization of feed for path "+path);
                        }
                     } catch (IOException ex) {
                        errorCount++;
                        log.log(Level.SEVERE,"Cannot get feed document for path "+path,ex);
                        throw new SyncException("Synchronization was incomplete.  Cannot get feed for path "+path);
                     }
                  } else if (resource==null) {
                     // Modify entry
                     log.info("Updating entry "+entry.getUUID()+" for feed "+feedURI);

                     // Get the entry document from the XML DB
                     try {
                        Representation entryRep = storage.getEntry(".",path,feed.getUUID(),entry.getUUID());

                        // Now, create the feed with the XML
                        try {
                           String xml = entryRep.getText();
                           if (!appClient.updateEntry(entry.getUUID(),xml).isSuccess()) {
                              errorCount++;
                              log.severe("Cannot update entry on target for path "+path);
                              throw new SyncException("Synchronization was incomplete.  Cannot update entry "+entry.getUUID()+" for path"+path);
                           }
                        } catch (IOException ex) {
                           errorCount++;
                           log.log(Level.SEVERE,"Cannot get xml serialization of entry document for path "+path,ex);
                           throw new SyncException("Synchronization was incomplete.  Cannot serialization of entry "+entry.getUUID()+" for path"+path);
                        }
                     } catch (IOException ex) {
                        errorCount++;
                        log.log(Level.SEVERE,"Cannot get entry document for path "+path+" and id "+entry.getUUID().toString(),ex);
                        throw new SyncException("Synchronization was incomplete.  Cannot get entry "+entry.getUUID()+" for path"+path);
                     }
                  } else {
                     // Modify resource
                     log.info("Updating resource "+resource.getName()+" for entry "+entry.getUUID()+" for feed "+feedURI);

                     // Get the media from the XML DB
                     try {
                        Representation mediaRep = storage.getMedia(path,feed.getUUID(),resource.getName());
                        mediaRep.setMediaType(resource.getMediaType());
                        if (!appClient.updateMedia(resource.getName(),mediaRep).isSuccess()) {
                           errorCount++;
                           log.severe("Cannot update media "+resource.getName()+" on target for path "+path);
                           throw new SyncException("Synchronization was incomplete.  Cannot update media "+resource.getName()+" for entry "+entry.getUUID()+" for path"+path);
                        }
                     } catch (IOException ex) {
                        errorCount++;
                        log.log(Level.SEVERE,"Cannot get media "+resource.getName()+" for path "+path+" and id "+entry.getUUID().toString(),ex);
                        throw new SyncException("Synchronization was incomplete.  Cannot get media "+resource.getName()+" for entry "+entry.getUUID()+" for path"+path);
                     }
                  }
               }
            }
            proc.setLastSynchronizedOn(syncTime);
View Full Code Here

         Feed newFeed = app.createFeed(parent.getPath()+name, feedDoc);
        
         // copy the entries
         Iterator<Entry> entries = source.getEntries();
         while (entries.hasNext()) {
            Entry entry = entries.next();
            Document entryDoc = parser.load(app.getEntryRepresentation("", entry));
            Iterator<EntryMedia> mediaResources = entry.getResources();
            if (mediaResources.hasNext()) {
               // we have a media entry and so copy the media
               EntryMedia media = mediaResources.next();
               Representation mediaRep = app.getStorage().getMedia(source.getPath(), source.getUUID(), media.getName());
               Entry newEntry = app.createMediaEntry(user,newFeed,mediaRep,media.getName(),UUID.randomUUID());
               app.updateEntry(user,newFeed,newEntry,entryDoc);
               // TODO: copy multiple media ?
            } else {
               // Just copy the entry.  The ID will be changed since the entry exists
               app.createEntry(user, newFeed, entryDoc);
View Full Code Here

TOP

Related Classes of org.atomojo.app.db.Entry

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.