001 package org.apache.archiva.admin.model.group; 002 /* 003 * Licensed to the Apache Software Foundation (ASF) under one 004 * or more contributor license agreements. See the NOTICE file 005 * distributed with this work for additional information 006 * regarding copyright ownership. The ASF licenses this file 007 * to you under the Apache License, Version 2.0 (the 008 * "License"); you may not use this file except in compliance 009 * with the License. You may obtain a copy of the License at 010 * 011 * http://www.apache.org/licenses/LICENSE-2.0 012 * 013 * Unless required by applicable law or agreed to in writing, 014 * software distributed under the License is distributed on an 015 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 016 * KIND, either express or implied. See the License for the 017 * specific language governing permissions and limitations 018 * under the License. 019 */ 020 021 import org.apache.archiva.admin.model.AuditInformation; 022 import org.apache.archiva.admin.model.RepositoryAdminException; 023 import org.apache.archiva.admin.model.beans.RepositoryGroup; 024 025 import java.util.List; 026 import java.util.Map; 027 028 /** 029 * @author Olivier Lamy 030 * @since 1.4-M1 031 */ 032 public interface RepositoryGroupAdmin 033 { 034 List<RepositoryGroup> getRepositoriesGroups() 035 throws RepositoryAdminException; 036 037 RepositoryGroup getRepositoryGroup( String repositoryGroupId ) 038 throws RepositoryAdminException; 039 040 Boolean addRepositoryGroup( RepositoryGroup repositoryGroup, AuditInformation auditInformation ) 041 throws RepositoryAdminException; 042 043 Boolean updateRepositoryGroup( RepositoryGroup repositoryGroup, AuditInformation auditInformation ) 044 throws RepositoryAdminException; 045 046 Boolean deleteRepositoryGroup( String repositoryGroupId, AuditInformation auditInformation ) 047 throws RepositoryAdminException; 048 049 Boolean addRepositoryToGroup( String repositoryGroupId, String repositoryId, AuditInformation auditInformation ) 050 throws RepositoryAdminException; 051 052 Boolean deleteRepositoryFromGroup( String repositoryGroupId, String repositoryId, 053 AuditInformation auditInformation ) 054 throws RepositoryAdminException; 055 056 /** 057 * @return Map with key repoGroupId and value repoGroup 058 * @throws RepositoryAdminException 059 */ 060 Map<String, RepositoryGroup> getRepositoryGroupsAsMap() 061 throws RepositoryAdminException; 062 063 /** 064 * @return Map with key repoGroupId and value List of ManagedRepositories 065 * @throws RepositoryAdminException 066 */ 067 Map<String, List<String>> getGroupToRepositoryMap() 068 throws RepositoryAdminException; 069 070 /** 071 * @return Map with key managedRepo id and value List of repositoryGroup ids where the repo is 072 * @throws RepositoryAdminException 073 */ 074 Map<String, List<String>> getRepositoryToGroupMap() 075 throws RepositoryAdminException; 076 }