001    /*
002     * Copyright 2011-2012 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    
018    package com.unboundid.scim.sdk;
019    
020    import com.unboundid.scim.schema.ResourceDescriptor;
021    
022    import java.net.URI;
023    
024    
025    
026    /**
027     * This class represents a SCIM Post Resource request to create a new resource.
028     */
029    public final class PostResourceRequest extends ResourceReturningRequest
030    {
031      /**
032       * The contents of the resource to be created.
033       */
034      private final SCIMObject resourceObject;
035    
036    
037    
038      /**
039       * Create a new SCIM Post Resource request from the provided information.
040       *
041       * @param baseURL              The base URL for the SCIM service.
042       * @param authenticatedUserID  The authenticated user name or {@code null} if
043       *                             the request is not authenticated.
044       * @param resourceDescriptor   The ResourceDescriptor associated with this
045       *                             request.
046       * @param resourceObject       The contents of the resource to be created.
047       * @param attributes           The set of requested attributes.
048       */
049      public PostResourceRequest(final URI baseURL,
050                                 final String authenticatedUserID,
051                                 final ResourceDescriptor resourceDescriptor,
052                                 final SCIMObject resourceObject,
053                                 final SCIMQueryAttributes attributes)
054      {
055        super(baseURL, authenticatedUserID, resourceDescriptor, attributes);
056        this.resourceObject      = resourceObject;
057      }
058    
059    
060    
061      /**
062       * Get the contents of the resource to be created.
063       *
064       * @return  The contents of the resource to be created.
065       */
066      public SCIMObject getResourceObject()
067      {
068        return resourceObject;
069      }
070    }