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

Examples of org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager


                requestContext.getRepository()
                        .move(new ResourcePath(fullResourcePath), fullTargetPath);
                requestContext.getRegistry().createLink(fullTargetPath, this.id);
                requestContext.getRegistry().removeLink(this.mountPoint);
                if (registryContext != null) {
                    HandlerManager hm = registryContext.getHandlerManager();
                    hm.removeHandler(this,
                            HandlerLifecycleManager.TENANT_SPECIFIC_SYSTEM_HANDLER_PHASE);
                }
            } else if (fullResourcePath.startsWith(this.mountPoint)) {
                String actualResourcePath = fullResourcePath.substring(
                        this.mountPoint.length(), fullResourcePath.length());
View Full Code Here


                repository.put(path, resource);
            } finally {
                CurrentSession.removeAttribute(Repository.IS_LOGGING_ACTIVITY);
            }
            resource.discard();
            HandlerManager hm = registryContext.getHandlerManager();

            ResourcePath resourcePath = new ResourcePath(path);
            context.setResourcePath(resourcePath);
            context.setTargetPath(target);
            hm.createLink(context);
            if (!context.isSimulation()) {
                if (!context.isProcessingComplete()) {
                    RegistryUtils.registerHandlerForSymbolicLinks(registryContext, path, target,
                            CurrentSession.getUser());
View Full Code Here

            } finally {
                CurrentSession.removeAttribute(Repository.IS_LOGGING_ACTIVITY);
            }
            resource.discard();

            HandlerManager hm = registryContext.getHandlerManager();

            ResourcePath resourcePath = new ResourcePath(path);
            context.setResourcePath(resourcePath);
            context.setTargetPath(target);
            context.setTargetSubPath(targetSubPath);
            hm.createLink(context);
            if (!context.isSimulation()) {
                if (!context.isProcessingComplete()) {
                    RegistryUtils.registerHandlerForRemoteLinks(registryContext, path, target,
                            targetSubPath, CurrentSession.getUser());
View Full Code Here

        String fullPath = requestContext.getResourcePath().getPath();
        RegistryContext registryContext = requestContext.getRegistryContext();
        if (fullPath.equals(this.mountPoint)) {
            requestContext.getRegistry().removeLink(fullPath);
            if (registryContext != null) {
                HandlerManager hm = registryContext.getHandlerManager();
                hm.removeHandler(this,
                        HandlerLifecycleManager.TENANT_SPECIFIC_SYSTEM_HANDLER_PHASE);
            }
        } else {
            String subPath = fullPath.substring(this.mountPoint.length(), fullPath.length());
            String actualPath = this.targetPoint + subPath;
View Full Code Here

        String fullTargetPath = requestContext.getTargetPath();
        RegistryContext registryContext = requestContext.getRegistryContext();
        if (fullResourcePath.equals(this.mountPoint)) {
            requestContext.getRegistry().removeLink(this.mountPoint);
            if (registryContext != null) {
                HandlerManager hm = registryContext.getHandlerManager();
                hm.removeHandler(this,
                        HandlerLifecycleManager.TENANT_SPECIFIC_SYSTEM_HANDLER_PHASE);
            }
            requestContext.getRegistry().createLink(fullTargetPath, this.targetPoint);
        } else {
            String subPath =
View Full Code Here

        String fullTargetPath = requestContext.getTargetPath();
        RegistryContext registryContext = requestContext.getRegistryContext();
        if (fullResourcePath.equals(this.mountPoint)) {
            requestContext.getRegistry().removeLink(this.mountPoint);
            if (registryContext != null) {
                HandlerManager hm = registryContext.getHandlerManager();
                hm.removeHandler(this,
                        HandlerLifecycleManager.TENANT_SPECIFIC_SYSTEM_HANDLER_PHASE);
            }
            requestContext.getRegistry().createLink(fullTargetPath, this.targetPoint);
        } else if (fullResourcePath.startsWith(this.mountPoint)) {
            String subPath =
View Full Code Here

        //If metering is disabled, we do not need to register the handler
        if(!"true".equals(ServerConfiguration.getInstance().getFirstProperty("EnableMetering"))){
            return;
        }

        HandlerManager handlerManager = registryContext.getHandlerManager();
        RegistryUsageListener handler = new RegistryUsageListener();
        URLMatcher anyUrlMatcher = new URLMatcher();
        anyUrlMatcher.setPattern(".*");
        String[] applyingFilters = new String[]{
                Filter.PUT, Filter.IMPORT, Filter.GET, Filter.DUMP, Filter.RESTORE, Filter.DELETE};

        handlerManager.addHandlerWithPriority(applyingFilters, anyUrlMatcher, handler,
                HandlerLifecycleManager.DEFAULT_REPORTING_HANDLER_PHASE);
    }
View Full Code Here

            }
        }
    }

    public static void registerPerRegistryRequestListener(RegistryContext registryContext) {
        HandlerManager handlerManager = registryContext.getHandlerManager();
        PerRegistryRequestListener storeBandwidthHandler = new PerRegistryRequestListener();
        URLMatcher anyUrlMatcher = new URLMatcher();
        anyUrlMatcher.setPattern(".*");
        String[] applyingFilters =
                new String[] { Filter.PUT, Filter.IMPORT, Filter.GET, Filter.DUMP, Filter.RESTORE, };

        handlerManager.addHandlerWithPriority(
                applyingFilters, anyUrlMatcher, storeBandwidthHandler);
    }
View Full Code Here

        }

        public void run() {
            try {
                MessageContext msgCtx = ((Axis2MessageContext) synCtx).getAxis2MessageContext();
                Event<MessageContext> event = new Event(msgCtx);
                subscriptions = subscriptionManager.getMatchingSubscriptions(event);
            } catch (EventException e) {
                handleException("Matching subscriptions fetching error", e);
            }
View Full Code Here

     * @throws EventException event
     */
    private void processGetStatusRequest(MessageContext mc,
                                         ResponseMessageBuilder messageBuilder)
            throws AxisFault, EventException {
        Subscription subscription =
                SubscriptionMessageBuilder.createGetStatusMessage(mc);
        if (log.isDebugEnabled()) {
            log.debug("GetStatus request recived for SynapseSubscription ID : " +
                    subscription.getId());
        }
        subscription = subscriptionManager.getSubscription(subscription.getId());
        if (subscription != null) {
            if (log.isDebugEnabled()) {
                log.debug("Sending GetStatus responce for SynapseSubscription ID : " +
                        subscription.getId());
            }
            //send the responce
            SOAPEnvelope soapEnvelope = messageBuilder.genGetStatusResponse(subscription);
            dispatchResponse(soapEnvelope, EventingConstants.WSE_GET_STATUS_RESPONSE,
                    mc, false);
View Full Code Here

TOP

Related Classes of org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager

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.