本文整理汇总了Java中com.google.api.server.spi.config.AnnotationBoolean.TRUE属性的典型用法代码示例。如果您正苦于以下问题:Java AnnotationBoolean.TRUE属性的具体用法?Java AnnotationBoolean.TRUE怎么用?Java AnnotationBoolean.TRUE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.google.api.server.spi.config.AnnotationBoolean
的用法示例。
在下文中一共展示了AnnotationBoolean.TRUE属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testValidateMethods_ignoredMethod
@Test
public void testValidateMethods_ignoredMethod() throws Exception {
final class Bean {
}
@Api
final class Endpoint {
@ApiMethod(ignored = AnnotationBoolean.TRUE)
public void thisShouldBeIgnored(Bean resource1, Bean resource2) {
}
}
ApiConfig config = configLoader.loadConfiguration(ServiceContext.create(), Endpoint.class);
// If this passes validation, then no error will be thrown. Otherwise, the validator will
// complain that the method has two resources.
validator.validate(config);
}
示例2: testLevelOverridingWithDefaultOverrides
@Test
public void testLevelOverridingWithDefaultOverrides() throws Exception {
@Api(
scopes = {"s0c", "s1c"},
audiences = {"a0c", "a1c"},
clientIds = {"c0c", "c1c"},
resource = "resource2",
useDatastoreForAdditionalConfig = AnnotationBoolean.TRUE
)
final class Test extends SimpleLevelOverridingInheritedApi {
}
ApiConfig config = createConfig(Test.class);
annotationReader.loadEndpointClass(serviceContext, Test.class, config);
annotationReader.loadEndpointMethods(serviceContext, Test.class,
config.getApiClassConfig().getMethods());
// All values overridden at a lower level, so nothing should change.
verifySimpleLevelOverriding(config);
}
示例3: setIsAbstractIfSpecified
public void setIsAbstractIfSpecified(AnnotationBoolean isAbstract) {
if (isAbstract == AnnotationBoolean.TRUE) {
config.setIsAbstract(true);
} else if (isAbstract == AnnotationBoolean.FALSE) {
config.setIsAbstract(false);
}
}
示例4: getKey
@ApiResourceProperty(ignored = AnnotationBoolean.TRUE)
public Key<SauceEntity> getKey() {
if(userKey == null || id == 0) {
return null;
}
return Key.create(userKey, SauceEntity.class, id);
}
示例5: setUseDatastoreIfSpecified
public void setUseDatastoreIfSpecified(AnnotationBoolean useDatastore) {
if (useDatastore == AnnotationBoolean.TRUE) {
config.setUseDatastore(true);
} else if (useDatastore == AnnotationBoolean.FALSE) {
config.setUseDatastore(false);
}
}
示例6: setAllowCookieAuthIfSpecified
public void setAllowCookieAuthIfSpecified(AnnotationBoolean allowCookieAuth) {
if (allowCookieAuth == AnnotationBoolean.TRUE) {
config.setAllowCookieAuth(true);
} else if (allowCookieAuth == AnnotationBoolean.FALSE) {
config.setAllowCookieAuth(false);
}
}
示例7: setApiKeyRequiredIfSpecified
public void setApiKeyRequiredIfSpecified(AnnotationBoolean apiKeyRequired) {
if (apiKeyRequired == AnnotationBoolean.TRUE) {
config.setApiKeyRequired(true);
} else if (apiKeyRequired == AnnotationBoolean.FALSE) {
config.setApiKeyRequired(false);
}
}
示例8: setIgnoredIfSpecified
public void setIgnoredIfSpecified(AnnotationBoolean ignored) {
if (ignored == AnnotationBoolean.TRUE) {
config.setIgnored(true);
} else if (ignored == AnnotationBoolean.FALSE) {
config.setIgnored(false);
}
}
示例9: testAbstract
@Test
public void testAbstract() throws Exception {
@Api(isAbstract = AnnotationBoolean.TRUE)
class Test {}
String apiConfigSource = g.generateConfig(Test.class).get("myapi-v1.api");
ObjectNode root = objectMapper.readValue(apiConfigSource, ObjectNode.class);
assertTrue(root.get("abstract").asBoolean());
}
示例10: testAbstract
@Test
public void testAbstract() throws Exception {
@Api(isAbstract = AnnotationBoolean.TRUE)
class Test {}
ApiConfig config = createConfig(Test.class);
annotationReader.loadEndpointClass(serviceContext, Test.class, config);
assertTrue(config.getIsAbstract());
}
示例11: getBar
@ApiResourceProperty(ignored = AnnotationBoolean.TRUE)
public String getBar() {
return null;
}
示例12: getUnindexedData
@ApiResourceProperty(ignored = AnnotationBoolean.TRUE)
public Map<String, Object> getUnindexedData() { return unindexedData; }
示例13: getKey
@ApiResourceProperty(ignored = AnnotationBoolean.TRUE)
public Key<SauceUser> getKey() {
return Key.create(SauceUser.class, userId);
}
示例14: setIndexedData
@ApiResourceProperty(ignored = AnnotationBoolean.TRUE)
public void setIndexedData(Map<String, Object> indexedData) { this.indexedData = indexedData; }
示例15: getIndexedData
@ApiResourceProperty(ignored = AnnotationBoolean.TRUE)
public Map<String, Object> getIndexedData(){ return indexedData; }