cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to delete a store

pmarreddy
Champ in-the-making
Champ in-the-making
I want to delete the content of a full store,Is there any mechanism to do this.
     If it is possible, what are its implicit and explicit conditions
If it is not possible how to delete the store
11 REPLIES 11

derek
Star Contributor
Star Contributor
Hi,

No, there isn't a way to do it.  It would have to be hooked into the system at a low level (NodeService) and the Lucene code would have to listen for it and remove the store's index files.

The content will take care of itself, then.

Regards

rdanner
Champ in-the-making
Champ in-the-making
Hi,

No, there isn't a way to do it.  It would have to be hooked into the system at a low level (NodeService) and the Lucene code would have to listen for it and remove the store's index files.

The content will take care of itself, then.

Regards

Derek,

You are stating what would have to happen should this be possible?  Is there a reason apart from time, technical or design issue why it is not yet possible to delete a store?

derek
Star Contributor
Star Contributor
Hi,

There is no technical reason why it has not been done.  It's the first I've heard of it being required, but that doesn't mean that others wouldn't use the feature if it were there.

Regards

cludt
Champ in-the-making
Champ in-the-making
So, why did you guys implement the web service tests (contained in the SDK) in that way, that each time, a new store is created if you are not able to delete the stores again? I think, there is no way to do it manually, is there?

Maybe, you should think about changing the web service test, then. Wouldn't it be better to create new spaces in e.g. the workspace store for the WS tests? (Except from a test case where you want to create a new store, of course.)

sergio
Champ in-the-making
Champ in-the-making
Hi all!

I agree with all of you who have a need for a method that allows to delete stores. It could be useful to provide such a method in order to clean all the test stores created by the SDK examples.

However, what are the steps needed to be executed manually to delete each reference to a store for which protocol and id are well known?

All the best,

Sergio

cludt
Champ in-the-making
Champ in-the-making
Use the WebServiceAPI: For each reference, run a delete command:

RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();        
       
CMLDelete delete = new CMLDelete(new Predicate(new Reference[] {reference}, reference.getStore(), null));
CML cml = new CML();
cml.setDelete(new CMLDelete[] {delete});
       
// Execute the update
try {
   repositoryService.update(cml);
} catch (RepositoryFault e) {
   […]
} catch (RemoteException e) {
   […]
}
Or create one delete for all references.

sergio
Champ in-the-making
Champ in-the-making
Many thanks, very useful.

But is the deleting a store procedure available only via WS?

All the best,

Sergio

cludt
Champ in-the-making
Champ in-the-making
At least not via the web interface. Maybe via the Java Content Repository API. But I have never worked with this, so I cannot tell.

cludt
Champ in-the-making
Champ in-the-making
Sorry sergio, there is no way to delete a store! Just to delete the content / spaces in a store that is usually not accessible via the web interface (e.g. stores created during the web service api test). The procedure I posted is only for deleting content / spaces!