Search in sources :

Example 6 with PDRIDescr

use of nl.uva.cs.lobcder.resources.PDRIDescr in project lobcder by skoulouzis.

the class Archive method copyStream.

private void copyStream(List<PDRIDescr> pdriDescrList, OutputStream os) {
    double start = System.currentTimeMillis();
    for (PDRIDescr pdriDescr : pdriDescrList) {
        try {
            PDRI pdri = PDRIFactory.getFactory().createInstance(pdriDescr, false);
            long total;
            try (InputStream in = pdri.getData()) {
                byte[] copyBuffer = new byte[Constants.BUF_SIZE];
                int len;
                total = 0;
                while ((len = in.read(copyBuffer)) != -1) {
                    os.write(copyBuffer, 0, len);
                    total += len;
                }
            }
            double elapsed = System.currentTimeMillis() - start;
            double speed = ((total * 8.0) * 1000.0) / (elapsed * 1000.0);
            Stats stats = new Stats();
            stats.setSource(pdri.getHost());
            stats.setDestination(request.getRemoteAddr());
            stats.setSpeed(speed);
            stats.setSize(total);
            String msg = "Source: " + stats.getSource() + " Destination: " + stats.getDestination() + " Tx_Speed: " + speed + " Kbites/sec Tx_Size: " + total + " bytes";
            try {
                if (!pdri.isCahce()) {
                    getCatalogue().setSpeed(stats);
                }
            } catch (SQLException ex) {
                Logger.getLogger(Archive.class.getName()).log(Level.SEVERE, null, ex);
            }
            Logger.getLogger(Archive.class.getName()).log(Level.INFO, msg);
            return;
        } catch (Throwable th) {
            Logger.getLogger(Archive.class.getName()).log(Level.SEVERE, null, th);
        }
    }
}
Also used : SQLException(java.sql.SQLException) InputStream(java.io.InputStream) PDRIDescr(nl.uva.cs.lobcder.resources.PDRIDescr) Stats(nl.uva.cs.lobcder.rest.wrappers.Stats) PDRI(nl.uva.cs.lobcder.resources.PDRI)

Example 7 with PDRIDescr

use of nl.uva.cs.lobcder.resources.PDRIDescr in project lobcder by skoulouzis.

the class Item method getLogicalData.

/**
 * Gets the resource's properties (length, owner, permitions etc.)
 *
 * @param uid the id of the resource
 * @return the resource's properties
 * @throws FileNotFoundException
 * @throws IOException
 * @throws VlException
 * @throws URISyntaxException
 * @throws MalformedURLException
 * @throws Exception
 */
@Path("query/{uid}")
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public LogicalDataWrapped getLogicalData(@PathParam("uid") Long uid) throws FileNotFoundException, IOException, VlException, URISyntaxException, MalformedURLException, Exception {
    MyPrincipal mp = (MyPrincipal) request.getAttribute("myprincipal");
    try {
        LogicalData resLD = getCatalogue().getLogicalDataByUid(uid);
        if (resLD == null) {
            throw new WebApplicationException(Response.Status.NOT_FOUND);
        }
        Permissions p = getCatalogue().getPermissions(uid, resLD.getOwner());
        if (!mp.canRead(p)) {
            throw new WebApplicationException(Response.Status.UNAUTHORIZED);
        }
        LogicalDataWrapped res = new LogicalDataWrapped();
        res.setGlobalID(getCatalogue().getGlobalID(uid));
        res.setLogicalData(resLD);
        res.setPermissions(p);
        res.setPath(getCatalogue().getPathforLogicalData(resLD));
        if (!resLD.isFolder()) {
            List<PDRIDescr> pdriDescr = getCatalogue().getPdriDescrByGroupId(resLD.getPdriGroupId());
            if (mp.isAdmin()) {
                for (PDRIDescr pdri : pdriDescr) {
                    if (pdri.getResourceUrl().startsWith("lfc") || pdri.getResourceUrl().startsWith("srm") || pdri.getResourceUrl().startsWith("gftp")) {
                        pdriDescr.remove(pdri);
                        GridHelper.initGridProxy(pdri.getUsername(), pdri.getPassword(), null, false);
                        pdri.setPassword(GridHelper.getProxyAsBase64String());
                        pdriDescr.add(pdri);
                    }
                }
            } else {
                for (PDRIDescr pdri : pdriDescr) {
                    pdriDescr.remove(pdri);
                    pdri.setPassword(null);
                    pdri.setUsername(null);
                    pdri.setKey(null);
                    pdri.setId(null);
                    pdri.setPdriGroupRef(null);
                    pdri.setStorageSiteId(null);
                    pdriDescr.add(pdri);
                }
            }
            res.setPdriList(pdriDescr);
        }
        return res;
    } catch (SQLException ex) {
        Logger.getLogger(Item.class.getName()).log(Level.SEVERE, null, ex);
        throw new WebApplicationException(Response.Status.INTERNAL_SERVER_ERROR);
    }
}
Also used : LogicalData(nl.uva.cs.lobcder.resources.LogicalData) MyPrincipal(nl.uva.cs.lobcder.auth.MyPrincipal) SQLException(java.sql.SQLException) PDRIDescr(nl.uva.cs.lobcder.resources.PDRIDescr) Permissions(nl.uva.cs.lobcder.auth.Permissions) LogicalDataWrapped(nl.uva.cs.lobcder.rest.wrappers.LogicalDataWrapped) Path(javax.ws.rs.Path)

