Package org.platformlayer

Examples of org.platformlayer.RepositoryException


        throw new IllegalStateException("Found duplicate results for primary key: " + serviceType + ":"
            + project);
      }
      return items.get(0);
    } catch (SQLException e) {
      throw new RepositoryException("Error running query", e);
    }
  }
View Full Code Here


        JdbcUtils.safeClose(ps);
      }

      return authorization;
    } catch (SQLException e) {
      throw new RepositoryException("Error running query", e);
    }
  }
View Full Code Here

        byte[] plaintext = FathomdbCrypto.decrypt(secretKey, rs.getBytes("data"));
        String value = Utf8.toString(plaintext);
        values.add(value);
      }
    } catch (SQLException e) {
      throw new RepositoryException("Error running query", e);
    } finally {
      JdbcUtils.safeClose(rs);

      db.close();
    }
View Full Code Here

      } else {
        db.insertServiceMetadata(ciphertext, secretData);
      }

    } catch (SQLException e) {
      throw new RepositoryException("Error running query", e);
    } finally {
      db.close();
    }
  }
View Full Code Here

      JoinedQueryResult result = db.queries.listItems(serviceId, modelId, projectId, filterKey);

      List<T> items = mapItemsAndTags(project, secretProvider, db, result);
      return applyFilter(items, filter);
    } catch (SQLException e) {
      throw new RepositoryException("Error fetching items", e);
    } finally {
      db.close();
    }
  }
View Full Code Here

        }
      }

      return roots;
    } catch (SQLException e) {
      throw new RepositoryException("Error fetching items", e);
    } finally {
      db.close();
    }
  }
View Full Code Here

      List<ItemBase> items = mapItemsAndTags(project, secretProvider, db, result);

      return applyFilter(items, filter);
    } catch (SQLException e) {
      throw new RepositoryException("Error fetching items", e);
    } finally {
      db.close();
    }
  }
View Full Code Here

      SecretInfo secret = new SecretInfo(entity.secret);
      CryptoKey itemSecret = secretProvider.getItemSecret(secret);

      if (itemSecret == null) {
        throw new RepositoryException("Could not get secret to decrypt item");
      }

      if (itemSecret instanceof AesCryptoKey) {
        log.warn("Legacy AES crypto key on {} {} {} {}",
            new Object[] { project, serviceType, itemType, entity });
      }

      secret.unlock(itemSecret);

      byte[] plaintext = FathomdbCrypto.decrypt(itemSecret, data);
      String xml = new String(plaintext, Charsets.UTF_8);

      T model = (T) jaxb.unmarshal(xml);

      model.state = ManagedItemState.fromCode(stateCode);

      model.secret = secret;

      PlatformLayerKey plk = new PlatformLayerKey(null, project, serviceType, itemType, new ManagedItemId(key));
      model.setKey(plk);

      return model;
    } catch (JAXBException e) {
      throw new RepositoryException("Error deserializing data", e);
    }
  }
View Full Code Here

      ManagedItemId itemId = key.getItemId();

      return fetchItem(db, serviceType, itemType, project, itemId, modelClass.getJavaClass(), secretProvider,
          fetchTags);
    } catch (SQLException e) {
      throw new RepositoryException("Error running query", e);
    } finally {
      db.close();
    }
  }
View Full Code Here

        db.insertTags(itemId, tags);
      }

      return item;
    } catch (SQLException e) {
      throw new RepositoryException("Error running query", e);
    } finally {
      db.close();
    }
  }
View Full Code Here

TOP

Related Classes of org.platformlayer.RepositoryException

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.