code: private CmsLock getParentLock(String resourcename) {
  
          CmsLock parentFolderLock = getParentFolderLock(resourcename);
          if (!parentFolderLock.isNullLock()) {
              return new CmsLock(
                  resourcename,
                  parentFolderLock.getUserId(),
                  parentFolderLock.getProject(),
                  CmsLockType.INHERITED);
          }
          return CmsLock.getNullLock();
      }
docs: Returns the inherited lock of a resource.<p>
  
  @param resourcename the name of the resource
  @return the inherited lock or the null lock