Example 8 with PDRIDescr

use of nl.uva.cs.lobcder.resources.PDRIDescr in project lobcder by skoulouzis.

the class WebDataFileResource method selectBestPDRI.

private PDRIDescr selectBestPDRI(List<PDRIDescr> pdris) throws URISyntaxException, UnknownHostException {
    if (pdris.size() == 1) {
        return pdris.iterator().next();
    }
    if (weightPDRIMap.isEmpty() || weightPDRIMap.size() < pdris.size()) {
        // Just return one at random;
        int index = new Random().nextInt(pdris.size());
        PDRIDescr[] array = pdris.toArray(new PDRIDescr[pdris.size()]);
        if (weightPDRIMap.containsKey(new URI(array[index].getResourceUrl()).getHost()) && weightPDRIMap.get(new URI(array[index].getResourceUrl()).getHost()) <= 1) {
            if (index >= (pdris.size() - 1)) {
                index--;
            } else {
                index++;
            }
        }
        Logger.getLogger(WebDataFileResource.class.getName()).log(Level.FINEST, "Selecting Random: {0}", array[index].getResourceUrl());
        return array[index];
    }
    long sumOfSpeed = 0;
    for (PDRIDescr p : pdris) {
        URI uri = new URI(p.getResourceUrl());
        String host;
        if (uri.getScheme().equals("file") || StringUtil.isEmpty(uri.getHost()) || uri.getHost().equals("localhost") || uri.getHost().equals("127.0.0.1")) {
            host = InetAddress.getLocalHost().getHostName();
        } else {
            host = uri.getHost();
        }
        Double speed = weightPDRIMap.get(host);
        if (speed == null) {
            speed = 0.0;
        }
        sumOfSpeed += speed;
    }
    if (sumOfSpeed <= 0) {
        int index = new Random().nextInt(pdris.size());
        PDRIDescr[] array = pdris.toArray(new PDRIDescr[pdris.size()]);
        if (weightPDRIMap.containsKey(new URI(array[index].getResourceUrl()).getHost()) && weightPDRIMap.get(new URI(array[index].getResourceUrl()).getHost()) <= 1) {
            if (index >= (pdris.size() - 1)) {
                index--;
            } else {
                index++;
            }
        }
        Logger.getLogger(WebDataFileResource.class.getName()).log(Level.FINEST, "Selecting:{0}", new Object[] { array[index] });
        return array[index];
    }
    int itemIndex = new Random().nextInt((int) sumOfSpeed);
    for (PDRIDescr p : pdris) {
        Double speed = weightPDRIMap.get(new URI(p.getResourceUrl()).getHost());
        if (speed == null) {
            speed = Double.valueOf(0);
        }
        if (itemIndex < speed) {
            Logger.getLogger(WebDataFileResource.class.getName()).log(Level.FINEST, "Selecting:{0}  with speed: {1}", new Object[] { p.getResourceUrl(), speed });
            return p;
        }
        itemIndex -= speed;
    }
    int index = new Random().nextInt(pdris.size());
    PDRIDescr[] array = pdris.toArray(new PDRIDescr[pdris.size()]);
    if (weightPDRIMap.containsKey(new URI(array[index].getResourceUrl()).getHost()) && weightPDRIMap.get(new URI(array[index].getResourceUrl()).getHost()) <= 1) {
        if (index >= (pdris.size() - 1)) {
            index--;
        } else {
            index++;
        }
    }
    Logger.getLogger(WebDataFileResource.class.getName()).log(Level.FINEST, "Selecting: {0}", array[index].getResourceUrl());
    return array[index];
}
Also used : PDRIDescr(nl.uva.cs.lobcder.resources.PDRIDescr) URI(java.net.URI)

