docs: public boolean isValid(CmsRequestContext context, CmsResource resource) {
  
          if (this == ALL) {
              // shortcut for "ALL" filter where nothing is filtered
              return true;
          }
  
          // check for required resource state
          switch (m_filterState) {
              case EXCLUDED:
                  if (resource.getState().equals(m_state)) {
                      return false;
                  }
                  break;
              case REQUIRED:
                  if (!resource.getState().equals(m_state)) {
                      return false;
                  }
                  break;
              default:
                  // ignored
          }
  
          // check for required resource state
          switch (m_filterFlags) {
              case EXCLUDED:
                  if ((resource.getFlags() & m_flags) != 0) {
                      return false;
                  }
                  break;
              case REQUIRED:
                  if ((resource.getFlags() & m_flags) != m_flags) {
                      return false;
                  }
                  break;
              default:
                  // ignored
          }
  
          // check for required resource type
          switch (m_filterType) {
              case EXCLUDED:
                  if (resource.getTypeId() == m_type) {
                      return false;
                  }
                  break;
              case REQUIRED:
                  if (resource.getTypeId() != m_type) {
                      return false;
                  }
                  break;
              default:
                  // ignored
          }
  
          if (m_onlyFolders != null) {
              if (m_onlyFolders.booleanValue()) {
                  if (!resource.isFolder()) {
                      // only folder resource are allowed
                      return false;
                  }
              } else {
                  if (resource.isFolder()) {
                      // no folder resources are allowed
                      return false;
                  }
              }
          }
  
          // check if the resource was last modified within the given time range
          if (m_filterLastModified) {
              if ((m_modifiedAfter > 0L) && (resource.getDateLastModified() < m_modifiedAfter)) {
                  return false;
              }
              if ((m_modifiedBefore > 0L) && (resource.getDateLastModified() > m_modifiedBefore)) {
                  return false;
              }
          }
  
          // check if the resource expires within the given time range
          if (m_filterExpire) {
              if ((m_expireAfter > 0L) && (resource.getDateExpired() < m_expireAfter)) {
                  return false;
              }
              if ((m_expireBefore > 0L) && (resource.getDateExpired() > m_expireBefore)) {
                  return false;
              }
          }
  
          // check if the resource is released within the given time range
          if (m_filterRelease) {
              if ((m_releaseAfter > 0L) && (resource.getDateReleased() < m_releaseAfter)) {
                  return false;
              }
              if ((m_releaseBefore > 0L) && (resource.getDateReleased() > m_releaseBefore)) {
                  return false;
              }
          }
  
          // check if the resource is currently released and not expired
          if (m_filterTimerange && !resource.isReleasedAndNotExpired(context.getRequestTime())) {
              return false;
          }
  
          // everything is ok, so return true
          return true;
      }