Examples of UserException


Examples of com.claymus.gwt.UserException

      BlockDTO blockDTO = block.getDTO();
      blockDTO.setLocations(getLocations());
      blockDTO.setRoles(getRoles());
      return blockDTO;
    } else {
      throw new UserException();
    }
  }
View Full Code Here

Examples of com.icegreen.greenmail.user.UserException

    }

    public void authenticate(String pass)
            throws UserException, FolderException {
        if (_user == null)
            throw new UserException("No user selected");

        _user.authenticate(pass);
        _inbox = imapHostManager.getInbox(_user);
    }
View Full Code Here

Examples of com.mamaeye.exception.UserException

  }

  @Override
  public User register(User user) throws UserException {
    if (StringUtils.isBlank(user.getNickname())) {
      throw new UserException("�dzƲ���Ϊ��");
    }
    if (StringUtils.isBlank(user.getEmail())) {
      throw new UserException("���䲻��Ϊ��");
    }
    if (StringUtils.isBlank(user.getPassword())) {
      throw new UserException("���벻��Ϊ��");
    }

    if (!StringUtils.equals(user.getPassword(), user.getCheckPassword())) {
      throw new UserException("�����������벻һ��");
    }

    if (existUser(user)) {
      throw new UserException("�����Ѵ���");
    }

    user.setStatus(1);
    String securityPassword = SecurityUtils
        .sha1(Constants.PASSWORD_PUBLIC_KEY + "-" + user.getPassword());
View Full Code Here

Examples of com.sun.jdo.api.persistence.enhancer.util.UserException

            // get real class name
            final String className = cc.className();
            cfs.setExpectedClassName(className);
        } catch (IOException ex) {
            //@olsen: support for I18N
            throw new UserException(
                getI18N("enhancer.io_error_while_reading_stream"),//NOI18N
                ex);
        } catch (ClassFormatError ex) {
            //@olsen: support for I18N
            throw new UserException(
                getI18N("enhancer.class_format_error"),//NOI18N
                ex);
        }

        // enhance class
        econtrol.modifyClasses();
        if (env.errorCount() > 0) {
            // retrieve error messages
            env.getErrorWriter ().flush ();
            /*
            final String str = errString.getBuffer().toString();

            // reset env's error writer
            errString = new StringWriter();
            err = new PrintWriter(errString, true);
            env.setErrorWriter(err);
            */

            //@olsen: support for I18N
            throw new UserException(env.getLastErrorMessage ());
        }

        // write class
        boolean changed = (cc.updated() && cc.filterRequired());
        try {
            if (changed)
            {
                env.message("writing enhanced class " + cc.userClassName()//NOI18N
                            + " to output stream");//NOI18N
            }
            else
            {
                env.message("no changes on class " + cc.userClassName());
            }
            outByteCode.setClassName (cc.userClassName ());
            final DataOutputStream dos = new DataOutputStream(outByteCode.getStream ());
            cf.write(dos);
            dos.flush();
        } catch (IOException ex) {
            //@olsen: support for I18N
            throw new UserException(
                getI18N("enhancer.io_error_while_writing_stream"),//NOI18N
                ex);
        }
        return changed;
    }
View Full Code Here

