Examples of InvalidImplementationException


Examples of org.opentides.InvalidImplementationException

      String cipher = encryptKey.substring(12);
      BASE64Decoder decoder = new BASE64Decoder();
      try {
        return new String(decoder.decodeBuffer(cipher));
      } catch (IOException e) {
        throw new InvalidImplementationException(
            "Failed to perform decryption for key ["+encryptKey+"]",e);
      }
    } else
      return null;       
  }
View Full Code Here

Examples of org.opentides.InvalidImplementationException

      } else {
        String outputPackage;
        outputPackage = outputFile.getParentFile().getCanonicalPath().replaceAll("\\\\", "/");
        int index = outputPackage.indexOf(baseOutputPath);
        if (index<0)
          throw new InvalidImplementationException("Unable to retrieve package. BaseOutputPath ["
              +baseOutputPath+"] is invalid.");
        index += baseOutputPath.length();
        String packagePath = outputPackage.substring(index);
        return packagePath.replaceAll("/", "\\.");   
      }
View Full Code Here

Examples of org.opentides.InvalidImplementationException

        }
        return showForm(request, response, errors);
      } else {
        String message = "ControllerException thrown but no errors reported.";
        _log.error(message, ce);
        throw new InvalidImplementationException(message, ce);
      }
    }
  }
View Full Code Here

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

Examples of org.opentides.InvalidImplementationException

      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

Examples of org.opentides.InvalidImplementationException

          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

Examples of org.opentides.InvalidImplementationException

   * @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

Examples of org.opentides.InvalidImplementationException

   * @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

Examples of org.opentides.InvalidImplementationException

   * @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

Examples of org.opentides.InvalidImplementationException

  @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
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.