001/* 002 * Copyright 2011-2016 UnboundID Corp. 003 * 004 * This program is free software; you can redistribute it and/or modify 005 * it under the terms of the GNU General Public License (GPLv2 only) 006 * or the terms of the GNU Lesser General Public License (LGPLv2.1 only) 007 * as published by the Free Software Foundation. 008 * 009 * This program is distributed in the hope that it will be useful, 010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 012 * GNU General Public License for more details. 013 * 014 * You should have received a copy of the GNU General Public License 015 * along with this program; if not, see <http://www.gnu.org/licenses>. 016 */ 017 018package com.unboundid.scim.sdk; 019 020import com.unboundid.scim.schema.ResourceDescriptor; 021 022import javax.servlet.http.HttpServletRequest; 023import java.net.URI; 024 025 026 027/** 028 * This class is the base class for SCIM requests that return resources in the 029 * response. 030 */ 031public class ResourceReturningRequest extends SCIMRequest 032{ 033 /** 034 * The set of requested attributes. 035 */ 036 private final SCIMQueryAttributes attributes; 037 038 039 040 /** 041 * Create a new SCIM request from the provided information. 042 * 043 * @param baseURL The base URL for the SCIM service. 044 * @param authenticatedUserID The authenticated user name or {@code null} if 045 * the request is not authenticated. 046 * @param resourceDescriptor The ResourceDescriptor associated with this 047 * request. 048 * @param attributes The set of requested attributes. 049 */ 050 public ResourceReturningRequest(final URI baseURL, 051 final String authenticatedUserID, 052 final ResourceDescriptor resourceDescriptor, 053 final SCIMQueryAttributes attributes) 054 { 055 super(baseURL, authenticatedUserID, resourceDescriptor); 056 this.attributes = attributes; 057 } 058 059 060 061 /** 062 * Create a new SCIM request from the provided information. 063 * 064 * @param baseURL The base URL for the SCIM service. 065 * @param authenticatedUserID The authenticated user name or {@code null} if 066 * the request is not authenticated. 067 * @param resourceDescriptor The ResourceDescriptor associated with this 068 * request. 069 * @param attributes The set of requested attributes. 070 * @param httpServletRequest The HTTP servlet request associated with this 071 * request or {@code null} if this request is not 072 * initiated by a servlet. 073 */ 074 public ResourceReturningRequest(final URI baseURL, 075 final String authenticatedUserID, 076 final ResourceDescriptor resourceDescriptor, 077 final SCIMQueryAttributes attributes, 078 final HttpServletRequest httpServletRequest) 079 { 080 super(baseURL, authenticatedUserID, resourceDescriptor, httpServletRequest); 081 this.attributes = attributes; 082 } 083 084 085 086 /** 087 * Create a new SCIM request from the provided information. 088 * 089 * @param baseURL The base URL for the SCIM service. 090 * @param authenticatedUserID The authenticated user name or {@code null} if 091 * the request is not authenticated. 092 * @param resourceDescriptor The ResourceDescriptor associated with this 093 * request. 094 * @param attributes The set of requested attributes. 095 * @param httpServletRequest The HTTP servlet request associated with this 096 * request or {@code null} if this request is not 097 * initiated by a servlet. 098 * @param ifMatchHeaderValue The If-Match header value. 099 * @param ifNoneMatchHeaderValue The If-None-Match header value. 100 */ 101 public ResourceReturningRequest(final URI baseURL, 102 final String authenticatedUserID, 103 final ResourceDescriptor resourceDescriptor, 104 final SCIMQueryAttributes attributes, 105 final HttpServletRequest httpServletRequest, 106 final String ifMatchHeaderValue, 107 final String ifNoneMatchHeaderValue) 108 { 109 super(baseURL, authenticatedUserID, resourceDescriptor, httpServletRequest, 110 ifMatchHeaderValue, ifNoneMatchHeaderValue); 111 this.attributes = attributes; 112 } 113 114 115 116 117 118 119 120 /** 121 * Get the set of requested attributes. 122 * 123 * @return The set of requested attributes. 124 */ 125 public SCIMQueryAttributes getAttributes() 126 { 127 return attributes; 128 } 129}