All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.stormpath.sdk.api.ApiKeys Maven / Gradle / Ivy

Go to download

The Stormpath Java SDK API .jar provides a Java API that your code can use to make calls to the Stormpath API. This .jar is the only compile-time dependency within the Stormpath SDK project that your code should depend on. Implementations of this API (implementation .jars) should be runtime dependencies only.

The newest version!
/*
 * Copyright 2014 Stormpath, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.stormpath.sdk.api;

import com.stormpath.sdk.lang.Classes;

/**
 * Static utility/helper methods for working with {@link ApiKey} resources.  Most methods are
 * factory methods used for forming
 * ApiKey-specific fluent DSL queries. for example:
 * 
 * ApiKeys.criteria()
 *     .offsetBy(50)
 *     .limitTo(25)
 *     .withTenant()
 *     .withAccount();
 * 
* or, if using static imports: *
 * import static com.stormpath.sdk.api.ApiKeys.*;
 *
 * ...
 *
 *  criteria()
 *     .offsetBy(50)
 *     .limitTo(25)
 *     .withTenant()
 *     .withAccount();
 * 
* * This class can also be used for working with {@link com.stormpath.sdk.client.ApiKey} resources. For example: *
 * ApiKeys.builder()
 *     .setFileLocation(path)
 *     .build();
 * 
* * @since 1.0.RC */ @SuppressWarnings("unchecked") public final class ApiKeys { /** * Returns a new {@link ApiKeyOptions} instance, used to customize how one or more {@link ApiKey}s are retrieved. * * @return a new {@link ApiKeyOptions} instance, used to customize how one or more {@link ApiKey}s are retrieved. */ public static ApiKeyOptions options() { return (ApiKeyOptions) Classes.newInstance("com.stormpath.sdk.impl.api.DefaultApiKeyOptions"); } /** * Returns a new {@link ApiKeyCriteria} instance to use to formulate an ApiKey query. *

* For example: *

     * ApiKeyCriteria criteria = ApiKeys.criteria()
     *     .offsetBy(50)
     *     .limitTo(25)
     *     .withTenant()
     *     .withAccount();
     * 
* * @return a new {@link ApiKeyCriteria} instance to use to formulate an ApiKey query. */ public static ApiKeyCriteria criteria() { return (ApiKeyCriteria) Classes.newInstance("com.stormpath.sdk.impl.api.DefaultApiKeyCriteria"); } /** * Returns a new {@link ApiKeyBuilder} instance, used to construct {@link ApiKey} instances to authenticate the calls to Stormpath. * * @return a new {@link ApiKeyBuilder} instance, used to construct {@link ApiKey} instances to authenticate the calls to Stormpath. */ public static ApiKeyBuilder builder() { return (ApiKeyBuilder) Classes.newInstance("com.stormpath.sdk.impl.api.ClientApiKeyBuilder"); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy