public CPrivilege readPrivilege( String id ) throws NoSuchPrivilegeException { CPrivilege privilege = getConfiguration().getPrivilegeById( id ); if ( privilege != null ) { return privilege; } else { throw new NoSuchPrivilegeException( id ); } }
throw new ResourceException(Status.CLIENT_ERROR_NOT_FOUND, e.getMessage());
throw new ResourceException( Status.CLIENT_ERROR_NOT_FOUND, e.getMessage() );
public void deletePrivilege( String id, boolean clean ) throws NoSuchPrivilegeException { boolean found = getConfiguration().removePrivilegeById( id ); if ( !found ) { throw new NoSuchPrivilegeException( id ); } if ( clean ) { cleanRemovedPrivilege( id ); } }