You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2014/02/05 22:29:23 UTC
[89/90] Revert global substation of “test” with “org.apache.usergrid.test” that was breaking everything, migrate REST tests to FasterXML Jackson, put JSPs in the right place.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/applications/users/UserResource/resetpw_set_success.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/applications/users/UserResource/resetpw_set_success.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/applications/users/UserResource/resetpw_set_success.jsp
deleted file mode 100644
index 9cedcaf..0000000
--- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/applications/users/UserResource/resetpw_set_success.jsp
+++ /dev/null
@@ -1,19 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
-<%@ page import="net.tanesha.recaptcha.ReCaptcha"%>
-<%@ page import="net.tanesha.recaptcha.ReCaptchaFactory"%>
-<%@ page import="org.apache.usergrid.rest.AbstractContextResource"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Reset Password</title>
- <link rel="stylesheet" type="text/css" href="/css/styles.css" />
-</head>
-<body>
-
- <p>New password set for <c:out value="${it.user.email}"/></p>
-
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/applications/users/UsersResource/error.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/applications/users/UsersResource/error.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/applications/users/UsersResource/error.jsp
deleted file mode 100644
index 8ab321f..0000000
--- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/applications/users/UsersResource/error.jsp
+++ /dev/null
@@ -1,17 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
-<%@ page import="org.apache.usergrid.rest.AbstractContextResource"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Error</title>
- <link rel="stylesheet" type="text/css" href="/css/styles.css" />
-</head>
-<body>
-
- <p>An error occurred <c:out value="${it}"/>.</p>
-
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/applications/users/UsersResource/resetpw_email_form.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/applications/users/UsersResource/resetpw_email_form.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/applications/users/UsersResource/resetpw_email_form.jsp
deleted file mode 100644
index e78dd1f..0000000
--- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/applications/users/UsersResource/resetpw_email_form.jsp
+++ /dev/null
@@ -1,37 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>Reset Password</title>
-<link rel="stylesheet" type="text/css" href="/css/styles.css" />
-</head>
-<body>
-
- <div class="dialog-area">
- <c:if test="${!empty it.errorMsg}">
- <div class="dialog-form-message">${it.errorMsg}</div>
- </c:if>
- <form class="dialog-form" action="" method="post">
- <fieldset>
- <p>
- <label for="email">Please type your <strong>email
- address</strong> or <strong>username</strong> below.
- </label>
- </p>
- <p>
- <input class="text_field" id="email" name="email" type="text" />
- </p>
- <p id="human-proof"></p>
- ${it.reCaptchaHtml}
- <p class="buttons">
- <button type="submit">Submit</button>
- </p>
- </fieldset>
- </form>
- </div>
-
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/applications/users/UsersResource/resetpw_email_success.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/applications/users/UsersResource/resetpw_email_success.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/applications/users/UsersResource/resetpw_email_success.jsp
deleted file mode 100644
index bed809e..0000000
--- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/applications/users/UsersResource/resetpw_email_success.jsp
+++ /dev/null
@@ -1,19 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
-<%@ page import="net.tanesha.recaptcha.ReCaptcha"%>
-<%@ page import="net.tanesha.recaptcha.ReCaptchaFactory"%>
-<%@ page import="org.apache.usergrid.rest.AbstractContextResource"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Reset Password</title>
- <link rel="stylesheet" type="text/css" href="/css/styles.css" />
-</head>
-<body>
-
- <p>Email with instructions for password reset sent to <c:out value="${it.user.email}"/></p>
-
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/ManagementResource/authorize_form.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/ManagementResource/authorize_form.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/ManagementResource/authorize_form.jsp
deleted file mode 100644
index bab57bf..0000000
--- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/ManagementResource/authorize_form.jsp
+++ /dev/null
@@ -1,43 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
-<%@ page import="org.apache.usergrid.rest.AbstractContextResource"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Sign In</title>
- <link rel="stylesheet" type="text/css" href="/css/styles.css" />
-</head>
-<body>
-
- <div class="dialog-area">
- <c:if test="${!empty it.errorMsg}"><div class="dialog-form-message">${it.errorMsg}</div></c:if>
- <form class="dialog-form" action="" method="post">
- <input type="hidden" name="response_type" value="${it.responseType}">
- <input type="hidden" name="client_id" value="${it.clientId}">
- <input type="hidden" name="redirect_uri" value="${it.redirectUri}">
- <input type="hidden" name="scope" value="${it.scope}">
- <input type="hidden" name="state" value="${it.state}">
- <fieldset>
- <p>
- <label for="username">Username</label>
- </p>
- <p>
- <input class="text_field" id="username" name="username" type="text" />
- </p>
- <p>
- <label for="password">Password</label>
- </p>
- <p>
- <input class="text_field" id="password" name="password" type="password" />
- </p>
- <p class="buttons">
- <button type="submit">Submit</button>
- </p>
- </fieldset>
- </form>
- </div>
-
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/ManagementResource/error.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/ManagementResource/error.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/ManagementResource/error.jsp
deleted file mode 100644
index 8ab321f..0000000
--- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/ManagementResource/error.jsp
+++ /dev/null
@@ -1,17 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
-<%@ page import="org.apache.usergrid.rest.AbstractContextResource"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Error</title>
- <link rel="stylesheet" type="text/css" href="/css/styles.css" />
-</head>
-<body>
-
- <p>An error occurred <c:out value="${it}"/>.</p>
-
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/organizations/OrganizationResource/activate.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/organizations/OrganizationResource/activate.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/organizations/OrganizationResource/activate.jsp
deleted file mode 100644
index 1f3b094..0000000
--- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/organizations/OrganizationResource/activate.jsp
+++ /dev/null
@@ -1,16 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Activate Organization</title>
- <link rel="stylesheet" type="text/css" href="/css/styles.css" />
-</head>
-<body>
-
- <p>Your organization <c:out value="${it.organization.name}"/> has been successfully activated.</p>
-
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/organizations/OrganizationResource/confirm.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/organizations/OrganizationResource/confirm.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/organizations/OrganizationResource/confirm.jsp
deleted file mode 100644
index e014523..0000000
--- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/organizations/OrganizationResource/confirm.jsp
+++ /dev/null
@@ -1,17 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Confirm Organization</title>
- <link rel="stylesheet" type="text/css" href="/css/styles.css" />
-</head>
-<body>
-
- <p>Your organization <c:out value="${it.organization.name}"/> has been successfully confirmed.
- You will received an email soon to let you know when you organization has been activated</p>
-
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/organizations/OrganizationResource/error.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/organizations/OrganizationResource/error.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/organizations/OrganizationResource/error.jsp
deleted file mode 100644
index 8ab321f..0000000
--- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/organizations/OrganizationResource/error.jsp
+++ /dev/null
@@ -1,17 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
-<%@ page import="org.apache.usergrid.rest.AbstractContextResource"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Error</title>
- <link rel="stylesheet" type="text/css" href="/css/styles.css" />
-</head>
-<body>
-
- <p>An error occurred <c:out value="${it}"/>.</p>
-
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/activate.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/activate.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/activate.jsp
deleted file mode 100644
index 41d990d..0000000
--- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/activate.jsp
+++ /dev/null
@@ -1,16 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Activate User</title>
- <link rel="stylesheet" type="text/css" href="/css/styles.css" />
-</head>
-<body>
-
- <p>Your account with email address <c:out value="${it.user.email}"/> has been successfully activated.</p>
-
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/confirm.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/confirm.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/confirm.jsp
deleted file mode 100644
index 6f775a5..0000000
--- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/confirm.jsp
+++ /dev/null
@@ -1,17 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Confirm User</title>
- <link rel="stylesheet" type="text/css" href="/css/styles.css" />
-</head>
-<body>
-
- <p>Your account with email address <c:out value="${it.user.email}"/> has been successfully confirmed.
- You will received an email soon to let you know when you account has been activated</p>
-
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/error.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/error.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/error.jsp
deleted file mode 100644
index 8ab321f..0000000
--- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/error.jsp
+++ /dev/null
@@ -1,17 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
-<%@ page import="org.apache.usergrid.rest.AbstractContextResource"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Error</title>
- <link rel="stylesheet" type="text/css" href="/css/styles.css" />
-</head>
-<body>
-
- <p>An error occurred <c:out value="${it}"/>.</p>
-
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/resetpw_email_form.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/resetpw_email_form.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/resetpw_email_form.jsp
deleted file mode 100644
index 711c23a..0000000
--- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/resetpw_email_form.jsp
+++ /dev/null
@@ -1,31 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>Reset Password</title>
-<link rel="stylesheet" type="text/css" href="/css/styles.css" />
-</head>
-<body>
- <div class="dialog-area password-reset-form">
- <c:if test="${!empty it.errorMsg}">
- <div class="dialog-form-message">${it.errorMsg}</div>
- </c:if>
- <form class="dialog-form" action="" method="post">
- <fieldset>
- <p>
- Enter the captcha to have your password reset instructions sent to
- <c:out value="${it.user.email}" />
- </p>
- <p id="human-proof"></p>
- ${it.reCaptchaHtml}
- <p class="buttons">
- <input type="submit" value="submit" />
- </p>
- </fieldset>
- </form>
- </div>
-</body>
-</html>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/resetpw_email_success.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/resetpw_email_success.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/resetpw_email_success.jsp
deleted file mode 100644
index bed809e..0000000
--- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/resetpw_email_success.jsp
+++ /dev/null
@@ -1,19 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
-<%@ page import="net.tanesha.recaptcha.ReCaptcha"%>
-<%@ page import="net.tanesha.recaptcha.ReCaptchaFactory"%>
-<%@ page import="org.apache.usergrid.rest.AbstractContextResource"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Reset Password</title>
- <link rel="stylesheet" type="text/css" href="/css/styles.css" />
-</head>
-<body>
-
- <p>Email with instructions for password reset sent to <c:out value="${it.user.email}"/></p>
-
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/resetpw_set_form.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/resetpw_set_form.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/resetpw_set_form.jsp
deleted file mode 100644
index bf95b92..0000000
--- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/resetpw_set_form.jsp
+++ /dev/null
@@ -1,41 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
-<%@ page import="net.tanesha.recaptcha.ReCaptcha"%>
-<%@ page import="net.tanesha.recaptcha.ReCaptchaFactory"%>
-<%@ page import="org.apache.usergrid.rest.AbstractContextResource"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Reset Password</title>
- <link rel="stylesheet" type="text/css" href="/css/styles.css" />
-</head>
-<body>
-
- <div class="dialog-area">
- <c:if test="${!empty it.errorMsg}"><div class="dialog-form-message">${it.errorMsg}</div></c:if>
- <form class="dialog-form" action="" method="post">
- <input type="hidden" name="token" value="${it.token}">
- <fieldset>
- <p>
- <label for="password1">Please enter your new password for <c:out value="${it.user.email}"/>.</label>
- </p>
- <p>
- <input class="text_field" id="password1" name="password1" type="password" />
- </p>
- <p>
- <label for="password2">Enter your new password again to confirm.</label>
- </p>
- <p>
- <input class="text_field" id="password2" name="password2" type="password" />
- </p>
- <p class="buttons">
- <button type="submit">Submit</button>
- </p>
- </fieldset>
- </form>
- </div>
-
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/resetpw_set_success.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/resetpw_set_success.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/resetpw_set_success.jsp
deleted file mode 100644
index 9cedcaf..0000000
--- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UserResource/resetpw_set_success.jsp
+++ /dev/null
@@ -1,19 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
-<%@ page import="net.tanesha.recaptcha.ReCaptcha"%>
-<%@ page import="net.tanesha.recaptcha.ReCaptchaFactory"%>
-<%@ page import="org.apache.usergrid.rest.AbstractContextResource"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Reset Password</title>
- <link rel="stylesheet" type="text/css" href="/css/styles.css" />
-</head>
-<body>
-
- <p>New password set for <c:out value="${it.user.email}"/></p>
-
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UsersResource/error.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UsersResource/error.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UsersResource/error.jsp
deleted file mode 100644
index 8ab321f..0000000
--- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UsersResource/error.jsp
+++ /dev/null
@@ -1,17 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
-<%@ page import="org.apache.usergrid.rest.AbstractContextResource"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Error</title>
- <link rel="stylesheet" type="text/css" href="/css/styles.css" />
-</head>
-<body>
-
- <p>An error occurred <c:out value="${it}"/>.</p>
-
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UsersResource/resetpw_email_form.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UsersResource/resetpw_email_form.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UsersResource/resetpw_email_form.jsp
deleted file mode 100644
index 5558c37..0000000
--- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UsersResource/resetpw_email_form.jsp
+++ /dev/null
@@ -1,34 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Reset Password</title>
- <link rel="stylesheet" type="text/css" href="/css/styles.css" />
-</head>
-<body>
-
- <div class="dialog-area">
- <c:if test="${!empty it.errorMsg}"><div class="dialog-form-message">${it.errorMsg}</div></c:if>
- <form class="dialog-form" action="" method="post">
- <fieldset>
- <p>
- <label for="email">Please type your <strong>email
- address</strong> or <strong>username</strong> below.</label>
- </p>
- <p>
- <input class="text_field" id="email" name="email" type="text" />
- </p>
- <p id="human-proof"></p>
- ${it.reCaptchaHtml}
- <p class="buttons">
- <button type="submit">Submit</button>
- </p>
- </fieldset>
- </form>
- </div>
-
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UsersResource/resetpw_email_success.jsp
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UsersResource/resetpw_email_success.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UsersResource/resetpw_email_success.jsp
deleted file mode 100644
index bed809e..0000000
--- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/usergrid/rest/management/users/UsersResource/resetpw_email_success.jsp
+++ /dev/null
@@ -1,19 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
-<%@ page import="net.tanesha.recaptcha.ReCaptcha"%>
-<%@ page import="net.tanesha.recaptcha.ReCaptchaFactory"%>
-<%@ page import="org.apache.usergrid.rest.AbstractContextResource"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Reset Password</title>
- <link rel="stylesheet" type="text/css" href="/css/styles.css" />
-</head>
-<body>
-
- <p>Email with instructions for password reset sent to <c:out value="${it.user.email}"/></p>
-
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/test/java/org/apache/usergrid/rest/AbstractRestIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/AbstractRestIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/AbstractRestIT.java
index 7a59053..a5f82d8 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/AbstractRestIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/AbstractRestIT.java
@@ -28,6 +28,7 @@ import javax.ws.rs.core.UriBuilder;
import org.apache.usergrid.cassandra.Concurrent;
import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.ClassRule;
@@ -53,7 +54,7 @@ import static org.junit.Assert.assertTrue;
/**
* Base class for testing Usergrid Jersey-based REST API. Implementations should model the paths mapped, not the method
- * names. For example, to org.apache.usergrid.test the the "password" mapping on applications.users.UserResource for a PUT method, the org.apache.usergrid.test
+ * names. For example, to test the the "password" mapping on applications.users.UserResource for a PUT method, the test
* method(s) should following the following naming convention: test_[HTTP verb]_[action mapping]_[ok|fail][_[specific
* failure condition if multiple]
*/
@@ -62,7 +63,6 @@ public abstract class AbstractRestIT extends JerseyTest {
private static final Logger LOG = LoggerFactory.getLogger( AbstractRestIT.class );
private static boolean usersSetup = false;
-
private static ClientConfig clientConfig = new DefaultClientConfig();
protected static String access_token;
@@ -78,10 +78,13 @@ public abstract class AbstractRestIT extends JerseyTest {
private static final URI baseURI = setup.getBaseURI();
+ protected static ObjectMapper mapper = new ObjectMapper();
+
static {
clientConfig.getFeatures().put( JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE );
- descriptor = new WebAppDescriptor.Builder( "org.apache.usergrid.rest" ).clientConfig( clientConfig ).build();
+ descriptor = new WebAppDescriptor.Builder(
+ "org.apache.usergrid.rest" ).clientConfig( clientConfig ).build();
dumpClasspath( AbstractRestIT.class.getClassLoader() );
}
@@ -145,16 +148,17 @@ public abstract class AbstractRestIT extends JerseyTest {
// TODO T.N. This is a filthy hack and I should be ashamed of it (which
// I am). There's a bug in the grizzly server when it's restarted per
- // org.apache.usergrid.test, and until we can upgrade versions this is the workaround. Backs
+ // test, and until we can upgrade versions this is the workaround. Backs
// off with each attempt to allow the server to catch up
setUserPassword( "ed@anuff.com", "sesame" );
- client = new Client( "org.apache.usergrid.test-organization", "org.apache.usergrid.test-app" ).withApiUrl(
+ client = new Client( "test-organization", "test-app" ).withApiUrl(
UriBuilder.fromUri( "http://localhost/" ).port( setup.getTomcatPort() ).build().toString() );
- org.apache.usergrid.java.client.response.ApiResponse response = client.authorizeAppUser( "ed@anuff.com", "sesame" );
+ org.apache.usergrid.java.client.response.ApiResponse response =
+ client.authorizeAppUser( "ed@anuff.com", "sesame" );
assertTrue( response != null && response.getError() == null );
}
@@ -186,9 +190,12 @@ public abstract class AbstractRestIT extends JerseyTest {
setUserPassword( "ed@anuff.com", "sesame" );
- JsonNode node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/token" ).queryParam( "grant_type", "password" )
- .queryParam( "username", name ).queryParam( "password", password ).accept( MediaType.APPLICATION_JSON )
- .get( JsonNode.class );
+ JsonNode node = mapper.valueToTree(resource().path( "/test-organization/test-app/token" )
+ .queryParam( "grant_type", "password" )
+ .queryParam( "username", name )
+ .queryParam( "password", password )
+ .accept( MediaType.APPLICATION_JSON )
+ .get( HashMap.class ));
String userToken = node.get( "access_token" ).asText();
LOG.info( "returning user token: {}", userToken );
@@ -198,10 +205,14 @@ public abstract class AbstractRestIT extends JerseyTest {
public void createUser( String username, String email, String password, String name ) {
try {
- JsonNode node =
- resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/token" ).queryParam( "grant_type", "password" )
- .queryParam( "username", username ).queryParam( "password", password )
- .accept( MediaType.APPLICATION_JSON ).get( JsonNode.class );
+ HashMap map = resource().path( "/test-organization/test-app/token" )
+ .queryParam( "grant_type", "password" )
+ .queryParam( "username", username )
+ .queryParam( "password", password )
+ .accept( MediaType.APPLICATION_JSON )
+ .get( HashMap.class );
+
+ JsonNode node = mapper.valueToTree( map );
if ( getError( node ) == null ) {
return;
}
@@ -214,12 +225,17 @@ public abstract class AbstractRestIT extends JerseyTest {
Map<String, String> payload =
- hashMap( "email", email ).map( "username", username ).map( "name", name ).map( "password", password )
+ hashMap( "email", email )
+ .map( "username", username )
+ .map( "name", name )
+ .map( "password", password )
.map( "pin", "1234" );
- resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users" ).queryParam( "access_token", adminAccessToken )
- .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE )
- .post( JsonNode.class, payload );
+ resource().path( "/test-organization/test-app/users" )
+ .queryParam( "access_token", adminAccessToken )
+ .accept( MediaType.APPLICATION_JSON )
+ .type( MediaType.APPLICATION_JSON_TYPE )
+ .post( payload );
}
@@ -232,17 +248,20 @@ public abstract class AbstractRestIT extends JerseyTest {
// change the password as admin. The old password isn't required
- JsonNode node = resource().path( String.format( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/%s/password", username ) )
- .queryParam( "access_token", adminAccessToken ).accept( MediaType.APPLICATION_JSON )
- .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class, data );
+ HashMap map = resource().path( String.format( "/test-organization/test-app/users/%s/password", username ) )
+ .queryParam( "access_token", adminAccessToken )
+ .accept( MediaType.APPLICATION_JSON )
+ .type( MediaType.APPLICATION_JSON_TYPE )
+ .post( HashMap.class, data );
+ JsonNode node = mapper.valueToTree( map );
assertNull( getError( node ) );
}
- /** Acquire the management token for the org.apache.usergrid.test@usergrid.com user with the default password */
+ /** Acquire the management token for the test@usergrid.com user with the default password */
protected String adminToken() {
- adminAccessToken = mgmtToken( "org.apache.usergrid.test@usergrid.com", "org.apache.usergrid.test" );
+ adminAccessToken = mgmtToken( "test@usergrid.com", "test" );
return adminAccessToken;
}
@@ -253,12 +272,16 @@ public abstract class AbstractRestIT extends JerseyTest {
}
- /** Acquire the management token for the org.apache.usergrid.test@usergrid.com user with the given password */
+ /** Acquire the management token for the test@usergrid.com user with the given password */
protected String mgmtToken( String user, String password ) {
- JsonNode node = resource().path( "/management/token" ).queryParam( "grant_type", "password" )
- .queryParam( "username", user ).queryParam( "password", password ).accept( MediaType.APPLICATION_JSON )
- .get( JsonNode.class );
-
+ HashMap map = resource().path( "/management/token" )
+ .queryParam( "grant_type", "password" )
+ .queryParam( "username", user )
+ .queryParam( "password", password )
+ .accept( MediaType.APPLICATION_JSON )
+ .get( HashMap.class );
+
+ JsonNode node = mapper.valueToTree( map );
String mgmToken = node.get( "access_token" ).asText();
LOG.info( "got mgmt token: {}", mgmToken );
return mgmToken;
@@ -307,7 +330,7 @@ public abstract class AbstractRestIT extends JerseyTest {
/** convenience to return a ready WebResource.Builder in a single call */
protected WebResource.Builder appPath( String path ) {
- return resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/" + path ).queryParam( "access_token", access_token )
+ return resource().path( "/test-organization/test-app/" + path ).queryParam( "access_token", access_token )
.accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE );
}
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/test/java/org/apache/usergrid/rest/BasicIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/BasicIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/BasicIT.java
index 77e2ba3..5ef5f13 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/BasicIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/BasicIT.java
@@ -30,6 +30,7 @@ import org.slf4j.LoggerFactory;
import com.sun.jersey.api.client.UniformInterfaceException;
import com.sun.jersey.api.client.WebResource;
import com.sun.jersey.core.util.MultivaluedMapImpl;
+import java.util.HashMap;
import static org.apache.commons.lang.StringUtils.isNotBlank;
import static org.apache.usergrid.utils.MapUtils.hashMap;
@@ -49,7 +50,7 @@ public class BasicIT extends AbstractRestIT {
public void tryTest() {
WebResource webResource = resource();
- String json = webResource.path( "/org.apache.usergrid.test/hello" ).accept( MediaType.APPLICATION_JSON ).get( String.class );
+ String json = webResource.path( "/test/hello" ).accept( MediaType.APPLICATION_JSON ).get( String.class );
assertTrue( isNotBlank( json ) );
LOG.info( json );
@@ -66,8 +67,8 @@ public class BasicIT extends AbstractRestIT {
String token = userToken( "ed@anuff.com", "sesame" );
WebResource resource =
- resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/suspects" ).queryParam( "access_token", token );
- node = resource.accept( MediaType.APPLICATION_JSON ).post( JsonNode.class );
+ resource().path( "/test-organization/test-app/suspects" ).queryParam( "access_token", token );
+ node = mapper.valueToTree(resource.accept( MediaType.APPLICATION_JSON ).post( HashMap.class ));
String uuid = "4dadf156-c82f-4eb7-a437-3e574441c4db";
@@ -77,8 +78,8 @@ public class BasicIT extends AbstractRestIT {
Map<String, String> payload = hashMap( "hair", "brown" ).map( "sex", "male" ).map( "eyes", "green" )
.map( "name", uuid.replace( '-', '0' ) ).map( "build", "thin" ).map( "height", "6 4" );
- node = resource.queryParam( "access_token", token ).accept( MediaType.APPLICATION_JSON )
- .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class, payload );
+ node = mapper.valueToTree(resource.queryParam( "access_token", token ).accept( MediaType.APPLICATION_JSON )
+ .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class, payload ));
logNode( node );
@@ -87,8 +88,8 @@ public class BasicIT extends AbstractRestIT {
payload = hashMap( "hair", "red" ).map( "sex", "female" ).map( "eyes", "blue" ).map( "name", uuid )
.map( "build", "heavy" ).map( "height", "5 9" );
- node = resource.accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE )
- .post( JsonNode.class, payload );
+ node = mapper.valueToTree(resource.accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE )
+ .post( HashMap.class, payload ));
logNode( node );
}
@@ -100,9 +101,9 @@ public class BasicIT extends AbstractRestIT {
try {
WebResource resource = resource();
- resource.path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/foobarNonexistent" );
+ resource.path( "/test-organization/test-app/users/foobarNonexistent" );
resource.accept( MediaType.APPLICATION_JSON );
- node = resource.get( JsonNode.class );
+ node = mapper.valueToTree(resource.get( HashMap.class ));
}
catch ( UniformInterfaceException e ) {
logNode( node );
@@ -115,13 +116,13 @@ public class BasicIT extends AbstractRestIT {
public void testToken() {
JsonNode node = null;
- // org.apache.usergrid.test get token for admin user with bad password
+ // test get token for admin user with bad password
boolean err_thrown = false;
try {
- node = resource().path( "/management/token" ).queryParam( "grant_type", "password" )
- .queryParam( "username", "org.apache.usergrid.test@usergrid.com" ).queryParam( "password", "blahblah" )
- .accept( MediaType.APPLICATION_JSON ).get( JsonNode.class );
+ node = mapper.valueToTree(resource().path( "/management/token" ).queryParam( "grant_type", "password" )
+ .queryParam( "username", "test@usergrid.com" ).queryParam( "password", "blahblah" )
+ .accept( MediaType.APPLICATION_JSON ).get( HashMap.class ));
}
catch ( UniformInterfaceException e ) {
assertEquals( "Should receive a 400 Bad Request", 400, e.getResponse().getStatus() );
@@ -129,28 +130,28 @@ public class BasicIT extends AbstractRestIT {
}
assertTrue( "Error should have been thrown", err_thrown );
- // org.apache.usergrid.test get token for admin user with correct default password
+ // test get token for admin user with correct default password
String mgmtToken = adminToken();
- // org.apache.usergrid.test get admin user with token
+ // test get admin user with token
- node = resource().path( "/management/users/org.apache.usergrid.test@usergrid.com" ).queryParam( "access_token", mgmtToken )
- .accept( MediaType.APPLICATION_JSON ).get( JsonNode.class );
+ node = mapper.valueToTree(resource().path( "/management/users/test@usergrid.com" ).queryParam( "access_token", mgmtToken )
+ .accept( MediaType.APPLICATION_JSON ).get( HashMap.class ));
logNode( node );
assertEquals( "Test User",
- node.get( "data" ).get( "organizations" ).get( "org.apache.usergrid.test-organization" ).get( "users" ).get( "org.apache.usergrid.test" )
+ node.get( "data" ).get( "organizations" ).get( "test-organization" ).get( "users" ).get( "test" )
.get( "name" ).asText() );
- // org.apache.usergrid.test login user with incorrect password
+ // test login user with incorrect password
err_thrown = false;
try {
- node = resource().path( "/org.apache.usergrid.test-app/token" ).queryParam( "grant_type", "password" )
+ node = mapper.valueToTree(resource().path( "/test-app/token" ).queryParam( "grant_type", "password" )
.queryParam( "username", "ed@anuff.com" ).queryParam( "password", "blahblah" )
- .accept( MediaType.APPLICATION_JSON ).get( JsonNode.class );
+ .accept( MediaType.APPLICATION_JSON ).get( HashMap.class ));
}
catch ( UniformInterfaceException e ) {
assertEquals( "Should receive a 400 Bad Request", 400, e.getResponse().getStatus() );
@@ -158,13 +159,13 @@ public class BasicIT extends AbstractRestIT {
}
assertTrue( "Error should have been thrown", err_thrown );
- // org.apache.usergrid.test login user with incorrect pin
+ // test login user with incorrect pin
err_thrown = false;
try {
- node = resource().path( "/org.apache.usergrid.test-app/token" ).queryParam( "grant_type", "pin" )
+ node = mapper.valueToTree(resource().path( "/test-app/token" ).queryParam( "grant_type", "pin" )
.queryParam( "username", "ed@anuff.com" ).queryParam( "pin", "4321" )
- .accept( MediaType.APPLICATION_JSON ).get( JsonNode.class );
+ .accept( MediaType.APPLICATION_JSON ).get( HashMap.class ));
}
catch ( UniformInterfaceException e ) {
assertEquals( "Should receive a 400 Bad Request", 400, e.getResponse().getStatus() );
@@ -172,24 +173,24 @@ public class BasicIT extends AbstractRestIT {
}
assertTrue( "Error should have been thrown", err_thrown );
- // org.apache.usergrid.test login user with correct password
+ // test login user with correct password
- node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/token" ).queryParam( "grant_type", "password" )
+ node = mapper.valueToTree(resource().path( "/test-organization/test-app/token" ).queryParam( "grant_type", "password" )
.queryParam( "username", "ed@anuff.com" ).queryParam( "password", "sesame" )
- .accept( MediaType.APPLICATION_JSON ).get( JsonNode.class );
+ .accept( MediaType.APPLICATION_JSON ).get( HashMap.class ));
logNode( node );
String user_access_token = node.get( "access_token" ).asText();
assertTrue( isNotBlank( user_access_token ) );
- // org.apache.usergrid.test get app user collection with insufficient permissions
+ // test get app user collection with insufficient permissions
err_thrown = false;
try {
- node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users" )
+ node = mapper.valueToTree(resource().path( "/test-organization/test-app/users" )
.queryParam( "access_token", user_access_token ).accept( MediaType.APPLICATION_JSON )
- .get( JsonNode.class );
+ .get( HashMap.class ));
}
catch ( UniformInterfaceException e ) {
if ( e.getResponse().getStatus() != 401 ) {
@@ -199,21 +200,21 @@ public class BasicIT extends AbstractRestIT {
}
// assertTrue("Error should have been thrown", err_thrown);
- // org.apache.usergrid.test get app user with sufficient permissions
+ // test get app user with sufficient permissions
- node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/edanuff" )
+ node = mapper.valueToTree(resource().path( "/test-organization/test-app/users/edanuff" )
.queryParam( "access_token", user_access_token ).accept( MediaType.APPLICATION_JSON )
- .get( JsonNode.class );
+ .get( HashMap.class ));
logNode( node );
assertEquals( 1, node.get( "entities" ).size() );
- // org.apache.usergrid.test get app user collection with bad token
+ // test get app user collection with bad token
err_thrown = false;
try {
- node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users" ).queryParam( "access_token", "blahblahblah" )
- .accept( MediaType.APPLICATION_JSON ).get( JsonNode.class );
+ node = mapper.valueToTree(resource().path( "/test-organization/test-app/users" ).queryParam( "access_token", "blahblahblah" )
+ .accept( MediaType.APPLICATION_JSON ).get( HashMap.class ));
}
catch ( UniformInterfaceException e ) {
if ( e.getResponse().getStatus() != 401 ) {
@@ -223,12 +224,12 @@ public class BasicIT extends AbstractRestIT {
}
assertTrue( "Error should have been thrown", err_thrown );
- // org.apache.usergrid.test get app user collection with no token
+ // test get app user collection with no token
err_thrown = false;
try {
- node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users" ).accept( MediaType.APPLICATION_JSON )
- .get( JsonNode.class );
+ node = mapper.valueToTree(resource().path( "/test-organization/test-app/users" ).accept( MediaType.APPLICATION_JSON )
+ .get( HashMap.class ));
}
catch ( UniformInterfaceException e ) {
assertEquals( "Should receive a 401 Unauthorized", 401, e.getResponse().getStatus() );
@@ -236,70 +237,70 @@ public class BasicIT extends AbstractRestIT {
}
assertTrue( "Error should have been thrown", err_thrown );
- // org.apache.usergrid.test login app user with pin
+ // test login app user with pin
- node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/token" ).queryParam( "grant_type", "pin" )
+ node = mapper.valueToTree(resource().path( "/test-organization/test-app/token" ).queryParam( "grant_type", "pin" )
.queryParam( "username", "ed@anuff.com" ).queryParam( "pin", "1234" )
- .accept( MediaType.APPLICATION_JSON ).get( JsonNode.class );
+ .accept( MediaType.APPLICATION_JSON ).get( HashMap.class ));
logNode( node );
user_access_token = node.get( "access_token" ).asText();
assertTrue( isNotBlank( user_access_token ) );
- // org.apache.usergrid.test set app user pin
+ // test set app user pin
MultivaluedMap<String, String> formData = new MultivaluedMapImpl();
formData.add( "pin", "5678" );
- node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/ed@anuff.com/setpin" )
+ node = mapper.valueToTree(resource().path( "/test-organization/test-app/users/ed@anuff.com/setpin" )
.queryParam( "access_token", user_access_token ).type( "application/x-www-form-urlencoded" )
- .post( JsonNode.class, formData );
+ .post( HashMap.class, formData ));
- node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/token" ).queryParam( "grant_type", "pin" )
+ node = mapper.valueToTree(resource().path( "/test-organization/test-app/token" ).queryParam( "grant_type", "pin" )
.queryParam( "username", "ed@anuff.com" ).queryParam( "pin", "5678" )
- .accept( MediaType.APPLICATION_JSON ).get( JsonNode.class );
+ .accept( MediaType.APPLICATION_JSON ).get( HashMap.class ));
logNode( node );
user_access_token = node.get( "access_token" ).asText();
assertTrue( isNotBlank( user_access_token ) );
- // org.apache.usergrid.test user org.apache.usergrid.test extension resource
+ // test user test extension resource
- node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/ed@anuff.com/org.apache.usergrid.test" ).get( JsonNode.class );
+ node = mapper.valueToTree(resource().path( "/test-organization/test-app/users/ed@anuff.com/test" ).get( HashMap.class ));
logNode( node );
- // org.apache.usergrid.test create user with guest permissions (no token)
+ // test create user with guest permissions (no token)
Map<String, String> payload =
hashMap( "email", "ed.anuff@gmail.com" ).map( "username", "ed.anuff" ).map( "name", "Ed Anuff" )
.map( "password", "sesame" ).map( "pin", "1234" );
- node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users" ).accept( MediaType.APPLICATION_JSON )
- .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class, payload );
+ node = mapper.valueToTree(resource().path( "/test-organization/test-app/users" ).accept( MediaType.APPLICATION_JSON )
+ .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class, payload ));
logNode( node );
assertEquals( "ed.anuff", node.get( "entities" ).get( 0 ).get( "username" ).asText() );
- // org.apache.usergrid.test create device with guest permissions (no token)
+ // test create device with guest permissions (no token)
payload = hashMap( "foo", "bar" );
- node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/devices/" + UUID.randomUUID() )
+ node = mapper.valueToTree(resource().path( "/test-organization/test-app/devices/" + UUID.randomUUID() )
.accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE )
- .put( JsonNode.class, payload );
+ .put( HashMap.class, payload ));
logNode( node );
- // org.apache.usergrid.test create entity with guest permissions (no token), should fail
+ // test create entity with guest permissions (no token), should fail
payload = hashMap( "foo", "bar" );
err_thrown = false;
try {
- node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/items" ).accept( MediaType.APPLICATION_JSON )
- .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class, payload );
+ node = mapper.valueToTree(resource().path( "/test-organization/test-app/items" ).accept( MediaType.APPLICATION_JSON )
+ .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class, payload ));
}
catch ( UniformInterfaceException e ) {
assertEquals( "Should receive a 401 Unauthorized", 401, e.getResponse().getStatus() );
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/test/java/org/apache/usergrid/rest/TestContextSetup.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/TestContextSetup.java b/stack/rest/src/test/java/org/apache/usergrid/rest/TestContextSetup.java
index 3abaadd..e11cd47 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/TestContextSetup.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/TestContextSetup.java
@@ -12,7 +12,7 @@ import com.sun.jersey.test.framework.JerseyTest;
/**
* A self configuring TestContext which sets itself up it implements TestRule. With a @Rule annotation, an instance of
- * this Class as a public member in any org.apache.usergrid.test class or abstract org.apache.usergrid.test class will auto svcSetup itself before each org.apache.usergrid.test.
+ * this Class as a public member in any test class or abstract test class will auto svcSetup itself before each test.
*/
public class TestContextSetup extends TestContext implements TestRule {
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationRequestCounterIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationRequestCounterIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationRequestCounterIT.java
index 9c887c1..a9aa6dc 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationRequestCounterIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationRequestCounterIT.java
@@ -29,6 +29,7 @@ import org.apache.usergrid.rest.AbstractRestIT;
import org.apache.usergrid.services.ServiceManager;
import org.apache.usergrid.utils.UUIDUtils;
import com.fasterxml.jackson.databind.JsonNode;
+import java.util.HashMap;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -51,8 +52,8 @@ public class ApplicationRequestCounterIT extends AbstractRestIT {
@Test
public void applicationrequestInternalCounters() throws Exception {
// Get application id
- JsonNode node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app" ).queryParam( "access_token", access_token )
- .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+ JsonNode node = mapper.valueToTree(resource().path( "/test-organization/test-app" ).queryParam( "access_token", access_token )
+ .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
assertNotNull( node.get( "entities" ) );
@@ -67,9 +68,9 @@ public class ApplicationRequestCounterIT extends AbstractRestIT {
int beforeCall = getCounter( em, ServiceManager.APPLICATION_REQUESTS_PER.concat( "get" ) );
// call
- node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/counters" ).queryParam( "resolution", "all" )
+ node = mapper.valueToTree(resource().path( "/test-organization/test-app/counters" ).queryParam( "resolution", "all" )
.queryParam( "counter", "application.requests" ).queryParam( "access_token", adminToken() )
- .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+ .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
assertNotNull( node.get( "counters" ) );