summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Hagemeister2014-09-23 16:32:45 +0200
committerBjörn Hagemeister2014-09-23 16:32:45 +0200
commit000ab5622b11d6138501ca2ea03c4851775fb79a (patch)
tree11f675b5e4673040d8ad3271eec3952e74ad8d0c
parentRemoved some out-commented code and merged getUploadInfos(ImageData, filename... (diff)
downloadsatellite-daemon-000ab5622b11d6138501ca2ea03c4851775fb79a.tar.gz
satellite-daemon-000ab5622b11d6138501ca2ea03c4851775fb79a.tar.xz
satellite-daemon-000ab5622b11d6138501ca2ea03c4851775fb79a.zip
Removed out-commented code.
-rw-r--r--src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java91
1 files changed, 0 insertions, 91 deletions
diff --git a/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java b/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java
index de8d3f9..f97dc6e 100644
--- a/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java
+++ b/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java
@@ -55,8 +55,6 @@ public class ThriftConnection {
/**
* Method for getting UploadeInfos
*
- * !! on the first Call !!
- *
* when the CRCsum need to be transfered. The method calls getConnection()
* to check if the connection is ok and to get the ServerSessionData. If
* connection is ok, it calls submitImage with CRCsum in List<Integer>.
@@ -168,95 +166,6 @@ public class ThriftConnection {
return null;
}
-// /***********************************************************************************************/
-// /**
-// * Method for getting UploadeInfos when CRCsum was already transfered on
-// * first call. The method calls getConnection() to check if the connection
-// * is ok and to get the ServerSessionData. If connection is ok, it calls
-// * submitImage with sSD.sessionId, imDat and !!null!!
-// *
-// * @return returns 'null' if there is a problem.
-// */
-// public static UploadInfos getUploadInfos(ImageData imDat) {
-// ImageServer.Client theClient = null;
-// try {
-// theClient = getConnection();
-// if (theClient == null) {
-// log.error("Client was null!");
-// return null;
-// }
-// // .submitImage needs the List<Integer> from CRCFile.getCRCs() only
-// // on the first time called. null afterwards. --Was the plan. So far
-// // not working I guess.
-// return theClient
-// .submitImage(sSD.sessionId, imDat, crc.getCrcSums());
-// } catch (ImageDataException e) {
-// if (e.isSetNumber()
-// && e.getNumber().equals(ImageDataError.INVALID_DATA)) {
-// // Data in the db is not valid
-// // TODO: add e.message into DB;
-// } else {
-// e.printStackTrace();
-// }
-// } catch (UploadException e) {
-// if (e.isSetNumber()
-// && e.getNumber().equals(UploadError.BROKEN_BLOCK)) {
-// // A Block was transmitted 20 times unsuccessfully.
-// // TODO: Mark the Image as corrupted.
-// } else if (e.getNumber().equals(UploadError.INVALID_CRC)) {
-// // The CRC sum contained errors
-// try {
-// if (!crc.isValid()) {
-// // TODO: Mark CRC-file as corrupted.
-// }
-// } catch (IOException e1) {
-// log.error("IOERROR, while reading from CRC File");
-// }
-// } else {
-// e.printStackTrace();
-// }
-// } catch (AuthorizationException e) {
-// if (e.isSetNumber()
-// && e.getNumber().equals(
-// AuthorizationError.NOT_AUTHENTICATED)) {
-// // SessionID is not valid
-// // TODO: Code for new SSID
-// } else if (e.getNumber().equals(AuthorizationError.NO_PERMISSION)) {
-//
-// } else {
-// e.printStackTrace();
-// }
-// } catch (UnrecoverableKeyException e) {
-// log.error("UnrecoverableKeyException");
-// e.printStackTrace();
-// } catch (InvalidKeyException e) {
-// log.error("InvalidKeyException");
-// e.printStackTrace();
-// } catch (NoSuchAlgorithmException e) {
-// log.error("NoSuchAlgorithmException");
-// e.printStackTrace();
-// } catch (CertificateException e) {
-// log.error("CertificateException");
-// e.printStackTrace();
-// } catch (FileNotFoundException e) {
-// log.error("FileNotFoundException");
-// e.printStackTrace();
-// } catch (KeyStoreException e) {
-// log.error("KeyStoreException");
-// e.printStackTrace();
-// } catch (SignatureException e) {
-// log.error("SignatureException");
-// e.printStackTrace();
-// } catch (IOException e) {
-// log.error("IOException");
-// e.printStackTrace();
-// } catch (TException e) {
-// log.error("TException");
-// e.printStackTrace();
-// }
-// return null;
-// }
-//
/***********************************************************************************************/
/**
* Method for getting DonwloadInfos. Calls getConnection if client was null.