This section describes how to delete a semantic object from the PCD.
Set the parameters for a JNDI lookup in the PCD.
Syntax
Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY); env.put(Context.SECURITY_PRINCIPAL, request.getUser()); env.put(Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_SEMANTICS);
Perform a lookup of the folder that contains the object that you want to delete.
Syntax
InitialContext iCtx = null; try { iCtx = new InitialContext(env); String folderName = "pcd:portal_content/myFolder"; Context ctx = (Context)iCtx.lookup(folderName); ...
Delete the object by unbinding the object from the folder that contains it. Use the atomic name of the object.
Syntax
... String atomicName = "myObject"; ctx.unbind(atomicName); } catch(NamingException e) { }
You can instead perform an unbind directly on the initial context, and supply the full path to the object.