Package java.util.logging

Examples of java.util.logging.Logger.warning()


             * First fetch the cell. If it does not exist, then return a bad
             * response.
             */
            WFSCell cell = dir.getCellByName(paths[i]);
            if (cell == null) {
                logger.warning("WFSManager: Unable to find cell with path: " + path);
                ResponseBuilder rb = Response.status(Response.Status.BAD_REQUEST);
                return rb.build();
            }
           
            /*
 
View Full Code Here


            /*
             * Next, get the directory associated with the cell. It also needs
             * to exist, otherwise, return a bad response.
             */
            if ((dir = cell.getCellDirectory()) == null) {
                logger.warning("WFSManager: Unable to find directory with path: " + path);
                ResponseBuilder rb = Response.status(Response.Status.BAD_REQUEST);
                return rb.build();
            }
        }
       
View Full Code Here

         * If we have reached here, we have one remaining element in the path
         * and 'dir' holds the directory in which the cell should be.
         */
        WFSCell cell = dir.getCellByName(paths[paths.length - 1]);
        if (cell == null) {
            logger.warning("WFSManager: Unable to find final cell with path: " + path);
            ResponseBuilder rb = Response.status(Response.Status.BAD_REQUEST);
            return rb.build();
        }
       
        /*
 
View Full Code Here

         */
        try {
            /* Fetch the essential configuration information, check for null */
            String setup = cell.getCellSetup();
            if (setup == null) {
                logger.warning("WFSManager: Unable to find cell setup: " + path);
                ResponseBuilder rb = Response.status(Response.Status.BAD_REQUEST);
                return rb.build();
            }
            else {
                /* Formulate the HTTP response and send the string */
 
View Full Code Here

                /* Formulate the HTTP response and send the string */
                ResponseBuilder rb = Response.ok(setup);
                return rb.build();
            }
        } catch (java.lang.Exception excp) {
            logger.warning("WFSManager: Unable to read cell with path: " + path + ": " + excp.toString());
            ResponseBuilder rb = Response.status(Response.Status.BAD_REQUEST);
            return rb.build();
        }
    }
}
View Full Code Here

        }

        // Create the WFS check return value is not null (error if so)
        WFSSnapshot snapshot = manager.createWFSSnapshot(name);
        if (snapshot == null) {
            logger.warning("[WFS] Unable to create snapshot " + name);
            ResponseBuilder rb = Response.status(Response.Status.BAD_REQUEST);
            return rb.build();
        }
       
        // Form the root path of the wfs: "snapshots/<date>/world-wfs"
View Full Code Here

         * response.
         */
        WFSManager wfsm = WFSManager.getWFSManager();
        WFS wfs = wfsm.getWFS(wfsName);
        if (wfs == null) {
            logger.warning("Unable to find WFS with name " + wfsName);
            ResponseBuilder rb = Response.status(Response.Status.BAD_REQUEST);
            return rb.build();
        }
       
        /* Fetch the root directory, check if null, but should never be */
 
View Full Code Here

        }
       
        /* Fetch the root directory, check if null, but should never be */
        WFSCellDirectory rootDir = wfs.getRootDirectory();
        if (rootDir == null) {
            logger.warning("WFSManager: Unable to find WFS root with name " + wfsName);
            ResponseBuilder rb = Response.status(Response.Status.BAD_REQUEST);
            return rb.build();
        }
       
        /*
 
View Full Code Here

            try {
                wfs.acquireOwnership();
                rootDir.setReload();
                wfs.release();
            } catch (InterruptedException excp) {
                logger.warning("WFSManager: Unable to set WFS to reload " + excp.toString());
            }
        }
       
        /* A queue (last-in, first-out) containing a list of cell to search down */
        LinkedList<WFSCellDirectory> children = new LinkedList();
View Full Code Here

        // Fetch the WFS for the world root path, flag an error if it does
        // not yet exist.
        String rootPath = cellDescriptor.getRootPath().getRootPath();
        WFS wfs = manager.getWFS(cellDescriptor.getRootPath());
        if (wfs == null) {
            logger.warning("[WFS] The WFS " + rootPath + " does not exist.");
            return Response.status(Status.BAD_REQUEST).build();
        }
       
        // Fetch the root directory, this should exist
        WFSCellDirectory wfsDirectory = wfs.getRootDirectory();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.