Package com.imaginea.mongodb.services

Examples of com.imaginea.mongodb.services.CollectionService


                               @Context final HttpServletRequest request) throws JSONException {

        String response = new ResponseTemplate().execute(logger, connectionId, request, new ResponseCallback() {
            public Object execute() throws Exception {

                CollectionService collectionService = new CollectionServiceImpl(connectionId);
                // Get the result;
                return collectionService.getCollStats(dbName, collectionName);
            }
        });
        return response;
    }
View Full Code Here


    @Produces(MediaType.APPLICATION_JSON)
    public String getCollList(@PathParam("dbName") final String dbName, @QueryParam("connectionId") final String connectionId, @Context final HttpServletRequest request) {

        String response = new ResponseTemplate().execute(logger, connectionId, request, new ResponseCallback() {
            public Object execute() throws Exception {
                CollectionService collectionService = new CollectionServiceImpl(connectionId);
                return collectionService.getCollList(dbName);
            }
        });
        return response;
    }
View Full Code Here

            return formErrorResponse(logger, e);
        }

        String response = new ResponseTemplate().execute(logger, connectionId, request, new ResponseCallback() {
            public Object execute() throws Exception {
                CollectionService collectionService = new CollectionServiceImpl(connectionId);
                String status = null;
                RequestMethod method = null;
                for (RequestMethod m : RequestMethod.values()) {
                    if ((m.toString()).equals(action)) {
                        method = m;
                        break;
                    }
                }
                switch (method) {
                    case PUT: {
                        if (updateColl.equals("false")) {
                            status = collectionService.insertCollection(dbName, newCollName, (isCapped != null && isCapped.equals("on")), capSize, maxDocs, (autoIndexId != null && autoIndexId.equals("on")));
                        } else {
                            status = collectionService.updateCollection(dbName, selectedCollection, newCollName, (isCapped != null && isCapped.equals("on")), capSize, maxDocs, (autoIndexId != null && autoIndexId.equals("on")));
                        }
                        break;
                    }
                    case DELETE: {
                        status = collectionService.deleteCollection(dbName, selectedCollection);
                        break;
                    }
                    default: {
                        status = "Action parameter value is wrong";
                        break;
View Full Code Here

TOP

Related Classes of com.imaginea.mongodb.services.CollectionService

Copyright © 2018 www.massapicom. 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.