@Override public boolean apply(ApiMetadata api) { return ApiPredicates.viewableAs(TypeToken.of(ComputeServiceContext.class)).apply(api); } }
/** * {@inheritDoc} */ @Override public boolean apply(ProviderMetadata providerMetadata) { return ApiPredicates.contextAssignableFrom(type).apply(providerMetadata.getApiMetadata()); }
/** * Returns the first api with the provided id * * @param id * the id of the api to return * * @return the api with the given id * * @throws NoSuchElementException * whenever there are no apis with the provided id */ public static ApiMetadata withId(String id) throws NoSuchElementException { return find(all(), ApiPredicates.id(id)); }
@Override public boolean apply(ApiMetadata api) { return ApiPredicates.viewableAs(TypeToken.of(BlobStoreContext.class)).apply(api); } }
/** * Returns all apis who's contexts are assignable from the parameter * * @param type * the type of the context to search for * * @return the apis with contexts assignable from given type */ public static Iterable<ApiMetadata> contextAssignableFrom(TypeToken<?> type) { return filter(all(), ApiPredicates.contextAssignableFrom(type)); }
/** * Returns the first api with the provided id * * @param id * the id of the api to return * * @return the api with the given id * * @throws NoSuchElementException * whenever there are no apis with the provided id */ public static ApiMetadata withId(String id) throws NoSuchElementException { return find(all(), ApiPredicates.id(id)); }
/** * {@inheritDoc} */ @Override public boolean apply(ProviderMetadata providerMetadata) { return ApiPredicates.viewableAs(type).apply(providerMetadata.getApiMetadata()); }
/** * {@inheritDoc} */ @Override public boolean apply(ProviderMetadata providerMetadata) { return ApiPredicates.contextAssignableFrom(type).apply(providerMetadata.getApiMetadata()); }
/** * Returns the first api with the provided id * * @param id * the id of the api to return * * @return the api with the given id * * @throws NoSuchElementException * whenever there are no apis with the provided id */ public static ApiMetadata withId(String id) throws NoSuchElementException { return find(all(), ApiPredicates.id(id)); }
/** * {@inheritDoc} */ @Override public boolean apply(ProviderMetadata providerMetadata) { return ApiPredicates.viewableAs(type).apply(providerMetadata.getApiMetadata()); }
/** * {@inheritDoc} */ @Override public boolean apply(ProviderMetadata providerMetadata) { return ApiPredicates.contextAssignableFrom(type).apply(providerMetadata.getApiMetadata()); }
/** * Returns the first api with the provided id * * @param id * the id of the api to return * * @return the api with the given id * * @throws NoSuchElementException * whenever there are no apis with the provided id */ public static ApiMetadata withId(String id) throws NoSuchElementException { return find(all(), ApiPredicates.id(id)); }
/** * {@inheritDoc} */ @Override public boolean apply(ProviderMetadata providerMetadata) { return ApiPredicates.viewableAs(type).apply(providerMetadata.getApiMetadata()); }
/** * Returns all apis who's contexts are assignable from the parameter * * @param type * the type of the context to search for * * @return the apis with contexts assignable from given type */ public static Iterable<ApiMetadata> contextAssignableFrom(TypeToken<?> type) { return filter(all(), ApiPredicates.contextAssignableFrom(type)); }
/** * Returns the first api with the provided id * * @param id * the id of the api to return * * @return the api with the given id * * @throws NoSuchElementException * whenever there are no apis with the provided id */ public static ApiMetadata withId(String id) throws NoSuchElementException { return find(all(), ApiPredicates.id(id)); }
/** * Returns all apis who's contexts are assignable from the parameter * * @param type * the type of the context to search for * * @return the apis with contexts assignable from given type */ public static Iterable<ApiMetadata> viewableAs(TypeToken<? extends View> type) { return filter(all(), ApiPredicates.viewableAs(type)); }
/** * Returns all apis who's contexts are assignable from the parameter * * @param type * the type of the context to search for * * @return the apis with contexts assignable from given type */ public static Iterable<ApiMetadata> contextAssignableFrom(TypeToken<?> type) { return filter(all(), ApiPredicates.contextAssignableFrom(type)); }
/** * Returns the first api with the provided id * * @param id * the id of the api to return * * @return the api with the given id * * @throws NoSuchElementException * whenever there are no apis with the provided id */ public static ApiMetadata withId(String id) throws NoSuchElementException { return find(all(), ApiPredicates.id(id)); }
/** * Returns all apis who's contexts are assignable from the parameter * * @param type * the type of the context to search for * * @return the apis with contexts assignable from given type */ public static Iterable<ApiMetadata> viewableAs(TypeToken<? extends View> type) { return filter(all(), ApiPredicates.viewableAs(type)); }
/** * {@inheritDoc} */ @Override public boolean apply(ProviderMetadata providerMetadata) { return ApiPredicates.contextAssignableFrom(type).apply(providerMetadata.getApiMetadata()); }