Examples of GxpContext


Examples of com.google.gxp.base.GxpContext

import java.util.Locale;
import com.google.gxp.base.GxpContext;

public class HtmlHelloWorldMain {
  public static void main(String[] args) throws Exception {
    GxpContext gc = new GxpContext(Locale.ENGLISH, true);
    HtmlHelloWorld.write(System.out, gc);
    System.out.println();
  }
View Full Code Here

Examples of com.google.gxp.base.GxpContext

import java.util.Locale;
import com.google.gxp.base.GxpContext;

public class HtmlHelloUserMain {
  public static void main(String[] args) throws Exception {
    GxpContext gc = new GxpContext(Locale.ENGLISH, true);
    HtmlHelloUser.write(System.out, gc, args[0]);
    System.out.println();
  }
View Full Code Here

Examples of com.google.gxp.base.GxpContext

import java.util.Locale;
import com.google.gxp.base.GxpContext;

public class HelloWorldMain {
  public static void main(String[] args) throws Exception {
    GxpContext gc = new GxpContext(Locale.ENGLISH);
    HelloWorld.write(System.out, gc);
    System.out.println();
  }
View Full Code Here

Examples of com.google.gxp.base.GxpContext

import java.util.Locale;
import com.google.gxp.base.GxpContext;

public class JsHelloUserMain {
  public static void main(String[] args) throws Exception {
    GxpContext gc = new GxpContext(Locale.ENGLISH, true);
    JsHelloUser.write(System.out, gc, args[0]);
    System.out.println();
  }
View Full Code Here

Examples of com.google.gxp.base.GxpContext

   *
   * @param message non-null but optional message to show on the page
   */
  private void doRegisterGet(HttpServletRequest req, HttpServletResponse resp, String message)
      throws IOException {
    RobotRegistrationPage.write(resp.getWriter(), new GxpContext(req.getLocale()), domain, message,
        analyticsAccount);
    resp.setContentType("text/html");
    resp.setStatus(HttpServletResponse.SC_OK);
  }
View Full Code Here

Examples of com.google.gxp.base.GxpContext

   *
   * @param robotAccount the newly registered robot account.
   */
  private void onRegisterSuccess(HttpServletRequest req, HttpServletResponse resp,
      RobotAccountData robotAccount) throws IOException {
    RobotRegistrationSuccessPage.write(resp.getWriter(), new GxpContext(req.getLocale()),
        robotAccount.getId().getAddress(), robotAccount.getConsumerSecret(), analyticsAccount);
    resp.setContentType("text/html");
    resp.setStatus(HttpServletResponse.SC_OK);
  }
View Full Code Here

Examples of com.google.gxp.base.GxpContext

   */
  private void doAuthorizeTokenGet(
      HttpServletRequest req, HttpServletResponse resp, ParticipantId user) throws IOException {
    Preconditions.checkNotNull(user, "User must be supplied");
    // Ask the user for permission.
    OAuthAuthorizeTokenPage.write(resp.getWriter(), new GxpContext(req.getLocale()),
        user.getAddress(), getOrGenerateXsrfToken(user));
    resp.setContentType(HTML_CONTENT_TYPE);
    resp.setStatus(HttpServletResponse.SC_OK);
    return;
  }
View Full Code Here

Examples of com.google.gxp.base.GxpContext

        return;
      }
      String authorizationCode = authorizedAccessor.requestToken + " "
          + authorizedAccessor.accessToken + " " + authorizedAccessor.tokenSecret;
      String base64AuthCode = CharBase64.encode(authorizationCode.getBytes());
      OAuthAuthorizationCodePage.write(resp.getWriter(), new GxpContext(req.getLocale()),
          base64AuthCode);
      resp.setContentType(HTML_CONTENT_TYPE);
      resp.setStatus(HttpServletResponse.SC_OK);
    }
  }
View Full Code Here

Examples of com.google.gxp.base.GxpContext

    String[] parts = id.getAddress().split("@");
    String username = parts[0];
    String userDomain = id.getDomain();

    try {
      WaveClientPage.write(response.getWriter(), new GxpContext(request.getLocale()),
          getSessionJson(request.getSession(false)), getClientFlags(request), websocketPresentedAddress,
          TopBar.getGxpClosure(username, userDomain), analyticsAccount);
    } catch (IOException e) {
      LOG.warning("Failed to write GXP for request " + request, e);
      response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
View Full Code Here

Examples of com.google.gxp.base.GxpContext

        String message = "The username or password you entered is incorrect.";
        String responseType = RESPONSE_STATUS_FAILED;
        LOG.info("User authentication failed: " + e.getLocalizedMessage());
        resp.setStatus(HttpServletResponse.SC_FORBIDDEN);
        resp.setContentType("text/html;charset=utf-8");
        AuthenticationPage.write(resp.getWriter(), new GxpContext(req.getLocale()), domain, message,
            responseType, isLoginPageDisabled, analyticsAccount);
        return;
      }

      subject = context.getSubject();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.