Returns a {@link RepositoryMetadata} of the specified {@code repoName} in the specified
{@code projectName}.
507424
public CompletableFuture<RepositoryMetadata> getRepo(String projectName, String repoName) {
        requireNonNull(projectName, "projectName");
        requireNonNull(repoName, "repoName");

        return getProject(projectName).thenApply(project -> project.repo(repoName));
    }
1166955
public CompletableFuture<Collection<Permission>> findPermissions(String projectName, String repoName,
                                                                     String appId) {
        requireNonNull(projectName, "projectName");
        requireNonNull(repoName, "repoName");
        requireNonNull(appId, "appId");

        return getProject(projectName).thenApply(metadata -> {
            final RepositoryMetadata repositoryMetadata = metadata.repo(repoName);
            final TokenRegistration registration = metadata.tokens().getOrDefault(appId, null);

            // If the token is guest.
            if (registration == null) {
                return repositoryMetadata.perRolePermissions().guest();
            }
            final Collection<Permission> p = repositoryMetadata.perTokenPermissions().get(registration.id());
            if (p != null) {
                return p;
            }
            return findPerRolePermissions(repositoryMetadata, registration.role());
        });
    }
1080027
public String getRepository() {
        if (!allowReleases && !allowSnapshots) {
            throw new IllegalStateException(
                "Does not make sense to disallow both releases and snapshots.");
        }
        // start with a plus to append default repositories from settings.xml and Maven Cental
        // to the list of repositories defined by options
        final StringBuilder url = new StringBuilder("+");
        url.append(this.repositoryUrl);
        if (allowSnapshots) {
            url.append("@snapshots");
        }
        if (!allowReleases) {
            url.append("@noreleases");
        }
        if (id != null) {
            url.append("@id=");
            url.append(id);
        }
        return url.toString();
    }
908424
public static ReposTag parseRepositoryTag(String name) {
        int n = name.lastIndexOf(':');
        if (n < 0) {
            return new ReposTag(name, "");
        }
        String tag = name.substring(n + 1);
        if (StringUtils.containsIgnoreCase(name, SHA256_SEPARATOR)) {
            return new ReposTag(name, "");
        }
        if (!tag.contains("/")) {
            return new ReposTag(name.substring(0, n), tag);
        }
        return new ReposTag(name, "");
    }
52680
private CompletableFuture<Collection<Permission>> findPermissions0(String projectName, String repoName,
                                                                       User user) {
        requireNonNull(projectName, "projectName");
        requireNonNull(repoName, "repoName");
        requireNonNull(user, "user");

        return getProject(projectName).thenApply(metadata -> {
            final RepositoryMetadata repositoryMetadata = metadata.repo(repoName);
            final Member member = metadata.memberOrDefault(user.id(), null);

            // If the member is guest.
            if (member == null) {
                return repositoryMetadata.perRolePermissions().guest();
            }
            final Collection<Permission> p = repositoryMetadata.perUserPermissions().get(member.id());
            if (p != null) {
                return p;
            }
            return findPerRolePermissions(repositoryMetadata, member.role());
        });
    }
451974
@Override
    public RepositoryInfo getRepositoryInfo(String repositoryId, ExtensionsData extension) {
        LOGGER.debug("-- getting repository info");
        RepositoryInfo info = jcrRepository(repositoryId).getRepositoryInfo(login(repositoryId));
        return new RepositoryInfoLocal(repositoryId, info);
    }
685916
public static JSONArray getRepositoryNames() {
        final JSONArray ret = new JSONArray();

        if (null == repositoriesDescription) {
            LOGGER.log(Level.INFO, "Not found repository description[repository.json] file under classpath");

            return ret;
        }

        final JSONArray repositories = repositoriesDescription.optJSONArray("repositories");

        for (int i = 0; i < repositories.length(); i++) {
            final JSONObject repository = repositories.optJSONObject(i);

            ret.put(repository.optString("name"));
        }

        return ret;
    }
180325
public Collection<String> getPropertyNames() throws RepositoryException
   {

      HashSet<String> props = new HashSet<String>();
      for (HierarchicalProperty p : properties)
      {
         props.add(p.getStringName());
      }
      return props;

      // PropertyIterator iter = node.getProperties();
      // ArrayList<String> props = new ArrayList<String>();
      // while (iter.hasNext()) {
      // String name = iter.nextProperty().getName();
      // if (!"jcr:primaryType".equals(name) && !"jcr:mixinTypes".equals(name)
      // && !"jcr:data".equals(name) && !"jcr:uuid".equals(name))
      // props.add(name);
      // }
      // return props;
   }
