[opencms-dev] deleting published resource

Hitesh hitesh.patel at tatainfotech.com
Thu Sep 23 11:10:01 CEST 2004


here's the code--> for that


private CmsObject cm = null;

cm = new CmsObject();  // or you may get it from
JspCmsActionElement.getCmsObject();

public boolean deleteResource(String destination) throws Exception{

boolean deleted = false;

cm.lockResource(destination);

cm.deleteResource(destination);

deleted = true;

return deleted;

}



hope it may help.

regds,

Hitesh

+919892678844





----- Original Message ----- 
From: "Blair Dye" <bdye at novomind.com>
To: <opencms-dev at opencms.org>
Sent: Thursday, September 23, 2004 2:16 PM
Subject: [opencms-dev] deleting published resource


>
> Hello,
>
> I am trying to delete a file with the Java API that has already been
> published. This throws an exception at the point where I try to publish my
> change. I've seen an earlier post which suggests deleting the whole
> directory but this is not practical in my case. It is possible to delete a
> published resource with in the frontend, does anyone know how to do it
with
> the API?
>
> Thanks,
> Blair
>
>
>
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
>




More information about the opencms-dev mailing list