Package com.dotmarketing.exception

Examples of com.dotmarketing.exception.DotRuntimeException


   *             respective API, calling the API ensures the consistency of
   *             the relationship and caches
   */
  public void addParent(Inode i) {
    if (this instanceof Category || i instanceof Category) {
      throw new DotRuntimeException(
          "Usage of this method directly is forbidden please go through the APIs directly");
    }
    Tree tree = TreeFactory.getTree(i, this, "child");
    if (!InodeUtils.isSet(tree.getParent()) || !InodeUtils.isSet(tree.getChild())) {
      tree.setChild(this.inode);
View Full Code Here


   *             respective API, calling the API ensures the consistency of
   *             the relationship and caches
   */
  public void addParent(Inode i, String relationType) {
    if (this instanceof Category || i instanceof Category) {
      throw new DotRuntimeException(
          "Usage of this method directly is forbidden please go through the APIs directly");
    }
    Tree tree = TreeFactory.getTree(i, this, relationType);
    if (!InodeUtils.isSet(tree.getParent()) ||!InodeUtils.isSet(tree.getChild())) {
      tree.setChild(this.inode);
View Full Code Here

   *             respective API, calling the API ensures the consistency of
   *             the relationship and caches
   */
  public boolean deleteChild(Inode child) {
    if (this instanceof Category || child instanceof Category) {
      throw new DotRuntimeException(
          "Usage of this method directly is forbidden please go through the APIs directly");
    }
    Tree tree = TreeFactory.getTree(this, child, "child");
    if (!InodeUtils.isSet(tree.getParent()) || !InodeUtils.isSet(tree.getChild())) {
      return false;
View Full Code Here

   *             respective API, calling the API ensures the consistency of
   *             the relationship and caches
   */
  public boolean deleteChild(Inode child, String relationType) {
    if (this instanceof Category || child instanceof Category) {
      throw new DotRuntimeException(
          "Usage of this method directly is forbidden please go through the APIs directly");
    }
    Tree tree = TreeFactory.getTree(this, child, relationType);
    if (!InodeUtils.isSet(tree.getParent())|| !InodeUtils.isSet(tree.getChild())) {
      return false;
View Full Code Here

   *             the relationship and caches
   * @return
   */
  public boolean deleteParent(Inode parent) {
    if (this instanceof Category || parent instanceof Category) {
      throw new DotRuntimeException(
          "Usage of this method directly is forbidden please go through the APIs directly");
    }
    Tree tree = TreeFactory.getTree(parent, this);
    if (!InodeUtils.isSet(tree.getParent()) || !InodeUtils.isSet(tree.getChild())) {
      return false;
View Full Code Here

   *             respective API, calling the API ensures the consistency of
   *             the relationship and caches
   */
  public boolean deleteParent(Inode parent, String relationType) {
    if (this instanceof Category || parent instanceof Category) {
      throw new DotRuntimeException(
          "Usage of this method directly is forbidden please go through the APIs directly");
    }
    Tree tree = TreeFactory.getTree(parent, this, relationType);
    if (!InodeUtils.isSet(tree.getParent()) || !InodeUtils.isSet(tree.getChild())) {
      return false;
View Full Code Here

    for (Object parent : newParents) {
      if (parent instanceof Category)
        invalidParent = true;
    }
    if (this instanceof Category || invalidParent) {
      throw new DotRuntimeException(
          "Usage of this method directly is forbidden please go through the APIs directly");
    }

    TreeFactory.deleteTreesByChild(this);
    Iterator it = newParents.iterator();
View Full Code Here

                  m.put("urlMap",urlMap );
                }
            }
            catch(Exception e){
              Logger.warn(this.getClass(), "Cannot get URLMap for contentlet.id : " + ((ident != null) ? ident.getId() : con) + " , reason: "+e.getMessage());
              throw new DotRuntimeException(urlMap, e);
            }

            for(Entry<String,String> entry : m.entrySet()){
                final String lcasek=entry.getKey().toLowerCase();
                final String lcasev=entry.getValue()!=null ? entry.getValue().toLowerCase() : "";
View Full Code Here

        };
        try {
          runOnce = TaskLocatorUtil.getFixTaskClasses();
   
        } catch (Exception e) {
          throw new DotRuntimeException(e.getMessage(), e);
        }
        Collections.sort(runOnce, comparator);
   
        //PreparedStatement update = null;
   
        try {
          for (Class<?> c : runOnce) {
            String name = c.getCanonicalName();
            name = name.substring(name.lastIndexOf(".") + 1);
            String id = name.substring(7, 12);
            try {
              int taskId = Integer.parseInt(id);
              if (FixTask.class.isAssignableFrom(c)) {
                FixTask task;
                try {
                  task = (FixTask) c.newInstance();
                } catch (Exception e) {
                  throw new DotRuntimeException(e.getMessage(), e);
                }
                HibernateUtil.startTransaction();
                            Boolean shouldrun=task.shouldRun();
                if (shouldrun) {
                  Logger.info(this, "Running: " + name);
View Full Code Here

           dc.addParam(identifier);
           dc.addParam(identifier);
           dc.loadResult();
       }   
    } catch (Exception e) {
      throw new DotRuntimeException("Unable to delete Orphaned Asset",e);
    }
  }
View Full Code Here

TOP

Related Classes of com.dotmarketing.exception.DotRuntimeException

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.