Example 9 with PDRIDescr

use of nl.uva.cs.lobcder.resources.PDRIDescr in project lobcder by skoulouzis.

the class Items method queryLogicalData.

private List<LogicalDataWrapped> queryLogicalData(@Nonnull MyPrincipal mp, @Nonnull Connection cn) throws Exception {
    MultivaluedMap<String, String> queryParameters = info.getQueryParameters();
    boolean addFlag = true;
    String rootPath = (queryParameters.containsKey("path") && queryParameters.get("path").iterator().hasNext()) ? queryParameters.get("path").iterator().next() : "/";
    if (!rootPath.equals("/") && rootPath.endsWith("/")) {
        rootPath = rootPath.substring(0, rootPath.length() - 1);
    }
    int rowLimit;
    try {
        rowLimit = (queryParameters.containsKey("limit") && queryParameters.get("limit").iterator().hasNext()) ? Integer.valueOf(queryParameters.get("limit").iterator().next()).intValue() : defaultRowLimit;
    } catch (Throwable th) {
        rowLimit = defaultRowLimit;
    }
    LogicalData ld = getCatalogue().getLogicalDataByPath(io.milton.common.Path.path(rootPath), cn);
    List<LogicalDataWrapped> logicalDataWrappedList = new ArrayList<>();
    if (ld == null || rowLimit < 1) {
        return logicalDataWrappedList;
    }
    Permissions p = getCatalogue().getPermissions(ld.getUid(), ld.getOwner(), cn);
    if (mp.canRead(p)) {
        try (PreparedStatement ps1 = cn.prepareStatement("SELECT uid, parentRef, " + "ownerId, datatype, ldName, createDate, modifiedDate, ldLength, " + "contentTypesStr, pdriGroupRef, isSupervised, checksum, lastValidationDate, " + "lockTokenID, lockScope, lockType, lockedByUser, lockDepth, lockTimeout, " + "description, locationPreference, status " + "FROM ldata_table WHERE (parentRef = ?) " + "AND (? OR (isSupervised = ?)) " + "AND (? OR (createDate BETWEEN FROM_UNIXTIME(?) AND FROM_UNIXTIME(?))) " + "AND (? OR (createDate >= FROM_UNIXTIME(?))) " + "AND (? OR (createDate <= FROM_UNIXTIME(?))) " + "AND (? OR (modifiedDate BETWEEN FROM_UNIXTIME(?) AND FROM_UNIXTIME(?))) " + "AND (? OR (modifiedDate >= FROM_UNIXTIME(?))) " + "AND (? OR (modifiedDate <= FROM_UNIXTIME(?))) " + "AND (? OR (ldName LIKE CONCAT('%', ? , '%')))" + "LIMIT ?");
            PreparedStatement ps2 = cn.prepareStatement("SELECT uid, ownerId, " + "ldName FROM ldata_table WHERE parentRef = ? AND datatype = '" + Constants.LOGICAL_FOLDER + "'")) {
            {
                if (queryParameters.containsKey("name") && queryParameters.get("name").iterator().hasNext()) {
                    String name = queryParameters.get("name").iterator().next();
                    ps1.setBoolean(18, false);
                    ps1.setString(19, name);
                    addFlag &= ld.getName().contains(name);
                } else {
                    ps1.setBoolean(18, true);
                    ps1.setString(19, "");
                }
                if (queryParameters.containsKey("cStartDate") && queryParameters.get("cStartDate").iterator().hasNext() && queryParameters.containsKey("cEndDate") && queryParameters.get("cEndDate").iterator().hasNext()) {
                    long cStartDate = Long.valueOf(queryParameters.get("cStartDate").iterator().next());
                    long cEndDate = Long.valueOf(queryParameters.get("cEndDate").iterator().next());
                    ps1.setBoolean(4, false);
                    ps1.setBoolean(7, true);
                    ps1.setBoolean(9, true);
                    ps1.setLong(5, cStartDate);
                    ps1.setLong(6, cEndDate);
                    ps1.setLong(8, 0);
                    ps1.setLong(10, 0);
                    addFlag &= (ld.getCreateDate() >= cStartDate * 1000) && (ld.getCreateDate() <= cEndDate * 1000);
                } else if (queryParameters.containsKey("cStartDate") && queryParameters.get("cStartDate").iterator().hasNext()) {
                    long cStartDate = Long.valueOf(queryParameters.get("cStartDate").iterator().next());
                    ps1.setBoolean(4, true);
                    ps1.setBoolean(7, false);
                    ps1.setBoolean(9, true);
                    ps1.setLong(5, 0);
                    ps1.setLong(6, 0);
                    ps1.setLong(8, cStartDate);
                    ps1.setLong(10, 0);
                    addFlag &= (ld.getCreateDate() >= cStartDate * 1000);
                } else if (queryParameters.containsKey("cEndDate") && queryParameters.get("cEndDate").iterator().hasNext()) {
                    long cEndDate = Long.valueOf(queryParameters.get("cEndDate").iterator().next());
                    ps1.setBoolean(4, true);
                    ps1.setBoolean(7, true);
                    ps1.setBoolean(9, false);
                    ps1.setLong(5, 0);
                    ps1.setLong(6, 0);
                    ps1.setLong(8, 0);
                    ps1.setLong(10, cEndDate);
                    addFlag &= (ld.getCreateDate() <= cEndDate * 1000);
                } else {
                    ps1.setBoolean(4, true);
                    ps1.setBoolean(7, true);
                    ps1.setBoolean(9, true);
                    ps1.setLong(5, 0);
                    ps1.setLong(6, 0);
                    ps1.setLong(8, 0);
                    ps1.setLong(10, 0);
                }
                if (queryParameters.containsKey("mStartDate") && queryParameters.get("mStartDate").iterator().hasNext() && queryParameters.containsKey("mEndDate") && queryParameters.get("mEndDate").iterator().hasNext()) {
                    long mStartDate = Long.valueOf(queryParameters.get("mStartDate").iterator().next());
                    long mEndDate = Long.valueOf(queryParameters.get("mEndDate").iterator().next());
                    ps1.setBoolean(11, false);
                    ps1.setBoolean(14, true);
                    ps1.setBoolean(16, true);
                    ps1.setLong(12, mStartDate);
                    ps1.setLong(13, mEndDate);
                    ps1.setLong(15, 0);
                    ps1.setLong(17, 0);
                    addFlag &= (ld.getModifiedDate() >= mStartDate * 1000) && (ld.getModifiedDate() <= mEndDate * 1000);
                } else if (queryParameters.containsKey("mStartDate") && queryParameters.get("mStartDate").iterator().hasNext()) {
                    long mStartDate = Long.valueOf(queryParameters.get("mStartDate").iterator().next());
                    ps1.setBoolean(11, true);
                    ps1.setBoolean(14, false);
                    ps1.setBoolean(16, true);
                    ps1.setLong(12, 0);
                    ps1.setLong(13, 0);
                    ps1.setLong(15, mStartDate);
                    ps1.setLong(17, 0);
                    addFlag &= (ld.getModifiedDate() >= mStartDate * 1000);
                } else if (queryParameters.containsKey("mEndDate") && queryParameters.get("mEndDate").iterator().hasNext()) {
                    long mEndDate = Long.valueOf(queryParameters.get("mEndDate").iterator().next());
                    ps1.setBoolean(11, true);
                    ps1.setBoolean(14, true);
                    ps1.setBoolean(16, false);
                    ps1.setLong(12, 0);
                    ps1.setLong(13, 0);
                    ps1.setLong(15, 0);
                    ps1.setLong(17, mEndDate);
                    addFlag &= (ld.getModifiedDate() <= mEndDate * 1000);
                } else {
                    ps1.setBoolean(11, true);
                    ps1.setBoolean(14, true);
                    ps1.setBoolean(16, true);
                    ps1.setLong(12, 0);
                    ps1.setLong(13, 0);
                    ps1.setLong(15, 0);
                    ps1.setLong(17, 0);
                }
                if (queryParameters.containsKey("isSupervised") && queryParameters.get("isSupervised").iterator().hasNext()) {
                    boolean isSupervised = Boolean.valueOf(queryParameters.get("isSupervised").iterator().next());
                    ps1.setBoolean(2, false);
                    ps1.setBoolean(3, isSupervised);
                    addFlag &= (ld.getSupervised() == isSupervised);
                } else {
                    ps1.setBoolean(2, true);
                    ps1.setBoolean(3, true);
                }
                if (addFlag) {
                    LogicalDataWrapped ldw = new LogicalDataWrapped();
                    ldw.setGlobalID(getCatalogue().getGlobalID(ld.getUid(), cn));
                    ldw.setLogicalData(ld);
                    ldw.setPath(rootPath);
                    ldw.setPermissions(p);
                    ldw.setUid(ld.getUid());
                    List<PDRIDescr> pdriDescr = getCatalogue().getPdriDescrByGroupId(ld.getPdriGroupId(), cn);
                    if (mp.isAdmin() && pdriDescr != null) {
                        for (PDRIDescr pdri : pdriDescr) {
                            if (pdri.getResourceUrl().startsWith("lfc") || pdri.getResourceUrl().startsWith("srm") || pdri.getResourceUrl().startsWith("gftp")) {
                                pdriDescr.remove(pdri);
                                GridHelper.initGridProxy(pdri.getUsername(), pdri.getPassword(), null, false);
                                pdri.setPassword(GridHelper.getProxyAsBase64String());
                                pdriDescr.add(pdri);
                            }
                        }
                    } else if (pdriDescr != null) {
                        for (PDRIDescr pdri : pdriDescr) {
                            pdriDescr.remove(pdri);
                            pdri.setPassword(null);
                            pdri.setUsername(null);
                            pdri.setKey(null);
                            pdri.setId(null);
                            pdri.setPdriGroupRef(null);
                            pdri.setStorageSiteId(null);
                            pdriDescr.add(pdri);
                        }
                    }
                    ldw.setPdriList(pdriDescr);
                    logicalDataWrappedList.add(ldw);
                    rowLimit--;
                }
                if (rowLimit != 0) {
                    logicalDataWrappedList.addAll(queryLogicalData(new MyData(ld.getUid(), rootPath.equals("/") ? "" : rootPath), rowLimit, ps1, ps2, mp, cn));
                }
            }
        }
    }
    return logicalDataWrappedList;
}
Also used : PDRIDescr(nl.uva.cs.lobcder.resources.PDRIDescr) ArrayList(java.util.ArrayList) LogicalDataWrapped(nl.uva.cs.lobcder.rest.wrappers.LogicalDataWrapped) PreparedStatement(java.sql.PreparedStatement) LogicalData(nl.uva.cs.lobcder.resources.LogicalData) Permissions(nl.uva.cs.lobcder.auth.Permissions) ArrayList(java.util.ArrayList) LinkedList(java.util.LinkedList) List(java.util.List)

