Package org.atomojo.app.client

Examples of org.atomojo.app.client.Entry


               public void onFeed(Document feedDoc) {
               }

               public void onEntry(Document entryDoc) {
                  Entry entry = new Entry(entryDoc);
                  entry.index();
                  if (entry.getTerm(HOST_TERM) == null) {
                     return;
                  }
                  Text text = entry.getContent();
                  if (text == null || !text.isXML()) {
                     getContext().getLogger().warning("Ignoring host entry with missing or has incorrectly typed content for configuration.");
                     return;
                  }
                  Element hostE = text.getContent();
                  if (hostE == null) {
                     getContext().getLogger().warning("Ignoring host entry with empty content.");
                     return;
                  }

                  Date edited = null;

                  try {
                     edited = entry.getEdited();
                     if (edited == null) {
                        edited = entry.getUpdated();
                     }
                  } catch (ParseException ex) {
                     getContext().getLogger().warning("Ignoring host entry with malformed date in updated or edited element: " + ex.getMessage());
                     return;
                  }

                  if (edited == null) {
                     getContext().getLogger().warning("Ignoring host entry without updated or edited element.");
                     return;
                  }

                  found.put(entry.getId(), Boolean.TRUE);

                  ConfiguredHost autoHost = hosts.get(entry.getId());
                  if (autoHost==null) {
                     getLogger().info("New host detected in entry "+entry.getId());
                  } else if (autoHost.edited.getTime() < edited.getTime()) {
                     // the entry has changed, so delete
                     getContext().getLogger().info("Entry changed for host " + autoHost.getVirtualHost().getHostDomain() + ", reconfiguring.");
                     getHosts().remove(autoHost.getVirtualHost());
                     autoHost = null;
                  }

                  if (autoHost != null) {
                     autoHost.check();
                     return;
                  }

                  // Create configuration
                  changes = true;

                  try {
                     Configuration.Host host = config.createHost(hostE);

                     String hostName = host.getName();
                     if (hostName == null) {
                        getLogger().severe("Host entry " + entry.getId() + " does not have a host name attribute.");
                        return;
                     }
                     getLogger().info("Auto-configuring host " + host.getName());


                     for (Map<String, ConfiguredHost> confHosts : ifaceHosts.values()) {
                        if (confHosts.get(host.getName()) != null) {
                           getLogger().warning("Ignoring duplicate host for " + host.getName() + " from auto-configuration.");
                           return;
                        }
                     }

                     Context hostContext = getContext().createChildContext();
                    
                     ConfiguredHost confHost = new ConfiguredHost(hostContext, getInternalRouter(),serverConf, host, edited, false);

                     // The auto host should not be in confHosts as it isn't static
                     //confHosts.put(host.getName(), confHost);
                     hosts.put(entry.getId(), confHost);

                     getHosts().add(confHost.getVirtualHost());

                  } catch (XMLException ex) {
                     getLogger().log(Level.SEVERE, "Cannot load host configuration.", ex);
View Full Code Here


            final Map<String,Boolean> changedAuth = new TreeMap<String,Boolean>();
            client.get(new FeedDestination() {
               public void onFeed(Document feedDoc) {
               }
               public void onEntry(Document entryDoc) {
                  Entry entry = new Entry(entryDoc);
                  entry.index();
                  if (entry.getTerm(HOST_TERM)!=null) {
                     // store host entry till DB entries are done
                     hostsToDo.add(entry);
                     return;
                  }
                  if (entry.getTerm(DB_TERM)!=null) {
                     // store db entry till realms are done
                     dbToDo.add(entry);
                     return;
                  }
                 
                  if (entry.getTerm(REALM_TERM)==null) {
                     // ignore non-realm entry
                     return;
                  }
                  Term nameT = entry.getTerm(REALM_NAME_TERM);
                  if (nameT==null) {
                     return;
                  }
                  String name = nameT.getFirstValue();
                  List<Link> services = entry.getLinks().get("service");
                  if (services==null) {
                     getLogger().warning("Missing 'service' relation link on realm "+name);
                  } else {
                     URI service = services.get(0).getLink();
                     AuthProtocolService auth = (AuthProtocolService)autoServices.get(name);
                     if (auth!=null) {
                        if (!auth.getServiceURI().equals(service)) {
                           // The service URI has changed
                           autoServices.remove(name);
                           auth = null;
                           changedAuth.put(name,Boolean.TRUE);
                        }
                     }
                     if (auth==null) {
                        getLogger().info("Adding realm "+name+" from service "+service);
                        auth = new AuthProtocolService();
                        Properties props = new Properties();
                        props.setProperty("href",service.toString());
                        try {
                           auth.init(props);
                           autoServices.put(name,auth);
                           currentAuthList.put(name,Boolean.TRUE);
                        } catch (AuthException ex) {
                           getLogger().log(Level.SEVERE,"Cannot initialize auth service for realm "+name,ex);
                        }
                     }
                  }
               }
            });
           
            // Configure the databases
            final Map<String,Boolean> currentDBList = new TreeMap<String,Boolean>();
            for (Entry entry : dbToDo) {
               Term nameT = entry.getTerm(DB_NAME_TERM);
               if (nameT==null) {
                  getLogger().warning("Ignoring db entry that does not have name term "+DB_NAME_TERM);
                  return;
               }
               Term authT = entry.getTerm(DB_AUTH_TERM);
               if (authT==null) {
                  getLogger().warning("Ignoring db entry that does not have auth term "+DB_AUTH_TERM);
                  return;
               }
               Term groupT = entry.getTerm(DB_GROUP_TERM);
               Term aliasT = entry.getTerm(DB_ALIAS_TERM);
               String dbName = nameT.getFirstValue();
               String authName = authT.getFirstValue();
               if (dbName==null) {
                  getLogger().warning("Ignoring db entry where name term "+DB_NAME_TERM+" does not have a value.");
                  return;
               }
               if (authName==null) {
                  getLogger().warning("Ignoring db entry where auth term "+DB_NAME_TERM+" does not have a value.");
                  return;
               }
               AuthService auth = services.get(authName);
               if (auth==null) {
                  auth = autoServices.get(authName);
               }
               if (auth==null) {
                  getLogger().warning("Cannot configure db entry for "+dbName+" as auth service "+authName+" does not exist.");
                  return;
               }
               DBInfo dbinfo = autodbList.get(dbName);
               Storage storage = null;
               if (dbinfo==null) {
                  getLogger().info("Creating DB "+dbName);
                  DB db = new DB(getLogger(),new File(dbDir,dbName));
                  dbinfo = new DBInfo(dbName,db,auth,groupT!=null ?  groupT.getFirstValue() : null, aliasT!=null ? aliasT.getFirstValue() : null);
                  storage = storageFactory.getStorage(db);
                  try {
                     getLogger().info("Connecting to DB "+dbName);
                     db.connect();
                     getLogger().info("Connected to DB "+dbName);
                     autodbList.put(dbName,dbinfo);
                     storage.start();
                  } catch (SQLException ex) {
                     getLogger().log(Level.SEVERE,"Cannot connect to database "+dbName,ex);
                  }
               } else {
                  storage = storageFactory.getStorage(dbinfo.getDB());
               }
               currentDBList.put(dbName,Boolean.TRUE);
               UserGuard adminGuard = new UserGuard(childContext,ChallengeScheme.HTTP_BASIC,"Atom Administrator",auth);
               adminGuard.getRequiredGroups().add(AuthService.ADMIN_GROUP);

               adminGuard.setNext(new AdminApplication(childContext,dbinfo.getDB(),storage,AtomApplication.RESOURCE_BASE));
               admins.put(dbName,adminGuard);
               for (Router router : adminRouters) {
                  router.attach("/admin/database/"+dbName,adminGuard).getTemplate().setMatchingMode(Template.MODE_STARTS_WITH);
               }
            }
           
            // Remove databases that have been removed from feed
            for (String name : autodbList.keySet()) {
               if (currentDBList.get(name)==null) {
                  // the database was removed
                  DBInfo dbinfo = autodbList.remove(name);
                  dbinfo.getDB().stop();
                  Storage storage = storageFactory.getStorage(dbinfo.getDB());
                  storage.stop();
                  Restlet admin = admins.remove(name);
                  if (admin!=null) {
                     for (Router router : adminRouters) {
                        router.detach(admin);
                     }
                  }
               }
            }
           
            final Map<String,Boolean> currentEntries = new TreeMap<String,Boolean>();
            for (Entry entry : hostsToDo) {
               Text text = entry.getContent();
               if (text==null || !text.isXML()) {
                  getLogger().warning("Ignoring host entry with missing or has incorrectly typed content for configuration.");
                  continue;
               }
               Element hostE = text.getContent();
               if (hostE==null) {
                  getLogger().warning("Ignoring host entry with empty content.");
                  continue;
               }

               Date edited = null;

               try {
                  edited = entry.getEdited();
                  if (edited==null) {
                     edited = entry.getUpdated();
                  }
               } catch (ParseException ex) {
                  getLogger().warning("Ignoring host entry with malformed date in updated or edited element: "+ex.getMessage());
                  continue;
               }

               if (edited==null) {
                  getLogger().warning("Ignoring host entry without updated or edited element.");
                  continue;
               }

               currentEntries.put(entry.getId(),Boolean.TRUE);

               AutoConfiguredHost autoHost = hosts.get(entry.getId());
               if (autoHost!=null && (autoHost.edited.getTime()<edited.getTime() || changedAuth.get(autoHost.host.getDatabaseName())!=null)) {
                  // the entry has changed, so delete
                  getLogger().info("Entry changed for host "+autoHost.vhost.getHostDomain()+", reconfiguring.");
                  getHosts().remove(autoHost.vhost);
                  autoHost = null;
               }

               if (autoHost!=null) {
                  getLogger().info("Nothing has changed for host "+autoHost.vhost.getHostDomain());
                  continue;
               }

               // Create configuration
               changes = true;

               ServerConfiguration.Host host = config.createHost(hostE);

               // Configure host
               getLogger().info("Adding host "+host.getName());
               VirtualHost vhost = createVirtualHost(host);

               WebComponent.this.configure(vhost,host);

               if (autoHost==null) {
                  hosts.put(entry.getId(),new AutoConfiguredHost(vhost,host,edited));
               } else {
                  autoHost.vhost = vhost;
                  autoHost.host = host;
                  autoHost.edited = edited;
               }
View Full Code Here

         for (int i=0; i<100; i++) {
            Reference feedRef = new Reference(config.getServerLocation()+"R/"+i+"/");
            FeedClient feedClient = new FeedClient(client,feedRef);
            feedClient.setIdentity("admin","admin");

            Entry entry = null;
            if (!feedClient.exists()) {
               log.info("Creating feed "+i);
               Status status = feedClient.create("<feed xmlns='http://www.w3.org/2005/Atom'><title>Feed "+i+"</title></feed>");
               if (!status.isSuccess()) {
                  log.info("Failure, status="+status.getCode());
               }
               assertTrue(status.isSuccess());
            } else {

               log.info("Checking feed "+i);
               final AtomicReference<Entry> theEntry = new AtomicReference<Entry>();
               feedClient.get(new FeedDestination() {
                  public void onEntry(Document entryDoc) {
                     Entry entry = new Entry(entryDoc);
                     entry.index();
                     theEntry.set(entry);
                  }
               });
               entry = theEntry.get();
            }
            if (entry==null) {
               try {
                  log.info("Creating entry in "+i);
                  feedClient.createEntry("<entry xmlns='http://www.w3.org/2005/Atom'><title>Entry "+i+"</title></entry>");
               } catch (StatusException ex) {
                  log.info("Failure, status="+ex.getStatus().getCode());
                  assertTrue(false);
               }
            } else {
               log.info("Updating entry in "+i);
               entry.setTitle("Updated "+entry.getTitle());
               EntryClient entryClient = feedClient.getEntryClient(entry);
               Status status = entryClient.update();
               if (!status.isSuccess()) {
                  log.info("Failure, status="+status.getCode());
               }
View Full Code Here

            Reference feedRef = new Reference(config.getServerLocation()+"R/"+i+"/");
            FeedClient feedClient = new FeedClient(client,feedRef);
            feedClient.setIdentity("admin","admin");

            log.info("Checking feed "+j+","+i);
            Entry entry = null;
            final AtomicReference<Entry> theEntry = new AtomicReference<Entry>();
            Status status = feedClient.get(new FeedDestination() {
               public void onEntry(Document entryDoc) {
                  Entry entry = new Entry(entryDoc);
                  entry.index();
                  theEntry.set(entry);
               }
            }).getStatus();
            if (status.getCode()==404) {
               log.info("Creating feed "+j+","+i);
               status = feedClient.create("<feed xmlns='http://www.w3.org/2005/Atom'><title>Feed "+j+","+i+"</title></feed>");
               if (!status.isSuccess()) {
                  log.info("Failure, status="+status.getCode());
               }
               assertTrue(status.isSuccess());
            } else if (status.isSuccess()) {
               entry = theEntry.get();
            } else {
               if (!status.isSuccess()) {
                  log.info("Failure, status="+status.getCode());
               }
               assertTrue(status.isSuccess());
            }
            if (entry==null) {
               try {
                  log.info("Creating entry in "+j+","+i);
                  feedClient.createEntry("<entry xmlns='http://www.w3.org/2005/Atom'><title>Entry "+i+"</title></entry>");
               } catch (StatusException ex) {
                  log.info("Failure, status="+ex.getStatus().getCode());
                  assertTrue(false);
               }
            } else {
               log.info("Updating entry in "+i);
               entry.setTitle("Updated "+entry.getTitle());
               EntryClient entryClient = feedClient.getEntryClient(entry);
               status = entryClient.update();
               if (!status.isSuccess()) {
                  log.info("Failure, status="+status.getCode());
               }
View Full Code Here

         final Map<String,Entry> entries = new HashMap<String,Entry>();
         try {
            feedClient.get(new FeedDestination() {
               public void onFeed(Document feedDoc) {}
               public void onEntry(Document entryDoc) {
                  Entry entry = new Entry(entryDoc);
                  Entry.Media media = entry.getMediaContent();
                  if (media!=null) {
                     //log.info("Caching entry for "+media.getName());
                     entries.put(media.getName(),entry);
                  }
               }
            });
         } catch (XMLException ex) {
            log.log(Level.SEVERE,"Cannot get feed "+target.feed+" due to XML exception.",ex);
            continue;
         } catch (IOException ex) {
            log.log(Level.SEVERE,"Cannot get feed "+target.feed+" due to I/O exception.",ex);
            continue;
         }
        
         String u = target.feed.toString();
         if (u.charAt(u.length()-1)!='/') {
            u += "/";
         }
         final String feedBase = u;
         final MetadataService metadataService = new MetadataService();
         target.dir.listFiles(new FileFilter() {
            public boolean accept(File file) {
               if (file.isDirectory()) {
                  URI subFeed = URI.create(feedBase+file.getName()+"/");
                  targets.add(new Target(file,subFeed));
               } else {
                  if (!excludeDot || file.getName().charAt(0)!='.') {
                     // Sync content
                     Entry entry = entries.get(file.getName());
                     Status status = null;
                     if (entry!=null) {
                        log.info("Updating "+file);
                        // update existing media
                        try {
                           FileInputStream is = new FileInputStream(file);
                           EntryClient client = feedClient.getEntryClient(entry);
                           status = client.updateMedia(new InputRepresentation(is,entry.getMediaContent().getMediaType()));
                           is.close();
                        } catch (IOException ex) {
                           log.log(Level.SEVERE,"Cannot update "+file+" due to I/O exception.",ex);
                        }
                        entries.remove(file.getName());
                     } else {
                        log.info("Creating "+file);
                        // create new media
                        try {
                           FileInputStream is = new FileInputStream(file);
                           int extPos = file.getName().lastIndexOf('.');
                           String ext = extPos<0 ? null : file.getName().substring(extPos+1);
                           Metadata metadata = ext==null ? null : metadataService.getMetadata(ext);
                           MediaType type = metadata==null ? MediaType.APPLICATION_OCTET_STREAM : MediaType.valueOf(metadata.getName());
                           Entry mediaEntry = feedClient.createMedia(file.getName(),new InputRepresentation(is,type));
                           is.close();
                        } catch (StatusException ex) {
                           log.log(Level.SEVERE,"Cannot create media entry from "+file+" due to status "+ex.getStatus().getCode(),ex);
                        } catch (Exception ex) {
                           log.log(Level.SEVERE,"Cannot create media entry from "+file+" due to exception.",ex);
View Full Code Here

            }
            public void onEntry(Document entryDoc) {
               if (!ok) {
                  return;
               }
               Entry entry = new Entry(entryDoc);
               entry.index();

               UUID entryId = null;
               try {
                  entryId = UUID.fromString(entry.getId().substring(9));
               } catch (IllegalArgumentException ex) {
                  log.severe("Ignoring entry with bad UUID: "+entry.getId());
                  errorCount++;
                  return;
               }
               log.info("Entry: "+entryId);
               EntryClient entryClient = new EntryClient(new Reference(targetClient.getEntryLocation(entryId).toString()),target.getIdentity());
               String src = null;
               Element content = entryDoc.getDocumentElement().getFirstElementNamed(CONTENT_NAME);
               URI baseURI = null;
               MediaType contentType = null;
               if (content!=null) {
                  src = content.getAttributeValue("src");
                  String type = content.getAttributeValue("type");
                  if (type!=null) {
                     contentType = MediaType.valueOf(type);
                  }
                  baseURI = content.getBaseURI();
               }
               if (entries!=null) {
                  entries.add(entryId);
               }
              
               Status exists = null;
               try {
                  exists = entryClient.get();
               } catch (Exception ex) {
                  log.log(Level.SEVERE,"Cannot get entry "+entryClient.getLocation()+", error: "+ex.getMessage(),ex);
                  errorCount++;
                  return;
               }
               if (exists.isSuccess()) {
                  entryClient.getEntry().index();
                  try {
                    
                     Status status = entryClient.update(entryDoc);
                     if (!status.isSuccess()) {
                        log.severe("Cannot update entry "+entryClient.getLocation()+", status="+status.getCode());
                        errorCount++;
                     }
                  } catch (Exception ex) {
                     log.log(Level.SEVERE,"Cannot update entry "+entryClient.getLocation()+", error: "+ex.getMessage(),ex);
                     errorCount++;
                  }
                  if (src!=null) {
                     // update media
                     Reference mediaLocation = new Reference(baseURI.resolve(src).toString());
                     Client client = new Client(mediaLocation.getSchemeProtocol());
                     Request getRequest = new Request(Method.GET,mediaLocation);
                     if (source.getIdentity()!=null) {
                        getRequest.setChallengeResponse(new ChallengeResponse(ChallengeScheme.HTTP_BASIC,source.getUsername(),source.getPassword()));
                     }
                     Response getResponse = client.handle(getRequest);
                     if (getResponse.getStatus().isSuccess()) {
                        Reference targetLocation = new Reference(targetClient.getLocation().resolve(src).toString());
                        Client targetClient = new Client(targetLocation.getSchemeProtocol());
                        Request putRequest = new Request(Method.PUT,targetLocation);
                        if (target.getIdentity()!=null) {
                           putRequest.setChallengeResponse(new ChallengeResponse(ChallengeScheme.HTTP_BASIC,target.getUsername(),target.getPassword()));
                        }
                        Representation rep = getResponse.getEntity();
                        if (contentType!=null) {
                           rep.setMediaType(contentType);
                        }
                        putRequest.setEntity(rep);
                        Response putResponse = targetClient.handle(putRequest);
                        if (!putResponse.getStatus().isSuccess()) {
                           log.severe("Cannot put media update to "+targetLocation+", status="+putResponse.getStatus().getCode());
                        }
                     } else {
                        if (!getResponse.getStatus().isSuccess()) {
                           log.severe("Cannot get media from "+mediaLocation+", status="+getResponse.getStatus().getCode());
                        }
                     }
                  }
               } else if (exists.getCode()==Status.CLIENT_ERROR_NOT_FOUND.getCode()) {
                  if (src==null) {
                     // regular entry
                     try {
                        targetClient.createEntry(entryDoc);
                     } catch (StatusException ex) {
                        log.severe("Cannot create entry "+entryClient.getLocation()+", status="+ex.getStatus().getCode());
                        errorCount++;
                     } catch (Exception ex) {
                        log.log(Level.SEVERE,"Cannot create entry "+entryClient.getLocation()+", error: "+ex.getMessage(),ex);
                        errorCount++;
                     }
                  } else {
                     // media entry
                     Reference mediaLocation = new Reference(baseURI.resolve(src).toString());
                     Client client = new Client(mediaLocation.getSchemeProtocol());
                     Request request = new Request(Method.GET,mediaLocation);
                     if (source.getIdentity()!=null) {
                        request.setChallengeResponse(new ChallengeResponse(ChallengeScheme.HTTP_BASIC,source.getUsername(),source.getPassword()));
                     }
                     Response response = client.handle(request);
                     if (response.getStatus().isSuccess()) {
                        try {
                           Representation rep = response.getEntity();
                           if (contentType!=null) {
                              rep.setMediaType(contentType);
                           }
                           Entry mediaEntry = targetClient.createMedia(entryId, src, rep);
                           entryClient.setEntry(mediaEntry);
                           try {
                              Status status = entryClient.update(entryDoc);
                              if (!status.isSuccess()) {
                                 log.severe("Cannot update entry "+entryClient.getLocation()+", status="+status.getCode());
View Full Code Here

               } else {
                  try {
                     Reader r = appResponse.getEntity().getReader();
                     DocumentLoader loader = new SAXDocumentLoader();
                     Document entryDoc = loader.load(r);
                     Entry entry = new Entry(entryDoc);
                     entry.index();
                     progress.entryId = entry.getId();
                     progress.status = appResponse.getStatus().getCode();
                     getLogger().info("Entry: "+progress.entryId+", status="+progress.status);
                  } catch (Exception ex) {
                     getLogger().log(Level.SEVERE,"Cannot parse response to upload to "+appRef,ex);
                     progress.status = appResponse.getStatus().getCode();
View Full Code Here

               public void onFeed(Document feedDoc) {
               }

               public void onEntry(Document entryDoc) {
                  Entry entry = new Entry(entryDoc);
                  entry.index();
                  if (entry.getTerm(HOST_TERM) == null) {
                     return;
                  }
                  Text text = entry.getContent();
                  if (text == null || !text.isXML()) {
                     getContext().getLogger().warning("Ignoring host entry with missing or has incorrectly typed content for configuration.");
                     return;
                  }
                  Element hostE = text.getContent();
                  if (hostE == null) {
                     getContext().getLogger().warning("Ignoring host entry with empty content.");
                     return;
                  }

                  Date edited = null;

                  try {
                     edited = entry.getEdited();
                     if (edited == null) {
                        edited = entry.getUpdated();
                     }
                  } catch (ParseException ex) {
                     getContext().getLogger().warning("Ignoring host entry with malformed date in updated or edited element: " + ex.getMessage());
                     return;
                  }

                  if (edited == null) {
                     getContext().getLogger().warning("Ignoring host entry without updated or edited element.");
                     return;
                  }

                  found.put(entry.getId(), Boolean.TRUE);

                  ConfiguredHost autoHost = hosts.get(entry.getId());
                  if (autoHost==null) {
                     getLogger().info("New host detected in entry "+entry.getId());
                  } else if (autoHost.edited.getTime() < edited.getTime()) {
                     // the entry has changed, so delete
                     getContext().getLogger().info("Entry changed for host " + autoHost.getVirtualHost().getHostDomain() + ", reconfiguring.");
                     getHosts().remove(autoHost.getVirtualHost());
                     autoHost = null;
                  }

                  if (autoHost != null) {
                     autoHost.check();
                     return;
                  }

                  // Create configuration
                  changes = true;

                  try {
                     Configuration.Host host = config.createHost(hostE);

                     String hostName = host.getName();
                     if (hostName == null) {
                        getLogger().severe("Host entry " + entry.getId() + " does not have a host name attribute.");
                        return;
                     }
                     getLogger().info("Auto-configuring host " + host.getName());


                     for (Map<String, ConfiguredHost> confHosts : ifaceHosts.values()) {
                        if (confHosts.get(host.getName()) != null) {
                           getLogger().warning("Ignoring duplicate host for " + host.getName() + " from auto-configuration.");
                           return;
                        }
                     }

                     Context hostContext = getContext().createChildContext();
                    
                     ConfiguredHost confHost = new ConfiguredHost(hostContext, getInternalRouter(),iface, host, edited, false);

                     // The auto host should not be in confHosts as it isn't static
                     //confHosts.put(host.getName(), confHost);
                     hosts.put(entry.getId(), confHost);

                     getHosts().add(confHost.getVirtualHost());

                  } catch (XMLException ex) {
                     getLogger().log(Level.SEVERE, "Cannot load host configuration.", ex);
View Full Code Here

TOP

Related Classes of org.atomojo.app.client.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.