@Override
    public CmsLock getLock(CmsObject cms, CmsResource resource) throws CmsException {

        CmsResource xmlPage = cms.readResource(resource.getStructureId());
        //CmsResource xmlPage = findXmlPage(cms, resource.getRootPath());
        if (xmlPage != null) {

            I_CmsResourceType resType = OpenCms.getResourceManager().getResourceType(xmlPage.getTypeId());
            if (resType instanceof CmsResourceTypeXmlPage) {
                return cms.getLock(xmlPage);
            }
        }

        return null;
    }
@ Override public CmsLock getLock ( CmsObject cms , CmsResource resource ) throws CmsException { CmsResource xmlPage = cms . readResource ( resource . getStructureId ( ) ) ; if ( xmlPage != null ) { I_CmsResourceType resType = OpenCms . getResourceManager ( ) . getResourceType ( xmlPage . getTypeId ( ) ) ; if ( resType instanceof CmsResourceTypeXmlPage ) { return cms . getLock ( xmlPage ) ; } } return null ; }
@see org.opencms.file.wrapper.A_CmsResourceWrapper#getLock(org.opencms.file.CmsObject, org.opencms.file.CmsResource)