search/indexer/mmm-search-indexer-base/src/main/java/net/sf/mmm/search/indexer/impl/strategy/SearchIndexerUpdateStrategyVcs.java
/**
   * This method tries to detect the VCS type for the given <code>location</code>.
   *
   * @param location is the location for which the VCS-type is requested.
   * @return the detected VCS-type.
   * @throws RuntimeException if the VCS-type could NOT be detected.
   */
This method tries to detect the VCS type for the given location.
@param location is the location for which the VCS-type is requested.
@return the detected VCS-type.
@throws RuntimeException if the VCS-type could NOT be detected.
This method tries to detect the VCS type for the given location . @param location is the location for which the VCS - type is requested . @return the detected VCS - type . @throws RuntimeException if the VCS - type could NOT be detected .
protected String detectVcsType(File location) throws RuntimeException {
    if (location.isDirectory()) {
      for (File child : location.listFiles()) {
        if (child.isDirectory()) {
          String childName = child.getName();
          String vcsType = FOLDER2VCS_MAP.get(childName);
          if (vcsType != null) {
            return vcsType;
          }
        }
      }
    }
    throw new ObjectNotFoundException("vcs-type");
  }
protected String detectVcsType ( File location ) throws RuntimeException { if ( location . isDirectory ( ) ) { for ( File child : location . listFiles ( ) ) { if ( child . isDirectory ( ) ) { String childName = child . getName ( ) ; String vcsType = FOLDER2VCS_MAP . get ( childName ) ; if ( vcsType != null ) { return vcsType ; } } } } throw new ObjectNotFoundException ( "vcs-type" ) ; }
This method tries to detect the VCS type for the given <code>location</code>.
This method tries to detect the VCS type for the given <code > location< / code > .
// TODO create own exception