Examples of fromString()


Examples of com.comcast.cmb.common.model.CMBPolicy.fromString()

        if (isAuthenticationRequired(action)) {
       
            CMBPolicy policy = new CMBPolicy();
           
            if (queue != null) {
              policy.fromString(queue.getPolicy());
            }
           
            if (!actionMap.get(action).isActionAllowed(user, request, "CQS", policy)) {
                throw new CMBException(CMBErrorCodes.AccessDenied, "You don't have permission for " + actionMap.get(action).getName());
            }
View Full Code Here

Examples of com.dooapp.gaedo.blueprints.transformers.LiteralTransformer.fromString()

  protected boolean callMatchLiteral(Vertex currentVertex, Property finalProperty) {
    Class<?> valueClass = finalProperty.getType();
    LiteralTransformer literalTransformer = Literals.get(valueClass);
    String effectiveGraphValue = currentVertex.getProperty(GraphUtils.getEdgeNameFor(finalProperty));
    ClassLoader classLoader = expected.getClass().getClassLoader();
    ComparableType value = (ComparableType) literalTransformer.fromString(effectiveGraphValue, valueClass, classLoader, objectsBeingAccessed);
    return doCompare(value);
  }
}
View Full Code Here

Examples of com.dooapp.gaedo.properties.Property.fromString()

    Informer<?> informer = service.getInformer();
    for(Object field : informer.getAllFields()) {
      if (field instanceof Property) {
        Property property = (Property) field;
        if(valuesAsTree.containsKey(property.getName())) {
          property.set(created, property.fromString(valuesAsTree.get(property.getName()).toString()));
        }
      }
    }
    return service.create(created);
  }
View Full Code Here

Examples of com.google.api.client.json.JsonFactory.fromString()

      + "\"refresh_token\":\"tGzv3JOkF0XG5Qx2TlKWIA\","
      + "\"example_parameter\":\"example_value\"}";

  public void test() throws Exception {
    JsonFactory jsonFactory = new JacksonFactory();
    TokenResponse response = jsonFactory.fromString(JSON, TokenResponse.class);
    assertEquals("2YotnFZFEjr1zCsicMWpAA", response.getAccessToken());
    assertEquals("example", response.getTokenType());
    assertEquals(3600L, response.getExpiresInSeconds().longValue());
    assertEquals("tGzv3JOkF0XG5Qx2TlKWIA", response.getRefreshToken());
    assertEquals("example_value", response.get("example_parameter"));
View Full Code Here

Examples of com.google.api.client.json.JsonFactory.fromString()

      + "\"error_uri\":\"http://www.example.com/error\","
      + "\"error_description\":\"error description\"}";

  public void test() throws Exception {
    JsonFactory jsonFactory = new JacksonFactory();
    TokenErrorResponse response = jsonFactory.fromString(JSON, TokenErrorResponse.class);
    assertEquals("invalid_request", response.getError());
    assertEquals("http://www.example.com/error", response.getErrorUri());
    assertEquals("error description", response.getErrorDescription());
  }
}
View Full Code Here

Examples of com.google.api.client.json.jackson.JacksonFactory.fromString()

      + "\"refresh_token\":\"tGzv3JOkF0XG5Qx2TlKWIA\","
      + "\"example_parameter\":\"example_value\"}";

  public void test() throws Exception {
    JsonFactory jsonFactory = new JacksonFactory();
    TokenResponse response = jsonFactory.fromString(JSON, TokenResponse.class);
    assertEquals("2YotnFZFEjr1zCsicMWpAA", response.getAccessToken());
    assertEquals("example", response.getTokenType());
    assertEquals(3600L, response.getExpiresInSeconds().longValue());
    assertEquals("tGzv3JOkF0XG5Qx2TlKWIA", response.getRefreshToken());
    assertEquals("example_value", response.get("example_parameter"));
View Full Code Here

Examples of com.google.api.client.json.jackson.JacksonFactory.fromString()

      + "\"error_uri\":\"http://www.example.com/error\","
      + "\"error_description\":\"error description\"}";

  public void test() throws Exception {
    JsonFactory jsonFactory = new JacksonFactory();
    TokenErrorResponse response = jsonFactory.fromString(JSON, TokenErrorResponse.class);
    assertEquals("invalid_request", response.getError());
    assertEquals("http://www.example.com/error", response.getErrorUri());
    assertEquals("error description", response.getErrorDescription());
  }
}
View Full Code Here

Examples of com.google.gwt.i18n.server.GwtLocaleFactoryImpl.fromString()

    TreeLogger logger = new FailErrorLogger();
    TypeOracle oracle = TypeOracleTestingUtils.buildStandardTypeOracleWith(
        logger, LOCALIZABLE, TEST, TEST_IW);
    JClassType test = oracle.findType("foo.Test");
    GwtLocaleFactory factory = new GwtLocaleFactoryImpl();
    GwtLocale locale = factory.fromString("he");
    String implClass = llc.linkWithImplClass(logger, test, locale);
    assertEquals("foo.Test_iw", implClass);
    oracle = TypeOracleTestingUtils.buildStandardTypeOracleWith(
        logger, LOCALIZABLE, TEST, TEST_HE);
    test = oracle.findType("foo.Test");
View Full Code Here

Examples of com.google.gwt.i18n.shared.GwtLocaleFactory.fromString()

    TreeLogger logger = new FailErrorLogger();
    TypeOracle oracle = TypeOracleTestingUtils.buildStandardTypeOracleWith(
        logger, LOCALIZABLE, TEST, TEST_IW);
    JClassType test = oracle.findType("foo.Test");
    GwtLocaleFactory factory = new GwtLocaleFactoryImpl();
    GwtLocale locale = factory.fromString("he");
    String implClass = llc.linkWithImplClass(logger, test, locale);
    assertEquals("foo.Test_iw", implClass);
    oracle = TypeOracleTestingUtils.buildStandardTypeOracleWith(
        logger, LOCALIZABLE, TEST, TEST_HE);
    test = oracle.findType("foo.Test");
View Full Code Here

Examples of com.impetus.kundera.property.PropertyAccessor.fromString()

                                paramValue =
                                    JAXBUtils.toObject(StreamUtils.toInputStream(value), paramClass, mediaType);

                            } else {
                                PropertyAccessor accessor = PropertyAccessorFactory.getPropertyAccessor(paramClass);
                                paramValue = accessor.fromString(paramClass, value);
                            }

                            q.setParameter(Integer.parseInt(paramName), paramValue);
                            break;
                        }
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.