Coverage Report - org.apache.maven.archiva.security.UserRepositories
 
Classes in this File Line Coverage Branch Coverage Complexity
UserRepositories
N/A
N/A
0
 
 1  
 package org.apache.maven.archiva.security;
 2  
 
 3  
 /*
 4  
  * Licensed to the Apache Software Foundation (ASF) under one
 5  
  * or more contributor license agreements.  See the NOTICE file
 6  
  * distributed with this work for additional information
 7  
  * regarding copyright ownership.  The ASF licenses this file
 8  
  * to you under the Apache License, Version 2.0 (the
 9  
  * "License"); you may not use this file except in compliance
 10  
  * with the License.  You may obtain a copy of the License at
 11  
  *
 12  
  *  http://www.apache.org/licenses/LICENSE-2.0
 13  
  *
 14  
  * Unless required by applicable law or agreed to in writing,
 15  
  * software distributed under the License is distributed on an
 16  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 17  
  * KIND, either express or implied.  See the License for the
 18  
  * specific language governing permissions and limitations
 19  
  * under the License.
 20  
  */
 21  
 
 22  
 import java.util.List;
 23  
 
 24  
 /**
 25  
  * UserRepositories 
 26  
  *
 27  
  * @version $Id: UserRepositories.java 755726 2009-03-18 20:47:20Z brett $
 28  
  */
 29  
 public interface UserRepositories
 30  
 {
 31  
     /**
 32  
      * Get the list of observable repository ids for the user specified.
 33  
      * 
 34  
      * @param principal the principle to obtain the observable repository ids from.
 35  
      * @return the list of observable repository ids.
 36  
      * @throws PrincipalNotFoundException
 37  
      * @throws AccessDeniedException
 38  
      * @throws ArchivaSecurityException
 39  
      */
 40  
     public List<String> getObservableRepositoryIds( String principal )
 41  
         throws PrincipalNotFoundException, AccessDeniedException, ArchivaSecurityException;
 42  
     
 43  
     /**
 44  
      * Get the list of writable repository ids for the user specified.
 45  
      * 
 46  
      * @param principal the principle to obtain the observable repository ids from.
 47  
      * @return the list of observable repository ids.
 48  
      * @throws PrincipalNotFoundException
 49  
      * @throws AccessDeniedException
 50  
      * @throws ArchivaSecurityException
 51  
      */
 52  
     public List<String> getManagableRepositoryIds( String principal )
 53  
         throws PrincipalNotFoundException, AccessDeniedException, ArchivaSecurityException;
 54  
     
 55  
     /**
 56  
      * Create any missing repository roles for the provided repository id.
 57  
      * 
 58  
      * @param repoId the repository id to work off of.
 59  
      * @throws ArchivaSecurityException if there was a problem creating the repository roles.
 60  
      */
 61  
     public void createMissingRepositoryRoles( String repoId )
 62  
         throws ArchivaSecurityException;
 63  
     
 64  
     /**
 65  
      * Check if user is authorized to upload artifacts in the repository.
 66  
      * 
 67  
      * @param principal
 68  
      * @param repoId
 69  
      * @return
 70  
      * @throws PrincipalNotFoundException
 71  
      * @throws ArchivaSecurityException
 72  
      */
 73  
     public boolean isAuthorizedToUploadArtifacts( String principal, String repoId)
 74  
         throws PrincipalNotFoundException, ArchivaSecurityException;
 75  
      
 76  
     /**
 77  
      * Check if user is authorized to delete artifacts in the repository.
 78  
      * 
 79  
      * @param principal
 80  
      * @param repoId
 81  
      * @return
 82  
      * @throws ArchivaSecurityException 
 83  
      * @throws AccessDeniedException 
 84  
      */
 85  
     public boolean isAuthorizedToDeleteArtifacts( String principal, String repoId )
 86  
         throws AccessDeniedException, ArchivaSecurityException;
 87  
     
 88  
 }