Examples of InputException


Examples of evolaris.framework.sys.business.exception.InputException

  public ActionForward delete(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
    String msisdnParam = req.getParameter("msisdn");
    SmsSenderManager senderManager = new SmsSenderManager(locale,session);
    Sender sender = senderManager.getSmsSenderByMsisdn(Long.parseLong(msisdnParam));
    if (sender == null) {
      throw new InputException(getResources(req).getMessage(locale, "admin.SenderNotFound",  msisdnParam));
    }
    senderManager.deleteSmsSender(sender);
    LOGGER.info("User " + req.getUserPrincipal().getName().toLowerCase() + ": Deleted sender `"+ msisdnParam + "`");
    return mapping.findForward("deleted");
  }
View Full Code Here

Examples of evolaris.framework.sys.business.exception.InputException

   * @param group  group which the web user tries to access; null => the user tries to access any group (only allowed for administrators)
   */
  protected void checkAccessRights(HttpServletRequest req, Group group) {
    Group webUserGroup = webUser.getGroup();
    if (!req.isUserInRole(UserManagerBase.ADMINISTRATOR) && webUserGroup != group) {     
      throw new InputException(getLocalizedMessage("SystemWeb", "sys.insufficientRights"));
    }   
  }  
View Full Code Here

Examples of evolaris.framework.sys.business.exception.InputException

   */
  @Override
  protected void checkAccessRights(HttpServletRequest req, Group group, User entry) {
    Group webUserGroup = webUser.getGroup();
    if (!req.isUserInRole(UserManagerBase.ADMINISTRATOR) && group != webUserGroup){
      throw new InputException(getResources(req).getMessage(locale, "um.insufficientRights"));
    }
    if (entry != null){
      if (!req.isUserInRole(UserManagerBase.GROUP_ADMINISTRATOR) && entry.getId() != webUser.getId()) {
        throw new InputException(getResources(req).getMessage(locale, "um.insufficientRights"));
      }
      // edited user may not have/receive more roles than the web user
      for (Role role : entry.getRoles()) {
        if (!req.isUserInRole(role.getRolename())){
          throw new InputException(getResources(req).getMessage(locale, "um.insufficientRights"));
        }
      }
    }
       }
View Full Code Here

Examples of evolaris.framework.sys.business.exception.InputException

   
    UserManager userManager = new UserManager(locale,session);
    User user = userManager.getUserDetails(f.getId());
   
    if (user == null){
      throw new InputException(getLocalizedMessage("SystemWeb", "sys.entryNotAvailable"));
    }
   
    // delete old references
    UserSetManager userSetManager = new UserSetManager(locale,session);
    Set<UserSet> oldUserSets = user.getUserSets();
View Full Code Here

Examples of evolaris.framework.sys.business.exception.InputException

   * @param duplicateUsers  true => include the users in the new set (for different destination groups new user objects without username/password and roles are created)
   * @return  newly created user set
   */
  public UserSet duplicate(UserSet userSet, Group destinationGroup, String newName, boolean includeUsers){
    if (destinationGroup == userSet.getGroup() && newName == null){
      throw new InputException(ResourceBundle.getBundle("UserManagement", locale).getString("userSetExists"));
    }
    UserSet newUserSet = clone(userSet);
    newUserSet.setCreationdate(new Date());
    newUserSet.setEditedAt(null);
    newUserSet.setGroup(destinationGroup);
View Full Code Here

Examples of evolaris.framework.sys.business.exception.InputException

   * @param userSet  the user set
   */
  public void createUserSet(UserSet userSet) {
    // check for existing set and create a reasonable exception if necessary
    if (getUserSet(userSet.getName(),userSet.getGroup()) != null){
      throw new InputException(ResourceBundle.getBundle("UserManagement", locale).getString("userSetExists") + ": " + userSet.getName());
    }
    userSet.setCreationdate(new Date());
    session.save(userSet);
  }
View Full Code Here

Examples of jnipap.InputException

      // one of our own NIPAP-errors?
      switch (e.code) {
        case 1000:
          return new JnipapException(e.getMessage());
        case 1100:
          return new InputException(e.getMessage());
        case 1110:
          return new MissingInputException(e.getMessage());
        case 1120:
          return new InvalidParameterException(e.getMessage());
        case 1130:
View Full Code Here

Examples of org.dbpedia.spotlight.exceptions.InputException

        LOG.info("disambiguator: " + disambiguatorName);

        /* Validating parameters */

        if (text.trim().equals("")) {
            throw new InputException("No text was specified in the &text parameter.");
        }

        /* Setting defaults */
        if (Server.getTokenizer() == null && disambiguatorName==SpotlightConfiguration.DisambiguationPolicy.Default.name()
                && text.length() > 1200) {
View Full Code Here

Examples of org.onemind.awtbridge.input.InputException

                item.write(f);
                chooser.setSelectedFile(f);
                chooser.approveSelection();
            } catch (Exception e)
            {
                throw new InputException("Cannot save file", e);
            }
        } else if (!StringUtils.isNullOrEmpty(inputForm.get(cancelKey)))
        {
            chooser.cancelSelection();
        } else
View Full Code Here

Examples of org.onemind.awtbridge.input.InputException

                    _logger.finest("item changes detected on component " + combo);
                    postEvent(context, new DelayedEvent(combo, i), BridgeEventQueue.HIGH_PRIORITY);
                }
            } catch (NumberFormatException e)
            {
                throw new InputException("combobox input value is not an integer", e);
            }
        }
    }
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.