コード例 #1
0
 public void deleteDomain(String name) throws SimpleDBException {
   try {
     logger.log(Level.INFO, "Deleting domain {0}", name);
     sdb.deleteDomain(name);
   } catch (SDBException e) {
     throw new SimpleDBException("Can't delete domain " + name, e);
   }
 }
コード例 #2
0
 public Domain findDomain(String name) throws SimpleDBException {
   try {
     logger.log(Level.INFO, "Searching for domain {0}", name);
     return new DomainImpl(sdb.getDomain(name));
   } catch (SDBException e) {
     throw new SimpleDBException("Can't find domain " + name, e);
   }
 }
コード例 #3
0
 public Domain createDomain(String name) throws SimpleDBException {
   try {
     logger.log(Level.INFO, "Creating domain {0}", name);
     return new DomainImpl(sdb.createDomain(name));
   } catch (SDBException e) {
     throw new SimpleDBException("Can't create domain " + name, e);
   }
 }
コード例 #4
0
 public List<Domain> listDomains() throws SimpleDBException {
   try {
     logger.info("Searching for all domains");
     ListDomainsResult raw = sdb.listDomains();
     List<Domain> domains = new ArrayList<Domain>(raw.getDomainList().size());
     for (com.xerox.amazonws.sdb.Domain domain : raw.getDomainList()) {
       domains.add(new DomainImpl(domain));
     }
     logger.log(Level.INFO, "Found {0} domain(s)", domains.size());
     return domains;
   } catch (SDBException e) {
     throw new SimpleDBException("Can't list domains", e);
   }
 }