summaryrefslogtreecommitdiffstats
path: root/idrop-lite
diff options
context:
space:
mode:
authorLISA STILLWELL <lisa@dhcp152-54-6-218.wireless.europa.renci.org>2011-06-15 18:53:41 (GMT)
committer LISA STILLWELL <lisa@dhcp152-54-6-218.wireless.europa.renci.org>2011-06-15 18:53:41 (GMT)
commitebe096dbff933cbc46e77073b5068bc80fcaee99 (patch)
treef2a629344a03e9c4b8ab0d6df9f0a7287f55170c /idrop-lite
parentca54ec993a89f5d71a1d5f12668e1f3731501ce6 (diff)
downloadQCG-Data-ebe096dbff933cbc46e77073b5068bc80fcaee99.zip
QCG-Data-ebe096dbff933cbc46e77073b5068bc80fcaee99.tar.gz
QCG-Data-ebe096dbff933cbc46e77073b5068bc80fcaee99.tar.bz2
Updated code to use idrop-commons package
Diffstat (limited to 'idrop-lite')
-rw-r--r--idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteCore.java196
1 files changed, 3 insertions, 193 deletions
diff --git a/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteCore.java b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteCore.java
index 0f161ef..b43332c 100644
--- a/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteCore.java
+++ b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteCore.java
@@ -5,200 +5,10 @@
package org.irods.jargon.idrop.lite;
-import java.util.Timer;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.util.prefs.Preferences;
+import org.irods.jargon.idrop.commons.iDropCoreCommon;
-import org.irods.jargon.core.connection.IRODSAccount;
-import org.irods.jargon.core.exception.JargonException;
-import org.irods.jargon.core.pub.IRODSAccessObjectFactory;
-import org.irods.jargon.core.pub.IRODSFileSystem;
-import org.irods.jargon.core.pub.io.IRODSFileFactory;
-//import org.irods.jargon.idrop.desktop.systraygui.services.IconManager;
-//import org.irods.jargon.idrop.lite.IdropConfig;
-//import org.irods.jargon.idrop.common.IdropRuntimeException;
-//import org.irods.jargon.transfer.engine.TransferManager;
-
-/**
- *
- * @author lisa
- */
-public class iDropLiteCore {
-
- private IRODSAccount irodsAccount = null;
- private IRODSFileSystem irodsFileSystem = null;
-
- public IRODSFileSystem getIrodsFileSystem() {
- return irodsFileSystem;
- }
-
- public void setIrodsFileSystem(IRODSFileSystem irodsFileSystem) {
- this.irodsFileSystem = irodsFileSystem;
- }
-
-// private IdropConfig idropConfig = null;
-
- //private TransferManager transferManager = null;
-
- //private IconManager iconManager = null;
-
- private Timer queueTimer = new Timer();
-
- private Preferences preferences = Preferences.userRoot();
-
- public iDropLiteCore() {
- super();
- }
-
- public IRODSAccount getIrodsAccount() {
- return irodsAccount;
- }
-
- public void setIrodsAccount(IRODSAccount irodsAccount) {
- this.irodsAccount = irodsAccount;
- }
-
- public void setIrodsAccount() {
- this.irodsAccount = new IRODSAccount("iren.renci.org", 1247, "rods", "rencirods2009", "", "renci", "");
- }
-
- public void setIrodsAccount(String sessionID) {
- this.irodsAccount = new IRODSAccount("iren.renci.org", 1247, "rods", "rencirods2009", "", "renci", "");
- }
-
-// public IdropConfig getIdropConfig() {
-// return idropConfig;
-// }
-//
-// public void setIdropConfig(IdropConfig idropConfig) {
-// this.idropConfig = idropConfig;
-// }
-//
-// public void setIdropConfig() {
-// try {
-// this.idropConfig = new IdropConfig();
-// }
-// catch(IdropException ex) {
-// }
-// }
-
-// public TransferManager getTransferManager() {
-// return transferManager;
-// }
-//
-// public void setTransferManager(TransferManager transferManager) {
-// this.transferManager = transferManager;
-// }
-//
-// public IconManager getIconManager() {
-// return iconManager;
-// }
-//
-// public void setIconManager(IconManager iconManager) {
-// this.iconManager = iconManager;
-// }
-
- public Timer getQueueTimer() {
- return queueTimer;
- }
-
- public void setQueueTimer(Timer queueTimer) {
- this.queueTimer = queueTimer;
- }
-
- public Preferences getPreferences() {
- return preferences;
- }
-
- public void setPreferences(Preferences preferences) {
- this.preferences = preferences;
- }
-
- /**
- * Handy method that delegates the process of getting an <code>IRODSAccessObjectFactory</code>.
- * @return {@link IRODSAccessObjectFactory}
- */
- public IRODSAccessObjectFactory getIRODSAccessObjectFactory() {
- if (irodsFileSystem == null) {
- throw new IdropRuntimeException("No IRODSFileSystem set, cannot obtain the IRODSAccessObjectFactory");
- }
- try {
- return irodsFileSystem.getIRODSAccessObjectFactory();
- } catch (JargonException ex) {
- Logger.getLogger(iDropLiteCore.class.getName()).log(Level.SEVERE, null, ex);
- throw new IdropRuntimeException("exception getting IRODSAccessObjectFactory");
- }
- }
-
- /**
- * Method to close any iRODS connections in the current thread. This delegates to the <code>IRODSFileSystem</code>.
- */
- public void closeAllIRODSConnections() {
- if (irodsFileSystem == null) {
- throw new IdropRuntimeException("No IRODSFileSystem set, cannot obtain the IRODSAccessObjectFactory");
- }
- irodsFileSystem.closeAndEatExceptions();
- }
-
- /**
- * Method to close iRODS connection denoted by the logged in <code>IRODSAccount</code>.
- */
- public void closeIRODSConnectionForLoggedInAccount() {
- if (irodsFileSystem == null) {
- throw new IdropRuntimeException("No IRODSFileSystem set, cannot obtain the IRODSAccessObjectFactory");
- }
- irodsFileSystem.closeAndEatExceptions(irodsAccount);
- }
-
- /**
- * Method to close iRODS connection denoted by the given <code>IRODSAccount</code> in the current thread. This delegates to the <code>IRODSFileSystem</code>.
- */
- public void closeIRODSConnection(final IRODSAccount irodsAccount) {
- if (irodsFileSystem == null) {
- throw new IdropRuntimeException("No IRODSFileSystem set, cannot obtain the IRODSAccessObjectFactory");
- }
- irodsFileSystem.closeAndEatExceptions(irodsAccount);
- }
- /**
- * Get the <code>IRODSFileFactory</code> for the given account
- * @return {@link IRODSFileFactory} associated with the account currently logged in
- */
- public IRODSFileFactory getIRODSFileFactory(final IRODSAccount irodsAccount) {
- if (irodsFileSystem == null) {
- throw new IdropRuntimeException("No IRODSFileSystem set, cannot obtain the IRODSAccessObjectFactory");
- }
- if (irodsAccount == null) {
- throw new IdropRuntimeException("No IRODSAccount set, cannot obtain the IRODSAccessObjectFactory");
- }
- try {
- return irodsFileSystem.getIRODSFileFactory(irodsAccount);
- } catch (JargonException ex) {
- Logger.getLogger(iDropLiteCore.class.getName()).log(Level.SEVERE, null, ex);
- throw new IdropRuntimeException("Exception getting iRODS file factory", ex);
- }
-
- }
-
- /**
- * Get the <code>IRODSFileFactory</code> for the current logged-in account.
- * @return {@link IRODSFileFactory} associated with the account currently logged in
- */
- public IRODSFileFactory getIRODSFileFactoryForLoggedInAccount() {
- if (irodsFileSystem == null) {
- throw new IdropRuntimeException("No IRODSFileSystem set, cannot obtain the IRODSAccessObjectFactory");
- }
- if (irodsAccount == null) {
- throw new IdropRuntimeException("No IRODSAccount set, cannot obtain the IRODSAccessObjectFactory");
- }
- try {
- return irodsFileSystem.getIRODSFileFactory(irodsAccount);
- } catch (JargonException ex) {
- Logger.getLogger(iDropLiteCore.class.getName()).log(Level.SEVERE, null, ex);
- throw new IdropRuntimeException("Exception getting iRODS file factory", ex);
- }
-
- }
+public class iDropLiteCore extends iDropCoreCommon
+{
}