Examples of net.sf.chellow.monad.UserException

    if (extension.equals("zip")) {
      try {
        is = new ZipInputStream(new BufferedInputStream(is));
        ZipEntry entry = ((ZipInputStream) is).getNextEntry();
        if (entry == null) {
          throw new UserException(null,
              "Can't find an entry within the zip file.");
        }
        String name = entry.getName();
        extension = name.substring(name.length() - 3);
      } catch (IOException e) {
View Full Code Here

Examples of no.kommune.bergen.soa.common.exception.UserException

    }
    return list;
  }

  public List<Forsendelse> retrieveRows(String[] ids) {
    if (ids.length > 25000) throw new UserException("Selection is too large, more than 25000 rows");
    List<String> list = Arrays.asList(ids);
    if (list.size() < 1000) return retrieveRowsMax1000(list);
    List<Forsendelse> result = new ArrayList<Forsendelse>();
    List<String> tempList = new ArrayList<String>();
    for (int i = 0; i < list.size(); i++) {
View Full Code Here

Examples of org.apache.jetspeed.services.security.UserException

        if (create)
        {
            ldapurl = JetspeedLDAP.buildURL("uid=" + (String)getPerm(User.USERNAME) + ",ou=users");
            setutil(ATTR_UID, (String)getPerm(User.USERNAME));
            if (JetspeedLDAP.addEntry(ldapurl, myAttrs) == false) throw new UserException("Could not insert user data to LDAP!");
        }
        else if (JetspeedLDAP.exists(ldapurl))
        {
            JetspeedLDAP.deleteAttrs(ldapurl, rmAttrs);
            if (JetspeedLDAP.updateEntry(ldapurl, myAttrs) == false) throw new UserException("Could not update user data to LDAP!");
        }
    }
View Full Code Here

Examples of org.apache.openjpa.util.UserException

        } catch (NoSuchMethodException e) {
            throw new InternalException(e);
        } catch (IllegalAccessException e) {
            throw new InternalException(e);
        } catch (InvocationTargetException e) {
            throw new UserException(e.getCause());
        } catch (IOException e) {
            throw new InternalException(e);
        } catch (ClassNotFoundException e) {
            throw new InternalException(e);
        } catch (UnmodifiableClassException e) {
View Full Code Here

Examples of org.apache.openjpa.util.UserException

                    unenhanced);
                if (conf.getRuntimeUnenhancedClassesConstant()
                    == RuntimeUnenhancedClasssesModes.WARN)
                    log.warn(msg);
                else
                    throw new UserException(msg);
            }
            return null;
        }

        boolean redefine = ClassRedefiner.canRedefineClasses();
        if (redefine)
            log.info(_loc.get("enhance-and-subclass-no-redef-start",
                classes));
        else
            log.info(_loc.get("enhance-and-subclass-and-redef-start",
                classes));

        final Map<Class, byte[]> map = new HashMap<Class, byte[]>();
        final List subs = new ArrayList(classes.size());
        final List ints = new ArrayList(classes.size());
        Set<Class> unspecified = null;
        for (Iterator iter = classes.iterator(); iter.hasNext(); ) {
            final Class cls = (Class) iter.next();
            final PCEnhancer enhancer = new PCEnhancer(conf, cls);

            enhancer.setBytecodeWriter(new BytecodeWriter() {
                public void write(BCClass bc) throws IOException {
                    ManagedClassSubclasser.write(bc, enhancer, map,
                        cls, subs, ints);
                }
            });
            if (redefine)
                enhancer.setRedefine(true);
            enhancer.setCreateSubclass(true);
            enhancer.setAddDefaultConstructor(true);

            // set this before enhancement as well as after since enhancement
            // uses a different metadata repository, and the metadata config
            // matters in the enhancement contract. Don't do any warning here,
            // since we'll issue warnings when we do the final metadata
            // reconfiguration at the end of this method.
            configureMetaData(enhancer.getMetaData(), conf, redefine, false);

            unspecified = collectRelatedUnspecifiedTypes(enhancer.getMetaData(),
                classes, unspecified);

            enhancer.run();
            try {
                enhancer.record();
            } catch (IOException e) {
                // our impl of BytecodeWriter doesn't throw IOException
                throw new InternalException(e);
            }
        }

        if (unspecified != null && !unspecified.isEmpty())
            throw new UserException(_loc.get("unspecified-unenhanced-types",
                classes, unspecified));

        ClassRedefiner.redefineClasses(conf, map);
        for (Class cls : map.keySet()) {
            setIntercepting(conf, envLoader, cls);
View Full Code Here

Examples of org.apache.openjpa.util.UserException

                J2DoPrivHelper.getClassLoaderAction(
                    AbstractStoreManager.class)));
        Configurations.configureInstance(store, null, props,
            PROP_ABSTRACT_STORE);
        if (store == null)
            throw new UserException(s_loc.get("no-store-manager",
                PROP_ABSTRACT_STORE)).setFatal(true);

        return store;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.