org.apache.archiva.security
Interface UserRepositories

All Known Implementing Classes:
DefaultUserRepositories

public interface UserRepositories

UserRepositories


Method Summary
 void createMissingRepositoryRoles(String repoId)
          Create any missing repository roles for the provided repository id.
 List<ManagedRepository> getAccessibleRepositories(String principal)
           
 List<String> getManagableRepositoryIds(String principal)
          Get the list of writable repository ids for the user specified.
 List<String> getObservableRepositoryIds(String principal)
          Get the list of observable repository ids for the user specified.
 boolean isAuthorizedToDeleteArtifacts(String principal, String repoId)
          Check if user is authorized to delete artifacts in the repository.
 boolean isAuthorizedToUploadArtifacts(String principal, String repoId)
          Check if user is authorized to upload artifacts in the repository.
 

Method Detail

getObservableRepositoryIds

List<String> getObservableRepositoryIds(String principal)
                                        throws PrincipalNotFoundException,
                                               AccessDeniedException,
                                               ArchivaSecurityException
Get the list of observable repository ids for the user specified.

Parameters:
principal - the principle to obtain the observable repository ids from.
Returns:
the list of observable repository ids.
Throws:
PrincipalNotFoundException
AccessDeniedException
ArchivaSecurityException

getManagableRepositoryIds

List<String> getManagableRepositoryIds(String principal)
                                       throws PrincipalNotFoundException,
                                              AccessDeniedException,
                                              ArchivaSecurityException
Get the list of writable repository ids for the user specified.

Parameters:
principal - the principle to obtain the observable repository ids from.
Returns:
the list of observable repository ids.
Throws:
PrincipalNotFoundException
AccessDeniedException
ArchivaSecurityException

createMissingRepositoryRoles

void createMissingRepositoryRoles(String repoId)
                                  throws ArchivaSecurityException
Create any missing repository roles for the provided repository id.

Parameters:
repoId - the repository id to work off of.
Throws:
ArchivaSecurityException - if there was a problem creating the repository roles.

isAuthorizedToUploadArtifacts

boolean isAuthorizedToUploadArtifacts(String principal,
                                      String repoId)
                                      throws PrincipalNotFoundException,
                                             ArchivaSecurityException
Check if user is authorized to upload artifacts in the repository.

Parameters:
principal -
repoId -
Returns:
Throws:
PrincipalNotFoundException
ArchivaSecurityException

isAuthorizedToDeleteArtifacts

boolean isAuthorizedToDeleteArtifacts(String principal,
                                      String repoId)
                                      throws AccessDeniedException,
                                             ArchivaSecurityException
Check if user is authorized to delete artifacts in the repository.

Parameters:
principal -
repoId -
Returns:
Throws:
ArchivaSecurityException
AccessDeniedException

getAccessibleRepositories

List<ManagedRepository> getAccessibleRepositories(String principal)
                                                  throws ArchivaSecurityException,
                                                         AccessDeniedException,
                                                         PrincipalNotFoundException
Parameters:
principal -
Returns:
Throws:
ArchivaSecurityException
AccessDeniedException
PrincipalNotFoundException
Since:
1.4-M3


Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.