Package org.opentides

Examples of org.opentides.InvalidImplementationException


          }
          return ret;
        }
        return retrieveObjectValue(ivalue,property.substring(props[0].length()+1));
      } catch (Exception e) {
        throw new InvalidImplementationException("Failed to retrieve value for "+property, e);
      }
    } else {
      // let's get the object value directly
      try {
        if (Map.class.isAssignableFrom(obj.getClass())) {
          Map map = (Map) obj;
          return map.get(property);         
        } else {
          Method method = obj.getClass().getMethod(getGetterMethodName(property));
          return method.invoke(obj);         
        }
      } catch (Exception e) {
        throw new InvalidImplementationException("Failed to retrieve value for "+property, e);
      }
    }
  }
View Full Code Here


      try {
        Method method = obj.getClass().getMethod(getGetterMethodName(props[0]));
        Object ivalue = method.invoke(obj);
        return retrieveObjectType(ivalue,property.substring(props[0].length()+1));
      } catch (Exception e) {
        throw new InvalidImplementationException("Failed to retrieve value for "+property, e);
      }
    } else {
      // let's get the object value directly
      try {
        Method method = obj.getClass().getMethod(getGetterMethodName(property));
        return method.getReturnType();
      } catch (Exception e) {
        throw new InvalidImplementationException("Failed to retrieve value for "+property, e);
      }
    }
  }
View Full Code Here

          ivalue = retrieveObjectType(obj, props[0]).newInstance();
        }
        setObjectValue(obj, props[0], ivalue);
        setObjectValue(ivalue, property.substring(props[0].length()+1), value);
      } catch (Exception e) {
        throw new InvalidImplementationException("Failed to set value for "+property, e);
      }
    } else {
      // let's get the object value directly
      try {
        Method method = obj.getClass().getMethod(getSetterMethodName(property), retrieveObjectType(obj, property));
        method.invoke(obj, value);
      } catch (Exception e) {
        throw new InvalidImplementationException("Failed to retrieve value for "+property, e);
      }
    }
  }
View Full Code Here

   * @return object
   */
  @Transactional(readOnly=true)
  public final T load(String sid) {
    if (StringUtil.isEmpty(sid)) {
      throw new InvalidImplementationException("ID parameter is empty.");
    } else {
      try {
        Long id = Long.parseLong(sid);
        return load(id);
      } catch (NumberFormatException nfe) {
        throw new InvalidImplementationException("ID parameter is not numeric.");
      }
    }
  }
View Full Code Here

   * @return object
   */
  @Transactional(readOnly=true)
  public final T load(String sid, boolean filter) {
    if (StringUtil.isEmpty(sid)) {
      throw new InvalidImplementationException("ID parameter is empty.");
    } else {
      try {
        Long id = Long.parseLong(sid);
        return load(id, filter);
      } catch (NumberFormatException nfe) {
        throw new InvalidImplementationException("ID parameter is not numeric.");
      }
    }
  }
View Full Code Here

   * @param sid -
   *            id to delete
   */
  public final void delete(String sid) {
    if (StringUtil.isEmpty(sid)) {
      throw new InvalidImplementationException("ID parameter is empty.");
    } else {
      try {
        Long id = Long.parseLong(sid);
        delete(id);
      } catch (NumberFormatException nfe) {
        throw new InvalidImplementationException("ID parameter is not numeric.");
      }
    }
  }
View Full Code Here

  @Override
  public void requestPasswordReset(String emailAddress) {
    UserDAO userDAO = (UserDAO) getDao();
    if (!userDAO.isRegisteredByEmail(emailAddress))
      throw new InvalidImplementationException(
          "Email ["
              + emailAddress
              + "] was not validated prior to calling this service. Please validate first.");
    PasswordReset passwd = new PasswordReset();
    String token = StringUtil.generateRandomString(tokenLength);
View Full Code Here

      InputStream is = FileUtil.getFileStream(file.getAbsolutePath());
      return readFile(is, file.getAbsolutePath());
    } catch (FileNotFoundException fe) {
      String msg = "Failed to find file [" + file.getAbsolutePath() + "].";
      _log.error(msg, fe);
      throw new InvalidImplementationException(msg, fe);
    }
  }
View Full Code Here

      InputStream is = FileUtil.getFileStream(filename);
      return readFile(is, filename);
    } catch (FileNotFoundException fe) {
      String msg = "Failed to find file [" + filename + "].";
      _log.error(msg, fe);
      throw new InvalidImplementationException(msg, fe);
    }
  }
View Full Code Here

      }
      return ret.toString();
    } catch (NullPointerException npe) {
      String msg = "Failed to find file [" + filename + "].";
      _log.error(msg, npe);
      throw new InvalidImplementationException(msg, npe);
    } catch (FileNotFoundException fe) {
      String msg = "Failed to find file [" + filename + "].";
      _log.error(msg, fe);
      throw new InvalidImplementationException(msg, fe);
    } catch (IOException ioe) {
      String msg = "Cannot access file [" + filename + "].";
      _log.error(ioe, ioe);
      throw new InvalidImplementationException(msg, ioe);
    } finally {
      if (reader!=null)
        try {
          reader.close();
        } catch (IOException e) {
View Full Code Here

TOP

Related Classes of org.opentides.InvalidImplementationException

Copyright © 2018 www.massapicom. 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.