Package com.dotmarketing.exception

Examples of com.dotmarketing.exception.DotRuntimeException


    List<Resource> children;
    try {
      children = dotDavHelper.getChildrenOfFolder(folder, user, isAutoPub);
    } catch (IOException e) {
      Logger.error(FolderResourceImpl.class, e.getMessage(), e);
      throw new DotRuntimeException(e.getMessage(), e);
    }
    for (Resource resource : children) {
      if(resource instanceof FolderResourceImpl){
        String name = ((FolderResourceImpl)resource).getFolder().getName();
        if(name.equalsIgnoreCase(childName)){
View Full Code Here


    List<Resource> children;
    try {
            children = dotDavHelper.getChildrenOfFolder( folder, user, isAutoPub );
        } catch (IOException e) {
      Logger.error(FolderResourceImpl.class, e.getMessage(), e);
      throw new DotRuntimeException(e.getMessage(), e);
    }
    return children;
  }
View Full Code Here

      }

    } catch (DotDataException e) {
      Logger.error(FolderResourceImpl.class, e.getMessage(),
          e);
      throw new DotRuntimeException(e.getMessage(), e);
    }
    return false;
  }
View Full Code Here

      User user=(User)HttpManager.request().getAuthorization().getTag();
    try {
      dotDavHelper.removeObject(path, user);
    } catch (Exception e) {
      Logger.error(this, e.getMessage(), e);
      throw new DotRuntimeException(e.getMessage(), e);
    }
  }
View Full Code Here

        try {
          host = hostAPI.find(fr.getFolder().getHostId(), user, false);
          folderPath = APILocator.getIdentifierAPI().find(fr.getFolder()).getPath();
        } catch (DotDataException e) {
          Logger.error(FolderResourceImpl.class, e.getMessage(), e);
          throw new DotRuntimeException(e.getMessage(), e);
        } catch (DotSecurityException e) {
          Logger.error(FolderResourceImpl.class, e.getMessage(), e);
          throw new DotRuntimeException(e.getMessage(), e);
        }
        dotDavHelper.createTempFolder(File.separator + host.getHostname() + folderPath + name);
        return;
      }
      try {
        String p = fr.getPath();
        if(!p.endsWith("/"))
          p = p + "/";
        dotDavHelper.move(this.getPath(), p + name, user, isAutoPub);
      } catch (Exception e) {
        Logger.error(this, e.getMessage(), e);
        throw new DotRuntimeException(e.getMessage(), e);
      }
    }else if(collRes instanceof HostResourceImpl){
      HostResourceImpl hr = (HostResourceImpl)collRes;
      if(dotDavHelper.isTempResource(name)){
        Host host = hr.getHost();
        dotDavHelper.createTempFolder(File.separator + host.getHostname());
        return;
      }
      try {
        String p = this.getPath();
        if(!p.endsWith("/"))
          p = p +"/";
        dotDavHelper.move(p, "/" + hr.getName() + "/" + name, user, isAutoPub);
      } catch (Exception e) {
        Logger.error(this, e.getMessage(), e);
        throw new DotRuntimeException(e.getMessage(), e);
      }
    }
  }
View Full Code Here

          Logger.debug(Structure.class, e.getMessage(), e);
        }
      }
      return APILocator.getHostAPI().findSystemHost();
    } catch (Exception e) {
      throw new DotRuntimeException(e.getMessage(), e);
    }
  }
View Full Code Here

   *             respective API, calling the API ensures the consistency of
   *             the relationship and caches
   */
  public void addChild(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(this, i, "child");
    if (!InodeUtils.isSet(tree.getParent()) || !InodeUtils.isSet(tree.getChild())) {
      tree.setParent(this.inode);
View Full Code Here

   *             respective API, calling the API ensures the consistency of
   *             the relationship and caches
   */
  public void addChild(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(this, i, relationType);
    if (!InodeUtils.isSet(tree.getParent()) || !InodeUtils.isSet(tree.getChild())){
      tree.setParent(this.inode);
View Full Code Here

    try {
      hosts = hostAPI.findAll(user, false);
      hosts.remove(APILocator.getHostAPI().findSystemHost());
    } catch (DotDataException e) {
      Logger.error(WebdavRootResourceImpl.class, e.getMessage(), e);
      throw new DotRuntimeException(e.getMessage(), e);
    } catch (DotSecurityException e) {
      Logger.error(WebdavRootResourceImpl.class, e.getMessage(), e);
      throw new DotRuntimeException(e.getMessage(), e);
    }
    return hosts;
  }
View Full Code Here

   *             respective API, calling the API ensures the consistency of
   *             the relationship and caches
   */
  public void addChild(Inode i, String relationType, int sortOrder) {
    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(this, i, relationType);
    if (!InodeUtils.isSet(tree.getParent()) || !InodeUtils.isSet(tree.getChild())) {
      tree.setParent(this.inode);
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.