Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Delete Folder with API

Hi,

Can someone tell me how can I delete a PCD folder with the PCD API. I have found some information already but it does not do the job.

I have tried to do it this way:

Hashtable env = new Hashtable();
		env.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
		env.put(Context.SECURITY_PRINCIPAL, IUserAdministrator);
		env.put(Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_SEMANTICS);
		
		InitialContext iCtx = null;
		try
		{
		    iCtx = new InitialContext(env);
		    String folderName = "pcd:portal_content/"+FOLDER_NAME;
		    Context ctx = (Context)iCtx.lookup(folderName);
		    ctx.unbind(FOLDER_NAME);
		}      
		catch(NamingException e)
		{
			//
		}

Could someone help?!

Thanks,

Deyan

Not what you were looking for? View more on this topic or Ask a question