public synchronized void deleteObject(CmsCmisCallContext context, String objectId, boolean allVersions) {

        try {
            CmsObject cms = m_repository.getCmsObject(context);
            CmsUUID structureId = new CmsUUID(objectId);
            CmsResource resource = cms.readResource(structureId);
            if (resource.isFolder()) {
                boolean isLeaf = !hasChildren(cms, resource);
                if (!isLeaf) {
                    throw new CmisConstraintException("Only leaf resources can be deleted.");
                }
            }
            ensureLock(cms, resource);
            cms.deleteResource(resource.getRootPath(), CmsResource.DELETE_PRESERVE_SIBLINGS);
        } catch (CmsException e) {
            handleCmsException(e);
        }
    }
public synchronized void deleteObject ( CmsCmisCallContext context , String objectId , boolean allVersions ) { try { CmsObject cms = m_repository . getCmsObject ( context ) ; CmsUUID structureId = new CmsUUID ( objectId ) ; CmsResource resource = cms . readResource ( structureId ) ; if ( resource . isFolder ( ) ) { boolean isLeaf = ! hasChildren ( cms , resource ) ; if ( ! isLeaf ) { throw new CmisConstraintException ( "Only leaf resources can be deleted." ) ; } } ensureLock ( cms , resource ) ; cms . deleteResource ( resource . getRootPath ( ) , CmsResource . DELETE_PRESERVE_SIBLINGS ) ; } catch ( CmsException e ) { handleCmsException ( e ) ; } }
Deletes a CMIS object.<p>

@param context the call context
@param objectId the id of the object to delete
@param allVersions flag to delete all version