Examples of deleteItem()


Examples of org.sonatype.nexus.proxy.repository.ProxyRepository.deleteItem()

    // install listener
    final DeleteEventsListener listener = new DeleteEventsListener();
    eventBus().register(listener);

    // perform delete
    repo1.deleteItem(new ResourceStoreRequest("/spoof/maven-metadata.xml"));

    // 1 events: the actual non-collection being deleted, no recursion happens
    assertThat(listener.getDeleteEvents().size(), equalTo(1));
    assertThat(listener.getDeleteEvents().get(0).getClass().getName(),
        equalTo(RepositoryItemEventDeleteRoot.class.getName()));
View Full Code Here

Examples of org.sonatype.nexus.proxy.repository.Repository.deleteItem()

      final Repository repository = repositories.getRepository(configuration.repositoryId());
      final RepositoryItemUid p2RepoUid = repository.createUid(P2_REPOSITORY_ROOT_PATH);
      try {
        p2RepoUid.getLock().lock(Action.create);
        final ResourceStoreRequest request = new ResourceStoreRequest(P2_REPOSITORY_ROOT_PATH);
        repository.deleteItem(request);
      }
      finally {
        p2RepoUid.getLock().unlock();
      }
    }
View Full Code Here

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager.deleteItem()

                fileName = st.getFileName();
            }
            synapseConfiguration.removeStartup(name);
            MediationPersistenceManager pm = ServiceBusUtils.getMediationPersistenceManager(
                    synapseConfiguration.getAxisConfiguration());
            pm.deleteItem(name, fileName, ServiceBusConstants.ITEM_TYPE_TASK);

        } else {
            log.warn("Cannot delete the startup named " + name
                    + ", it doesn't exists in the SynapseConfiguration");
        }
View Full Code Here

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager.deleteItem()

            if (!keepHistory) {
                ProxyService proxySvc = synapseConfig.getProxyService(axisService.getName());
                if (proxySvc != null) {
                    synapseConfig.removeProxyService(axisService.getName());
                    MediationPersistenceManager pm = getMediationPersistenceManager();
                    pm.deleteItem(proxySvc.getName(), proxySvc.getFileName(),
                            ServiceBusConstants.ITEM_TYPE_PROXY_SERVICE);
                    log.info("Deleted the proxy service : " + proxySvc.getName());

                } else if (log.isDebugEnabled()) {
                    log.debug("Proxy Service representing the service " + axisService.getName()
View Full Code Here

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager.deleteItem()

            configuration.removeMessageStore(name);
            String fileName = removedMessageStore.getFileName();
            removedMessageStore.destroy();

            MediationPersistenceManager pm = getMediationPersistenceManager();
            pm.deleteItem(removedMessageStore.getName(),
                    fileName,ServiceBusConstants.ITEM_TYPE_MESSAGE_STORE);

        } else {
            handleException(log, "Message Store " + name + " does not exist", null);
        }
View Full Code Here

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager.deleteItem()

            SynapseConfiguration synCfg = getSynapseConfiguration();
            SequenceMediator sequence = synCfg.getDefinedSequences().get(sequenceName);
            if (sequence != null) {
                synCfg.removeSequence(sequenceName);
                MediationPersistenceManager pm = getMediationPersistenceManager();
                pm.deleteItem(sequenceName, sequence.getFileName(),
                        ServiceBusConstants.ITEM_TYPE_SEQUENCE);
            } else {
                handleException("No defined sequence with name " + sequenceName
                        + " found to delete in the Synapse configuration");
            }
View Full Code Here

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager.deleteItem()

            SynapseConfiguration synapseConfiguration = getSynapseConfiguration();
            SynapseEventSource eventSource = synapseConfiguration.getEventSource(eventsourceName);
            if (eventSource != null) {
                synapseConfiguration.removeEventSource(eventsourceName);
                MediationPersistenceManager pm = getMediationPersistenceManager();
                pm.deleteItem(eventsourceName, eventSource.getFileName(),
                        ServiceBusConstants.ITEM_TYPE_EVENT_SRC);
            } else {
                log.warn("No event source exists by the name : " + eventsourceName);
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager.deleteItem()

            if (executor != null) {
                executor.destroy();
                log.info("Removed priority executor with name: " + name);
                MediationPersistenceManager pm = getMediationPersistenceManager();
                pm.deleteItem(name, executor.getFileName(),
                        ServiceBusConstants.ITEM_TYPE_EXECUTOR);
            }
        } finally {
            lock.unlock();
        }
View Full Code Here

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager.deleteItem()

            SynapseConfiguration synapseConfiguration = getSynapseConfiguration();
            ProxyService proxy = synapseConfiguration.getProxyService(proxyName);
            if (proxy != null) {
                synapseConfiguration.removeProxyService(proxyName);
                MediationPersistenceManager pm = getMediationPersistenceManager();
                pm.deleteItem(proxyName, proxy.getFileName(),
                        ServiceBusConstants.ITEM_TYPE_PROXY_SERVICE);
                if(log.isDebugEnabled()) {
                    log.debug("Proxy service : " + proxyName + " deleted");
                }
                return SUCCESSFUL;
View Full Code Here

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager.deleteItem()

                processor.destroy();
            }


            MediationPersistenceManager pm = getMediationPersistenceManager();
            pm.deleteItem(processor.getName(),
                    fileName,ServiceBusConstants.ITEM_TYPE_MESSAGE_PROCESSOR);

        } else {
            handleException(log, "Message Store " + name + " does not exist", null);
        }
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.