Package org.apache.isis.runtimes.dflt.objectstores.nosql

Examples of org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlStoreException


            writer.write('\n');
            writer.write('\n');
            writer.write("#transaction ended\n\n".getBytes());
            writer.flush();
        } catch (final IOException e) {
            throw new NoSqlStoreException("Failed to write serial number data to log file", e);
        }

    }
View Full Code Here


            writer.write('\n');
            writer.write('\n');
            writer.write("#transaction ended\n\n".getBytes());
            writer.flush();
        } catch (final IOException e) {
            throw new NoSqlStoreException("Failed to write service entry data to log file", e);
        }
    }
View Full Code Here

                writer.write('\n');
            }
            writer.write("#transaction ended\n\n".getBytes());
            writer.flush();
        } catch (final IOException e) {
            throw new NoSqlStoreException("Failed to write data to log file", e);
        }
    }
View Full Code Here

    private void openNewFile() {
        nextLogIdToWrite++;
        final File file = Util.logFile(nextLogIdToWrite);
        if (file.exists()) {
            throw new NoSqlStoreException("Log file already exists");
        }
        openFile(file);
    }
View Full Code Here

    private void openFile(final File file) {
        try {
            writer = new DataOutputStream(new FileOutputStream(file));
            startNewFile = false;
        } catch (final IOException e) {
            throw new NoSqlStoreException("Failed to open log file", e);
        }
    }
View Full Code Here

    private void close() {
        try {
            writer.close();
        } catch (final IOException e) {
            throw new NoSqlStoreException("Falied to close log file", e);
        }
    }
View Full Code Here

            final SecretKeySpec key = new SecretKeySpec(specKey, BLOWFISH);
            final Cipher cipher = Cipher.getInstance(BLOWFISH);
            cipher.init(Cipher.ENCRYPT_MODE, key);
            return new String(cipher.doFinal(plainText.getBytes()));
        } catch (final Exception e) {
            throw new NoSqlStoreException(e);
        }
    }
View Full Code Here

            final Cipher cipher = Cipher.getInstance(BLOWFISH);
            cipher.init(Cipher.DECRYPT_MODE, key);
            final byte[] decrypted = cipher.doFinal(encryptedText.getBytes());
            return new String(decrypted);
        } catch (final Exception e) {
            throw new NoSqlStoreException(e);
        }
    }
View Full Code Here

            final SecretKeySpec key = new SecretKeySpec(specKey, AES);
            final Cipher cipher = Cipher.getInstance("AES/ECB/PKCS7Padding");
            cipher.init(Cipher.ENCRYPT_MODE, key);
            return new String(cipher.doFinal(plainText.getBytes()));
        } catch (final Exception e) {
            throw new NoSqlStoreException(e);
        }
    }
View Full Code Here

            final Cipher cipher = Cipher.getInstance("AES/ECB/PKCS7Padding");
            cipher.init(Cipher.DECRYPT_MODE, key);
            final byte[] decrypted = cipher.doFinal(encryptedText.getBytes());
            return new String(decrypted);
        } catch (final Exception e) {
            throw new NoSqlStoreException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlStoreException

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.