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

com.covisint.platform.oauth.client.granttype.certificate.CertificateGrantTypeClient Maven / Gradle / Ivy

/* 
 * Copyright 2015 Covisint
 * 
 * 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.covisint.platform.oauth.client.granttype.certificate;

import java.util.List;

import org.apache.http.protocol.HttpContext;

import com.covisint.core.http.service.client.ResourceClient;
import com.covisint.core.http.service.core.Page;
import com.covisint.core.http.service.core.ServiceException;
import com.covisint.core.http.service.core.SortCriteria;
import com.covisint.core.support.constraint.Nonnull;
import com.covisint.core.support.constraint.NotEmpty;
import com.covisint.platform.oauth.core.domain.CertificateGrantType;
import com.google.common.collect.Multimap;
import com.google.common.util.concurrent.CheckedFuture;

/** Client for reading and updating information about CertificateGrantType. */
public interface CertificateGrantTypeClient extends ResourceClient {

    /**
     * Retrieves certificate grant for a subject.
     * 
     * @param subjectId The subject id.
     * @param grantTypeId The grant type id.
     * @param httpContext The http context.
     * @return The certificate grant type.
     */
    @Nonnull CheckedFuture get(@Nonnull @NotEmpty String subjectId,
            @Nonnull @NotEmpty String grantTypeId, @Nonnull HttpContext httpContext);

    /**
     * Search for grant types based on the passed search criteria for a subject.
     * 
     * @param subjectId The subject id.
     * @param searchCriteria search information about the query
     * @param sortCriteria sort information about the query
     * @param page The page of data to retrieve.
     * @param httpContext the HTTP Context containing session-level data
     * 
     * @return all matching resources found in the system
     */
    @Nonnull CheckedFuture, ServiceException> search(@Nonnull @NotEmpty String subjectId,
            @Nonnull Multimap searchCriteria, @Nonnull SortCriteria sortCriteria, @Nonnull Page page,
            @Nonnull HttpContext httpContext);

    /**
     * create the certificate grant for a subject.
     * 
     * @param subjectId The subject id.
     * @param certificateGrantType The certificate grant type resource.
     * @param httpContext The http context.
     * @return The certificate grant.
     */
    @Nonnull CheckedFuture add(@Nonnull @NotEmpty String subjectId,
            @Nonnull CertificateGrantType certificateGrantType, @Nonnull HttpContext httpContext);

    /**
     * Deletes the certificate grant for a subject.
     * 
     * @param subjectId The subject id.
     * @param grantTypeId The grant type id.
     * @param httpContext The http context.
     * @return The certificate grant.
     */
    @Nonnull CheckedFuture delete(@Nonnull @NotEmpty String subjectId,
            @Nonnull @NotEmpty String grantTypeId, @Nonnull HttpContext httpContext);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy