This project has retired. For details please refer to its Attic page.
DefaultUserRepositories

org.apache.maven.archiva.security
Class DefaultUserRepositories

Package class diagram package DefaultUserRepositories
java.lang.Object
  extended by org.apache.maven.archiva.security.DefaultUserRepositories
All Implemented Interfaces:
UserRepositories

public class DefaultUserRepositories
extends java.lang.Object
implements UserRepositories

DefaultUserRepositories


Constructor Summary
DefaultUserRepositories()
           
 
Method Summary
 void createMissingRepositoryRoles(java.lang.String repoId)
          Create any missing repository roles for the provided repository id.
 java.util.List<java.lang.String> getManagableRepositoryIds(java.lang.String principal)
          Get the list of writable repository ids for the user specified.
 java.util.List<java.lang.String> getObservableRepositoryIds(java.lang.String principal)
          Get the list of observable repository ids for the user specified.
 boolean isAuthorizedToDeleteArtifacts(java.lang.String principal, java.lang.String repoId)
          Check if user is authorized to delete artifacts in the repository.
 boolean isAuthorizedToUploadArtifacts(java.lang.String principal, java.lang.String repoId)
          Check if user is authorized to upload artifacts in the repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultUserRepositories

public DefaultUserRepositories()
Method Detail

getObservableRepositoryIds

public java.util.List<java.lang.String> getObservableRepositoryIds(java.lang.String principal)
                                                            throws PrincipalNotFoundException,
                                                                   AccessDeniedException,
                                                                   ArchivaSecurityException
Description copied from interface: UserRepositories
Get the list of observable repository ids for the user specified.

Specified by:
getObservableRepositoryIds in interface UserRepositories
Parameters:
principal - the principle to obtain the observable repository ids from.
Returns:
the list of observable repository ids.
Throws:
PrincipalNotFoundException
AccessDeniedException
ArchivaSecurityException

getManagableRepositoryIds

public java.util.List<java.lang.String> getManagableRepositoryIds(java.lang.String principal)
                                                           throws PrincipalNotFoundException,
                                                                  AccessDeniedException,
                                                                  ArchivaSecurityException
Description copied from interface: UserRepositories
Get the list of writable repository ids for the user specified.

Specified by:
getManagableRepositoryIds in interface UserRepositories
Parameters:
principal - the principle to obtain the observable repository ids from.
Returns:
the list of observable repository ids.
Throws:
PrincipalNotFoundException
AccessDeniedException
ArchivaSecurityException

createMissingRepositoryRoles

public void createMissingRepositoryRoles(java.lang.String repoId)
                                  throws ArchivaSecurityException
Description copied from interface: UserRepositories
Create any missing repository roles for the provided repository id.

Specified by:
createMissingRepositoryRoles in interface UserRepositories
Parameters:
repoId - the repository id to work off of.
Throws:
ArchivaSecurityException - if there was a problem creating the repository roles.

isAuthorizedToUploadArtifacts

public boolean isAuthorizedToUploadArtifacts(java.lang.String principal,
                                             java.lang.String repoId)
                                      throws PrincipalNotFoundException,
                                             ArchivaSecurityException
Description copied from interface: UserRepositories
Check if user is authorized to upload artifacts in the repository.

Specified by:
isAuthorizedToUploadArtifacts in interface UserRepositories
Returns:
Throws:
PrincipalNotFoundException
ArchivaSecurityException

isAuthorizedToDeleteArtifacts

public boolean isAuthorizedToDeleteArtifacts(java.lang.String principal,
                                             java.lang.String repoId)
                                      throws AccessDeniedException,
                                             ArchivaSecurityException
Description copied from interface: UserRepositories
Check if user is authorized to delete artifacts in the repository.

Specified by:
isAuthorizedToDeleteArtifacts in interface UserRepositories
Returns:
Throws:
AccessDeniedException
ArchivaSecurityException