Package org.wso2.carbon.registry.core.jdbc.handlers

Examples of org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.addHandler()


        handler.setMountPoint(path);
        handler.setTargetPoint(target);
        handler.setAuthor(author);

        HandlerManager hm = context.getHandlerManager();
        hm.addHandler(RegistryUtils.getMountingMethods(),
                RegistryUtils.getMountingMatcher(path), handler,
                HandlerLifecycleManager.TENANT_SPECIFIC_SYSTEM_HANDLER_PHASE);
        // now we are going to iterate through all the already available symbolic links and resolve
        // the cyclic symbolic links
View Full Code Here


                } else {
                    handler.setRemote(true);
                    handler.setRegistryType(config.getType());
                }
                if (forAllTenants) {
                    hm.addHandler(RegistryUtils.getMountingMethods(),
                            RegistryUtils.getMountingMatcher(path), handler);
                } else {
                    hm.addHandler(RegistryUtils.getMountingMethods(),
                            RegistryUtils.getMountingMatcher(path), handler,
                            HandlerLifecycleManager.TENANT_SPECIFIC_SYSTEM_HANDLER_PHASE);
View Full Code Here

                }
                if (forAllTenants) {
                    hm.addHandler(RegistryUtils.getMountingMethods(),
                            RegistryUtils.getMountingMatcher(path), handler);
                } else {
                    hm.addHandler(RegistryUtils.getMountingMethods(),
                            RegistryUtils.getMountingMatcher(path), handler,
                            HandlerLifecycleManager.TENANT_SPECIFIC_SYSTEM_HANDLER_PHASE);
                }
                return;
            }
View Full Code Here

        HandlerManager handlerManager = registryContext.getHandlerManager();

        URLMatcher myPrivateHandlerMatcher = new URLMatcher();
        myPrivateHandlerMatcher.setGetPattern(".*/to/my/private/handler");
        myPrivateHandlerMatcher.setPutPattern(".*/to/my/private/handler");
        handlerManager.addHandler(
                new String[] {Filter.GET, Filter.PUT} , myPrivateHandlerMatcher, myPrivateHandler);

        Resource r = adminRegistry.newResource();
        String originalContent = "original content";
        r.setContent(originalContent.getBytes());
View Full Code Here

        }
        // handler to record system statistics
        OperationStatisticsHandler systemStatisticsHandler = new OperationStatisticsHandler();
        URLMatcher systemStatisticsURLMatcher = new URLMatcher();
        systemStatisticsURLMatcher.setPattern(".*");
        handlerManager.addHandler(null, systemStatisticsURLMatcher, systemStatisticsHandler);

        if (log.isTraceEnabled()) {
            log.trace("Engaging the Comment URL Handler.");
        }
        // this handler will return the comment for a path ending as ;comments:<number>
View Full Code Here

        // this handler will return the comment for a path ending as ;comments:<number>
        CommentURLHandler commentURLHandler = new CommentURLHandler();
        URLMatcher commentURLMatcher = new URLMatcher();
        commentURLMatcher.setGetPattern(".+;comments:[0-9]+");
        commentURLMatcher.setDeletePattern(".+;comments:[0-9]+");
        handlerManager.addHandler(
                new String[]{Filter.GET, Filter.DELETE}, commentURLMatcher, commentURLHandler);

        if (log.isTraceEnabled()) {
            log.trace("Engaging the Comment Collection URL Handler.");
        }
View Full Code Here

        }
        // this will return all the comments for the path if the path ending as ;comments
        CommentCollectionURLHandler commentCollectionURLHandler = new CommentCollectionURLHandler();
        URLMatcher commentCollectionURLMatcher = new URLMatcher();
        commentCollectionURLMatcher.setGetPattern(".+;comments");
        handlerManager.addHandler(new String[]{Filter.GET},
                commentCollectionURLMatcher, commentCollectionURLHandler);

        if (log.isTraceEnabled()) {
            log.trace("Engaging the Rating URL Handler.");
        }
View Full Code Here

        }
        // this will return the rating of a user if the path is ending as ;ratings:<username>
        RatingURLHandler ratingURLHandler = new RatingURLHandler();
        URLMatcher ratingURLMatcher = new URLMatcher();
        ratingURLMatcher.setGetPattern(".+;ratings:.+");
        handlerManager.addHandler(new String[]{Filter.GET}, ratingURLMatcher, ratingURLHandler);

        if (log.isTraceEnabled()) {
            log.trace("Engaging the Rating Collection URL Handler.");
        }
        // this will return all the ratings for a path if the path is ending as ;ratings
View Full Code Here

        }
        // this will return all the ratings for a path if the path is ending as ;ratings
        RatingCollectionURLHandler ratingCollectionURLHandler = new RatingCollectionURLHandler();
        URLMatcher ratingCollectionURLMatcher = new URLMatcher();
        ratingCollectionURLMatcher.setGetPattern(".+;ratings");
        handlerManager.addHandler(
                new String[]{Filter.GET}, ratingCollectionURLMatcher, ratingCollectionURLHandler);

        if (log.isTraceEnabled()) {
            log.trace("Engaging the Tag URL Handler.");
        }
View Full Code Here

        // this will return the tags for a path  if the path is ending as
        // ;tags:<tag-name>:<user-name>
        TagURLHandler tagURLHandler = new TagURLHandler();
        URLMatcher tagURLMatcher = new URLMatcher();
        tagURLMatcher.setGetPattern(".+;.+:.+:.+");
        handlerManager.addHandler(new String[]{Filter.GET}, tagURLMatcher, tagURLHandler);

        if (log.isTraceEnabled()) {
            log.trace("Engaging the SQL Query Handler.");
        }
        // this will return the results for a custom query if the resource has the
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.