Package org.structr.rest.exception

Examples of org.structr.rest.exception.NotAllowedException


    return false;
  }

  @Override
  public Result doGet(PropertyKey sortKey, boolean sortDescending, int pageSize, int page, String offsetId) throws FrameworkException {
    throw new NotAllowedException();
  }
View Full Code Here


    throw new NotAllowedException();
  }

  @Override
  public RestMethodResult doPut(Map<String, Object> propertySet) throws FrameworkException {
    throw new NotAllowedException();
  }
View Full Code Here

    throw new NotAllowedException();
  }

  @Override
  public RestMethodResult doPost(Map<String, Object> propertySet) throws FrameworkException {
    throw new NotAllowedException();
  }
View Full Code Here

        } else if (obj instanceof AbstractNode) {

          if (!securityContext.isAllowed((AbstractNode)obj, Permission.delete)) {

            logger.log(Level.WARNING, "Could not delete {0} because {1} has no delete permission", new Object[]{obj, securityContext.getUser(true)});
            throw new NotAllowedException();

          }

          // delete cascading
          app.delete((AbstractNode)obj);
View Full Code Here

    return ("maintenance".equals(part));
  }

  @Override
  public Result doGet(PropertyKey sortKey, boolean sortDescending, int pageSize, int page, String offsetId) throws FrameworkException {
    throw new NotAllowedException();
  }
View Full Code Here

    throw new NotAllowedException();
  }

  @Override
  public RestMethodResult doPut(Map<String, Object> propertySet) throws FrameworkException {
    throw new NotAllowedException();
  }
View Full Code Here

//        ? "non-null"
//        : "null", ((securityContext != null) && (securityContext.getUser(true) != null))
//            ? securityContext.getUser(true).getProperty(AbstractNode.name)
//            : "null" });

      throw new NotAllowedException();

    }
  }
View Full Code Here

    if (entity == null) {
      throw new NotFoundException();
    }

    if (entity instanceof AbstractNode && !securityContext.isReadable((AbstractNode)entity, true, false)) {
      throw new NotAllowedException();
    }

    entity.setSecurityContext(securityContext);

    return entity;
View Full Code Here

  public RestMethodResult doPost(final Map<String, Object> propertySet) throws FrameworkException {

    // Admins only
    if (!securityContext.isSuperUser()) {

      throw new NotAllowedException();

    }

    try {
View Full Code Here

  }

  @Override
  public Result doGet(PropertyKey sortKey, boolean sortDescending, int pageSize, int page, String offsetId) throws FrameworkException {

    throw new NotAllowedException();

  }
View Full Code Here

TOP

Related Classes of org.structr.rest.exception.NotAllowedException

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.