congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
UserNotFoundException
Code IndexAdd Tabnine to your IDE (free)

How to use
UserNotFoundException
in
org.apache.archiva.redback.users

Best Java code snippets using org.apache.archiva.redback.users.UserNotFoundException (Showing top 17 results out of 315)

origin: stackoverflow.com

 @Provider
public class UserNotFoundMapper implements
    ExceptionMapper<UserNotFoundException> {
  @Override
  public Response toResponse(UserNotFoundException ex) {
    return Response.status(404).entity(ex.getMessage()).type("text/plain")
        .build();
  }
}
origin: org.apache.archiva.redback/redback-users-jdo

public User findUser( String username )
  throws UserNotFoundException, UserManagerException
{
  if ( StringUtils.isEmpty( username ) )
  {
    throw new UserNotFoundException( "User with empty username not found." );
  }
  return (User) getObjectById( username, null );
}
origin: org.apache.archiva.redback/redback-users-memory

public User findUser( String username )
  throws UserNotFoundException
{
  triggerInit();
  User user = null;
  Iterator<User> it = users.values().iterator();
  while ( it.hasNext() )
  {
    User u = it.next();
    if ( u.getUsername().equals( username ) )
    {
      user = u;
    }
  }
  if ( user == null )
  {
    throw new UserNotFoundException( "Unable to find user '" + username + "'" );
  }
  return user;
}
origin: stackoverflow.com

 @Provider
public class UserNotFoundMapper implements ExceptionMapper<UserNotFoundException> {
  @Override
  public Response toResponse(UserNotFoundException e) {
    return Response.status(404).entity(e.getMessage()).type("text/plain").build();
  }
}
origin: org.apache.archiva.redback/redback-users-jdo

private Object getObjectById( String id, String fetchGroup )
  throws UserNotFoundException, UserManagerException
{
  try
  {
    return RedbackJdoUtils.getObjectById( getPersistenceManager(), JdoUser.class, id, fetchGroup );
  }
  catch ( RedbackObjectNotFoundException e )
  {
    throw new UserNotFoundException( e.getMessage() );
  }
  catch ( RedbackStoreException e )
  {
    throw new UserManagerException( "Unable to get object '" + JdoUser.class.getName() + "', id '" + id +
                      "', fetch-group '" + fetchGroup + "' from jdo store.", e );
  }
}
origin: stackoverflow.com

 @Provider
public class UserNotFoundMapper implements
  ExceptionMapper<UserNotFoundException> {
  @Override
   public Response toResponse(UserNotFoundException ex) {
     return Response.status(404).entity(ex.getMessage()).type("text/plain")
      .build();
  }
}
origin: org.apache.archiva.redback/redback-rest-services

log.error( e.getMessage(), e );
throw new RedbackServiceException( e.getMessage() );
origin: org.apache.archiva.redback/redback-rest-services

log.info( "user {} not found", e.getMessage() );
List<ErrorMessage> errorMessages = new ArrayList<ErrorMessage>( 2 );
ErrorMessage errorMessage = new ErrorMessage( "cannot.update.user.not.found", new String[]{ principal } );
origin: org.apache.archiva.redback/redback-rest-services

log.info( "user {} not found", e.getMessage() );
List<ErrorMessage> errorMessages = new ArrayList<ErrorMessage>( 2 );
ErrorMessage errorMessage = new ErrorMessage( "cannot.update.user.not.found", new String[]{ principal } );
origin: org.apache.archiva.redback/redback-rest-services

log.error( e.getMessage(), e );
throw new RedbackServiceException( e.getMessage() );
origin: org.apache.archiva.redback/redback-rest-services

throw new RedbackServiceException( e.getMessage() );
origin: org.apache.archiva.redback/redback-rest-services

new ErrorMessage( "user.does.not.exist", new String[]{ username, e.getMessage() } ) );
origin: apache/archiva

throw new UnauthorizedException( e.getMessage(), e );
origin: org.apache.archiva/archiva-security

throw new UnauthorizedException( e.getMessage(), e );
origin: org.apache.archiva.redback/redback-rest-services

throw new RedbackServiceException( e.getMessage() );
origin: org.apache.archiva.redback/redback-rest-services

new ErrorMessage( "user.does.not.exist", new String[]{ username, e.getMessage() } ) );
origin: org.apache.archiva.redback/redback-rest-services

public Boolean updateUser( User user )
  throws RedbackServiceException
{
  try
  {
    org.apache.archiva.redback.users.User rawUser = userManager.findUser( user.getUsername(), false );
    rawUser.setFullName( user.getFullName() );
    rawUser.setEmail( user.getEmail() );
    rawUser.setValidated( user.isValidated() );
    rawUser.setLocked( user.isLocked() );
    rawUser.setPassword( user.getPassword() );
    rawUser.setPasswordChangeRequired( user.isPasswordChangeRequired() );
    rawUser.setPermanent( user.isPermanent() );
    userManager.updateUser( rawUser );
    return Boolean.TRUE;
  }
  catch ( UserNotFoundException e )
  {
    throw new RedbackServiceException( e.getMessage() );
  }
  catch ( UserManagerException e )
  {
    throw new RedbackServiceException( new ErrorMessage( e.getMessage() ) );
  }
}
org.apache.archiva.redback.usersUserNotFoundException

Most used methods

  • getMessage
  • <init>

Popular in Java

  • Making http requests using okhttp
  • findViewById (Activity)
  • setContentView (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • JTextField (javax.swing)
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now