841003
@Get("/projects/{projectName}/repos/{repoName}/merge")
    public <T> CompletableFuture<?> mergeFiles(
            @Param("revision") @Default("-1") String revision, Repository repository,
            @RequestConverter(MergeQueryRequestConverter.class) MergeQuery<T> query) {
        return repository.mergeFiles(new Revision(revision), query).thenApply(DtoConverter::convert);
    }
391276
public static Repository getRepository( String repositoryName ) throws NoSuchRepositoryException {
        Repository repository = null;
        try {
            repository = repositoriesContainer.getRepository(repositoryName, Collections.unmodifiableMap(factoryParams));
        } catch (RepositoryException e) {
            throw new NoSuchRepositoryException(WebJcrI18n.cannotInitializeRepository.text(repositoryName), e);
        }

        if (repository == null) {
            throw new NoSuchRepositoryException(WebJcrI18n.repositoryNotFound.text(repositoryName));
        }
        return repository;
    }
639703
@GetMapping("/sp/{client}/idp/metadata")
    public ResponseEntity<String> getIdentityProviderMetadataByName(@PathVariable("client") final String client) {
        val saml2Client = (SAML2Client) builtClients.findClient(client);
        if (saml2Client != null) {
            return getSaml2ClientIdentityProviderMetadataResponseEntity(saml2Client);
        }
        return getNotAcceptableResponseEntity();
    }
314627
public String[] getUserStorableTypeNames() throws RepositoryException {
        StorableInfoCapability replicaCap =
            mReplicaRepository.getCapability(StorableInfoCapability.class);
        StorableInfoCapability masterCap =
            mMasterRepository.getCapability(StorableInfoCapability.class);

        if (replicaCap == null) {
            if (masterCap == null) {
                return new String[0];
            }
            return masterCap.getUserStorableTypeNames();
        } else if (masterCap == null) {
            return replicaCap.getUserStorableTypeNames();
        }

        // Merge the two sets together.
        Set<String> names = new LinkedHashSet<String>();
        for (String name : replicaCap.getUserStorableTypeNames()) {
            names.add(name);
        }
        for (String name : masterCap.getUserStorableTypeNames()) {
            names.add(name);
        }

        return names.toArray(new String[names.size()]);
    }
866389
public Collection<HierarchicalProperty> getProperties(String name) throws RepositoryException
   {
      ArrayList<HierarchicalProperty> props = new ArrayList<HierarchicalProperty>();
      for (HierarchicalProperty p : properties)
      {
         if (p.getStringName().equals(name))
            props.add(p);
      }
      return props;
      // HierarchicalProperty prop = getProperty(name);
      // if(prop != null)
      // props.add( prop );
      // return props;
   }
958215
public ConfigurationMetadataRepository build() {
        val result = new SimpleConfigurationMetadataRepository();
        for (val repository : this.repositories) {
            result.include(repository);
        }
        return result;
    }
796051
protected function getProjectPackageName($projectName, $repositoryUrl)
    {
        $packageName = null;

        if ($this->hasComposerJson($projectName)) {
            $packageName = $this->getPackageNameByComposerJson($projectName);
        }

        return $packageName ? $packageName : $this->getPackageNameByRepositoryUrl($repositoryUrl);
    }
1191044
public PropertyDefinitionDatas getPropertyDefinitions(final InternalQName propertyName,
      final InternalQName... nodeTypeNames) throws RepositoryException
   {

      PropertyDefinitionDatas propertyDefinitions =
         this.nodeTypeRepository.getPropertyDefinitions(propertyName, nodeTypeNames);

      // Try super
      if (propertyDefinitions == null)
      {
         for (int i = 0; i < nodeTypeNames.length && propertyDefinitions == null; i++)
         {
            final InternalQName[] supers =
               this.nodeTypeRepository.getNodeType(nodeTypeNames[i]).getDeclaredSupertypeNames();
            propertyDefinitions = getPropertyDefinitions(propertyName, supers);

         }
      }

      // try residual def
      if (propertyDefinitions == null && !propertyName.equals(Constants.JCR_ANY_NAME))
      {
         propertyDefinitions = getPropertyDefinitions(Constants.JCR_ANY_NAME, nodeTypeNames);
      }

      return propertyDefinitions;
   }
1246163
private CompletableFuture<Void> createRepository(CreateRepositoryCommand c) {
        return CompletableFuture.supplyAsync(() -> {
            projectManager.get(c.projectName()).repos().create(c.repositoryName(), c.timestamp(), c.author());
            return null;
        }, repositoryWorker);
    }