From e0005ceecfd9281230c4add7575b18ee88307774 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 11 Jun 2015 18:40:49 +0200 Subject: [server] On mah way (lots of restructuring, some early db classes, sql dump of current schema) --- .../src/main/java/server/ServerHandler.java | 215 --------------------- 1 file changed, 215 deletions(-) delete mode 100644 dozentenmodulserver/src/main/java/server/ServerHandler.java (limited to 'dozentenmodulserver/src/main/java/server/ServerHandler.java') diff --git a/dozentenmodulserver/src/main/java/server/ServerHandler.java b/dozentenmodulserver/src/main/java/server/ServerHandler.java deleted file mode 100644 index dddec9be..00000000 --- a/dozentenmodulserver/src/main/java/server/ServerHandler.java +++ /dev/null @@ -1,215 +0,0 @@ -package server; - -import java.nio.ByteBuffer; -import java.util.List; -import java.util.Map; - -import org.apache.log4j.Logger; -import org.apache.thrift.TException; -import org.openslx.bwlp.thrift.iface.ImageBaseWrite; -import org.openslx.bwlp.thrift.iface.ImageDetailsRead; -import org.openslx.bwlp.thrift.iface.ImagePermissions; -import org.openslx.bwlp.thrift.iface.ImageSummaryRead; -import org.openslx.bwlp.thrift.iface.ImageVersionWrite; -import org.openslx.bwlp.thrift.iface.LecturePermissions; -import org.openslx.bwlp.thrift.iface.LectureRead; -import org.openslx.bwlp.thrift.iface.LectureSummary; -import org.openslx.bwlp.thrift.iface.LectureWrite; -import org.openslx.bwlp.thrift.iface.OperatingSystem; -import org.openslx.bwlp.thrift.iface.Organization; -import org.openslx.bwlp.thrift.iface.SatelliteServer; -import org.openslx.bwlp.thrift.iface.TAuthorizationException; -import org.openslx.bwlp.thrift.iface.TInvalidTokenException; -import org.openslx.bwlp.thrift.iface.TNotFoundException; -import org.openslx.bwlp.thrift.iface.TTransferRejectedException; -import org.openslx.bwlp.thrift.iface.TransferInformation; -import org.openslx.bwlp.thrift.iface.UploadStatus; -import org.openslx.bwlp.thrift.iface.UserInfo; -import org.openslx.bwlp.thrift.iface.Virtualizer; -import org.openslx.sat.thrift.version.Version; - -import sql.models.DbImage; -import thrift.OperatingSystemList; -import fileserv.ActiveUpload; -import fileserv.FileServer; - -public class ServerHandler implements SatelliteServer.Iface { - - private static final Logger log = Logger.getLogger(ServerHandler.class); - - private static final FileServer fileServer = FileServer.instance(); - - @Override - public long getVersion() throws TException { - return Version.VERSION; - } - - @Override - public TransferInformation requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, - List blockHashes) throws TTransferRejectedException, TAuthorizationException, - TException { - // TODO Auto-generated method stub - return null; - } - - @Override - public void cancelUpload(String uploadToken) throws TException { - ActiveUpload upload = fileServer.getUploadByToken(uploadToken); - if (upload != null) - upload.cancel(); - - } - - @Override - public UploadStatus queryUploadStatus(String uploadToken) throws TInvalidTokenException, TException { - // TODO Auto-generated method stub - return null; - } - - @Override - public TransferInformation requestDownload(String userToken, String imageVersionId) - throws TAuthorizationException, TException { - // TODO Auto-generated method stub - return null; - } - - @Override - public void cancelDownload(String downloadToken) throws TException { - // TODO Auto-generated method stub - - } - - @Override - public boolean isAuthenticated(String userToken) throws TException { - return SessionManager.get(userToken) != null; - } - - @Override - public void invalidateSession(String userToken) throws TException { - SessionManager.remove(userToken); - } - - @Override - public List getOperatingSystems() throws TException { - return OperatingSystemList.get(); - } - - @Override - public List getVirtualizers() throws TException { - // TODO Auto-generated method stub - return null; - } - - @Override - public List getAllOrganizations() throws TException { - // TODO Auto-generated method stub - return null; - } - - @Override - public List getImageList(String userToken, List tagSearch) - throws TAuthorizationException, TException { - UserInfo user = SessionManager.getOrFail(userToken); - return DbImage.getAllVisible(user, tagSearch); - } - - @Override - public ImageDetailsRead getImageDetails(String userToken, String imageBaseId) - throws TAuthorizationException, TNotFoundException, TException { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean updateImageBase(String userToken, String imageBaseId, ImageBaseWrite image) - throws TAuthorizationException, TException { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean updateImageVersion(String userToken, String imageVersionId, ImageVersionWrite image) - throws TAuthorizationException, TException { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean deleteImageVersion(String userToken, String imageVersionId) - throws TAuthorizationException, TNotFoundException, TException { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean writeImagePermissions(String userToken, String imageId, - Map permissions) throws TAuthorizationException, TNotFoundException, - TException { - // TODO Auto-generated method stub - return false; - } - - @Override - public Map getImagePermissions(String userToken, String imageBaseId) - throws TAuthorizationException, TNotFoundException, TException { - // TODO Auto-generated method stub - return null; - } - - @Override - public String createLecture(String userToken, LectureWrite lecture) throws TAuthorizationException, - TException { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean updateLecture(String userToken, String lectureId, LectureWrite lecture) - throws TAuthorizationException, TNotFoundException, TException { - // TODO Auto-generated method stub - return false; - } - - @Override - public List getLectureList(String userToken) throws TAuthorizationException, TException { - // TODO Auto-generated method stub - return null; - } - - @Override - public LectureRead getLectureDetails(String userToken, String lectureId) throws TAuthorizationException, - TNotFoundException, TException { - // TODO Auto-generated method stub - return null; - } - - @Override - public List getLecturesByImageVersion(String userToken, String imageVersionId) - throws TAuthorizationException, TNotFoundException, TException { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean deleteLecture(String userToken, String lectureId) throws TAuthorizationException, - TNotFoundException, TException { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean writeLecturePermissions(String userToken, String lectureId, - Map permissions) throws TAuthorizationException, TNotFoundException, - TException { - // TODO Auto-generated method stub - return false; - } - - @Override - public Map getLecturePermissions(String userToken, String lectureId) - throws TAuthorizationException, TNotFoundException, TException { - // TODO Auto-generated method stub - return null; - } - -}// end class -- cgit v1.2.3-55-g7522