Example 10 with PDRIDescr

use of nl.uva.cs.lobcder.resources.PDRIDescr in project lobcder by skoulouzis.

the class Items method queryLogicalData.

private List<LogicalDataWrapped> queryLogicalData(MyData myData, int limit, PreparedStatement ps1, PreparedStatement ps2, MyPrincipal mp, Connection cn) throws Exception {
    List<LogicalDataWrapped> ldwl = new LinkedList<>();
    Queue<MyData> dirs = new LinkedList<>();
    dirs.offer(myData);
    MyData dir;
    while ((dir = dirs.poll()) != null) {
        ps1.setLong(1, dir.getUid());
        ps1.setInt(20, limit + 1);
        try (ResultSet resultSet = ps1.executeQuery()) {
            while (resultSet.next()) {
                Long uid = resultSet.getLong(1);
                String datatype = resultSet.getString(4);
                String ldName = resultSet.getString(5);
                String owner = resultSet.getString(3);
                Permissions p = getCatalogue().getPermissions(uid, owner, cn);
                if (mp.canRead(p) && uid != 1) {
                    LogicalData logicalData = new LogicalData();
                    logicalData.setUid(uid);
                    logicalData.setParentRef(dir.getUid());
                    logicalData.setOwner(owner);
                    logicalData.setType(datatype);
                    logicalData.setName(ldName);
                    logicalData.setCreateDate(resultSet.getTimestamp(6).getTime());
                    logicalData.setModifiedDate(resultSet.getTimestamp(7).getTime());
                    logicalData.setLength(resultSet.getLong(8));
                    logicalData.setContentTypesAsString(resultSet.getString(9));
                    logicalData.setPdriGroupId(resultSet.getLong(10));
                    logicalData.setSupervised(resultSet.getBoolean(11));
                    logicalData.setChecksum(resultSet.getString(12));
                    logicalData.setLastValidationDate(resultSet.getLong(13));
                    logicalData.setLockTokenID(resultSet.getString(14));
                    logicalData.setLockScope(resultSet.getString(15));
                    logicalData.setLockType(resultSet.getString(16));
                    logicalData.setLockedByUser(resultSet.getString(17));
                    logicalData.setLockDepth(resultSet.getString(18));
                    logicalData.setLockTimeout(resultSet.getLong(19));
                    logicalData.setDescription(resultSet.getString(20));
                    // logicalData.setDataLocationPreference(resultSet.getString(21));
                    logicalData.setStatus(resultSet.getString(22));
                    LogicalDataWrapped ldw = new LogicalDataWrapped();
                    ldw.setGlobalID(getCatalogue().getGlobalID(uid, cn));
                    ldw.setLogicalData(logicalData);
                    ldw.setPermissions(p);
                    ldw.setPath(dir.getPath().concat("/").concat(logicalData.getName()));
                    if (!logicalData.isFolder() && mp.isAdmin()) {
                        List<PDRIDescr> pdriDescr = getCatalogue().getPdriDescrByGroupId(logicalData.getPdriGroupId(), cn);
                        for (PDRIDescr pdri : pdriDescr) {
                            if (pdri.getResourceUrl().startsWith("lfc") || pdri.getResourceUrl().startsWith("srm") || pdri.getResourceUrl().startsWith("gftp")) {
                                pdriDescr.remove(pdri);
                                GridHelper.initGridProxy(pdri.getUsername(), pdri.getPassword(), null, false);
                                pdri.setPassword(GridHelper.getProxyAsBase64String());
                                pdriDescr.add(pdri);
                            }
                        }
                        ldw.setPdriList(pdriDescr);
                    }
                    ldwl.add(ldw);
                    limit--;
                }
                if (limit == 0) {
                    break;
                }
            }
        }
        if (limit != 0) {
            ps2.setLong(1, dir.getUid());
            try (ResultSet resultSet = ps2.executeQuery()) {
                while (resultSet.next()) {
                    Long myUid = resultSet.getLong(1);
                    String myOwner = resultSet.getString(2);
                    String myPath = dir.getPath().concat("/").concat(resultSet.getString(3));
                    Permissions p = getCatalogue().getPermissions(myUid, myOwner, cn);
                    if (mp.canRead(p) && myUid != 1) {
                        dirs.offer(new MyData(myUid, myPath));
                    }
                }
            }
        } else {
            break;
        }
    }
    return ldwl;
}
Also used : LogicalData(nl.uva.cs.lobcder.resources.LogicalData) PDRIDescr(nl.uva.cs.lobcder.resources.PDRIDescr) ResultSet(java.sql.ResultSet) Permissions(nl.uva.cs.lobcder.auth.Permissions) LogicalDataWrapped(nl.uva.cs.lobcder.rest.wrappers.LogicalDataWrapped) LinkedList(java.util.LinkedList)

Aggregations

PDRIDescr (nl.uva.cs.lobcder.resources.PDRIDescr)22 IOException (java.io.IOException)8 PDRI (nl.uva.cs.lobcder.resources.PDRI)7 SQLException (java.sql.SQLException)6 Permissions (nl.uva.cs.lobcder.auth.Permissions)5 LogicalData (nl.uva.cs.lobcder.resources.LogicalData)5 URI (java.net.URI)4 URISyntaxException (java.net.URISyntaxException)4 UnknownHostException (java.net.UnknownHostException)4 ArrayList (java.util.ArrayList)4 LogicalDataWrapped (nl.uva.cs.lobcder.rest.wrappers.LogicalDataWrapped)4 BadRequestException (io.milton.http.exceptions.BadRequestException)3 NotFoundException (io.milton.http.exceptions.NotFoundException)3 InputStream (java.io.InputStream)3 Path (javax.ws.rs.Path)3 MyPrincipal (nl.uva.cs.lobcder.auth.MyPrincipal)3 ConflictException (io.milton.http.exceptions.ConflictException)2 NotAuthorizedException (io.milton.http.exceptions.NotAuthorizedException)2 UnsupportedEncodingException (java.io.UnsupportedEncodingException)2 SocketException (java.net.SocketException)2