Package com.bradmcevoy.http.exceptions

Examples of com.bradmcevoy.http.exceptions.NotAuthorizedException


            return;
        }
        if( lockToken.tokenId.equals( tokenId ) ) {
            removeLock( lockToken );
        } else {
            throw new NotAuthorizedException( r );
        }
    }
View Full Code Here


        getFolder().setName(name);
        ofy.put(getFolder());
        return;
      }
    }
    throw new NotAuthorizedException(rDest);
  }
View Full Code Here

            return;
        }
        if( lockToken.tokenId.equals( tokenId ) ) {
            removeLock( lockToken );
        } else {
            throw new NotAuthorizedException( r );
        }
    }
View Full Code Here

            log.trace( "check permissions with: " + permissionService.getClass() );
        }
        Set<PropertyAuthoriser.CheckResult> errorFields = permissionService.checkPermissions( HttpManager.request(), Method.PROPPATCH, PropertyAuthoriser.PropertyPermission.WRITE, fields.keySet(), wrappedResource );
        if( errorFields != null && errorFields.size() > 0 ) {
            log.trace( "authorisation errors" );
            throw new NotAuthorizedException( wrappedResource );
        } else {
            log.trace( "setting properties" );
            PropFindResponse resp = patchSetter.setProperties( encodedUrl, parseResult, wrappedResource );
            if( eventManager != null ) {
                log.trace( "fire event" );
View Full Code Here

        }
        try {
            return pd.getReadMethod().invoke( r, NOARGS );
        } catch( Exception ex ) {
            if( ex.getCause() instanceof NotAuthorizedException ) {
                NotAuthorizedException na = (NotAuthorizedException) ex.getCause();
                throw na;
            } else {
                throw new RuntimeException( name.toString(), ex );
            }
        }
View Full Code Here

            pd.getWriteMethod().invoke( r, value );
        } catch( PropertySetException e ) {
            throw e;
        } catch( Exception ex ) {
            if( ex.getCause() instanceof NotAuthorizedException ) {
                NotAuthorizedException na = (NotAuthorizedException) ex.getCause();
                throw na;
            } else if( ex.getCause() instanceof PropertySetException ) {
                PropertySetException na = (PropertySetException) ex.getCause();
                throw na;
            } else {
View Full Code Here

        if (log.isTraceEnabled()) {
            log.trace("check permissions with: " + permissionService.getClass().getCanonicalName());
        }
        Set<PropertyAuthoriser.CheckResult> errorFields = permissionService.checkPermissions(request, request.getMethod(), PropertyAuthoriser.PropertyPermission.WRITE, allFields, resource);
        if (errorFields != null && errorFields.size() > 0) {
            throw new NotAuthorizedException(resource);
        }
        String href = request.getAbsoluteUrl();
        PropFindResponse resp = patchSetter.setProperties(href, parseResult, resource);
        return resp;
    }
View Full Code Here

            return;
        }
        if( lockToken.tokenId.equals( tokenId ) ) {
            removeLock( lockToken );
        } else {
            throw new NotAuthorizedException( resource );
        }
    }
View Full Code Here

                vtf=null;
            }
           
        } catch (PermissionDeniedException e) {
            LOG.debug(e.getMessage());
            throw new NotAuthorizedException(this);
           
        } finally {
            IOUtils.closeQuietly(out);
        }
    }
View Full Code Here

            LockToken mltonLT = convertToken(existLT);
            lr = LockResult.success(mltonLT);

        } catch (PermissionDeniedException ex) {
            LOG.debug(ex.getMessage());
            throw new NotAuthorizedException(this);

        } catch (DocumentAlreadyLockedException ex) {
            // set result iso throw new LockedException(this);
            LOG.debug(ex.getMessage());
            lr = LockResult.failed(LockResult.FailureReason.ALREADY_LOCKED);
View Full Code Here

TOP

Related Classes of com.bradmcevoy.http.exceptions.NotAuthorizedException

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.